根据组织Id 集合、部门ID 集合 查询账号信息
parent
a6b20f4b59
commit
27648112d8
@ -0,0 +1,41 @@
|
||||
package cn.estsh.i3plus.core.apiservice.util;
|
||||
|
||||
import cn.estsh.i3plus.pojo.base.tool.HqlPack;
|
||||
import cn.estsh.i3plus.pojo.model.platform.UserDetailModel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Description :
|
||||
* @Reference :
|
||||
* @Author : Adair Peng
|
||||
* @CreateDate : 2018-12-26 19:22
|
||||
* @Modify:
|
||||
**/
|
||||
public class HqlModelPack {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 用户信息 复杂查询拼接
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
public static String packHqlSysUserByModelOrIds(UserDetailModel model, List<Long> idList){
|
||||
StringBuffer result = new StringBuffer();
|
||||
|
||||
// And
|
||||
HqlPack.getNumEqualPack(model.getUserStatus(),"userStatus",result);
|
||||
if(idList != null && idList.size() > 0){
|
||||
HqlPack.getInPack(StringUtils.join(idList, ","), "id", result);
|
||||
}
|
||||
|
||||
// Like
|
||||
HqlPack.getStringLikerPack(model.getInfoName(),"userName",result);
|
||||
HqlPack.getStringLikerPack(model.getInfoEmpNo(),"userEmpNo",result);
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue