Commit 29659c31 authored by zhengyi's avatar zhengyi

批量修改跟进记录状态时需要更新最新更新时间和操作人

parent bcf1787a
package cn.iocoder.yudao.module.customer.service.customerFollowup; package cn.iocoder.yudao.module.customer.service.customerFollowup;
import cn.hutool.core.date.DateUtil;
import cn.iocoder.yudao.framework.apollo.core.event.Order.OrderNumberLogEvent; import cn.iocoder.yudao.framework.apollo.core.event.Order.OrderNumberLogEvent;
import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.code.CodeUtils; import cn.iocoder.yudao.framework.common.util.code.CodeUtils;
...@@ -31,6 +32,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -31,6 +32,7 @@ import org.springframework.validation.annotation.Validated;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Collection; import java.util.Collection;
import java.util.Date;
import java.util.List; import java.util.List;
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
...@@ -206,11 +208,14 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu ...@@ -206,11 +208,14 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
// throw exception(FOLLOWUP_ALREADY_SUBMITTED); // throw exception(FOLLOWUP_ALREADY_SUBMITTED);
// } // }
} }
Date now = DateUtil.date();
Long userId = SecurityFrameworkUtils.getLoginUser().getId();
for (Long id : ids) { for (Long id : ids) {
CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id); CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id);
customerFollowupDO.setStatus(updateStatusReqVO.getStatus()); customerFollowupDO.setStatus(updateStatusReqVO.getStatus());
customerFollowupDO.setUpdater(String.valueOf(userId));
customerFollowupDO.setUpdateTime(now);
followupMapper.updateById(customerFollowupDO); followupMapper.updateById(customerFollowupDO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment