Browse Source

feat: 用户列表查询、认证参数校验

lixuesong 3 years ago
parent
commit
3a65cb4a86

+ 7 - 7
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/SysUserController.java

@@ -1435,14 +1435,14 @@ public class SysUserController {
 	 */
 	@GetMapping("/selectUserList")
 	public R selectUserList(Page page, UserDTO userDTO) {
-		if (StrUtil.isNotBlank(userDTO.getSubType())) {
-			String[] gigTypeArr = Stream.of(GigTypeEnum.values())
-					.map(GigTypeEnum::getCode)
-					.map(String::valueOf)
+
+		if (StrUtil.isNotBlank(userDTO.getSubjectLocation())) {
+			String[] locationArr = Stream.of(SubjectLocation.values())
+					.map(SubjectLocation::getType)
 					.toArray(String[]::new);
-			if (!ArrayUtil.containsAny(userDTO.getSubType().split(StrUtil.COMMA), gigTypeArr)) {
-				// 只接收已有的渠道类型值
-				userDTO.setSubType(null);
+			if (!ArrayUtil.containsAny(userDTO.getSubjectLocation().split(StrUtil.COMMA), locationArr)) {
+				// 只接收已有的税源地类型值
+				userDTO.setSubjectLocation(null);
 			}
 		}
 

+ 9 - 0
hnqz-upms/hnqz-upms-biz/src/main/java/com/qunzhixinxi/hnqz/admin/controller/SysUserSignCertController.java

@@ -129,6 +129,9 @@ public class SysUserSignCertController {
 		if (userSignCertDTO.getUserId() == null) {
 			return R.failed("userId不能为空");
 		}
+		if (userSignCertDTO.getSubjectLocation() == null) {
+			return R.failed("税源地不能为空");
+		}
 		return sysUserSignCertService.toSign(userSignCertDTO);
 	}
 
@@ -147,6 +150,9 @@ public class SysUserSignCertController {
 		if (StrUtil.isBlank(userSignCertDTO.getAgreementUrl())) {
 			return R.failed("协议不能为空");
 		}
+		if (userSignCertDTO.getSubjectLocation() == null) {
+			return R.failed("税源地不能为空");
+		}
 
 		sysUserSignCertService.signAgreement(userSignCertDTO);
 
@@ -166,6 +172,9 @@ public class SysUserSignCertController {
 		if (userSignCertDTO.getUserId() == null) {
 			return R.failed("userId不能为空");
 		}
+		if (userSignCertDTO.getSubjectLocation() == null) {
+			return R.failed("税源地不能为空");
+		}
 		if (!StrUtil.isAllNotBlank(userSignCertDTO.getIdCardFrontUrl(), userSignCertDTO.getIdCardBackUrl(),
 				userSignCertDTO.getCertVideo1Url(), userSignCertDTO.getCertVideo2Url())) {
 			return R.failed("身份证或视频信息不能为空");