yunhao.wang 7 years ago
commit bbc849b3d1

@ -234,11 +234,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;
@ -283,9 +285,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++) {

@ -1,51 +0,0 @@
package cn.estsh.i3plus.pojo.model.flatform;
import cn.estsh.i3plus.pojo.platform.bean.*;
import io.swagger.annotations.ApiParam;
import lombok.Data;
import java.util.List;
import java.util.Set;
/**
* @Description :
* <pre>
* </br>
* </br>
* </br>
* </br>
* </br>
* </br>
* </pre>
*
* @Reference :
* @Author : wei.peng
* @Date : 2018-10-25 16:54
* @Modify :
**/
@Data
public class UserModel {
@ApiParam("用户对象信息")
private SysUser user;
@ApiParam("用户对象信息")
private SysUserInfo userInfo;
@ApiParam(value = "角色信息",access = "用户所拥有岗位信息集合")
private List<SysRole> roles;
@ApiParam(value = "角色信息",access = "用户所拥有岗位信息")
private SysRole role;
@ApiParam(value = "岗位信息",access = "用户所拥有岗位信息")
private Position position;
@ApiParam(value = "部门信息",access = "用户所拥有部门信息")
private Department department;
@ApiParam(value = "组织信息",access = "用户所拥有的组织信息")
private Organize organize;
}

@ -75,15 +75,15 @@ public class CoreHqlPack {
/**
*
* In
* @param columnName
* @return
*/
public static String packHqlIds(String columnName,String[] params){
StringBuffer result = new StringBuffer();
// 参数数组
HqlPack.getInPack(Arrays.toString(params),columnName,result);
// 参数数组 [1,2,3] -> "1,2,3"
HqlPack.getInPack(String.join(",",params),columnName,result);
return result.toString();
}

Loading…
Cancel
Save