Commit a792a45e by 宋祥

1.sql名称错误

parent d2c741ee
......@@ -419,6 +419,10 @@ public class HGSqlConstant {
*/
public class HgXsUser {
// 查询
public static final String QUERY = "HGXSUser.query";
// 查询
public static final String COUNT = "HGXSUser.count";
// 根据组织查询
public static final String QUERY_BY_ORG = "HGXSUser.queryByOrg";
}
......
......@@ -91,7 +91,6 @@
WHERE 1=1
AND A.ORG_ID = B.ORG_ID
AND B.USER_ID = C.USER_ID
AND C.LOGIN_NAME = #loginName#
<isNotEmpty prepend=" AND " property="accountCode">
A.ACCOUNT_CODE = #accountCode#
</isNotEmpty>
......
package com.baosight.hggp.hg.xs.tools;
import com.baosight.hggp.core.constant.CommonConstant;
import com.baosight.hggp.core.dao.DaoBase;
import com.baosight.hggp.core.enums.OrgTypeEnum;
import com.baosight.hggp.core.security.UserSessionUtils;
......@@ -48,7 +47,7 @@ public class HGXSTools {
AssertUtils.isEmpty(loginName, "用户登录名不能为空");
Map paramMap = new HashMap();
paramMap.put("loginName", loginName);
List<User> results = DaoBase.getInstance().query("HGXSUser.query", paramMap);
List<User> results = DaoBase.getInstance().query(HGSqlConstant.HgXsUser.QUERY, paramMap);
return CollectionUtils.isEmpty(results) ? null : results.get(0);
}
......@@ -77,7 +76,7 @@ public class HGXSTools {
}
Map queryMap = new HashMap();
queryMap.put("loginNames", loginNames);
return DaoBase.getInstance().query("HGXSUser.query", queryMap);
return DaoBase.getInstance().query(HGSqlConstant.HgXsUser.QUERY, queryMap);
}
/**
......@@ -103,7 +102,7 @@ public class HGXSTools {
public static int countByAccount(String accountCode) {
Map paramMap = new HashMap();
paramMap.put("accountCode", accountCode);
List<Integer> results = DaoBase.getInstance().query("HGXSUser.count", paramMap);
List<Integer> results = DaoBase.getInstance().query(HGSqlConstant.HgXsUser.COUNT, paramMap);
return CollectionUtils.isEmpty(results) ? 0 : results.get(0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment