|
@@ -380,6 +380,26 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.error(Constants.Error_Code_Design, MessageType.MESSAGE_ERROR_CODE_SYSTEM003.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (ta.getIsmain() == 0 && param.getRelateduserid() != null &&
|
|
|
|
|
+ param.getRelateduserid().compareTo(ta.getUserid()) == 0) {
|
|
|
|
|
+ return AjaxResult.error(Constants.Error_Code_Design, MessageType.INVESTOR_ERROR_CODE_012.getCode(), request.getHeader("Accept-Language"));
|
|
|
|
|
+ }
|
|
|
|
|
+ //原来的状态
|
|
|
|
|
+ Integer oldtradestatus = ta.getTradestatus();
|
|
|
|
|
+ if (param.getRelateduserid() != null) {
|
|
|
|
|
+ ta.setRelateduserid(param.getRelateduserid());
|
|
|
|
|
+ }
|
|
|
|
|
+ ta.setRelatedaccountstatus(param.getRelatedaccountstatus());
|
|
|
|
|
+ iTaaccountMapper.update(ta, new QueryWrapper<Taaccount>().eq("accountid", ta.getAccountid()));
|
|
|
|
|
+
|
|
|
|
|
+ List<Logintaaccount> logintaaccounts = iLogintaaccountMapper.selectList(new QueryWrapper<Logintaaccount>().eq("accountid", param.getAccountId()));
|
|
|
|
|
+ List<Long> list = logintaaccounts.stream().map(Logintaaccount::getAccountid).collect(Collectors.toList());
|
|
|
|
|
+
|
|
|
|
|
+ Set<Long> set = new HashSet<>();
|
|
|
|
|
+ Set<Long> set_msg = new HashSet<>();
|
|
|
|
|
+ if (!list.isEmpty()) {
|
|
|
|
|
+ set.addAll(list);
|
|
|
|
|
+ }
|
|
|
//处理当前登录账户资金权限
|
|
//处理当前登录账户资金权限
|
|
|
if (CollectionUtils.isNotEmpty(param.getLoginIds())) {
|
|
if (CollectionUtils.isNotEmpty(param.getLoginIds())) {
|
|
|
iLogintaaccountMapper.delete(new QueryWrapper<Logintaaccount>().eq("ACCOUNTID", param.getAccountId()));
|
|
iLogintaaccountMapper.delete(new QueryWrapper<Logintaaccount>().eq("ACCOUNTID", param.getAccountId()));
|
|
@@ -390,8 +410,17 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
lt.setModifytime(new Date());
|
|
lt.setModifytime(new Date());
|
|
|
lt.setModifierid(systemmanager.getAutoid());
|
|
lt.setModifierid(systemmanager.getAutoid());
|
|
|
iLogintaaccountMapper.insert(lt);
|
|
iLogintaaccountMapper.insert(lt);
|
|
|
|
|
+
|
|
|
|
|
+ if (!set.contains(id)) {
|
|
|
|
|
+ set_msg.add(id);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ set.remove(id);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ set_msg.addAll(set);
|
|
|
|
|
+ ta.setSet_msg(set_msg);
|
|
|
|
|
+
|
|
|
//处理市场权限
|
|
//处理市场权限
|
|
|
if (systemmanager.getAreauserid().compareTo(ta.getUserid()) == 0) {
|
|
if (systemmanager.getAreauserid().compareTo(ta.getUserid()) == 0) {
|
|
|
iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("ACCOUNTID", param.getAccountId()));
|
|
iTaaccountmarketMapper.delete(new QueryWrapper<Taaccountmarket>().eq("ACCOUNTID", param.getAccountId()));
|
|
@@ -405,6 +434,26 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
}
|
|
}
|
|
|
//记录操作日志
|
|
//记录操作日志
|
|
|
writeOperateLog(param, ta, systemmanager);
|
|
writeOperateLog(param, ta, systemmanager);
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+ //发送登录服务消息
|
|
|
|
|
+ if (ta.getSet_msg() != null && !ta.getSet_msg().isEmpty()) {
|
|
|
|
|
+ iSendMsgService.sendLoginMsg(ta.getSet_msg(), 4, 0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //发送用户变更通知
|
|
|
|
|
+ if (Objects.equals(oldtradestatus, SysEnums.TradeStatusEnum.CANCELED.getType())) {
|
|
|
|
|
+ iSendMsgService.sendUserChangeMsg(ta.getAccountid(), ta.getUserid(),
|
|
|
|
|
+ SysEnums.UserOperateTypeEnum.ADD.getType(),
|
|
|
|
|
+ SysEnums.NotifyModeEnum.UNICAST.getType());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ iSendMsgService.sendUserChangeMsg(ta.getAccountid(), ta.getUserid(),
|
|
|
|
|
+ SysEnums.UserOperateTypeEnum.UPDATE.getType(),
|
|
|
|
|
+ SysEnums.NotifyModeEnum.UNICAST.getType());
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("资金账户-->修改 发送用户信息修改失败,code=" + FunCodeConstants.FunCode_Trade_UserChangeNtf + ",请检查!,失败原因:" + e);
|
|
|
|
|
+ }
|
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
return AjaxResult.success(Constants.Success_Code_Design, MessageType.MESSAGE_CODE_SYSTEM001.getCode(), request.getHeader("Accept-Language"));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -455,7 +504,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//原来的状态
|
|
//原来的状态
|
|
|
- Integer oldtradestatus = updateParam.getTradestatus();
|
|
|
|
|
|
|
+ Integer oldtradestatus = old.getTradestatus();
|
|
|
if (updateParam.getOutthreshold() != null) {
|
|
if (updateParam.getOutthreshold() != null) {
|
|
|
old.setOutthreshold(updateParam.getOutthreshold());
|
|
old.setOutthreshold(updateParam.getOutthreshold());
|
|
|
}
|
|
}
|
|
@@ -465,6 +514,10 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
}
|
|
}
|
|
|
iTaaccountMapper.update(old, new QueryWrapper<Taaccount>().eq("accountid", old.getAccountid()));
|
|
iTaaccountMapper.update(old, new QueryWrapper<Taaccount>().eq("accountid", old.getAccountid()));
|
|
|
|
|
|
|
|
|
|
+ List<Logintaaccount> logintaaccounts = iLogintaaccountMapper.selectList(new QueryWrapper<Logintaaccount>().eq("accountid", updateParam.getAccountid()));
|
|
|
|
|
+ Set<Long> set_msg = logintaaccounts.stream().map(Logintaaccount::getAccountid).collect(Collectors.toSet());
|
|
|
|
|
+ old.setSet_msg(set_msg);
|
|
|
|
|
+
|
|
|
Systemmanagerlog syslog = new Systemmanagerlog();
|
|
Systemmanagerlog syslog = new Systemmanagerlog();
|
|
|
syslog.setUserid(systemmanager.getAutoid());
|
|
syslog.setUserid(systemmanager.getAutoid());
|
|
|
syslog.setReletype(systemmanager.getReletype());
|
|
syslog.setReletype(systemmanager.getReletype());
|
|
@@ -484,15 +537,21 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
+ "\"outthreshold\":" + old.getOutthreshold() + "\"}");
|
|
+ "\"outthreshold\":" + old.getOutthreshold() + "\"}");
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
|
|
+ //发送登录服务消息
|
|
|
|
|
+ if (old.getSet_msg() != null && !old.getSet_msg().isEmpty()) {
|
|
|
|
|
+ iSendMsgService.sendLoginMsg(old.getSet_msg(), 4, 0);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
//发送用户变更通知
|
|
//发送用户变更通知
|
|
|
- if (Objects.equals(oldtradestatus, SysEnums.TradeStatusEnum.CANCELED.getType()))
|
|
|
|
|
|
|
+ if (Objects.equals(oldtradestatus, SysEnums.TradeStatusEnum.CANCELED.getType())) {
|
|
|
iSendMsgService.sendUserChangeMsg(old.getAccountid(), old.getUserid(),
|
|
iSendMsgService.sendUserChangeMsg(old.getAccountid(), old.getUserid(),
|
|
|
SysEnums.UserOperateTypeEnum.ADD.getType(),
|
|
SysEnums.UserOperateTypeEnum.ADD.getType(),
|
|
|
SysEnums.NotifyModeEnum.UNICAST.getType());
|
|
SysEnums.NotifyModeEnum.UNICAST.getType());
|
|
|
- else
|
|
|
|
|
|
|
+ } else {
|
|
|
iSendMsgService.sendUserChangeMsg(old.getAccountid(), old.getUserid(),
|
|
iSendMsgService.sendUserChangeMsg(old.getAccountid(), old.getUserid(),
|
|
|
SysEnums.UserOperateTypeEnum.UPDATE.getType(),
|
|
SysEnums.UserOperateTypeEnum.UPDATE.getType(),
|
|
|
SysEnums.NotifyModeEnum.UNICAST.getType());
|
|
SysEnums.NotifyModeEnum.UNICAST.getType());
|
|
|
|
|
+ }
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
log.error("资金账户-->修改 发送用户信息修改失败,code=" + FunCodeConstants.FunCode_Trade_UserChangeNtf + ",请检查!,失败原因:" + e);
|
|
log.error("资金账户-->修改 发送用户信息修改失败,code=" + FunCodeConstants.FunCode_Trade_UserChangeNtf + ",请检查!,失败原因:" + e);
|
|
|
}
|
|
}
|
|
@@ -619,7 +678,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
//错误 #58783
|
|
//错误 #58783
|
|
|
organ.setModifystatus(1);
|
|
organ.setModifystatus(1);
|
|
|
// #6607 【交易中心-管理端】将实名认证的申请直接撤回会导致实名状态一直为审核中
|
|
// #6607 【交易中心-管理端】将实名认证的申请直接撤回会导致实名状态一直为审核中
|
|
|
- organ.setHasauth( (oldVo == null || oldVo.getHasauth() == null) ? 0: oldVo.getHasauth());
|
|
|
|
|
|
|
+ organ.setHasauth((oldVo == null || oldVo.getHasauth() == null) ? 0 : oldVo.getHasauth());
|
|
|
iUseraccountMapper.update(organ, new QueryWrapper<Useraccount>().eq("userid", organ.getUserid()));
|
|
iUseraccountMapper.update(organ, new QueryWrapper<Useraccount>().eq("userid", organ.getUserid()));
|
|
|
|
|
|
|
|
if (organ.getUsertype() == 3 || organ.getUsertype() == 4) {
|
|
if (organ.getUsertype() == 3 || organ.getUsertype() == 4) {
|
|
@@ -641,9 +700,9 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
List<Userinfo> uiList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
|
|
List<Userinfo> uiList = iUserinfoMapper.selectList(new QueryWrapper<Userinfo>()
|
|
|
.eq("userstatus", 1)
|
|
.eq("userstatus", 1)
|
|
|
.ne("userid", ui.getUserid())
|
|
.ne("userid", ui.getUserid())
|
|
|
- .and(a -> a.eq(StringUtils.isNotBlank(ui.getCardnum()),"cardnum", ui.getCardnum())
|
|
|
|
|
|
|
+ .and(a -> a.eq(StringUtils.isNotBlank(ui.getCardnum()), "cardnum", ui.getCardnum())
|
|
|
.or()
|
|
.or()
|
|
|
- .eq(StringUtils.isNotBlank(ui.getMobile()),"mobile", ui.getMobile()))
|
|
|
|
|
|
|
+ .eq(StringUtils.isNotBlank(ui.getMobile()), "mobile", ui.getMobile()))
|
|
|
);
|
|
);
|
|
|
if (CollectionUtils.isNotEmpty(uiList)) {
|
|
if (CollectionUtils.isNotEmpty(uiList)) {
|
|
|
for (Userinfo userinfo : uiList) {
|
|
for (Userinfo userinfo : uiList) {
|
|
@@ -888,7 +947,7 @@ public class TaaccountServiceImpl extends ServiceImpl<ITaaccountMapper, Taaccoun
|
|
|
//注销状态
|
|
//注销状态
|
|
|
ta.setTradestatus(SysEnums.TradeStatusEnum.CANCELED.getType());
|
|
ta.setTradestatus(SysEnums.TradeStatusEnum.CANCELED.getType());
|
|
|
ta.setTradestatuschangetime(new Date());
|
|
ta.setTradestatuschangetime(new Date());
|
|
|
- iTaaccountMapper.update(ta,new QueryWrapper<Taaccount>().eq("accountid",ta.getAccountid()));
|
|
|
|
|
|
|
+ iTaaccountMapper.update(ta, new QueryWrapper<Taaccount>().eq("accountid", ta.getAccountid()));
|
|
|
|
|
|
|
|
Userinfo info = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", userid));
|
|
Userinfo info = iUserinfoMapper.selectOne(new QueryWrapper<Userinfo>().eq("userid", userid));
|
|
|
info.setUserstatus(2);
|
|
info.setUserstatus(2);
|