意向日志

This commit is contained in:
wxp01309236
2023-07-05 09:54:33 +08:00
parent 5491866dc7
commit 5a90881c58
3 changed files with 7 additions and 4 deletions

View File

@@ -124,6 +124,7 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
}
WantInfoUpdateDTO.BaseInfoUpdate beforeBaseInfoUpdate = new WantInfoUpdateDTO.BaseInfoUpdate();
WantInfoUpdateDTO.BaseInfoUpdate afterBaseInfoUpdate = new WantInfoUpdateDTO.BaseInfoUpdate();
OperateTypeEnum operateTypeEnum = OperateTypeEnum.INTENT_INFO_UPDATE;
HyPartnerBaseInfoDO baseInfoDO = hyPartnerBaseInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
if(baseInfoDO == null){
@@ -131,6 +132,7 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
fillBaseInfo(baseInfoDO, request);
hyPartnerBaseInfoDAO.insertSelective(baseInfoDO);
BeanUtil.copyProperties(baseInfoDO, afterBaseInfoUpdate);
operateTypeEnum = OperateTypeEnum.INTENT_INFO_SUBMIT;
}else {
BeanUtil.copyProperties(baseInfoDO, beforeBaseInfoUpdate);
fillBaseInfo(baseInfoDO, request);
@@ -164,7 +166,7 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
WantInfoUpdateDTO log = WantInfoUpdateDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername())
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.beforeBaseInfoUpdate(beforeBaseInfoUpdate).afterBaseInfoUpdate(afterBaseInfoUpdate).build();
logService.recordPartnerBizLog(operator, baseInfoDO.getPartnerLineId(), OperateTypeEnum.INTENT_INFO_UPDATE,log);
logService.recordPartnerBizLog(operator, baseInfoDO.getPartnerLineId(), operateTypeEnum,log);
return Boolean.TRUE;
}

View File

@@ -193,13 +193,14 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
}
WantInfoUpdateDTO.IntentInfoUpdate beforeIntentInfoUpdate = new WantInfoUpdateDTO.IntentInfoUpdate();
WantInfoUpdateDTO.IntentInfoUpdate afterIntentInfoUpdate = new WantInfoUpdateDTO.IntentInfoUpdate();
OperateTypeEnum operateTypeEnum = OperateTypeEnum.INTENT_INFO_UPDATE;
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(request.getPartnerId(), request.getPartnerLineId());
if(intentInfoDO == null){
intentInfoDO = new HyPartnerIntentInfoDO();
fillIntentInfo(intentInfoDO, request);
hyPartnerIntentInfoDAO.insertSelective(intentInfoDO);
BeanUtil.copyProperties(intentInfoDO, afterIntentInfoUpdate);
operateTypeEnum = OperateTypeEnum.INTENT_INFO_SUBMIT;
}else {
BeanUtil.copyProperties(intentInfoDO, beforeIntentInfoUpdate);
fillIntentInfo(intentInfoDO, request);
@@ -231,7 +232,7 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
WantInfoUpdateDTO log = WantInfoUpdateDTO.builder().mobile(operator.getMobile()).operateUserId(operator.getPartnerId()).operateUsername(operator.getUsername())
.operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC))
.beforeIntentInfoUpdate(beforeIntentInfoUpdate).afterIntentInfoUpdate(afterIntentInfoUpdate).build();
logService.recordPartnerBizLog(operator,hyPartnerLineInfoDO.getId(), OperateTypeEnum.INTENT_INFO_UPDATE,log);
logService.recordPartnerBizLog(operator,hyPartnerLineInfoDO.getId(), operateTypeEnum, log);
return hyPartnerLineInfoDO.getLineStatus();
}