|
|
@@ -90,11 +90,11 @@ public class FsUserCompanyUserScrmServiceImpl extends ServiceImpl<FsUserCompanyU
|
|
|
old.getId(), old.getUserId(), old.getCompanyUserId(), old.getProjectId(),
|
|
|
old.getStatus(), fsUserCompanyUser.getStatus(),
|
|
|
Thread.currentThread().getStackTrace()[2]);
|
|
|
- // status=2拉黑时,在remark中追加拉黑信息
|
|
|
- if (fsUserCompanyUser.getStatus() == 2) {
|
|
|
- String blackRemark = "系统拉黑(原status=" + old.getStatus() + ")";
|
|
|
- String originRemark = fsUserCompanyUser.getRemark() != null ? fsUserCompanyUser.getRemark() : (old.getRemark() != null ? old.getRemark() : "");
|
|
|
- fsUserCompanyUser.setRemark(originRemark + (originRemark.isEmpty() ? "" : "|") + blackRemark);
|
|
|
+ // status=2拉黑时,在blacklistInfo中追加拉黑信息(防重复:已拉黑不再追加)
|
|
|
+ if (fsUserCompanyUser.getStatus() == 2 && old.getStatus() != 2) {
|
|
|
+ String blackInfo = "系统拉黑(原status=" + old.getStatus() + ")";
|
|
|
+ String originBlackInfo = old.getBlacklistInfo() != null ? old.getBlacklistInfo() : "";
|
|
|
+ fsUserCompanyUser.setBlacklistInfo(originBlackInfo + (originBlackInfo.isEmpty() ? "" : "|") + blackInfo);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -246,16 +246,16 @@ public class FsUserCompanyUserScrmServiceImpl extends ServiceImpl<FsUserCompanyU
|
|
|
}
|
|
|
log.info("[fs_user_company_user] Scrm batchUpdateUserProjectStatus | status={}, ids={}, operatorInfo={}, 调用来源={}",
|
|
|
status, ids, operatorInfo, Thread.currentThread().getStackTrace()[2]);
|
|
|
- // status=2拉黑时,逐条追加拉黑备注
|
|
|
+ // status=2拉黑时,逐条追加拉黑信息到blacklistInfo(防重复:已经是拉黑状态的跳过)
|
|
|
if (status == 2) {
|
|
|
- String blackRemark = (operatorInfo != null ? operatorInfo : "系统") + "拉黑";
|
|
|
+ String blackInfo = (operatorInfo != null ? operatorInfo : "系统") + " 拉黑";
|
|
|
for (UserProjectDTO dto : ids) {
|
|
|
FsUserCompanyUserScrm old = selectByUserIdAndProjectId(dto.getUserId(), dto.getProjectId());
|
|
|
- if (old != null) {
|
|
|
- String originRemark = old.getRemark() != null ? old.getRemark() : "";
|
|
|
+ if (old != null && old.getStatus() != 2) {
|
|
|
+ String originBlackInfo = old.getBlacklistInfo() != null ? old.getBlacklistInfo() : "";
|
|
|
FsUserCompanyUserScrm update = new FsUserCompanyUserScrm();
|
|
|
update.setId(old.getId());
|
|
|
- update.setRemark(originRemark + (originRemark.isEmpty() ? "" : "|") + blackRemark);
|
|
|
+ update.setBlacklistInfo(originBlackInfo + (originBlackInfo.isEmpty() ? "" : "|") + blackInfo);
|
|
|
baseMapper.updateFsUserCompanyUser(update);
|
|
|
}
|
|
|
}
|
|
|
@@ -290,16 +290,16 @@ public class FsUserCompanyUserScrmServiceImpl extends ServiceImpl<FsUserCompanyU
|
|
|
}
|
|
|
log.info("[fs_user_company_user] Scrm batchUpdateStatus | status={}, ids={}, operatorInfo={}, 调用来源={}",
|
|
|
status, ids, operatorInfo, Thread.currentThread().getStackTrace()[2]);
|
|
|
- // status=2拉黑时,逐条追加拉黑备注
|
|
|
+ // status=2拉黑时,逐条追加拉黑信息到blacklistInfo(防重复:已经是拉黑状态的跳过)
|
|
|
if (status == 2) {
|
|
|
- String blackRemark = (operatorInfo != null ? operatorInfo : "系统") + "拉黑";
|
|
|
+ String blackInfo = (operatorInfo != null ? operatorInfo : "系统") + " 拉黑";
|
|
|
for (Long id : ids) {
|
|
|
FsUserCompanyUserScrm old = baseMapper.selectFsUserCompanyUserById(id);
|
|
|
- if (old != null) {
|
|
|
- String originRemark = old.getRemark() != null ? old.getRemark() : "";
|
|
|
+ if (old != null && old.getStatus() != 2) {
|
|
|
+ String originBlackInfo = old.getBlacklistInfo() != null ? old.getBlacklistInfo() : "";
|
|
|
FsUserCompanyUserScrm update = new FsUserCompanyUserScrm();
|
|
|
update.setId(old.getId());
|
|
|
- update.setRemark(originRemark + (originRemark.isEmpty() ? "" : "|") + blackRemark);
|
|
|
+ update.setBlacklistInfo(originBlackInfo + (originBlackInfo.isEmpty() ? "" : "|") + blackInfo);
|
|
|
baseMapper.updateFsUserCompanyUser(update);
|
|
|
}
|
|
|
}
|