Commit 818beda2 by huangjinxin

添加日志

1 parent 2cb65f16
......@@ -674,13 +674,13 @@ public class UserService {
String limit = " ORDER BY su.CREATED_TIME DESC limit " + (search.getPage() - 1) * search.getSize() + "," + search.getSize();
StringBuffer querySql = new StringBuffer("from sys_user su left join sys_user_role sur on su.id =sur.user_id left JOIN sys_role sr on sr.id =sur.role_id where 1=1 ");
if (StringUtils.isNotBlank(search.getRoleId())) {
querySql.append("sr.id ='" + search.getRoleId() + "'");
querySql.append("and sr.id ='" + search.getRoleId() + "'");
}
if (null != search.getSource()) {
querySql.append("su.source =" + search.getSource() + " ");
querySql.append("and su.source =" + search.getSource() + " ");
}
if (null != search.getQueryString()) {
querySql.append("(su.engineer_code LIKE '%" + search.getQueryString() + "%' or su.nickname like '%" + search.getQueryString() + "%' or su.phone like '%" + search.getQueryString() + "%' or su.email like '%" + search.getQueryString() + "%' )");
querySql.append("and (su.engineer_code LIKE '%" + search.getQueryString() + "%' or su.nickname like '%" + search.getQueryString() + "%' or su.phone like '%" + search.getQueryString() + "%' or su.email like '%" + search.getQueryString() + "%' )");
}
log.info("countSql:" + (count + querySql.toString()));
BigInteger countNum = (BigInteger) entityManager.createNativeQuery(count + querySql.toString()).getSingleResult();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!