Commit 96ca01e1 by 宋祥

1.登录绑定企业信息

parent 4ad3c20e
...@@ -136,8 +136,14 @@ public enum DdynamicEnum { ...@@ -136,8 +136,14 @@ public enum DdynamicEnum {
* 用途:项目档案下拉框 * 用途:项目档案下拉框
* 编写:wwl * 编写:wwl
*/ */
ORG_RECORD_BLOCK_ID("org_record_block_id","orgId","orgCname","HPXSOrg.queryComboBox"); ORG_RECORD_BLOCK_ID("org_record_block_id","orgId","orgCname","HPXSOrg.queryComboBox"),
/**
* 模块:用户企业
* 用途:项目档案下拉框
* 编写:wwl
*/
COMPANY_RECORD_BLOCK_ID("company_record_block_id","companyCode","companyName","HPXSUser.queryCompanyComboBox");
/** 将结果集放入的块名 */ /** 将结果集放入的块名 */
private final String blockId; private final String blockId;
......
...@@ -29,7 +29,7 @@ public class UserSessionUtils extends UserSession { ...@@ -29,7 +29,7 @@ public class UserSessionUtils extends UserSession {
*/ */
public static User getUser() { public static User getUser() {
EiInfo eiInfo = new EiInfo(); EiInfo eiInfo = new EiInfo();
eiInfo.set("loginName", UserSession.getLoginName()); eiInfo.set("userId", UserSession.getUserId());
eiInfo.set(EiConstant.serviceName, "HPXSUser"); eiInfo.set(EiConstant.serviceName, "HPXSUser");
eiInfo.set(EiConstant.methodName, "getUser"); eiInfo.set(EiConstant.methodName, "getUser");
EiInfo outInfo = XLocalManager.call(eiInfo); EiInfo outInfo = XLocalManager.call(eiInfo);
......
...@@ -131,9 +131,9 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -131,9 +131,9 @@ public class ServiceHPKC001 extends ServiceBase {
// 入库单号 // 入库单号
List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo"); List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo");
// 锁记录 // 锁记录
HPKCTools.lockKc001(otherEnterNos); HPKCTools.HpKc001.lock(otherEnterNos);
// 查询数据库记录 // 查询数据库记录
Map<String, HPKC001> mapKc001 = HPKCTools.mapKc001(otherEnterNos); Map<String, HPKC001> mapKc001 = HPKCTools.HpKc001.map(otherEnterNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC001 fKc001 = new HPKC001(); HPKC001 fKc001 = new HPKC001();
fKc001.fromMap(resultRows.get(i)); fKc001.fromMap(resultRows.get(i));
...@@ -199,9 +199,9 @@ public class ServiceHPKC001 extends ServiceBase { ...@@ -199,9 +199,9 @@ public class ServiceHPKC001 extends ServiceBase {
// 入库单号 // 入库单号
List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo"); List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo");
// 锁记录 // 锁记录
HPKCTools.lockKc001(otherEnterNos); HPKCTools.HpKc001.lock(otherEnterNos);
// 查询数据库记录 // 查询数据库记录
Map<String, HPKC001> mapKc001 = HPKCTools.mapKc001(otherEnterNos); Map<String, HPKC001> mapKc001 = HPKCTools.HpKc001.map(otherEnterNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC001 fKc001 = new HPKC001(); HPKC001 fKc001 = new HPKC001();
fKc001.fromMap(resultRows.get(i)); fKc001.fromMap(resultRows.get(i));
......
...@@ -89,9 +89,9 @@ public class ServiceHPKC002 extends ServiceBase { ...@@ -89,9 +89,9 @@ public class ServiceHPKC002 extends ServiceBase {
// 销售单号 // 销售单号
List<String> reqNos = ObjectUtils.listKey(resultRows, "reqNo"); List<String> reqNos = ObjectUtils.listKey(resultRows, "reqNo");
// 锁记录 // 锁记录
HPKCTools.lockKc002(reqNos); HPKCTools.HpKc002.lock(reqNos);
// 查询数据库记录 // 查询数据库记录
Map<String, HPKC002> dbMapKc002 = HPKCTools.mapKc002(reqNos); Map<String, HPKC002> dbMapKc002 = HPKCTools.HpKc002.map(reqNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC002 fKc002 = new HPKC002(); HPKC002 fKc002 = new HPKC002();
fKc002.fromMap(resultRows.get(i)); fKc002.fromMap(resultRows.get(i));
......
...@@ -162,9 +162,9 @@ public class ServiceHPKC005 extends ServiceBase { ...@@ -162,9 +162,9 @@ public class ServiceHPKC005 extends ServiceBase {
// 盘点单号 // 盘点单号
List<String> checkNos = ObjectUtils.listKey(resultRows, "checkNo"); List<String> checkNos = ObjectUtils.listKey(resultRows, "checkNo");
// 锁记录 // 锁记录
HPKCTools.lockKc005(checkNos); HPKCTools.HpKc005.lock(checkNos);
// 查询数据库记录 // 查询数据库记录
Map<String, HPKC005> mapKc005 = HPKCTools.mapKc005(checkNos); Map<String, HPKC005> mapKc005 = HPKCTools.HpKc005.map(checkNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC005 fKc005 = new HPKC005(); HPKC005 fKc005 = new HPKC005();
fKc005.fromMap(resultRows.get(i)); fKc005.fromMap(resultRows.get(i));
......
...@@ -133,9 +133,9 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -133,9 +133,9 @@ public class ServiceHPKC006 extends ServiceBase {
// 入库单号 // 入库单号
List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo"); List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo");
// 锁记录 // 锁记录
HPKCTools.lockKc006(otherEnterNos); HPKCTools.HpKc006.lock(otherEnterNos);
// 查询数据库记录 // 查询数据库记录
Map<String, HPKC006> mapKc006 = HPKCTools.mapKc006(otherEnterNos); Map<String, HPKC006> mapKc006 = HPKCTools.HpKc006.map(otherEnterNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC006 fKc006 = new HPKC006(); HPKC006 fKc006 = new HPKC006();
fKc006.fromMap(resultRows.get(i)); fKc006.fromMap(resultRows.get(i));
...@@ -201,9 +201,9 @@ public class ServiceHPKC006 extends ServiceBase { ...@@ -201,9 +201,9 @@ public class ServiceHPKC006 extends ServiceBase {
// 入库单号 // 入库单号
List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo"); List<String> otherEnterNos = ObjectUtils.listKey(resultRows, "otherEnterNo");
// 锁记录 // 锁记录
HPKCTools.lockKc006(otherEnterNos); HPKCTools.HpKc006.lock(otherEnterNos);
// 查询数据库记录 // 查询数据库记录
Map<String, HPKC006> mapKc006 = HPKCTools.mapKc006(otherEnterNos); Map<String, HPKC006> mapKc006 = HPKCTools.HpKc006.map(otherEnterNos);
for (int i = 0; i < resultRows.size(); i++) { for (int i = 0; i < resultRows.size(); i++) {
HPKC006 fKc006 = new HPKC006(); HPKC006 fKc006 = new HPKC006();
fKc006.fromMap(resultRows.get(i)); fKc006.fromMap(resultRows.get(i));
......
...@@ -23,12 +23,20 @@ import java.util.stream.Collectors; ...@@ -23,12 +23,20 @@ import java.util.stream.Collectors;
public class HPKCTools { public class HPKCTools {
/** /**
* HPKC001公共DAO定义
*
* @author:songx
* @date:2024/2/1,9:09
*/
public static class HpKc001 {
/**
* 锁 * 锁
* *
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
public static void lockKc001(List<String> otherEnterNos) { public static void lock(List<String> otherEnterNos) {
if (CollectionUtils.isEmpty(otherEnterNos)) { if (CollectionUtils.isEmpty(otherEnterNos)) {
return; return;
} }
...@@ -43,7 +51,7 @@ public class HPKCTools { ...@@ -43,7 +51,7 @@ public class HPKCTools {
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
public static List<HPKC001> listKc001(List<String> otherEnterNos) { public static List<HPKC001> list(List<String> otherEnterNos) {
if (CollectionUtils.isEmpty(otherEnterNos)) { if (CollectionUtils.isEmpty(otherEnterNos)) {
return null; return null;
} }
...@@ -58,13 +66,22 @@ public class HPKCTools { ...@@ -58,13 +66,22 @@ public class HPKCTools {
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
public static Map<String, HPKC001> mapKc001(List<String> otherEnterNos) { public static Map<String, HPKC001> map(List<String> otherEnterNos) {
List<HPKC001> results = listKc001(otherEnterNos); List<HPKC001> results = list(otherEnterNos);
if (CollectionUtils.isEmpty(results)) { if (CollectionUtils.isEmpty(results)) {
return null; return null;
} }
return results.stream().collect(Collectors.toMap(HPKC001::getPurchaseNo, item -> item)); return results.stream().collect(Collectors.toMap(HPKC001::getPurchaseNo, item -> item));
} }
}
/**
* HPKC002公共DAO定义
*
* @author:songx
* @date:2024/2/1,9:09
*/
public static class HpKc002 {
/** /**
* 锁 * 锁
...@@ -72,7 +89,7 @@ public class HPKCTools { ...@@ -72,7 +89,7 @@ public class HPKCTools {
* @param reqNos * @param reqNos
* @return * @return
*/ */
public static void lockKc002(List<String> reqNos) { public static void lock(List<String> reqNos) {
if (CollectionUtils.isEmpty(reqNos)) { if (CollectionUtils.isEmpty(reqNos)) {
return; return;
} }
...@@ -87,7 +104,7 @@ public class HPKCTools { ...@@ -87,7 +104,7 @@ public class HPKCTools {
* @param reqNos * @param reqNos
* @return * @return
*/ */
public static List<HPKC002> listKc002(List<String> reqNos) { public static List<HPKC002> list(List<String> reqNos) {
if (CollectionUtils.isEmpty(reqNos)) { if (CollectionUtils.isEmpty(reqNos)) {
return null; return null;
} }
...@@ -102,14 +119,16 @@ public class HPKCTools { ...@@ -102,14 +119,16 @@ public class HPKCTools {
* @param reqNos * @param reqNos
* @return * @return
*/ */
public static Map<String, HPKC002> mapKc002(List<String> reqNos) { public static Map<String, HPKC002> map(List<String> reqNos) {
List<HPKC002> results = listKc002(reqNos); List<HPKC002> results = list(reqNos);
if (CollectionUtils.isEmpty(results)) { if (CollectionUtils.isEmpty(results)) {
return null; return null;
} }
return results.stream().collect(Collectors.toMap(HPKC002::getReqNo, item -> item)); return results.stream().collect(Collectors.toMap(HPKC002::getReqNo, item -> item));
} }
}
/** /**
* HPKC004 公共方法定义 * HPKC004 公共方法定义
* *
...@@ -193,12 +212,20 @@ public class HPKCTools { ...@@ -193,12 +212,20 @@ public class HPKCTools {
} }
/** /**
* HPKC005公共DAO方法定义
*
* @author:songx
* @date:2024/1/31,16:36
*/
public static class HpKc005 {
/**
* 锁 * 锁
* *
* @param checkNos * @param checkNos
* @return * @return
*/ */
public static void lockKc005(List<String> checkNos) { public static void lock(List<String> checkNos) {
if (CollectionUtils.isEmpty(checkNos)) { if (CollectionUtils.isEmpty(checkNos)) {
return; return;
} }
...@@ -213,7 +240,7 @@ public class HPKCTools { ...@@ -213,7 +240,7 @@ public class HPKCTools {
* @param checkNos * @param checkNos
* @return * @return
*/ */
public static List<HPKC005> listKc005(List<String> checkNos) { public static List<HPKC005> list(List<String> checkNos) {
if (CollectionUtils.isEmpty(checkNos)) { if (CollectionUtils.isEmpty(checkNos)) {
return null; return null;
} }
...@@ -228,21 +255,31 @@ public class HPKCTools { ...@@ -228,21 +255,31 @@ public class HPKCTools {
* @param checkNos * @param checkNos
* @return * @return
*/ */
public static Map<String, HPKC005> mapKc005(List<String> checkNos) { public static Map<String, HPKC005> map(List<String> checkNos) {
List<HPKC005> results = listKc005(checkNos); List<HPKC005> results = list(checkNos);
if (CollectionUtils.isEmpty(results)) { if (CollectionUtils.isEmpty(results)) {
return null; return null;
} }
return results.stream().collect(Collectors.toMap(HPKC005::getCheckNo, item -> item)); return results.stream().collect(Collectors.toMap(HPKC005::getCheckNo, item -> item));
} }
}
/**
* HPKC006公共DAO方法定义
*
* @author:songx
* @date:2024/2/1,9:15
*/
public static class HpKc006 {
/** /**
* 锁 * 锁
* *
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
public static void lockKc006(List<String> otherEnterNos) { public static void lock(List<String> otherEnterNos) {
if (CollectionUtils.isEmpty(otherEnterNos)) { if (CollectionUtils.isEmpty(otherEnterNos)) {
return; return;
} }
...@@ -257,7 +294,7 @@ public class HPKCTools { ...@@ -257,7 +294,7 @@ public class HPKCTools {
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
public static List<HPKC006> listKc006(List<String> otherEnterNos) { public static List<HPKC006> list(List<String> otherEnterNos) {
if (CollectionUtils.isEmpty(otherEnterNos)) { if (CollectionUtils.isEmpty(otherEnterNos)) {
return null; return null;
} }
...@@ -272,14 +309,16 @@ public class HPKCTools { ...@@ -272,14 +309,16 @@ public class HPKCTools {
* @param otherEnterNos * @param otherEnterNos
* @return * @return
*/ */
public static Map<String, HPKC006> mapKc006(List<String> otherEnterNos) { public static Map<String, HPKC006> map(List<String> otherEnterNos) {
List<HPKC006> results = listKc006(otherEnterNos); List<HPKC006> results = list(otherEnterNos);
if (CollectionUtils.isEmpty(results)) { if (CollectionUtils.isEmpty(results)) {
return null; return null;
} }
return results.stream().collect(Collectors.toMap(HPKC006::getOtherEnterNo, item -> item)); return results.stream().collect(Collectors.toMap(HPKC006::getOtherEnterNo, item -> item));
} }
}
/** /**
* 锁 * 锁
* *
...@@ -378,7 +417,6 @@ public class HPKCTools { ...@@ -378,7 +417,6 @@ public class HPKCTools {
} }
/** /**
* HPKC011公共DAO方法定义 * HPKC011公共DAO方法定义
* *
......
package com.baosight.hpjx.hp.pz.service; package com.baosight.hpjx.hp.pz.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.core.constant.CommonConstant; import com.baosight.hpjx.core.constant.CommonConstant;
import com.baosight.hpjx.core.dao.DaoUtils; import com.baosight.hpjx.core.dao.DaoUtils;
import com.baosight.hpjx.hp.constant.HPConstant; import com.baosight.hpjx.hp.constant.HPConstant;
import com.baosight.hpjx.hp.pz.domain.HPPZ009; import com.baosight.hpjx.hp.pz.domain.HPPZ009;
import com.baosight.hpjx.hp.xs.tools.HPXSUserTools; import com.baosight.hpjx.hp.xs.tools.HPXSUserTools;
import com.baosight.hpjx.util.AssertUtils; import com.baosight.hpjx.util.AssertUtils;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.DateUtils; import com.baosight.hpjx.util.DateUtils;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.RsaUtils; import com.baosight.hpjx.util.RsaUtils;
import com.baosight.iplat4j.core.ei.EiConstant; import com.baosight.iplat4j.core.ei.EiConstant;
...@@ -18,6 +21,7 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession; ...@@ -18,6 +21,7 @@ import com.baosight.iplat4j.core.web.threadlocal.UserSession;
import com.baosight.iplat4j.ed.util.SequenceGenerator; import com.baosight.iplat4j.ed.util.SequenceGenerator;
import com.baosight.xservices.xs.constants.LoginConstants; import com.baosight.xservices.xs.constants.LoginConstants;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
......
package com.baosight.hpjx.hp.xs.service; package com.baosight.hpjx.hp.xs.service;
import com.baosight.hpjx.common.DdynamicEnum;
import com.baosight.hpjx.hp.xs.domain.User; import com.baosight.hpjx.hp.xs.domain.User;
import com.baosight.hpjx.util.CommonMethod;
import com.baosight.hpjx.util.EiInfoUtils;
import com.baosight.hpjx.util.LogUtils; import com.baosight.hpjx.util.LogUtils;
import com.baosight.hpjx.util.ObjectUtils;
import com.baosight.iplat4j.core.ei.EiInfo; import com.baosight.iplat4j.core.ei.EiInfo;
import com.baosight.iplat4j.core.service.impl.ServiceBase; import com.baosight.iplat4j.core.service.impl.ServiceBase;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -27,10 +32,10 @@ public class ServiceHPXSUser extends ServiceBase { ...@@ -27,10 +32,10 @@ public class ServiceHPXSUser extends ServiceBase {
int status = 0; int status = 0;
String msg = ""; String msg = "";
try { try {
String loginName = eiInfo.getString("loginName"); String userId = eiInfo.getString("userId");
if (StringUtils.isNotEmpty(loginName)) { if (StringUtils.isNotEmpty(userId)) {
Map map = new HashMap(); Map map = new HashMap();
map.put("loginName", loginName); map.put("userId", userId);
List<User> users = dao.query("HPXSUser.query", map); List<User> users = dao.query("HPXSUser.query", map);
if (users != null && users.size() > 0) { if (users != null && users.size() > 0) {
status = 1; status = 1;
...@@ -50,4 +55,25 @@ public class ServiceHPXSUser extends ServiceBase { ...@@ -50,4 +55,25 @@ public class ServiceHPXSUser extends ServiceBase {
return outInfo; return outInfo;
} }
/**
* 查询用户的一页下拉框
*
* @param inInfo
* @return
*/
public EiInfo queryCompanyComboBox(EiInfo inInfo) {
try {
Map queryMap = EiInfoUtils.getFirstRow(inInfo);
if (ObjectUtils.isNullBlank(queryMap.get("loginName"))) {
return inInfo;
}
List<DdynamicEnum> list = new ArrayList<>();
list.add(DdynamicEnum.COMPANY_RECORD_BLOCK_ID);
CommonMethod.initBlock(inInfo, list, queryMap, false);
} catch (Exception e) {
LogUtils.setMsg(inInfo, e, "查询企业失败");
}
return inInfo;
}
} }
...@@ -45,6 +45,17 @@ ...@@ -45,6 +45,17 @@
<include refid="condition"/> <include refid="condition"/>
</select> </select>
<!-- 查询用户企业 -->
<select id="queryCompanyComboBox" parameterClass="java.util.HashMap" resultClass="java.util.HashMap">
SELECT
A.COMPANY_CODE as "companyCode", <!-- 企业编码 -->
B.COMPANY_NAME as "companyName" <!-- 企业名称 -->
FROM ${platSchema}.XS_USER A, ${hpjxSchema}.T_HPPZ009 B
WHERE 1=1
AND A.COMPANY_CODE = B.COMPANY_CODE
AND A.LOGIN_NAME = #loginName#
</select>
<!-- 统计用户 --> <!-- 统计用户 -->
<select id="count" resultClass="int"> <select id="count" resultClass="int">
SELECT COUNT(1) SELECT COUNT(1)
......
...@@ -60,9 +60,11 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity ...@@ -60,9 +60,11 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity
int status = -1; int status = -1;
String msg = ""; String msg = "";
if (eiInfo.get("loginName") != null && eiInfo.get("password") != null) { if (eiInfo.get("loginName") != null && eiInfo.get("password") != null) {
String loginName = eiInfo.get("loginName").toString(); String companyCode = eiInfo.getString("companyCode");
String password = eiInfo.get("password").toString(); String loginName = eiInfo.getString("loginName");
String password = eiInfo.getString("password");
Map map = new HashMap(); Map map = new HashMap();
map.put("companyCode", companyCode);
map.put("loginName", loginName); map.put("loginName", loginName);
List user = dao.query("XSUser.queryForLogin", map); List user = dao.query("XSUser.queryForLogin", map);
String hashedPassword; String hashedPassword;
...@@ -125,8 +127,8 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity ...@@ -125,8 +127,8 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity
msg = msgSb.toString(); msg = msgSb.toString();
} else if (!"-1".equals(userMap.get("isLocked")) && !"-1".equals(userMap.get("status"))) { } else if (!"-1".equals(userMap.get("isLocked")) && !"-1".equals(userMap.get("status"))) {
// 登录校验增加企业是否启用 modify by songx at 2024-01-16 // 登录校验增加企业是否启用 modify by songx at 2024-01-16
String companyCode = (String) userMap.get("companyCode"); String dbCompanyCode = (String) userMap.get("companyCode");
if (StringUtils.isBlank(companyCode) || HPPZTools.isValid(companyCode)) { if (StringUtils.isBlank(dbCompanyCode) || HPPZTools.isValid(dbCompanyCode)) {
String pwdExpireDateString = (String) userMap.get("pwdExpireDate"); String pwdExpireDateString = (String) userMap.get("pwdExpireDate");
String accountExpireDateString = (String) userMap.get("accountExpireDate"); String accountExpireDateString = (String) userMap.get("accountExpireDate");
String nowDateString = DateUtils.curDateStr8(); String nowDateString = DateUtils.curDateStr8();
...@@ -263,12 +265,13 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity ...@@ -263,12 +265,13 @@ public class SecurityUserStandardImpl extends ServiceEPBase implements ISecurity
Map resultObject = null; Map resultObject = null;
int status = 0; int status = 0;
String msg = ""; String msg = "";
String companyCode = eiInfo.getString("companyCode");
String loginName = eiInfo.getString("loginName"); String loginName = eiInfo.getString("loginName");
try { try {
if (StringUtils.isNotEmpty(loginName)) { if (StringUtils.isNotEmpty(loginName)) {
Map map = new HashMap(); Map map = new HashMap();
map.put("loginName", loginName); map.put("loginName", loginName);
map.put("companyCode", companyCode);
List user = dao.query("XSUser.query", map); List user = dao.query("XSUser.query", map);
if (user != null && user.size() > 0) { if (user != null && user.size() > 0) {
status = 1; status = 1;
......
...@@ -57,6 +57,9 @@ ...@@ -57,6 +57,9 @@
<isNotEmpty prepend=" AND " property="userType"> <isNotEmpty prepend=" AND " property="userType">
USER_TYPE = #userType# USER_TYPE = #userType#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -114,6 +117,9 @@ ...@@ -114,6 +117,9 @@
<isNotEmpty prepend=" AND " property="userType"> <isNotEmpty prepend=" AND " property="userType">
user_type like ('%$userType$%') user_type like ('%$userType$%')
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
company_code = #companyCode#
</isNotEmpty>
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
......
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