Commit 5302e00c by huangjinxin

修改参数

1 parent 4cad62f4
......@@ -668,8 +668,8 @@ public class UserService {
PageResult<UserInfoSearch> pageResult = new PageResult<>();
String count = "select count(*) ";
String select = "SELECT su.*,sr.name roleName ";
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 ");
String limit = " ORDER BY su.createdTime DESC limit " + (search.getPage() - 1) * search.getSize() + "," + search.getSize();
StringBuffer querySql = new StringBuffer("from UserEntity su left join UserRoleEntity sur on su.id =sur.userId left JOIN RoleEntity sr on sr.id =sur.roleId where 1=1 ");
if (StringUtils.isNotBlank(search.getRoleId())) {
querySql.append("sr.id ='" + search.getRoleId() + "'");
}
......@@ -677,7 +677,7 @@ public class UserService {
querySql.append("su.source ='" + search.getSource() + "'");
}
if (null != search.getSource()) {
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("(su.engineerCode LIKE '%" + search.getQueryString() + "%' or su.nickname like '%" + search.getQueryString() + "%' or su.phone like '%" + search.getQueryString() + "%' or su.email like '%" + search.getQueryString() + "%' )");
}
BigInteger countNum = (BigInteger) entityManager.createQuery(count + querySql.toString()).getSingleResult();
if (countNum.intValue() == 0) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!