|
|
@@ -77,7 +77,6 @@ public class SaveOwnerMemberCmd extends Cmd {
|
|
|
private IUserV1InnerServiceSMO userV1InnerServiceSMOImpl;
|
|
|
|
|
|
|
|
|
-
|
|
|
@Override
|
|
|
public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
|
|
|
Assert.jsonObjectHaveKey(reqJson, "name", "请求报文中未包含name");
|
|
|
@@ -89,6 +88,7 @@ public class SaveOwnerMemberCmd extends Cmd {
|
|
|
|
|
|
Assert.jsonObjectHaveKey(reqJson, "communityId", "请求报文中未包含communityId");
|
|
|
|
|
|
+ //todo 验证吗校验
|
|
|
if (reqJson.containsKey("msgCode")) {
|
|
|
SmsDto smsDto = new SmsDto();
|
|
|
smsDto.setTel(reqJson.getString("link"));
|
|
|
@@ -98,8 +98,18 @@ public class SaveOwnerMemberCmd extends Cmd {
|
|
|
throw new IllegalArgumentException(smsDto.getMsg());
|
|
|
}
|
|
|
}
|
|
|
+ //todo 校验手机号重复
|
|
|
+ String userValidate = MappingCache.getValue("USER_VALIDATE");
|
|
|
+ if ("ON".equals(userValidate)) {
|
|
|
+ String link = reqJson.getString("link");
|
|
|
+ OwnerDto ownerDto = new OwnerDto();
|
|
|
+ ownerDto.setLink(link);
|
|
|
+ ownerDto.setCommunityId(reqJson.getString("communityId"));
|
|
|
+ List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryAllOwners(ownerDto);
|
|
|
+ Assert.listIsNull(ownerDtos, "手机号重复,请重新输入");
|
|
|
+ }
|
|
|
|
|
|
- //属性校验
|
|
|
+ //todo 属性校验
|
|
|
Assert.judgeAttrValue(reqJson);
|
|
|
|
|
|
}
|