添加用户枚举

SQL BUG 修复
yun-zuoyi
wei.peng 7 years ago
parent f91d524cfe
commit a1bdbd827f

@ -233,11 +233,13 @@ public class CommonEnumUtil {
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum USER_STATUS {
NORMAL(1, "NORMAL", "正常"),
FREEZE(2, "FREEZE", "冻结"),
ABERRANT(3, "ABERRANT", "异常"),
RESIGNATION(4, "RESIGNATION", "离职"),
EXPIRE(5, "EXPIRE", "服务到期");
NORMAL(1, "正常", "正常_NORMAL"),
FREEZE(2, "冻结", "冻结_FREEZE"),
ABERRANT(3, "异常", "异常_ABERRANT"),
RESIGNATION(4, "离职", "离职_RESIGNATION"),
EXPIRE(5, "服务到期", "服务到期_EXPIRE"),
LOCKING(6, "锁定", "fa cell-fa fa-lock"),
ENABLE(7, "启用", "fa fa-success cell-fa fa-check");
private int value;
private String code;
@ -282,9 +284,18 @@ public class CommonEnumUtil {
}
}
/**
*
* 1
* 2
* 3
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_STATUS {
Enable(1, "启用", "fa fa-success cell-fa fa-check"), Disable(2, "禁止", "fa fa-disabled cell-fa fa-times-circle"), locking(3, "锁定", "fa cell-fa fa-lock");
ENABLE(1, "启用", "fa fa-success cell-fa fa-check"),
DISABLE(2, "禁止", "fa fa-disabled cell-fa fa-times-circle"),
LOCKING(3, "锁定", "fa cell-fa fa-lock");
private int value;
private String name;

@ -129,7 +129,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
@Override
public void deleteByProperties(String[] propName, Object[] propValue) {
if ((propName != null) && (propName.length > 0) && (propValue != null) && (propValue.length > 0) && (propValue.length == propName.length)) {
StringBuffer sb = new StringBuffer("delete from " + persistentClass.getName() + " o where ");
StringBuffer sb = new StringBuffer("delete from " + persistentClass.getName() + " o where 1=1 ");
appendQL(sb,propName,propValue);
Query query = entityManager.createQuery(sb.toString());
setParameter(query,propName,propValue);
@ -166,7 +166,7 @@ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRep
sb.append(propertyName[i] + " = :p_" + propertyName[i] + ",");
}
sb.deleteCharAt(sb.length() - 1);
sb.append(" where ");
sb.append(" where 1=1 ");
appendQL(sb, conditionName, conditionValue);
Query query = entityManager.createQuery(sb.toString());
for (int i = 0; i < propertyName.length; i++) {

Loading…
Cancel
Save