添加新增线索与批量新增添加操作日志
This commit is contained in:
@@ -14,6 +14,7 @@ import static com.cool.store.enums.OperateLogFieldValueEnum.*;
|
||||
public enum OperateTypeEnum {
|
||||
|
||||
EC_SYNC_ADD_LINE("ec_sync_add_line", "ec同步新增线索", Arrays.asList(MOBILE,OPERATE_TIME, OPERATE_USER_ID, OPERATE_USER_NAME)),
|
||||
ADD_LINE("add_line", "新增线索", Arrays.asList(MOBILE,OPERATE_TIME, OPERATE_USER_ID, OPERATE_USER_NAME)),
|
||||
ALLOCATION_INVESTMENT_MANAGER("allocation_investment_manager", "分配招商经理", Arrays.asList(ALLOCATION_USERID,ALLOCATION_USERNAME, MOBILE, OPERATE_TIME)),
|
||||
ADD_BLACKLIST("add_blacklist", "加入黑名单", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REASON)),
|
||||
REMOVE_BLACKLIST("remove_blacklist", "移除黑名单", Arrays.asList(OPERATE_USER_ID,OPERATE_USER_NAME, MOBILE, OPERATE_TIME, REASON)),
|
||||
|
||||
@@ -6,7 +6,10 @@ import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.cool.store.constants.ExcelErrorConstants;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.log.BlackListLogDTO;
|
||||
import com.cool.store.dto.log.LineLogInfo;
|
||||
import com.cool.store.dto.partner.MobileCheckDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
@@ -17,6 +20,7 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.error.ErrorExcelResponse;
|
||||
import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.LineHighSeasService;
|
||||
import com.cool.store.utils.CoolDateUtils;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.utils.poi.ExcelUtil;
|
||||
@@ -51,6 +55,9 @@ public class LineHighSeasServiceImpl implements LineHighSeasService {
|
||||
private Integer manual;
|
||||
|
||||
|
||||
@Resource
|
||||
HyPartnerTaskInfoLogDAO hyPartnerTaskInfoLogDAO;
|
||||
|
||||
@Resource
|
||||
private HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
||||
|
||||
@@ -125,6 +132,17 @@ public class LineHighSeasServiceImpl implements LineHighSeasService {
|
||||
resultBase.setPartnerId(partnerId).setPartnerLineId(resultLine.getId()).setStatus(Integer.valueOf(WorkflowStatusEnum.INTENT_0.getCode())).
|
||||
setCreateTime(new Date()).setUsername(request.getPartnerName()).setMobile(request.getMobile());
|
||||
hyPartnerBaseInfoDAO.insertSelective(resultBase);
|
||||
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
//添加日志
|
||||
LineLogInfo lineLogInfo = new LineLogInfo(resultLine.getPartnerId(), resultLine.getId(), user.getUserId(),
|
||||
user.getName(), OperateTypeEnum.ADD_LINE,
|
||||
WorkflowStageEnum.getWorkflowStageByCode(resultLine.getWorkflowStage()),
|
||||
WorkflowStatusEnum.INTENT_0.getCode(), "");
|
||||
BlackListLogDTO logDTO = BlackListLogDTO.builder().operateUserId(user.getUserId()).operateUsername(user.getName())
|
||||
.mobile(resultBase.getMobile()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_2)).build();
|
||||
lineLogInfo.setData(logDTO);
|
||||
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user