|
|
@@ -15,10 +15,7 @@ import com.muchinfo.mtp3century.service.IUseraccountService;
|
|
|
import com.muchinfo.mtp3century.service.IWskhUserinfoService;
|
|
|
import com.muchinfo.mtp3century.utils.RedisServiceUtil;
|
|
|
import com.muchinfo.mtp3century.utils.SequenceIDGeneratorUtils;
|
|
|
-import com.muchinfo.mtp3common.enumtype.Constants;
|
|
|
-import com.muchinfo.mtp3common.enumtype.FunCodeConstants;
|
|
|
-import com.muchinfo.mtp3common.enumtype.SysConstants;
|
|
|
-import com.muchinfo.mtp3common.enumtype.SysEnums;
|
|
|
+import com.muchinfo.mtp3common.enumtype.*;
|
|
|
import com.muchinfo.mtp3common.utils.*;
|
|
|
import com.muchinfo.mtp3common.vo.AjaxResult;
|
|
|
import com.muchinfo.mtp3common.vo.PageResult;
|
|
|
@@ -104,16 +101,16 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
private IDivisionMapper iDivisionMapper;
|
|
|
|
|
|
@Override
|
|
|
- public PageResult<WskhUserinfo> queryByPage(String username, Integer pageNum, Integer pageSize) {
|
|
|
+ public PageResult<WskhUserinfo> queryByPage(String username, Integer pageNum, Integer pageSize, HttpServletRequest request) {
|
|
|
WskhUserinfo wskhUserinfoVo = new WskhUserinfo();
|
|
|
wskhUserinfoVo.setUsername(username);
|
|
|
wskhUserinfoVo.setUsertype(2);
|
|
|
//列表返回
|
|
|
IPage<WskhUserinfo> page = new Page<>(pageNum, pageSize);
|
|
|
- IPage<WskhUserinfo> wskhUserinfoVos = iWskhUserinfoMapper.selectByPage(page,wskhUserinfoVo);
|
|
|
+ IPage<WskhUserinfo> wskhUserinfoVos = iWskhUserinfoMapper.selectByPage(page, wskhUserinfoVo);
|
|
|
PageResult<WskhUserinfo> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
|
- pageResult.setMessage(Constants.Deal_Success_Message);
|
|
|
+ pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
|
|
|
pageResult.setPages(wskhUserinfoVos.getPages());
|
|
|
pageResult.setCurrent(wskhUserinfoVos.getCurrent());
|
|
|
pageResult.setTotal(wskhUserinfoVos.getTotal());
|
|
|
@@ -123,7 +120,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult<WskhUserinfo> queryDetail(Long userId) {
|
|
|
+ public AjaxResult<WskhUserinfo> queryDetail(Long userId, HttpServletRequest request) {
|
|
|
//获取解密的key
|
|
|
WskhUserinfo wskhUserinfo = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", userId));
|
|
|
if (StringUtils.isNotBlank(wskhUserinfo.getBankid())) {
|
|
|
@@ -144,32 +141,32 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
wskhUserinfo.setReferralname(referral.getAccountname());
|
|
|
}
|
|
|
}
|
|
|
- if(wskhUserinfo.getBrokerid() != null)
|
|
|
+ if (wskhUserinfo.getBrokerid() != null)
|
|
|
wskhUserinfo.setBrokername(iUseraccountMapper.selectOrganName(Long.valueOf(wskhUserinfo.getBrokerid())));
|
|
|
- if(wskhUserinfo.getAreaid() != null)
|
|
|
+ if (wskhUserinfo.getAreaid() != null)
|
|
|
wskhUserinfo.setAreaname(iUseraccountMapper.selectOrganName(wskhUserinfo.getAreaid()));
|
|
|
- if(wskhUserinfo.getMemberareaid() != null)
|
|
|
+ if (wskhUserinfo.getMemberareaid() != null)
|
|
|
wskhUserinfo.setMemberusername(iUseraccountMapper.selectOrganName(wskhUserinfo.getMemberareaid()));
|
|
|
if (wskhUserinfo.getDistrictid() != null)
|
|
|
wskhUserinfo.setPathname(iDivisionMapper.selectAreaPathName(wskhUserinfo.getDistrictid()) + wskhUserinfo.getCardaddress());
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message, wskhUserinfo);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"), wskhUserinfo);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult addAreainfo(WskhUserinfo vo, Systemmanager systemmanager) {
|
|
|
+ public AjaxResult addAreainfo(WskhUserinfo vo, Systemmanager systemmanager, HttpServletRequest request) {
|
|
|
List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>().eq("CARDTYPE", vo.getCardtype()).eq("CARDNUM", vo.getCardnum()));
|
|
|
if (!CollectionUtils.isEmpty(wskhBlacklists)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
// 机构开户证件号码是否唯一
|
|
|
String areaCardFlag = iCommonService.getSystemParam(Constants.REDIS_HEADER_SYSPARAM, Constants.SYSPARAM_CARD_NO);
|
|
|
// 验证证件号码是否存在
|
|
|
- if (areaCardFlag != null && areaCardFlag.equals("1") && iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(),null)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
|
|
|
+ if (areaCardFlag != null && areaCardFlag.equals("1") && iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(), null)) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
// 验证手机号是否存在
|
|
|
- if (StringUtils.isNotBlank(vo.getMobilephone()) && iCommonService.checkOranCardNumOrMobile(2, vo.getMobilephone(),null)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
|
|
|
+ if (StringUtils.isNotBlank(vo.getMobilephone()) && iCommonService.checkOranCardNumOrMobile(2, vo.getMobilephone(), null)) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//入库重新加密
|
|
|
encrypt(vo);
|
|
|
@@ -190,18 +187,18 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
iWskhUserinfoMapper.insert(vo);
|
|
|
} catch (Exception e) {
|
|
|
log.error("添加开户信息失败,请检查!失败原因:" + e);
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult updateAreainfo(WskhUserinfo vo, Systemmanager systemmanager) {
|
|
|
+ public AjaxResult updateAreainfo(WskhUserinfo vo, Systemmanager systemmanager, HttpServletRequest request) {
|
|
|
List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
|
|
|
.eq("CARDTYPE", vo.getCardtype())
|
|
|
.eq("CARDNUM", vo.getCardnum()));
|
|
|
if (CollectionUtils.isNotEmpty(wskhBlacklists)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
try {
|
|
|
// 机构开户证件号码是否唯一
|
|
|
@@ -210,7 +207,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
.eq("CARDNUM", vo.getCardnum())
|
|
|
.eq("USERID", vo.getUserid()));
|
|
|
if (areacardflag != null && areacardflag.equals("1") && CollectionUtils.isNotEmpty(wskhUserinfoList)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
WskhUserinfo base = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
|
|
|
BeanUtils.copyProperties(vo, base);
|
|
|
@@ -220,28 +217,28 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
iWskhUserinfoMapper.update(base, new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
|
|
|
} catch (Exception e) {
|
|
|
log.error("修改开户信息失败,请检查!失败原因:" + e);
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult reBack(Long userid) {
|
|
|
+ public AjaxResult reBack(Long userid, HttpServletRequest request) {
|
|
|
WskhUserinfo wskhUserinfo = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", userid));
|
|
|
if (wskhUserinfo != null) {
|
|
|
if (wskhUserinfo.getUserstate() != 2 && wskhUserinfo.getUserstate() != 4) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "非待审核状态,无法撤回");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_022.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
wskhUserinfo.setUserstate(1);
|
|
|
iWskhUserinfoMapper.update(wskhUserinfo, new QueryWrapper<WskhUserinfo>().eq("USERID", userid));
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult delete(Long userid) {
|
|
|
+ public AjaxResult delete(Long userid, HttpServletRequest request) {
|
|
|
iWskhUserinfoMapper.delete(new QueryWrapper<WskhUserinfo>().eq("USERID", userid));
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -252,27 +249,27 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
WskhUserinfo wui = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
|
|
|
if (Objects.isNull(wui)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已更新,请刷新数据");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
if (wui.getUserstate() != 2 && wui.getUserstate() != 4) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该机构信息已更新,请刷新数据");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_018.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
if (vo.getAuditflag() != 1) {
|
|
|
//不通过
|
|
|
wui.setUserstate(3);
|
|
|
if (vo.getRemark().length() > 80) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "审核拒绝原因不能超过80个字");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_020.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
wui.setRemark(vo.getRemark());
|
|
|
iWskhUserinfoMapper.update(wui, new QueryWrapper<WskhUserinfo>().eq("USERID", vo.getUserid()));
|
|
|
} else {
|
|
|
Useraccount isUa = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("USERID", Long.valueOf(vo.getAreacode())));
|
|
|
if (Objects.nonNull(isUa)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "机构代码重复");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_010.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//验证证件号码是否存在
|
|
|
- if (!iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(),null)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
|
|
|
+ if (!iCommonService.checkOranCardNumOrMobile(1, vo.getCardnum(), null)) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
if (wui.getUserinfotype() == 2) {
|
|
|
//机构类型为企业需 名称唯一,1:个人,2:企业
|
|
|
@@ -280,12 +277,12 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
.eq("customername", wui.getCustomername().trim())
|
|
|
.eq("userinfotype", 2));
|
|
|
if (CollectionUtils.isNotEmpty(userinfoList)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "名称已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_013.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
List<Systemmanager> list = iSystemmanagerMapper.selectList(new QueryWrapper<Systemmanager>().eq("logincode", vo.getSmlogincode().trim()));
|
|
|
if (CollectionUtils.isNotEmpty(list)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "管理员登录帐号重复");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_014.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//新增用户信息
|
|
|
List<Taaccount> taaccountList = insertUserAccount(vo, wui, systemmanager);
|
|
|
@@ -301,7 +298,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
if (vo.getAuditflag() == 1) {
|
|
|
//审核通过
|
|
|
for (Taaccount taaccount : taaccountList) {
|
|
|
- iSendMsgService.sendCustomerInfo(userinfo,taaccount.getAccountid(), "1", 3);
|
|
|
+ iSendMsgService.sendCustomerInfo(userinfo, taaccount.getAccountid(), "1", 3);
|
|
|
iSendMsgService.sendUserChangeMsg(taaccount.getAccountid(), taaccount.getUserid(),
|
|
|
SysEnums.UserOperateTypeEnum.ADD.getType(),
|
|
|
SysEnums.AccountOperateTypeEnum.ADD.getType(),
|
|
|
@@ -310,24 +307,24 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
- log.error("网上开户审核发送消息失败,失败原因:"+e);
|
|
|
+ log.error("网上开户审核发送消息失败,失败原因:" + e);
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("审核提交失败,失败原因:" + e);
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public PageResult<InvestorQueryResult> queryInvestorPage(InvestorQueryParam investorQueryParam) {
|
|
|
+ public PageResult<InvestorQueryResult> queryInvestorPage(InvestorQueryParam investorQueryParam, HttpServletRequest request) {
|
|
|
//列表返回
|
|
|
IPage<InvestorQueryResult> page = new Page<>(investorQueryParam.getPageNum(), investorQueryParam.getPageSize());
|
|
|
- IPage<InvestorQueryResult> investorQueryResults = iWskhUserinfoMapper.queryInvestorPage(page,investorQueryParam);
|
|
|
+ IPage<InvestorQueryResult> investorQueryResults = iWskhUserinfoMapper.queryInvestorPage(page, investorQueryParam);
|
|
|
PageResult<InvestorQueryResult> pageResult = new PageResult<>();
|
|
|
pageResult.setCode(Constants.Success_Code_Design);
|
|
|
- pageResult.setMessage(Constants.Deal_Success_Message);
|
|
|
+ pageResult.setMessage(AjaxResult.dealMsg(MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language")));
|
|
|
pageResult.setPages(investorQueryResults.getPages());
|
|
|
pageResult.setCurrent(investorQueryResults.getCurrent());
|
|
|
pageResult.setTotal(investorQueryResults.getTotal());
|
|
|
@@ -340,34 +337,34 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
public AjaxResult<WskhUserinfo> querySunDetail(Long userId, HttpServletRequest request) {
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
if (checkWskhAccountRole(systemmanager, userId)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "没有该用户的操作权限");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
- return queryDetail(userId);
|
|
|
+ return queryDetail(userId, request);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult editWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager) {
|
|
|
+ public AjaxResult editWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager, HttpServletRequest request) {
|
|
|
WskhUserinfo base = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("USERID", currentVo.getUserid()));
|
|
|
if (checkWskhAccountRole(systemmanager, currentVo.getUserid())) {
|
|
|
- return AjaxResult.success(Constants.Error_Code_Design, "没有该用户的操作权限");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
|
|
|
.eq("CARDTYPE", currentVo.getCardtype())
|
|
|
.eq("CARDNUM", currentVo.getCardnum()));
|
|
|
if (CollectionUtils.isNotEmpty(wskhBlacklists)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
Systemparam sysParam = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("PARAMCODE", Constants.SYSPARAM_CARD_NOTWO));
|
|
|
//验证证件号码是否唯一
|
|
|
if (!base.getCardnum().equals(EncryptionUtils.encryptByAES(currentVo.getCardnum()))) {
|
|
|
if (iCommonService.checkOranCardNumOrMobile(1, EncryptionUtils.encryptByAES(currentVo.getCardnum()), currentVo.getUserid()) && (sysParam == null) || "1".equals(sysParam.getParamvalue())) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
// 验证手机号是否唯一
|
|
|
if (!base.getMobilephone().equals(EncryptionUtils.encryptByAES(currentVo.getMobilephone()))) {
|
|
|
- if (iCommonService.checkOranCardNumOrMobile(2, EncryptionUtils.encryptByAES(currentVo.getMobilephone()),currentVo.getUserid())) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "手机号码已存在");
|
|
|
+ if (iCommonService.checkOranCardNumOrMobile(2, EncryptionUtils.encryptByAES(currentVo.getMobilephone()), currentVo.getUserid())) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
try {
|
|
|
@@ -376,20 +373,20 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
encrypt(currentVo);
|
|
|
base = (WskhUserinfo) SensitiveEncryptUtil.sensitiveEncrypt(base, null);
|
|
|
iWskhUserinfoMapper.update(base, new QueryWrapper<WskhUserinfo>().eq("USERID", currentVo.getUserid()));
|
|
|
- }catch (Exception e) {
|
|
|
+ } catch (Exception e) {
|
|
|
log.error("修改开户信息失败,请检查!失败原因:" + e);
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult addWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager) {
|
|
|
+ public AjaxResult addWskhUserinfo(WskhUserinfo currentVo, Systemmanager systemmanager, HttpServletRequest request) {
|
|
|
List<WskhBlacklist> wskhBlacklists = iWskhBlacklistMapper.selectList(new QueryWrapper<WskhBlacklist>()
|
|
|
.eq("CARDTYPE", currentVo.getCardtype())
|
|
|
.eq("CARDNUM", currentVo.getCardnum()));
|
|
|
if (CollectionUtils.isNotEmpty(wskhBlacklists)) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在黑名单中,不能开户");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
Systemparam sysParm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("PARAMCODE", Constants.SYSPARAM_CARD_NOTWO));
|
|
|
//校验唯一性
|
|
|
@@ -403,14 +400,14 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
if (sysParm == null || "1".equals(sysParm.getParamvalue())) {
|
|
|
if (StringUtils.isNotBlank(userinfo.getCardnum()) &&
|
|
|
userinfo.getCardnum().equals(EncryptionUtils.encryptByAES(currentVo.getCardnum()))) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(userinfo.getMobile()) &&
|
|
|
userinfo.getMobile().equals(
|
|
|
EncryptionUtils.encryptByAES(currentVo.getMobilephone()))) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -424,14 +421,14 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
if (sysParm == null || "1".equals(sysParm.getParamvalue())) {
|
|
|
if (StringUtils.isNotBlank(wskhUserinfo.getCardnum()) &&
|
|
|
wskhUserinfo.getCardnum().equals(EncryptionUtils.encryptByAES(currentVo.getCardnum()))) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "证件号码已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (StringUtils.isNotBlank(wskhUserinfo.getMobilephone()) &&
|
|
|
wskhUserinfo.getMobilephone().equals(
|
|
|
EncryptionUtils.encryptByAES(currentVo.getMobilephone()))) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "手机号已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -462,26 +459,26 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
iWskhUserinfoMapper.insert(currentVo);
|
|
|
} catch (Exception e) {
|
|
|
log.error("新增开户信息失败,请检查!失败原因:" + e);
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, Constants.Error_Code_Message);
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM002.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public AjaxResult investorProcess(InvestorProcessParam param, HttpServletRequest request){
|
|
|
- WskhUserinfo wui = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("userid",param.getAuditid()));
|
|
|
+ public AjaxResult investorProcess(InvestorProcessParam param, HttpServletRequest request) {
|
|
|
+ WskhUserinfo wui = iWskhUserinfoMapper.selectOne(new QueryWrapper<WskhUserinfo>().eq("userid", param.getAuditid()));
|
|
|
if (wui == null) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该投资者"+wui.getUsername()+"信息已更新,请刷新数据.");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_021.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
Systemmanager systemmanager = iSystemmanagerMapper.selectOne(new QueryWrapper<Systemmanager>().eq("LOGINCODE", iCommonService.getUserLoginCode(request)));
|
|
|
if (!checkWskhAccountRole(systemmanager, param.getAuditid())) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "没有该用户"+wui.getUsername()+"的操作权限,");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//已实名认证
|
|
|
param.setHasauth(1);
|
|
|
- String sp1006 = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM,"1006");
|
|
|
- if (!Strings.isNullOrEmpty(sp1006) && sp1006.equals("0")){
|
|
|
+ String sp1006 = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "1006");
|
|
|
+ if (!Strings.isNullOrEmpty(sp1006) && sp1006.equals("0")) {
|
|
|
// 1006 管理端开交易商是否默认已实名 默认为1, 中融为0(接的爱签四要素实名)
|
|
|
param.setHasauth(0);
|
|
|
}
|
|
|
@@ -497,12 +494,12 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
}
|
|
|
if (!sysFlag) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "系统维护中,请稍后再试.");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM007.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
//错误 #59041 投资者开户关联了推荐人,复审时,把推荐人注销,审核通过后,推荐人也得到了现金红包
|
|
|
if (!"".equals(wui.getReferral()) && null != wui.getReferral()) {
|
|
|
- Userinfo userinfo = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid",Long.parseLong(wui.getReferral())));
|
|
|
+ Userinfo userinfo = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", Long.parseLong(wui.getReferral())));
|
|
|
if (userinfo != null && userinfo.getUserstatus() == 2) {
|
|
|
//如果已经注销
|
|
|
wui.setReferral("");
|
|
|
@@ -513,7 +510,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
Systemparam sysParm = iSystemparamMapper.selectOne(new QueryWrapper<Systemparam>().eq("PARAMCODE", Constants.SYSPARAM_CARD_NOTWO));
|
|
|
//校验唯一性
|
|
|
List<Userinfo> userinfoList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
|
|
|
- .eq("cardnum", EncryptionUtils.encryptByAES(wui.getCardnum()))
|
|
|
+ .eq("cardnum", EncryptionUtils.encryptByAES(wui.getCardnum()))
|
|
|
.or()
|
|
|
.eq("mobile", EncryptionUtils.encryptByAES(wui.getMobilephone()))
|
|
|
.and(a -> a.eq("userstatus", 1)));
|
|
|
@@ -522,13 +519,13 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
if (sysParm == null || "1".equals(sysParm.getParamvalue())) {
|
|
|
if (StringUtils.isNotBlank(userinfo.getCardnum()) &&
|
|
|
userinfo.getCardnum().equals(EncryptionUtils.encryptByAES(wui.getCardnum()))) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该用户"+wui.getUsername()+"证件号码已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_011.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(userinfo.getMobile()) &&
|
|
|
userinfo.getMobile().equals(
|
|
|
EncryptionUtils.encryptByAES(wui.getMobilephone()))) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该用户"+wui.getUsername()+"手机号已存在");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_016.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -536,11 +533,11 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
|
|
|
if (systemmanager.getReletype() == 1) {
|
|
|
if (wui.getUserstate() != 2 && wui.getUserstate() != 4) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该投资者"+wui.getUsername()+"信息已更新,请刷新数据");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_021.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//平台管理员审核
|
|
|
if (param.getAuditflag() == 1) {
|
|
|
- AjaxResult result = checkOrgan(wui);
|
|
|
+ AjaxResult result = checkOrgan(wui, request);
|
|
|
if (result != null) {
|
|
|
return result;
|
|
|
}
|
|
|
@@ -555,7 +552,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
//不通过
|
|
|
wui.setUserstate(5);
|
|
|
if (param.getMsg().length() > 80) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "不通过原因不能超过80个字");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_020.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//不通过原因
|
|
|
wui.setRemark(param.getMsg());
|
|
|
@@ -564,10 +561,10 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
} else {
|
|
|
if (wui.getUserstate() != 2 && wui.getUserstate() != 4) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "该投资者"+wui.getUsername()+"信息已更新,请刷新数据");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_021.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
if (param.getAuditflag() == 1) {
|
|
|
- AjaxResult result = checkOrgan(wui);
|
|
|
+ AjaxResult result = checkOrgan(wui, request);
|
|
|
if (result != null) {
|
|
|
return result;
|
|
|
}
|
|
|
@@ -576,7 +573,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
} else {
|
|
|
wui.setUserstate(3);
|
|
|
if (param.getMsg().length() > 80) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "不通过原因不能超过80个字");
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_020.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
//不通过原因
|
|
|
wui.setRemark(param.getMsg());
|
|
|
@@ -584,11 +581,11 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
iWskhUserinfoMapper.updateById(wui);
|
|
|
}
|
|
|
}
|
|
|
- return AjaxResult.success(Constants.Success_Code_Design, Constants.Deal_Success_Message);
|
|
|
+ return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public void passauto(WskhUserinfo wui, Long userid, String countStr, Systemmanager user, InvestorProcessParam param){
|
|
|
+ public void passauto(WskhUserinfo wui, Long userid, String countStr, Systemmanager user, InvestorProcessParam param) {
|
|
|
|
|
|
String lpwd = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "046");
|
|
|
String zpwd = redisServiceUtil.getCacheMapValue(Constants.REDIS_HEADER_SYSPARAM, "047");
|
|
|
@@ -609,7 +606,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
ua.setCreatetime(new Date());
|
|
|
ua.setCreatorid(user.getAutoid());
|
|
|
ua.setParentuserid(wui.getAreaid());
|
|
|
- Useraccount parentUser = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",wui.getAreaid()));
|
|
|
+ Useraccount parentUser = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", wui.getAreaid()));
|
|
|
if (parentUser != null) {
|
|
|
ua.setSubarealevelpath(parentUser.getSubarealevelpath() + userid.toString() + ",");
|
|
|
}
|
|
|
@@ -660,7 +657,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
Enumdicitem item = iEnumdicitemMapper.selectOne(new QueryWrapper<Enumdicitem>()
|
|
|
.eq("enumdiccode", "certificatetype")
|
|
|
.eq("enumitemname", Long.valueOf(wui.getCardtype())));
|
|
|
- Certificatetypeconfig config = iCertificatetypeconfigMapper.selectOne(new QueryWrapper<Certificatetypeconfig>().eq("enumdicitemid",item.getAutoid()));
|
|
|
+ Certificatetypeconfig config = iCertificatetypeconfigMapper.selectOne(new QueryWrapper<Certificatetypeconfig>().eq("enumdicitemid", item.getAutoid()));
|
|
|
if (config != null) {
|
|
|
ui.setUserinfotype(config.getIsperson() == 2 ? 2 : 1);
|
|
|
} else {
|
|
|
@@ -786,7 +783,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
|
|
|
if (wui.getOpenmode() == 11 || wui.getOpenmode() == 12) {
|
|
|
- WskhUserauthinfo wuai = iWskhUserauthinfoMapper.selectOne(new QueryWrapper<WskhUserauthinfo>().eq("userid",wui.getUserid()));
|
|
|
+ WskhUserauthinfo wuai = iWskhUserauthinfoMapper.selectOne(new QueryWrapper<WskhUserauthinfo>().eq("userid", wui.getUserid()));
|
|
|
|
|
|
Userauthinfo uai = new Userauthinfo();
|
|
|
uai.setAuthid(wuai.getAuthid());
|
|
|
@@ -815,7 +812,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
smsbuilder.addParamValues(loginid.toString());
|
|
|
smsbuilder.addParamValues(lpwd);
|
|
|
smsbuilder.addParamValues(zpwd);
|
|
|
- smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",ua.getParentuserid())).
|
|
|
+ smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", ua.getParentuserid())).
|
|
|
getAccountname().replaceAll("\\*", "-"));
|
|
|
|
|
|
// 添加消息头
|
|
|
@@ -834,11 +831,11 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
|
|
|
private Long getOrganMaxinvestornum(Long memberareaid) {
|
|
|
- Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",memberareaid));
|
|
|
+ Useraccount ua = iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", memberareaid));
|
|
|
if (Objects.nonNull(ua)) {
|
|
|
long num = ua.getMaxinvestornum() == null ? 0 : ua.getMaxinvestornum();
|
|
|
ua.setMaxinvestornum(num + 1);
|
|
|
- iUseraccountMapper.update(ua,new QueryWrapper<Useraccount>().eq("userid",ua.getUserid()));
|
|
|
+ iUseraccountMapper.update(ua, new QueryWrapper<Useraccount>().eq("userid", ua.getUserid()));
|
|
|
return ua.getMaxinvestornum();
|
|
|
}
|
|
|
return 0L;
|
|
|
@@ -855,7 +852,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
smsbuilder.addRecvPhone(EncryptionUtils.decryptForAES(wui.getMobilephone()));
|
|
|
smsbuilder.addParamValues(wui.getUsername().replaceAll("\\*", "-")); //用户名称
|
|
|
smsbuilder.addParamValues(wui.getRemark().replaceAll("\\*", "-"));
|
|
|
- smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid",wui.getAreaid())).
|
|
|
+ smsbuilder.addParamValues(iUseraccountMapper.selectOne(new QueryWrapper<Useraccount>().eq("userid", wui.getAreaid())).
|
|
|
getAccountname().replaceAll("\\*", "-"));
|
|
|
|
|
|
// 添加消息头
|
|
|
@@ -871,7 +868,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
|
|
|
|
|
|
- public AjaxResult checkOrgan(WskhUserinfo wui) {
|
|
|
+ public AjaxResult checkOrgan(WskhUserinfo wui, HttpServletRequest request) {
|
|
|
Long[] ids = new Long[3];
|
|
|
if (wui.getMemberareaid() != null) {
|
|
|
ids[0] = wui.getMemberareaid();
|
|
|
@@ -885,13 +882,21 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
Map<String, Object> result = new HashMap<String, Object>();
|
|
|
result.put("userid", ids);
|
|
|
List<Useraccount> organ = iUseraccountMapper.selectList(new QueryWrapper<Useraccount>()
|
|
|
- .in("userid",ids));
|
|
|
+ .in("userid", ids));
|
|
|
|
|
|
- if (organ != null && !organ.isEmpty()) {
|
|
|
+ if (CollectionUtils.isNotEmpty(organ)) {
|
|
|
for (Useraccount ua : organ) {
|
|
|
- if (ua.getAccountstatus() != 4) {
|
|
|
- return AjaxResult.error(Constants.Error_Code_Design, "所属" + (ua.getUsertype() == 2 ? "会员" :
|
|
|
- (ua.getUsertype() == 3 ? "机构" : "经纪人")) + "为非正常状态,无法审核通过");
|
|
|
+
|
|
|
+ if (ua.getAccountstatus() == 4) {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (ua.getUsertype() == 2) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_023.getCode(), request.getHeader("Accept-Language"));
|
|
|
+ } else if (ua.getUsertype() == 3) {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_024.getCode(), request.getHeader("Accept-Language"));
|
|
|
+ } else {
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.ORGAN_ERROR_CODE_025.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -991,7 +996,7 @@ public class WskhUserinfoServiceImpl extends ServiceImpl<IWskhUserinfoMapper, Ws
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private List<Taaccount> insertUserAccount(WskhUserinfo vo, WskhUserinfo wui, Systemmanager systemmanager){
|
|
|
+ private List<Taaccount> insertUserAccount(WskhUserinfo vo, WskhUserinfo wui, Systemmanager systemmanager) {
|
|
|
List<Taaccount> taaccountList = new ArrayList<>();
|
|
|
Useraccount ua = new Useraccount();
|
|
|
ua.setUserid(Long.valueOf(vo.getAreacode()));
|