From f106a3caf40487089b782ac5bdb51d8c4e1bf95a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=95=B8=E9=9D=9E?= <8153694@qq.com> Date: Sun, 28 Jul 2024 16:23:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=9B=AE=E5=BD=95=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../interceptor/AuthTokenServiceImpl.java | 9 - .../base/system/user/model/UserEntity.java | 52 +- .../base/system/user/model/UserEntityExt.java | 44 ++ .../xhx/base/system/user/model/UserQuery.java | 615 +++++++++++++++++- .../xhx/base/system/user/model/vo/UserVo.java | 6 +- .../model/CertificateCatalogEntity.java | 13 + .../model/CertificateCatalogQuery.java | 1 + .../impl/CertificateCatalogServiceImpl.java | 108 ++- .../resources/sqlmap/base/system/user.xml | 471 +++++++++++--- 9 files changed, 1176 insertions(+), 143 deletions(-) create mode 100644 one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java b/one-certificate-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java index 9a8a2d1..e901001 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/base/framework/interceptor/AuthTokenServiceImpl.java @@ -58,12 +58,7 @@ public class AuthTokenServiceImpl implements IAuthTokenService { // 浠ょ墝鍓嶇紑 @Value("${token.prefix:}") private String tokenPrefix; - // redis db - @Value("${spring.redis.database:}") - private Integer db; - @Value("${token.database:0}") - private Integer portalDb; protected static final Long SECOND = 1l; @@ -104,11 +99,7 @@ public class AuthTokenServiceImpl implements IAuthTokenService { Claims claims = parseToken(token); String uuid = (String) claims.get(SysConstains.LOGIN_USER_KEY); String userKey = getTokenKey(uuid); - //cacheService.select(portalDb); String userStr = cacheService.get(userKey); - /* RedisTemplate<String, String> redisTemplate = cacheService.selectDbRedisTemplate(portalDb); - String userStr =redisTemplate.opsForValue().get(userKey); -*/ //鍒锋柊token鏃堕棿 UserEntity userEntity = JSONObject.parseObject(userStr, UserEntity.class); if (!ObjectUtils.isEmpty(userEntity)) { diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java index 20f30ab..47af48c 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntity.java @@ -1,4 +1,5 @@ package com.mortals.xhx.base.system.user.model; +import com.mortals.framework.annotation.desensitization.MobileDesensitize; import com.mortals.framework.ap.SysConstains; import com.mortals.framework.service.IUser; import com.mortals.xhx.base.system.user.model.vo.UserVo; @@ -34,6 +35,7 @@ public class UserEntity extends UserVo implements IUser { /** * 鐢ㄦ埛鎵嬫満鍙� */ + @MobileDesensitize private String mobile; /** * 鐢ㄦ埛鑱旂郴鐢佃瘽 @@ -48,9 +50,19 @@ public class UserEntity extends UserVo implements IUser { */ private String qq; /** - * 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳,3.宸℃煡浜哄憳,4.绐楀彛璐熻矗浜�) */ private Integer userType; + + /** + * 鐢ㄦ埛鎵€灞為儴闂╥d + */ + private Long deptId; + /** + * 鎵€灞為儴闂ㄥ悕绉� + */ + private String deptName; + /** * 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧 */ @@ -76,7 +88,23 @@ public class UserEntity extends UserVo implements IUser { */ private String lastLoginAddress; + /** + * 鍛樺伐id + */ + private Long customerId; + + /** + * 閽夐拤userId + */ + private String dingUserId; + + public String getDingUserId() { + return dingUserId; + } + public void setDingUserId(String dingUserId) { + this.dingUserId = dingUserId; + } public UserEntity(){} /** @@ -100,6 +128,15 @@ public class UserEntity extends UserVo implements IUser { public String getLoginPwd(){ return loginPwd; } + + public void setDeptId(Long deptId) { + this.deptId = deptId; + } + + public void setDeptName(String deptName) { + this.deptName = deptName; + } + /** * 璁剧疆 鐧诲綍瀵嗙爜锛屼娇鐢╩d5鍙屾鍔犲瘑 * @param loginPwd @@ -132,6 +169,7 @@ public class UserEntity extends UserVo implements IUser { @Override public boolean isAdmin() { return super.getId() == null ? false : super.getId().longValue() == SysConstains.ADMIN_ID; + // return true; } @Override @@ -208,7 +246,7 @@ public class UserEntity extends UserVo implements IUser { this.qq = qq; } /** - * 鑾峰彇 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 鑾峰彇 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳,3.鏅€氬憳宸�) * @return Integer */ public Integer getUserType(){ @@ -224,17 +262,17 @@ public class UserEntity extends UserVo implements IUser { @Override public Long getDeptId() { - return null; + return this.deptId; } @Override public String getDeptName() { - return null; + return this.deptName; } @Override public Long getCustomerId() { - return null; + return this.customerId; } @Override @@ -339,7 +377,9 @@ public class UserEntity extends UserVo implements IUser { } - + public void setCustomerId(Long customerId) { + this.customerId = customerId; + } @Override public int hashCode() { diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java new file mode 100644 index 0000000..d5cedd5 --- /dev/null +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserEntityExt.java @@ -0,0 +1,44 @@ +package com.mortals.xhx.base.system.user.model; + +import com.mortals.framework.model.BaseEntityLong; +import lombok.Data; + +/** + * Description:User + * date: 2021-9-26 16:11:48 + */ +@Data +public class UserEntityExt extends BaseEntityLong { + /** + * 绔欑偣鍚嶇О + */ + private String siteName; + + private String roleIds; + /** + * 鍞竴鏍囪瘑 + */ + private String token; + /** + * 鑿滃崟鏍� + */ + private String menuUrl; + + /** + * 鐧诲綍鏃堕棿 + */ + private Long loginTime; + + /** + * 杩囨湡鏃堕棿 + */ + private Long expireTime; + + private Long deptId; + + private String deptName; + + + + +} \ No newline at end of file diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserQuery.java b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserQuery.java index 0b76d80..21e600e 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserQuery.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/UserQuery.java @@ -1,12 +1,12 @@ package com.mortals.xhx.base.system.user.model; - import java.util.List; + /** * 鐢ㄦ埛淇℃伅涓氬姟鏌ヨ瀵硅薄 * * @author zxfei - * @date 2022-07-06 + * @date 2023-03-09 */ public class UserQuery extends UserEntity { /** 寮€濮� 鐢ㄦ埛ID锛屼富閿紝鑷闀� */ @@ -21,48 +21,94 @@ public class UserQuery extends UserEntity { /** 鐢ㄦ埛ID锛屼富閿紝鑷闀垮垪琛� */ private List <Long> idList; + /** 鐢ㄦ埛ID锛屼富閿紝鑷闀挎帓闄ゅ垪琛� */ + private List <Long> idNotList; + /** 鐧诲綍鍚� */ private List<String> loginNameList; + /** 鐧诲綍鍚嶆帓闄ゅ垪琛� */ + private List <String> loginNameNotList; /** 鐧诲綍瀵嗙爜锛屼娇鐢╩d5鍙屾鍔犲瘑 */ private List<String> loginPwdList; + /** 鐧诲綍瀵嗙爜锛屼娇鐢╩d5鍙屾鍔犲瘑鎺掗櫎鍒楄〃 */ + private List <String> loginPwdNotList; /** 鐧诲綍闄愬埗鍦板潃锛屽涓狪P鍦板潃鐢ㄩ€楀彿鍒嗛殧锛屽彲浠ヤ娇鐢↖P娈靛尮閰嶏紝濡傦細172.17.*闈炵┖锛氬垯鍙兘璇ュ€煎唴鐨処P鍙互鐧诲綍 */ private List<String> loginLimitAddressList; + /** 鐧诲綍闄愬埗鍦板潃锛屽涓狪P鍦板潃鐢ㄩ€楀彿鍒嗛殧锛屽彲浠ヤ娇鐢↖P娈靛尮閰嶏紝濡傦細172.17.*闈炵┖锛氬垯鍙兘璇ュ€煎唴鐨処P鍙互鐧诲綍鎺掗櫎鍒楄〃 */ + private List <String> loginLimitAddressNotList; /** 鐢ㄦ埛鍚� */ private List<String> realNameList; + /** 鐢ㄦ埛鍚嶆帓闄ゅ垪琛� */ + private List <String> realNameNotList; /** 鐢ㄦ埛鎵嬫満鍙� */ private List<String> mobileList; + /** 鐢ㄦ埛鎵嬫満鍙锋帓闄ゅ垪琛� */ + private List <String> mobileNotList; /** 鐢ㄦ埛鑱旂郴鐢佃瘽 */ private List<String> phoneList; + /** 鐢ㄦ埛鑱旂郴鐢佃瘽鎺掗櫎鍒楄〃 */ + private List <String> phoneNotList; /** 鐢ㄦ埛閭 */ private List<String> emailList; + /** 鐢ㄦ埛閭鎺掗櫎鍒楄〃 */ + private List <String> emailNotList; /** QQ鍙风爜 */ private List<String> qqList; - /** 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) */ + /** QQ鍙风爜鎺掗櫎鍒楄〃 */ + private List <String> qqNotList; + /** 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) */ private Integer userTypeStart; - /** 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) */ + /** 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) */ private Integer userTypeEnd; - /** 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) */ + /** 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) */ private Integer userTypeIncrement; - /** 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳)鍒楄〃 */ + /** 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳)鍒楄〃 */ private List <Integer> userTypeList; + /** 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳)鎺掗櫎鍒楄〃 */ + private List <Integer> userTypeNotList; + + /** 寮€濮� 鐢ㄦ埛鎵€灞為儴闂╥d */ + private Long deptIdStart; + + /** 缁撴潫 鐢ㄦ埛鎵€灞為儴闂╥d */ + private Long deptIdEnd; + + /** 澧炲姞 鐢ㄦ埛鎵€灞為儴闂╥d */ + private Long deptIdIncrement; + + /** 鐢ㄦ埛鎵€灞為儴闂╥d鍒楄〃 */ + private List <Long> deptIdList; + + /** 鐢ㄦ埛鎵€灞為儴闂╥d鎺掗櫎鍒楄〃 */ + private List <Long> deptIdNotList; + + /** 鎵€灞為儴闂ㄥ悕绉� */ + private List<String> deptNameList; + + /** 鎵€灞為儴闂ㄥ悕绉版帓闄ゅ垪琛� */ + private List <String> deptNameNotList; /** 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧 */ private List<String> siteIdsList; + /** 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧鎺掗櫎鍒楄〃 */ + private List <String> siteIdsNotList; /** 鎵€灞炲尯鍩焎ode,澶氫釜閫楀彿鍒嗛殧 */ private List<String> areaCodesList; + /** 鎵€灞炲尯鍩焎ode,澶氫釜閫楀彿鍒嗛殧鎺掗櫎鍒楄〃 */ + private List <String> areaCodesNotList; /** 寮€濮� 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴) */ private Integer statusStart; @@ -75,6 +121,9 @@ public class UserQuery extends UserEntity { /** 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴)鍒楄〃 */ private List <Integer> statusList; + /** 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴)鎺掗櫎鍒楄〃 */ + private List <Integer> statusNotList; + /** 寮€濮� 鍒涘缓鏃堕棿 */ private String createTimeStart; @@ -93,9 +142,14 @@ public class UserQuery extends UserEntity { /** 鍒涘缓鐢ㄦ埛鍒楄〃 */ private List <Long> createUserIdList; + /** 鍒涘缓鐢ㄦ埛鎺掗櫎鍒楄〃 */ + private List <Long> createUserIdNotList; + /** 鍒涘缓鐢ㄦ埛鍚嶇О */ private List<String> createUserNameList; + /** 鍒涘缓鐢ㄦ埛鍚嶇О鎺掗櫎鍒楄〃 */ + private List <String> createUserNameNotList; /** 寮€濮� 鏈€鍚庝竴娆$櫥褰曟椂闂� */ private String lastLoginTimeStart; @@ -105,6 +159,16 @@ public class UserQuery extends UserEntity { /** 鏈€鍚庝竴娆$櫥褰曞湴鍧€ */ private List<String> lastLoginAddressList; + /** 鏈€鍚庝竴娆$櫥褰曞湴鍧€鎺掗櫎鍒楄〃 */ + private List <String> lastLoginAddressNotList; + + + /** 閽夐拤userId */ + private List<String> dingUserIdList; + + /** 閽夐拤userId鎺掗櫎鍒楄〃 */ + private List <String> dingUserIdNotList; + /** OR鏉′欢闆嗗悎锛屽垪琛ㄩ」涔嬮棿鏄疧R锛岄」鍐呭涔嬮棿鏄疉ND锛屽锛�(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ private List<UserQuery> orConditionList; @@ -177,6 +241,23 @@ public class UserQuery extends UserEntity { this.idList = idList; } + /** + * 鑾峰彇 鐢ㄦ埛ID锛屼富閿紝鑷闀� + * @return idNotList + */ + public List<Long> getIdNotList(){ + return this.idNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛ID锛屼富閿紝鑷闀� + * @param idNotList + */ + public void setIdNotList(List<Long> idNotList){ + this.idNotList = idNotList; + } + + /** * 鑾峰彇 鐧诲綍鍚� * @return loginNameList @@ -192,6 +273,23 @@ public class UserQuery extends UserEntity { public void setLoginNameList(List<String> loginNameList){ this.loginNameList = loginNameList; } + + /** + * 鑾峰彇 鐧诲綍鍚� + * @return loginNameNotList + */ + public List<String> getLoginNameNotList(){ + return this.loginNameNotList; + } + + /** + * 璁剧疆 鐧诲綍鍚� + * @param loginNameNotList + */ + public void setLoginNameNotList(List<String> loginNameNotList){ + this.loginNameNotList = loginNameNotList; + } + /** * 鑾峰彇 鐧诲綍瀵嗙爜锛屼娇鐢╩d5鍙屾鍔犲瘑 * @return loginPwdList @@ -207,6 +305,23 @@ public class UserQuery extends UserEntity { public void setLoginPwdList(List<String> loginPwdList){ this.loginPwdList = loginPwdList; } + + /** + * 鑾峰彇 鐧诲綍瀵嗙爜锛屼娇鐢╩d5鍙屾鍔犲瘑 + * @return loginPwdNotList + */ + public List<String> getLoginPwdNotList(){ + return this.loginPwdNotList; + } + + /** + * 璁剧疆 鐧诲綍瀵嗙爜锛屼娇鐢╩d5鍙屾鍔犲瘑 + * @param loginPwdNotList + */ + public void setLoginPwdNotList(List<String> loginPwdNotList){ + this.loginPwdNotList = loginPwdNotList; + } + /** * 鑾峰彇 鐧诲綍闄愬埗鍦板潃锛屽涓狪P鍦板潃鐢ㄩ€楀彿鍒嗛殧锛屽彲浠ヤ娇鐢↖P娈靛尮閰嶏紝濡傦細172.17.*闈炵┖锛氬垯鍙兘璇ュ€煎唴鐨処P鍙互鐧诲綍 * @return loginLimitAddressList @@ -222,6 +337,23 @@ public class UserQuery extends UserEntity { public void setLoginLimitAddressList(List<String> loginLimitAddressList){ this.loginLimitAddressList = loginLimitAddressList; } + + /** + * 鑾峰彇 鐧诲綍闄愬埗鍦板潃锛屽涓狪P鍦板潃鐢ㄩ€楀彿鍒嗛殧锛屽彲浠ヤ娇鐢↖P娈靛尮閰嶏紝濡傦細172.17.*闈炵┖锛氬垯鍙兘璇ュ€煎唴鐨処P鍙互鐧诲綍 + * @return loginLimitAddressNotList + */ + public List<String> getLoginLimitAddressNotList(){ + return this.loginLimitAddressNotList; + } + + /** + * 璁剧疆 鐧诲綍闄愬埗鍦板潃锛屽涓狪P鍦板潃鐢ㄩ€楀彿鍒嗛殧锛屽彲浠ヤ娇鐢↖P娈靛尮閰嶏紝濡傦細172.17.*闈炵┖锛氬垯鍙兘璇ュ€煎唴鐨処P鍙互鐧诲綍 + * @param loginLimitAddressNotList + */ + public void setLoginLimitAddressNotList(List<String> loginLimitAddressNotList){ + this.loginLimitAddressNotList = loginLimitAddressNotList; + } + /** * 鑾峰彇 鐢ㄦ埛鍚� * @return realNameList @@ -237,6 +369,23 @@ public class UserQuery extends UserEntity { public void setRealNameList(List<String> realNameList){ this.realNameList = realNameList; } + + /** + * 鑾峰彇 鐢ㄦ埛鍚� + * @return realNameNotList + */ + public List<String> getRealNameNotList(){ + return this.realNameNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛鍚� + * @param realNameNotList + */ + public void setRealNameNotList(List<String> realNameNotList){ + this.realNameNotList = realNameNotList; + } + /** * 鑾峰彇 鐢ㄦ埛鎵嬫満鍙� * @return mobileList @@ -252,6 +401,23 @@ public class UserQuery extends UserEntity { public void setMobileList(List<String> mobileList){ this.mobileList = mobileList; } + + /** + * 鑾峰彇 鐢ㄦ埛鎵嬫満鍙� + * @return mobileNotList + */ + public List<String> getMobileNotList(){ + return this.mobileNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛鎵嬫満鍙� + * @param mobileNotList + */ + public void setMobileNotList(List<String> mobileNotList){ + this.mobileNotList = mobileNotList; + } + /** * 鑾峰彇 鐢ㄦ埛鑱旂郴鐢佃瘽 * @return phoneList @@ -267,6 +433,23 @@ public class UserQuery extends UserEntity { public void setPhoneList(List<String> phoneList){ this.phoneList = phoneList; } + + /** + * 鑾峰彇 鐢ㄦ埛鑱旂郴鐢佃瘽 + * @return phoneNotList + */ + public List<String> getPhoneNotList(){ + return this.phoneNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛鑱旂郴鐢佃瘽 + * @param phoneNotList + */ + public void setPhoneNotList(List<String> phoneNotList){ + this.phoneNotList = phoneNotList; + } + /** * 鑾峰彇 鐢ㄦ埛閭 * @return emailList @@ -282,6 +465,23 @@ public class UserQuery extends UserEntity { public void setEmailList(List<String> emailList){ this.emailList = emailList; } + + /** + * 鑾峰彇 鐢ㄦ埛閭 + * @return emailNotList + */ + public List<String> getEmailNotList(){ + return this.emailNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛閭 + * @param emailNotList + */ + public void setEmailNotList(List<String> emailNotList){ + this.emailNotList = emailNotList; + } + /** * 鑾峰彇 QQ鍙风爜 * @return qqList @@ -297,8 +497,25 @@ public class UserQuery extends UserEntity { public void setQqList(List<String> qqList){ this.qqList = qqList; } + + /** + * 鑾峰彇 QQ鍙风爜 + * @return qqNotList + */ + public List<String> getQqNotList(){ + return this.qqNotList; + } + + /** + * 璁剧疆 QQ鍙风爜 + * @param qqNotList + */ + public void setQqNotList(List<String> qqNotList){ + this.qqNotList = qqNotList; + } + /** - * 鑾峰彇 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 鑾峰彇 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @return userTypeStart */ public Integer getUserTypeStart(){ @@ -306,7 +523,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeStart */ public void setUserTypeStart(Integer userTypeStart){ @@ -314,7 +531,7 @@ public class UserQuery extends UserEntity { } /** - * 鑾峰彇 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 鑾峰彇 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @return $userTypeEnd */ public Integer getUserTypeEnd(){ @@ -322,7 +539,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeEnd */ public void setUserTypeEnd(Integer userTypeEnd){ @@ -330,7 +547,7 @@ public class UserQuery extends UserEntity { } /** - * 鑾峰彇 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 鑾峰彇 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @return userTypeIncrement */ public Integer getUserTypeIncrement(){ @@ -338,7 +555,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeIncrement */ public void setUserTypeIncrement(Integer userTypeIncrement){ @@ -346,7 +563,7 @@ public class UserQuery extends UserEntity { } /** - * 鑾峰彇 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 鑾峰彇 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @return userTypeList */ public List<Integer> getUserTypeList(){ @@ -354,13 +571,143 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeList */ public void setUserTypeList(List<Integer> userTypeList){ this.userTypeList = userTypeList; } + /** + * 鑾峰彇 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) + * @return userTypeNotList + */ + public List<Integer> getUserTypeNotList(){ + return this.userTypeNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) + * @param userTypeNotList + */ + public void setUserTypeNotList(List<Integer> userTypeNotList){ + this.userTypeNotList = userTypeNotList; + } + + + /** + * 鑾峰彇 寮€濮� 鐢ㄦ埛鎵€灞為儴闂╥d + * @return deptIdStart + */ + public Long getDeptIdStart(){ + return this.deptIdStart; + } + + /** + * 璁剧疆 寮€濮� 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdStart + */ + public void setDeptIdStart(Long deptIdStart){ + this.deptIdStart = deptIdStart; + } + + /** + * 鑾峰彇 缁撴潫 鐢ㄦ埛鎵€灞為儴闂╥d + * @return $deptIdEnd + */ + public Long getDeptIdEnd(){ + return this.deptIdEnd; + } + + /** + * 璁剧疆 缁撴潫 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdEnd + */ + public void setDeptIdEnd(Long deptIdEnd){ + this.deptIdEnd = deptIdEnd; + } + + /** + * 鑾峰彇 澧炲姞 鐢ㄦ埛鎵€灞為儴闂╥d + * @return deptIdIncrement + */ + public Long getDeptIdIncrement(){ + return this.deptIdIncrement; + } + + /** + * 璁剧疆 澧炲姞 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdIncrement + */ + public void setDeptIdIncrement(Long deptIdIncrement){ + this.deptIdIncrement = deptIdIncrement; + } + + /** + * 鑾峰彇 鐢ㄦ埛鎵€灞為儴闂╥d + * @return deptIdList + */ + public List<Long> getDeptIdList(){ + return this.deptIdList; + } + + /** + * 璁剧疆 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdList + */ + public void setDeptIdList(List<Long> deptIdList){ + this.deptIdList = deptIdList; + } + + /** + * 鑾峰彇 鐢ㄦ埛鎵€灞為儴闂╥d + * @return deptIdNotList + */ + public List<Long> getDeptIdNotList(){ + return this.deptIdNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdNotList + */ + public void setDeptIdNotList(List<Long> deptIdNotList){ + this.deptIdNotList = deptIdNotList; + } + + + /** + * 鑾峰彇 鎵€灞為儴闂ㄥ悕绉� + * @return deptNameList + */ + public List<String> getDeptNameList(){ + return this.deptNameList; + } + + /** + * 璁剧疆 鎵€灞為儴闂ㄥ悕绉� + * @param deptNameList + */ + public void setDeptNameList(List<String> deptNameList){ + this.deptNameList = deptNameList; + } + + /** + * 鑾峰彇 鎵€灞為儴闂ㄥ悕绉� + * @return deptNameNotList + */ + public List<String> getDeptNameNotList(){ + return this.deptNameNotList; + } + + /** + * 璁剧疆 鎵€灞為儴闂ㄥ悕绉� + * @param deptNameNotList + */ + public void setDeptNameNotList(List<String> deptNameNotList){ + this.deptNameNotList = deptNameNotList; + } + /** * 鑾峰彇 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧 * @return siteIdsList @@ -376,6 +723,23 @@ public class UserQuery extends UserEntity { public void setSiteIdsList(List<String> siteIdsList){ this.siteIdsList = siteIdsList; } + + /** + * 鑾峰彇 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧 + * @return siteIdsNotList + */ + public List<String> getSiteIdsNotList(){ + return this.siteIdsNotList; + } + + /** + * 璁剧疆 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧 + * @param siteIdsNotList + */ + public void setSiteIdsNotList(List<String> siteIdsNotList){ + this.siteIdsNotList = siteIdsNotList; + } + /** * 鑾峰彇 鎵€灞炲尯鍩焎ode,澶氫釜閫楀彿鍒嗛殧 * @return areaCodesList @@ -391,6 +755,23 @@ public class UserQuery extends UserEntity { public void setAreaCodesList(List<String> areaCodesList){ this.areaCodesList = areaCodesList; } + + /** + * 鑾峰彇 鎵€灞炲尯鍩焎ode,澶氫釜閫楀彿鍒嗛殧 + * @return areaCodesNotList + */ + public List<String> getAreaCodesNotList(){ + return this.areaCodesNotList; + } + + /** + * 璁剧疆 鎵€灞炲尯鍩焎ode,澶氫釜閫楀彿鍒嗛殧 + * @param areaCodesNotList + */ + public void setAreaCodesNotList(List<String> areaCodesNotList){ + this.areaCodesNotList = areaCodesNotList; + } + /** * 鑾峰彇 寮€濮� 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴) * @return statusStart @@ -455,6 +836,23 @@ public class UserQuery extends UserEntity { this.statusList = statusList; } + /** + * 鑾峰彇 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴) + * @return statusNotList + */ + public List<Integer> getStatusNotList(){ + return this.statusNotList; + } + + /** + * 璁剧疆 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴) + * @param statusNotList + */ + public void setStatusNotList(List<Integer> statusNotList){ + this.statusNotList = statusNotList; + } + + /** * 鑾峰彇 寮€濮� 鍒涘缓鏃堕棿 * @return createTimeStart @@ -551,6 +949,23 @@ public class UserQuery extends UserEntity { this.createUserIdList = createUserIdList; } + /** + * 鑾峰彇 鍒涘缓鐢ㄦ埛 + * @return createUserIdNotList + */ + public List<Long> getCreateUserIdNotList(){ + return this.createUserIdNotList; + } + + /** + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserIdNotList + */ + public void setCreateUserIdNotList(List<Long> createUserIdNotList){ + this.createUserIdNotList = createUserIdNotList; + } + + /** * 鑾峰彇 鍒涘缓鐢ㄦ埛鍚嶇О * @return createUserNameList @@ -566,6 +981,23 @@ public class UserQuery extends UserEntity { public void setCreateUserNameList(List<String> createUserNameList){ this.createUserNameList = createUserNameList; } + + /** + * 鑾峰彇 鍒涘缓鐢ㄦ埛鍚嶇О + * @return createUserNameNotList + */ + public List<String> getCreateUserNameNotList(){ + return this.createUserNameNotList; + } + + /** + * 璁剧疆 鍒涘缓鐢ㄦ埛鍚嶇О + * @param createUserNameNotList + */ + public void setCreateUserNameNotList(List<String> createUserNameNotList){ + this.createUserNameNotList = createUserNameNotList; + } + /** * 鑾峰彇 寮€濮� 鏈€鍚庝竴娆$櫥褰曟椂闂� * @return lastLoginTimeStart @@ -613,6 +1045,23 @@ public class UserQuery extends UserEntity { public void setLastLoginAddressList(List<String> lastLoginAddressList){ this.lastLoginAddressList = lastLoginAddressList; } + + /** + * 鑾峰彇 鏈€鍚庝竴娆$櫥褰曞湴鍧€ + * @return lastLoginAddressNotList + */ + public List<String> getLastLoginAddressNotList(){ + return this.lastLoginAddressNotList; + } + + /** + * 璁剧疆 鏈€鍚庝竴娆$櫥褰曞湴鍧€ + * @param lastLoginAddressNotList + */ + public void setLastLoginAddressNotList(List<String> lastLoginAddressNotList){ + this.lastLoginAddressNotList = lastLoginAddressNotList; + } + /** * 璁剧疆 鐢ㄦ埛ID锛屼富閿紝鑷闀� * @param id @@ -658,6 +1107,15 @@ public class UserQuery extends UserEntity { return this; } + /** + * 璁剧疆 鐢ㄦ埛ID锛屼富閿紝鑷闀� + * @param idNotList + */ + public UserQuery idNotList(List<Long> idNotList){ + this.idNotList = idNotList; + return this; + } + /** * 璁剧疆 鐧诲綍鍚� @@ -811,7 +1269,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userType */ public UserQuery userType(Integer userType){ @@ -820,7 +1278,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 寮€濮� 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeStart */ public UserQuery userTypeStart(Integer userTypeStart){ @@ -829,7 +1287,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 缁撴潫 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeEnd */ public UserQuery userTypeEnd(Integer userTypeEnd){ @@ -838,7 +1296,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 澧炲姞 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeIncrement */ public UserQuery userTypeIncrement(Integer userTypeIncrement){ @@ -847,7 +1305,7 @@ public class UserQuery extends UserEntity { } /** - * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鏅€氱敤鎴�,2.宸ヤ綔浜哄憳) + * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) * @param userTypeList */ public UserQuery userTypeList(List<Integer> userTypeList){ @@ -855,6 +1313,88 @@ public class UserQuery extends UserEntity { return this; } + /** + * 璁剧疆 鐢ㄦ埛绫诲瀷(0.绯荤粺鐢ㄦ埛,1.鍚庡彴绠$悊,2.宸ヤ綔浜哄憳) + * @param userTypeNotList + */ + public UserQuery userTypeNotList(List<Integer> userTypeNotList){ + this.userTypeNotList = userTypeNotList; + return this; + } + + /** + * 璁剧疆 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptId + */ + public UserQuery deptId(Long deptId){ + setDeptId(deptId); + return this; + } + + /** + * 璁剧疆 寮€濮� 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdStart + */ + public UserQuery deptIdStart(Long deptIdStart){ + this.deptIdStart = deptIdStart; + return this; + } + + /** + * 璁剧疆 缁撴潫 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdEnd + */ + public UserQuery deptIdEnd(Long deptIdEnd){ + this.deptIdEnd = deptIdEnd; + return this; + } + + /** + * 璁剧疆 澧炲姞 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdIncrement + */ + public UserQuery deptIdIncrement(Long deptIdIncrement){ + this.deptIdIncrement = deptIdIncrement; + return this; + } + + /** + * 璁剧疆 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdList + */ + public UserQuery deptIdList(List<Long> deptIdList){ + this.deptIdList = deptIdList; + return this; + } + + /** + * 璁剧疆 鐢ㄦ埛鎵€灞為儴闂╥d + * @param deptIdNotList + */ + public UserQuery deptIdNotList(List<Long> deptIdNotList){ + this.deptIdNotList = deptIdNotList; + return this; + } + + + /** + * 璁剧疆 鎵€灞為儴闂ㄥ悕绉� + * @param deptName + */ + public UserQuery deptName(String deptName){ + setDeptName(deptName); + return this; + } + + /** + * 璁剧疆 鎵€灞為儴闂ㄥ悕绉� + * @param deptNameList + */ + public UserQuery deptNameList(List<String> deptNameList){ + this.deptNameList = deptNameList; + return this; + } + /** * 璁剧疆 鎵€灞炵珯鐐筰d,澶氫釜閫楀彿鍒嗛殧 @@ -938,6 +1478,15 @@ public class UserQuery extends UserEntity { return this; } + /** + * 璁剧疆 鐢ㄦ埛鐘舵€�(0.鍋滅敤锛�1.姝e父锛�2.鍐荤粨锛�3.閿€鎴凤紝4.绂昏亴) + * @param statusNotList + */ + public UserQuery statusNotList(List<Integer> statusNotList){ + this.statusNotList = statusNotList; + return this; + } + /** * 璁剧疆 鍒涘缓鐢ㄦ埛 @@ -984,6 +1533,15 @@ public class UserQuery extends UserEntity { return this; } + /** + * 璁剧疆 鍒涘缓鐢ㄦ埛 + * @param createUserIdNotList + */ + public UserQuery createUserIdNotList(List<Long> createUserIdNotList){ + this.createUserIdNotList = createUserIdNotList; + return this; + } + /** * 璁剧疆 鍒涘缓鐢ㄦ埛鍚嶇О @@ -1055,4 +1613,23 @@ public class UserQuery extends UserEntity { this.andConditionList = andConditionList; } + + /** + * 璁剧疆 閽夐拤userId + * @param dingUserId + */ + public UserQuery dingUserId(String dingUserId){ + setDingUserId(dingUserId); + return this; + } + + /** + * 璁剧疆 閽夐拤userId + * @param dingUserIdList + */ + public UserQuery dingUserIdList(List<String> dingUserIdList){ + this.dingUserIdList = dingUserIdList; + return this; + } + } \ No newline at end of file diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/vo/UserVo.java b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/vo/UserVo.java index 580370b..9b627c1 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/vo/UserVo.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/base/system/user/model/vo/UserVo.java @@ -4,6 +4,8 @@ package com.mortals.xhx.base.system.user.model.vo; import com.mortals.framework.model.BaseEntityLong; import lombok.Data; +import java.util.List; + /** * 鐢ㄦ埛淇℃伅涓氬姟瑙嗗浘瀵硅薄 * @@ -17,7 +19,7 @@ public class UserVo extends BaseEntityLong { */ private String siteName; - private String roleIds; + private List<Long> roleIds; /** * 鍞竴鏍囪瘑 */ @@ -36,4 +38,6 @@ public class UserVo extends BaseEntityLong { * 杩囨湡鏃堕棿 */ private Long expireTime; + + String roleIdStrs; } \ No newline at end of file diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogEntity.java b/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogEntity.java index a6d6b14..c18b2d9 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogEntity.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogEntity.java @@ -1,5 +1,6 @@ package com.mortals.xhx.module.certificate.model; import java.util.List; +import java.util.List; import java.util.ArrayList; import java.math.BigDecimal; import cn.hutool.core.date.DateUtil; @@ -8,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.mortals.framework.annotation.Excel; import com.mortals.framework.model.BaseEntityLong; import com.mortals.xhx.module.certificate.model.vo.CertificateCatalogVo; +import com.mortals.xhx.module.certificate.model.CertificateChildEntity; import lombok.Data; /** * 璇佺収鐩綍瀹炰綋瀵硅薄 @@ -99,6 +101,17 @@ public class CertificateCatalogEntity extends CertificateCatalogVo { * 鎵撳嵃鏈虹焊鐩� */ private String paperSource; + /** + * 鐩綍瀛愯瘉淇℃伅 + */ + private List<CertificateChildEntity> certificateChildList=new ArrayList<>();; + public List<CertificateChildEntity> getCertificateChildList(){ + return certificateChildList; + } + + public void setCertificateChildList(List<CertificateChildEntity> certificateChildList){ + this.certificateChildList = certificateChildList; + } @Override public int hashCode() { return this.getId().hashCode(); diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogQuery.java b/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogQuery.java index 64541eb..c5932f2 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogQuery.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/model/CertificateCatalogQuery.java @@ -1,5 +1,6 @@ package com.mortals.xhx.module.certificate.model; +import java.util.List; import java.util.List; import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity; /** diff --git a/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateCatalogServiceImpl.java b/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateCatalogServiceImpl.java index 81f04ee..c71f080 100644 --- a/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateCatalogServiceImpl.java +++ b/one-certificate-manager/src/main/java/com/mortals/xhx/module/certificate/service/impl/CertificateCatalogServiceImpl.java @@ -8,24 +8,32 @@ import com.mortals.xhx.common.code.ClassifyType; import com.mortals.xhx.common.utils.StringUtils; import com.mortals.xhx.module.certificate.dao.CertificateCatalogDao; import com.mortals.xhx.module.certificate.model.CertificateCatalogEntity; +import com.mortals.xhx.module.certificate.model.CertificateChildEntity; +import com.mortals.xhx.module.certificate.model.CertificateChildQuery; import com.mortals.xhx.module.certificate.model.CertificateClassifyEntity; import com.mortals.xhx.module.certificate.service.CertificateCatalogService; +import com.mortals.xhx.module.certificate.service.CertificateChildService; import com.mortals.xhx.module.certificate.service.CertificateClassifyService; import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; +import org.springframework.util.ObjectUtils; +import java.util.Arrays; +import java.util.Date; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** -* CertificateCatalogService -* 璇佺収鐩綍 service瀹炵幇 -* -* @author zxfei -* @date 2022-10-14 -*/ + * CertificateCatalogService + * 璇佺収鐩綍 service瀹炵幇 + * + * @author zxfei + * @date 2022-10-14 + */ @Service("certificateCatalogService") public class CertificateCatalogServiceImpl extends AbstractCRUDServiceImpl<CertificateCatalogDao, CertificateCatalogEntity, Long> implements CertificateCatalogService { @@ -41,21 +49,25 @@ public class CertificateCatalogServiceImpl extends AbstractCRUDServiceImpl<Certi @Autowired private CertificateClassifyService certificateClassifyService; + @Autowired + private CertificateChildService certificateChildService; + + @Override protected void saveBefore(CertificateCatalogEntity entity, Context context) throws AppException { - if(StringUtils.isEmpty(entity.getCatalogName())){ + if (StringUtils.isEmpty(entity.getCatalogName())) { throw new AppException("鐩綍鍚嶇О涓嶈兘涓虹┖"); } - if(StringUtils.isEmpty(entity.getCatalogCode())){ + if (StringUtils.isEmpty(entity.getCatalogCode())) { throw new AppException("鐩綍缂栫爜涓嶈兘涓虹┖"); } - if(entity.getHolderType()==null){ + if (entity.getHolderType() == null) { throw new AppException("鎸佹湁鑰呯被鍨嬩笉鑳戒负绌�"); } - if(entity.getClassifyId()==null){ + if (entity.getClassifyId() == null) { throw new AppException("鐩綍鍒嗙被涓嶈兘涓虹┖"); } - if(entity.getIndustryId()==null){ + if (entity.getIndustryId() == null) { throw new AppException("鎵€灞炶涓氫笉鑳戒负绌�"); } @@ -63,19 +75,19 @@ public class CertificateCatalogServiceImpl extends AbstractCRUDServiceImpl<Certi @Override protected void updateBefore(CertificateCatalogEntity entity, Context context) throws AppException { - if(StringUtils.isEmpty(entity.getCatalogName())){ + if (StringUtils.isEmpty(entity.getCatalogName())) { throw new AppException("鐩綍鍚嶇О涓嶈兘涓虹┖"); } - if(StringUtils.isEmpty(entity.getCatalogCode())){ + if (StringUtils.isEmpty(entity.getCatalogCode())) { throw new AppException("鐩綍缂栫爜涓嶈兘涓虹┖"); } - if(entity.getHolderType()==null){ + if (entity.getHolderType() == null) { throw new AppException("鎸佹湁鑰呯被鍨嬩笉鑳戒负绌�"); } - if(entity.getClassifyId()==null){ + if (entity.getClassifyId() == null) { throw new AppException("鐩綍鍒嗙被涓嶈兘涓虹┖"); } - if(entity.getIndustryId()==null){ + if (entity.getIndustryId() == null) { throw new AppException("鎵€灞炶涓氫笉鑳戒负绌�"); } @@ -84,7 +96,7 @@ public class CertificateCatalogServiceImpl extends AbstractCRUDServiceImpl<Certi @Override protected CertificateCatalogEntity findBefore(CertificateCatalogEntity params, PageInfo pageInfo, Context context) throws AppException { - if(StringUtils.isNotEmpty(params.getCatalogName())){ + if (StringUtils.isNotEmpty(params.getCatalogName())) { params.setCatalogName("%".concat(params.getCatalogName()).concat("%")); } return params; @@ -92,20 +104,72 @@ public class CertificateCatalogServiceImpl extends AbstractCRUDServiceImpl<Certi @Override protected void findAfter(CertificateCatalogEntity params, PageInfo pageInfo, Context context, List<CertificateCatalogEntity> list) throws AppException { - if(CollectionUtils.isNotEmpty(list)){ - for(CertificateCatalogEntity entity:list){ + if (CollectionUtils.isNotEmpty(list)) { + for (CertificateCatalogEntity entity : list) { CertificateClassifyEntity certificateClassifyEntity = certificateClassifyService.get(entity.getClassifyId()); - if(certificateClassifyEntity!=null){ + if (certificateClassifyEntity != null) { entity.setClassifyType(certificateClassifyEntity.getClassifyType()); - }else { + } else { entity.setClassifyType(ClassifyType.PRINCIPAL.getValue()); } } } + fillSubData(list); + } + + @Override + protected void findAfter(CertificateCatalogEntity params, Context context, List<CertificateCatalogEntity> list) throws AppException { + fillSubData(list); + super.findAfter(params, context, list); + } + + private void fillSubData(List<CertificateCatalogEntity> list) { + List<Long> idList = list.stream().map(i -> i.getId()).collect(Collectors.toList()); + CertificateChildQuery certificateChildQuery = new CertificateChildQuery(); + certificateChildQuery.setCatalogIdList(idList); + Map<Long, List<CertificateChildEntity>> certificateChildListMap = certificateChildService.find(certificateChildQuery).stream().collect(Collectors.groupingBy(CertificateChildEntity::getCatalogId)); + list.forEach(item -> item.setCertificateChildList(certificateChildListMap.get(item.getId()))); + } + + @Override + protected void saveAfter(CertificateCatalogEntity entity, Context context) throws AppException { + if (!ObjectUtils.isEmpty(entity.getCertificateChildList())) { + entity.getCertificateChildList().stream().peek(item -> { + item.setCatalogId(entity.getId()); + item.setCreateUserId(this.getContextUserId(context)); + item.setCreateTime(new Date()); + }).count(); + certificateChildService.save(entity.getCertificateChildList()); + } + super.saveAfter(entity, context); + } + + @Override + protected void updateAfter(CertificateCatalogEntity entity, Context context) throws AppException { + if (!ObjectUtils.isEmpty(entity.getCertificateChildList())) { + Long[] certificateChildIds = certificateChildService.find(new CertificateChildQuery().catalogId(entity.getId())).stream().map(CertificateChildEntity::getId).toArray(Long[]::new); + certificateChildService.remove(certificateChildIds, context); + entity.getCertificateChildList().stream().peek(item -> { + item.setCatalogId(entity.getId()); + item.setCreateUserId(this.getContextUserId(context)); + item.setCreateTime(new Date()); + item.setUpdateUserId(this.getContextUserId(context)); + item.setUpdateTime(new Date()); + }).count(); + certificateChildService.save(entity.getCertificateChildList()); + } + super.updateAfter(entity, context); + } + + @Override + protected void removeAfter(Long[] ids, Context context, int result) throws AppException { + List<CertificateChildEntity> certificateChildlist = certificateChildService.find(new CertificateChildQuery().catalogIdList(Arrays.asList(ids))); + certificateChildService.removeList(certificateChildlist, context); + super.removeAfter(ids, context, result); } - public static void main(String[] args){ + public static void main(String[] args) { // String excelFilePath = "D:/mortals/app/data/cpm/" + "excel/test1.xls"; // List<String> excelList = new ArrayList<>(); // excelList.add("i_1_濮撳悕"); diff --git a/one-certificate-manager/src/main/resources/sqlmap/base/system/user.xml b/one-certificate-manager/src/main/resources/sqlmap/base/system/user.xml index 0b1fd23..982c749 100644 --- a/one-certificate-manager/src/main/resources/sqlmap/base/system/user.xml +++ b/one-certificate-manager/src/main/resources/sqlmap/base/system/user.xml @@ -15,14 +15,18 @@ <result property="email" column="email" /> <result property="qq" column="qq" /> <result property="userType" column="userType" /> - <result property="siteIds" column="siteIds" /> - <result property="areaCodes" column="areaCodes" /> <result property="status" column="status" /> + <result property="customerId" column="customerId" /> <result property="createTime" column="createTime" /> <result property="createUserId" column="createUserId" /> <result property="createUserName" column="createUserName" /> <result property="lastLoginTime" column="lastLoginTime" /> <result property="lastLoginAddress" column="lastLoginAddress" /> + <result property="deptId" column="deptId" /> + <result property="deptName" column="deptName" /> + <result property="siteIds" column="siteIds" /> + <result property="areaCodes" column="areaCodes" /> + <result property="dingUserId" column="dingUserId" /> </resultMap> @@ -60,15 +64,12 @@ <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('userType') or colPickMode == 1 and data.containsKey('userType')))"> a.userType, </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteIds') or colPickMode == 1 and data.containsKey('siteIds')))"> - a.siteIds, - </if> - <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaCodes') or colPickMode == 1 and data.containsKey('areaCodes')))"> - a.areaCodes, - </if> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('status') or colPickMode == 1 and data.containsKey('status')))"> a.status, </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('customerId') or colPickMode == 1 and data.containsKey('customerId')))"> + a.customerId, + </if> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('createTime') or colPickMode == 1 and data.containsKey('createTime')))"> a.createTime, </if> @@ -84,23 +85,38 @@ <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('lastLoginAddress') or colPickMode == 1 and data.containsKey('lastLoginAddress')))"> a.lastLoginAddress, </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptId') or colPickMode == 1 and data.containsKey('deptId')))"> + a.deptId, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('deptName') or colPickMode == 1 and data.containsKey('deptName')))"> + a.deptName, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('siteIds') or colPickMode == 1 and data.containsKey('siteIds')))"> + a.siteIds, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('areaCodes') or colPickMode == 1 and data.containsKey('areaCodes')))"> + a.areaCodes, + </if> + <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('dingUserId') or colPickMode == 1 and data.containsKey('dingUserId')))"> + a.dingUserId, + </if> </trim> </sql> <!-- 鏂板 鍖哄垎涓婚敭鑷鍔犺繕鏄笟鍔℃彃鍏� --> <insert id="insert" parameterType="UserEntity" useGeneratedKeys="true" keyProperty="id"> insert into mortals_xhx_user - (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress) + (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,deptId,deptName,siteIds,areaCodes,dingUserId) VALUES - (#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{siteIds},#{areaCodes},#{status},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress}) + (#{loginName},#{loginPwd},#{loginLimitAddress},#{realName},#{mobile},#{phone},#{email},#{qq},#{userType},#{status},#{customerId},#{createTime},#{createUserId},#{createUserName},#{lastLoginTime},#{lastLoginAddress},#{deptId},#{deptName},#{siteIds},#{areaCodes},#{dingUserId}) </insert> <!-- 鎵归噺鏂板 --> <insert id="insertBatch" parameterType="paramDto"> insert into mortals_xhx_user - (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,siteIds,areaCodes,status,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress) + (loginName,loginPwd,loginLimitAddress,realName,mobile,phone,email,qq,userType,status,customerId,createTime,createUserId,createUserName,lastLoginTime,lastLoginAddress,deptId,deptName,siteIds,areaCodes,dingUserId) VALUES <foreach collection="data.dataList" item="item" index="index" separator="," > - (#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.siteIds},#{item.areaCodes},#{item.status},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress}) + (#{item.loginName},#{item.loginPwd},#{item.loginLimitAddress},#{item.realName},#{item.mobile},#{item.phone},#{item.email},#{item.qq},#{item.userType},#{item.status},#{item.customerId},#{item.createTime},#{item.createUserId},#{item.createUserName},#{item.lastLoginTime},#{item.lastLoginAddress},#{item.deptId},#{item.deptName},#{item.siteIds},#{item.areaCodes},#{item.dingUserId}) </foreach> </insert> @@ -140,18 +156,18 @@ <if test="(colPickMode==0 and data.containsKey('userTypeIncrement')) or (colPickMode==1 and !data.containsKey('userTypeIncrement'))"> a.userType=ifnull(a.userType,0) + #{data.userTypeIncrement}, </if> - <if test="(colPickMode==0 and data.containsKey('siteIds')) or (colPickMode==1 and !data.containsKey('siteIds'))"> - a.siteIds=#{data.siteIds}, - </if> - <if test="(colPickMode==0 and data.containsKey('areaCodes')) or (colPickMode==1 and !data.containsKey('areaCodes'))"> - a.areaCodes=#{data.areaCodes}, - </if> <if test="(colPickMode==0 and data.containsKey('status')) or (colPickMode==1 and !data.containsKey('status'))"> a.status=#{data.status}, </if> <if test="(colPickMode==0 and data.containsKey('statusIncrement')) or (colPickMode==1 and !data.containsKey('statusIncrement'))"> a.status=ifnull(a.status,0) + #{data.statusIncrement}, </if> + <if test="(colPickMode==0 and data.containsKey('customerId')) or (colPickMode==1 and !data.containsKey('customerId'))"> + a.customerId=#{data.customerId}, + </if> + <if test="(colPickMode==0 and data.containsKey('customerIdIncrement')) or (colPickMode==1 and !data.containsKey('customerIdIncrement'))"> + a.customerId=ifnull(a.customerId,0) + #{data.customerIdIncrement}, + </if> <if test="(colPickMode==0 and data.containsKey('createTime')) or (colPickMode==1 and !data.containsKey('createTime'))"> a.createTime=#{data.createTime}, </if> @@ -170,6 +186,24 @@ <if test="(colPickMode==0 and data.containsKey('lastLoginAddress')) or (colPickMode==1 and !data.containsKey('lastLoginAddress'))"> a.lastLoginAddress=#{data.lastLoginAddress}, </if> + <if test="(colPickMode==0 and data.containsKey('deptId')) or (colPickMode==1 and !data.containsKey('deptId'))"> + a.deptId=#{data.deptId}, + </if> + <if test="(colPickMode==0 and data.containsKey('deptIdIncrement')) or (colPickMode==1 and !data.containsKey('deptIdIncrement'))"> + a.deptId=ifnull(a.deptId,0) + #{data.deptIdIncrement}, + </if> + <if test="(colPickMode==0 and data.containsKey('deptName')) or (colPickMode==1 and !data.containsKey('deptName'))"> + a.deptName=#{data.deptName}, + </if> + <if test="(colPickMode==0 and data.containsKey('siteIds')) or (colPickMode==1 and !data.containsKey('siteIds'))"> + a.siteIds=#{data.siteIds}, + </if> + <if test="(colPickMode==0 and data.containsKey('areaCodes')) or (colPickMode==1 and !data.containsKey('areaCodes'))"> + a.areaCodes=#{data.areaCodes}, + </if> + <if test="(colPickMode==0 and data.containsKey('dingUserId')) or (colPickMode==1 and !data.containsKey('dingUserId'))"> + a.dingUserId=#{data.dingUserId}, + </if> </trim> <trim suffixOverrides="where" suffix=""> where @@ -250,20 +284,6 @@ </choose> </foreach> </trim> - <trim prefix="siteIds=(case" suffix="ELSE siteIds end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('siteIds')) or (colPickMode==1 and !item.containsKey('siteIds'))"> - when a.id=#{item.id} then #{item.siteIds} - </if> - </foreach> - </trim> - <trim prefix="areaCodes=(case" suffix="ELSE areaCodes end),"> - <foreach collection="data.dataList" item="item" index="index" separator="" > - <if test="(colPickMode==0 and item.containsKey('areaCodes')) or (colPickMode==1 and !item.containsKey('areaCodes'))"> - when a.id=#{item.id} then #{item.areaCodes} - </if> - </foreach> - </trim> <trim prefix="status=(case" suffix="ELSE status end),"> <foreach collection="data.dataList" item="item" index="index" separator="" > <choose> @@ -276,6 +296,18 @@ </choose> </foreach> </trim> + <trim prefix="customerId=(case" suffix="ELSE customerId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('customerId')) or (colPickMode==1 and !item.containsKey('customerId'))"> + when a.id=#{item.id} then #{item.customerId} + </when> + <when test="(colPickMode==0 and item.containsKey('customerIdIncrement')) or (colPickMode==1 and !item.containsKey('customerIdIncrement'))"> + when a.id=#{item.id} then ifnull(a.customerId,0) + #{item.customerIdIncrement} + </when> + </choose> + </foreach> + </trim> <trim prefix="createTime=(case" suffix="ELSE createTime end),"> <foreach collection="data.dataList" item="item" index="index" separator="" > <if test="(colPickMode==0 and item.containsKey('createTime')) or (colPickMode==1 and !item.containsKey('createTime'))"> @@ -316,6 +348,46 @@ </if> </foreach> </trim> + <trim prefix="deptId=(case" suffix="ELSE deptId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <choose> + <when test="(colPickMode==0 and item.containsKey('deptId')) or (colPickMode==1 and !item.containsKey('deptId'))"> + when a.id=#{item.id} then #{item.deptId} + </when> + <when test="(colPickMode==0 and item.containsKey('deptIdIncrement')) or (colPickMode==1 and !item.containsKey('deptIdIncrement'))"> + when a.id=#{item.id} then ifnull(a.deptId,0) + #{item.deptIdIncrement} + </when> + </choose> + </foreach> + </trim> + <trim prefix="deptName=(case" suffix="ELSE deptName end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('deptName')) or (colPickMode==1 and !item.containsKey('deptName'))"> + when a.id=#{item.id} then #{item.deptName} + </if> + </foreach> + </trim> + <trim prefix="siteIds=(case" suffix="ELSE siteIds end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('siteIds')) or (colPickMode==1 and !item.containsKey('siteIds'))"> + when a.id=#{item.id} then #{item.siteIds} + </if> + </foreach> + </trim> + <trim prefix="areaCodes=(case" suffix="ELSE areaCodes end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('areaCodes')) or (colPickMode==1 and !item.containsKey('areaCodes'))"> + when a.id=#{item.id} then #{item.areaCodes} + </if> + </foreach> + </trim> + <trim prefix="dingUserId=(case" suffix="ELSE dingUserId end),"> + <foreach collection="data.dataList" item="item" index="index" separator="" > + <if test="(colPickMode==0 and item.containsKey('dingUserId')) or (colPickMode==1 and !item.containsKey('dingUserId'))"> + when a.id=#{item.id} then #{item.dingUserId} + </if> + </foreach> + </trim> </trim> where id in <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> @@ -339,6 +411,21 @@ #{item} </foreach> </delete> + <!-- 鏍规嵁涓诲仴鍒楄〃鍒犻櫎涓€鎵癸紝閽堝鍗曚竴涓诲仴鏈夋晥 --> + <delete id="deleteByKeyList"> + delete from mortals_xhx_user where id in + <foreach collection="list" item="item" index="index" open="(" separator="," close=")"> + #{item} + </foreach> + </delete> + + <!-- 鏍规嵁瀵硅薄鍒楄〃鍒犻櫎涓€鎵癸紝閽堝鍗曚竴涓诲仴鏈夋晥 --> + <delete id="deleteByEntityList"> + delete from mortals_xhx_user where id in + <foreach collection="list" item="item" index="index" open="(" separator="," close=")"> + #{item.id} + </foreach> + </delete> <!-- 鏍规嵁paramDto鍒犻櫎涓€鎵� --> <delete id="deleteByMap" parameterType="paramDto"> delete a.* from mortals_xhx_user as a @@ -425,12 +512,18 @@ ${_conditionType_} a.id is null </if> </if> - <if test="conditionParamRef.containsKey('idList')"> + <if test="conditionParamRef.containsKey('idList') and conditionParamRef.idList.size() > 0"> ${_conditionType_} a.id in <foreach collection="conditionParamRef.idList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('idNotList') and conditionParamRef.idNotList.size() > 0"> + ${_conditionType_} a.id not in + <foreach collection="conditionParamRef.idNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('idStart') and conditionParamRef.idStart != null"> ${_conditionType_} a.id <![CDATA[ >= ]]> #{${_conditionParam_}.idStart} </if> @@ -447,12 +540,18 @@ ${_conditionType_} a.loginName is null </if> </if> - <if test="conditionParamRef.containsKey('loginNameList')"> + <if test="conditionParamRef.containsKey('loginNameList') and conditionParamRef.loginNameList.size() > 0"> ${_conditionType_} a.loginName in <foreach collection="conditionParamRef.loginNameList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('loginNameNotList') and conditionParamRef.loginNameNotList.size() > 0"> + ${_conditionType_} a.loginName not in + <foreach collection="conditionParamRef.loginNameNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('loginPwd')"> <if test="conditionParamRef.loginPwd != null and conditionParamRef.loginPwd != ''"> @@ -462,12 +561,18 @@ ${_conditionType_} a.loginPwd is null </if> </if> - <if test="conditionParamRef.containsKey('loginPwdList')"> + <if test="conditionParamRef.containsKey('loginPwdList') and conditionParamRef.loginPwdList.size() > 0"> ${_conditionType_} a.loginPwd in <foreach collection="conditionParamRef.loginPwdList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('loginPwdNotList') and conditionParamRef.loginPwdNotList.size() > 0"> + ${_conditionType_} a.loginPwd not in + <foreach collection="conditionParamRef.loginPwdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('loginLimitAddress')"> <if test="conditionParamRef.loginLimitAddress != null and conditionParamRef.loginLimitAddress != ''"> @@ -477,12 +582,18 @@ ${_conditionType_} a.loginLimitAddress is null </if> </if> - <if test="conditionParamRef.containsKey('loginLimitAddressList')"> + <if test="conditionParamRef.containsKey('loginLimitAddressList') and conditionParamRef.loginLimitAddressList.size() > 0"> ${_conditionType_} a.loginLimitAddress in <foreach collection="conditionParamRef.loginLimitAddressList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('loginLimitAddressNotList') and conditionParamRef.loginLimitAddressNotList.size() > 0"> + ${_conditionType_} a.loginLimitAddress not in + <foreach collection="conditionParamRef.loginLimitAddressNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('realName')"> <if test="conditionParamRef.realName != null and conditionParamRef.realName != ''"> @@ -492,12 +603,18 @@ ${_conditionType_} a.realName is null </if> </if> - <if test="conditionParamRef.containsKey('realNameList')"> + <if test="conditionParamRef.containsKey('realNameList') and conditionParamRef.realNameList.size() > 0"> ${_conditionType_} a.realName in <foreach collection="conditionParamRef.realNameList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('realNameNotList') and conditionParamRef.realNameNotList.size() > 0"> + ${_conditionType_} a.realName not in + <foreach collection="conditionParamRef.realNameNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('mobile')"> <if test="conditionParamRef.mobile != null and conditionParamRef.mobile != ''"> @@ -507,12 +624,18 @@ ${_conditionType_} a.mobile is null </if> </if> - <if test="conditionParamRef.containsKey('mobileList')"> + <if test="conditionParamRef.containsKey('mobileList') and conditionParamRef.mobileList.size() > 0"> ${_conditionType_} a.mobile in <foreach collection="conditionParamRef.mobileList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('mobileNotList') and conditionParamRef.mobileNotList.size() > 0"> + ${_conditionType_} a.mobile not in + <foreach collection="conditionParamRef.mobileNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('phone')"> <if test="conditionParamRef.phone != null and conditionParamRef.phone != ''"> @@ -522,12 +645,18 @@ ${_conditionType_} a.phone is null </if> </if> - <if test="conditionParamRef.containsKey('phoneList')"> + <if test="conditionParamRef.containsKey('phoneList') and conditionParamRef.phoneList.size() > 0"> ${_conditionType_} a.phone in <foreach collection="conditionParamRef.phoneList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('phoneNotList') and conditionParamRef.phoneNotList.size() > 0"> + ${_conditionType_} a.phone not in + <foreach collection="conditionParamRef.phoneNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('email')"> <if test="conditionParamRef.email != null and conditionParamRef.email != ''"> @@ -537,12 +666,18 @@ ${_conditionType_} a.email is null </if> </if> - <if test="conditionParamRef.containsKey('emailList')"> + <if test="conditionParamRef.containsKey('emailList') and conditionParamRef.emailList.size() > 0"> ${_conditionType_} a.email in <foreach collection="conditionParamRef.emailList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('emailNotList') and conditionParamRef.emailNotList.size() > 0"> + ${_conditionType_} a.email not in + <foreach collection="conditionParamRef.emailNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('qq')"> <if test="conditionParamRef.qq != null and conditionParamRef.qq != ''"> @@ -552,12 +687,18 @@ ${_conditionType_} a.qq is null </if> </if> - <if test="conditionParamRef.containsKey('qqList')"> + <if test="conditionParamRef.containsKey('qqList') and conditionParamRef.qqList.size() > 0"> ${_conditionType_} a.qq in <foreach collection="conditionParamRef.qqList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('qqNotList') and conditionParamRef.qqNotList.size() > 0"> + ${_conditionType_} a.qq not in + <foreach collection="conditionParamRef.qqNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('userType')"> <if test="conditionParamRef.userType != null "> ${_conditionType_} a.userType = #{${_conditionParam_}.userType} @@ -566,12 +707,18 @@ ${_conditionType_} a.userType is null </if> </if> - <if test="conditionParamRef.containsKey('userTypeList')"> + <if test="conditionParamRef.containsKey('userTypeList') and conditionParamRef.userTypeList.size() > 0"> ${_conditionType_} a.userType in <foreach collection="conditionParamRef.userTypeList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('userTypeNotList') and conditionParamRef.userTypeNotList.size() > 0"> + ${_conditionType_} a.userType not in + <foreach collection="conditionParamRef.userTypeNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('userTypeStart') and conditionParamRef.userTypeStart != null"> ${_conditionType_} a.userType <![CDATA[ >= ]]> #{${_conditionParam_}.userTypeStart} </if> @@ -579,36 +726,6 @@ ${_conditionType_} a.userType <![CDATA[ <= ]]> #{${_conditionParam_}.userTypeEnd} </if> - - <if test="conditionParamRef.containsKey('siteIds')"> - <if test="conditionParamRef.siteIds != null and conditionParamRef.siteIds != ''"> - ${_conditionType_} a.siteIds like #{${_conditionParam_}.siteIds} - </if> - <if test="conditionParamRef.siteIds == null"> - ${_conditionType_} a.siteIds is null - </if> - </if> - <if test="conditionParamRef.containsKey('siteIdsList')"> - ${_conditionType_} a.siteIds in - <foreach collection="conditionParamRef.siteIdsList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> - </if> - - <if test="conditionParamRef.containsKey('areaCodes')"> - <if test="conditionParamRef.areaCodes != null and conditionParamRef.areaCodes != ''"> - ${_conditionType_} a.areaCodes like #{${_conditionParam_}.areaCodes} - </if> - <if test="conditionParamRef.areaCodes == null"> - ${_conditionType_} a.areaCodes is null - </if> - </if> - <if test="conditionParamRef.containsKey('areaCodesList')"> - ${_conditionType_} a.areaCodes in - <foreach collection="conditionParamRef.areaCodesList" open="(" close=")" index="index" item="item" separator=","> - #{item} - </foreach> - </if> <if test="conditionParamRef.containsKey('status')"> <if test="conditionParamRef.status != null "> ${_conditionType_} a.status = #{${_conditionParam_}.status} @@ -617,12 +734,18 @@ ${_conditionType_} a.status is null </if> </if> - <if test="conditionParamRef.containsKey('statusList')"> + <if test="conditionParamRef.containsKey('statusList') and conditionParamRef.statusList.size() > 0"> ${_conditionType_} a.status in <foreach collection="conditionParamRef.statusList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('statusNotList') and conditionParamRef.statusNotList.size() > 0"> + ${_conditionType_} a.status not in + <foreach collection="conditionParamRef.statusNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('statusStart') and conditionParamRef.statusStart != null"> ${_conditionType_} a.status <![CDATA[ >= ]]> #{${_conditionParam_}.statusStart} </if> @@ -630,6 +753,33 @@ ${_conditionType_} a.status <![CDATA[ <= ]]> #{${_conditionParam_}.statusEnd} </if> + <if test="conditionParamRef.containsKey('customerId')"> + <if test="conditionParamRef.customerId != null "> + ${_conditionType_} a.customerId = #{${_conditionParam_}.customerId} + </if> + <if test="conditionParamRef.customerId == null"> + ${_conditionType_} a.customerId is null + </if> + </if> + <if test="conditionParamRef.containsKey('customerIdList') and conditionParamRef.customerIdList.size() > 0"> + ${_conditionType_} a.customerId in + <foreach collection="conditionParamRef.customerIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('customerIdNotList') and conditionParamRef.customerIdNotList.size() > 0"> + ${_conditionType_} a.customerId not in + <foreach collection="conditionParamRef.customerIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('customerIdStart') and conditionParamRef.customerIdStart != null"> + ${_conditionType_} a.customerId <![CDATA[ >= ]]> #{${_conditionParam_}.customerIdStart} + </if> + <if test="conditionParamRef.containsKey('customerIdEnd') and conditionParamRef.customerIdEnd != null"> + ${_conditionType_} a.customerId <![CDATA[ <= ]]> #{${_conditionParam_}.customerIdEnd} + </if> + <if test="conditionParamRef.containsKey('createTime')"> <if test="conditionParamRef.createTime != null "> @@ -653,12 +803,18 @@ ${_conditionType_} a.createUserId is null </if> </if> - <if test="conditionParamRef.containsKey('createUserIdList')"> + <if test="conditionParamRef.containsKey('createUserIdList') and conditionParamRef.createUserIdList.size() > 0"> ${_conditionType_} a.createUserId in <foreach collection="conditionParamRef.createUserIdList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('createUserIdNotList') and conditionParamRef.createUserIdNotList.size() > 0"> + ${_conditionType_} a.createUserId not in + <foreach collection="conditionParamRef.createUserIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('createUserIdStart') and conditionParamRef.createUserIdStart != null"> ${_conditionType_} a.createUserId <![CDATA[ >= ]]> #{${_conditionParam_}.createUserIdStart} </if> @@ -675,12 +831,18 @@ ${_conditionType_} a.createUserName is null </if> </if> - <if test="conditionParamRef.containsKey('createUserNameList')"> + <if test="conditionParamRef.containsKey('createUserNameList') and conditionParamRef.createUserNameList.size() > 0"> ${_conditionType_} a.createUserName in <foreach collection="conditionParamRef.createUserNameList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('createUserNameNotList') and conditionParamRef.createUserNameNotList.size() > 0"> + ${_conditionType_} a.createUserName not in + <foreach collection="conditionParamRef.createUserNameNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> <if test="conditionParamRef.containsKey('lastLoginTime')"> <if test="conditionParamRef.lastLoginTime != null "> @@ -705,12 +867,129 @@ ${_conditionType_} a.lastLoginAddress is null </if> </if> - <if test="conditionParamRef.containsKey('lastLoginAddressList')"> + <if test="conditionParamRef.containsKey('lastLoginAddressList') and conditionParamRef.lastLoginAddressList.size() > 0"> ${_conditionType_} a.lastLoginAddress in <foreach collection="conditionParamRef.lastLoginAddressList" open="(" close=")" index="index" item="item" separator=","> #{item} </foreach> </if> + <if test="conditionParamRef.containsKey('lastLoginAddressNotList') and conditionParamRef.lastLoginAddressNotList.size() > 0"> + ${_conditionType_} a.lastLoginAddress not in + <foreach collection="conditionParamRef.lastLoginAddressNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('deptId')"> + <if test="conditionParamRef.deptId != null "> + ${_conditionType_} a.deptId = #{${_conditionParam_}.deptId} + </if> + <if test="conditionParamRef.deptId == null"> + ${_conditionType_} a.deptId is null + </if> + </if> + <if test="conditionParamRef.containsKey('deptIdList') and conditionParamRef.deptIdList.size() > 0"> + ${_conditionType_} a.deptId in + <foreach collection="conditionParamRef.deptIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('deptIdNotList') and conditionParamRef.deptIdNotList.size() > 0"> + ${_conditionType_} a.deptId not in + <foreach collection="conditionParamRef.deptIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('deptIdStart') and conditionParamRef.deptIdStart != null"> + ${_conditionType_} a.deptId <![CDATA[ >= ]]> #{${_conditionParam_}.deptIdStart} + </if> + <if test="conditionParamRef.containsKey('deptIdEnd') and conditionParamRef.deptIdEnd != null"> + ${_conditionType_} a.deptId <![CDATA[ <= ]]> #{${_conditionParam_}.deptIdEnd} + </if> + + + <if test="conditionParamRef.containsKey('deptName')"> + <if test="conditionParamRef.deptName != null and conditionParamRef.deptName != ''"> + ${_conditionType_} a.deptName like #{${_conditionParam_}.deptName} + </if> + <if test="conditionParamRef.deptName == null"> + ${_conditionType_} a.deptName is null + </if> + </if> + <if test="conditionParamRef.containsKey('deptNameList') and conditionParamRef.deptNameList.size() > 0"> + ${_conditionType_} a.deptName in + <foreach collection="conditionParamRef.deptNameList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('deptNameNotList') and conditionParamRef.deptNameNotList.size() > 0"> + ${_conditionType_} a.deptName not in + <foreach collection="conditionParamRef.deptNameNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + + <if test="conditionParamRef.containsKey('siteIds')"> + <if test="conditionParamRef.siteIds != null and conditionParamRef.siteIds != ''"> + ${_conditionType_} a.siteIds like #{${_conditionParam_}.siteIds} + </if> + <if test="conditionParamRef.siteIds == null"> + ${_conditionType_} a.siteIds is null + </if> + </if> + <if test="conditionParamRef.containsKey('siteIdsList') and conditionParamRef.siteIdsList.size() > 0"> + ${_conditionType_} a.siteIds in + <foreach collection="conditionParamRef.siteIdsList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('siteIdsNotList') and conditionParamRef.siteIdsNotList.size() > 0"> + ${_conditionType_} a.siteIds not in + <foreach collection="conditionParamRef.siteIdsNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + + <if test="conditionParamRef.containsKey('areaCodes')"> + <if test="conditionParamRef.areaCodes != null and conditionParamRef.areaCodes != ''"> + ${_conditionType_} a.areaCodes like #{${_conditionParam_}.areaCodes} + </if> + <if test="conditionParamRef.areaCodes == null"> + ${_conditionType_} a.areaCodes is null + </if> + </if> + <if test="conditionParamRef.containsKey('areaCodesList') and conditionParamRef.areaCodesList.size() > 0"> + ${_conditionType_} a.areaCodes in + <foreach collection="conditionParamRef.areaCodesList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('areaCodesNotList') and conditionParamRef.areaCodesNotList.size() > 0"> + ${_conditionType_} a.areaCodes not in + <foreach collection="conditionParamRef.areaCodesNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + + <if test="conditionParamRef.containsKey('dingUserId')"> + <if test="conditionParamRef.dingUserId != null and conditionParamRef.dingUserId != ''"> + ${_conditionType_} a.dingUserId like #{${_conditionParam_}.dingUserId} + </if> + <if test="conditionParamRef.dingUserId == null"> + ${_conditionType_} a.dingUserId is null + </if> + </if> + <if test="conditionParamRef.containsKey('dingUserIdList') and conditionParamRef.dingUserIdList.size() > 0"> + ${_conditionType_} a.dingUserId in + <foreach collection="conditionParamRef.dingUserIdList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="conditionParamRef.containsKey('dingUserIdNotList') and conditionParamRef.dingUserIdNotList.size() > 0"> + ${_conditionType_} a.dingUserId not in + <foreach collection="conditionParamRef.dingUserIdNotList" open="(" close=")" index="index" item="item" separator=","> + #{item} + </foreach> + </if> </sql> <sql id="_orderCols_"> <if test="orderColList != null and !orderColList.isEmpty()"> @@ -774,21 +1053,16 @@ <if test='orderCol.userType != null and "DESC".equalsIgnoreCase(orderCol.userType)'>DESC</if> , </if> - <if test="orderCol.containsKey('siteIds')"> - a.siteIds - <if test='orderCol.siteIds != null and "DESC".equalsIgnoreCase(orderCol.siteIds)'>DESC</if> - , - </if> - <if test="orderCol.containsKey('areaCodes')"> - a.areaCodes - <if test='orderCol.areaCodes != null and "DESC".equalsIgnoreCase(orderCol.areaCodes)'>DESC</if> - , - </if> <if test="orderCol.containsKey('status')"> a.status <if test='orderCol.status != null and "DESC".equalsIgnoreCase(orderCol.status)'>DESC</if> , </if> + <if test="orderCol.containsKey('customerId')"> + a.customerId + <if test='orderCol.customerId != null and "DESC".equalsIgnoreCase(orderCol.customerId)'>DESC</if> + , + </if> <if test="orderCol.containsKey('createTime')"> a.createTime <if test='orderCol.createTime != null and "DESC".equalsIgnoreCase(orderCol.createTime)'>DESC</if> @@ -814,6 +1088,31 @@ <if test='orderCol.lastLoginAddress != null and "DESC".equalsIgnoreCase(orderCol.lastLoginAddress)'>DESC</if> , </if> + <if test="orderCol.containsKey('deptId')"> + a.deptId + <if test='orderCol.deptId != null and "DESC".equalsIgnoreCase(orderCol.deptId)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('deptName')"> + a.deptName + <if test='orderCol.deptName != null and "DESC".equalsIgnoreCase(orderCol.deptName)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('siteIds')"> + a.siteIds + <if test='orderCol.siteIds != null and "DESC".equalsIgnoreCase(orderCol.siteIds)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('areaCodes')"> + a.areaCodes + <if test='orderCol.areaCodes != null and "DESC".equalsIgnoreCase(orderCol.areaCodes)'>DESC</if> + , + </if> + <if test="orderCol.containsKey('dingUserId')"> + a.dingUserId + <if test='orderCol.dingUserId != null and "DESC".equalsIgnoreCase(orderCol.dingUserId)'>DESC</if> + , + </if> </trim> </if> </sql> -- 2.24.3