Commit 4477e6eb authored by yanghao's avatar yanghao

fix: 修改跟进状态可以由已提交修改为未提交

parent bac48d7b
......@@ -11,7 +11,7 @@ VALUES (25, '25', '新增跟进纪录', 'Create Customer Followup', 'customer_op
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (26, '26', '编辑跟进纪录', 'Update Customer Followup', 'customer_operate_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
VALUES (27, '27', '提交跟进纪录', 'Commit Customer Followup', 'customer_operate_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
VALUES (27, '27', '修改跟进状态', 'Commit Customer Followup', 'customer_operate_type', 0, 'default', '', NULL, '1', now(), '115', now(), b'0');
INSERT INTO `system_dict_data` (`sort`, `value`, `label`, `label_en`, `dict_type`, `status`, `color_type`, `css_class`, `remark`, `creator`, `create_time`, `updater`, `update_time`, `deleted`)
......
......@@ -17,14 +17,12 @@ import cn.iocoder.yudao.module.customer.dal.dataobject.customerFollowup.Customer
import cn.iocoder.yudao.module.customer.dal.mysql.customer.CustomerMapper;
import cn.iocoder.yudao.module.customer.dal.mysql.customerContacts.CustomerContactsMapper;
import cn.iocoder.yudao.module.customer.dal.mysql.customerFollowup.CustomerFollowupMapper;
import cn.iocoder.yudao.module.customer.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.customer.service.customerOperateLog.CustomerOperateLogService;
import cn.iocoder.yudao.module.customer.vo.customerFollowup.*;
import cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO;
import cn.iocoder.yudao.module.ecw.enums.CustomerFollowupStatusEnum;
import cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.commons.lang3.StringUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -213,6 +211,8 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
for (Long id : ids) {
CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id);
Integer statusOld = customerFollowupDO.getStatus();
customerFollowupDO.setStatus(updateStatusReqVO.getStatus());
customerFollowupDO.setUpdater(String.valueOf(userId));
customerFollowupDO.setUpdateTime(now);
......@@ -236,8 +236,8 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
.setOldCustomerService(customer.getCustomerService())
.setOldEstimateEnterOpenSeaTime(customer.getEstimateEnterOpenSeaTime())
.setNewEstimateEnterOpenSeaTime(customer.getEstimateEnterOpenSeaTime())
.setOperateType(CustomerOperateTypeEnum.FOLLOWUP_COMMIT.getValue())
.setRemark("提交跟进纪录");
.setOperateType(CustomerOperateTypeEnum.FOLLOWUP_UPDATE_STATUS.getValue())
.setRemark(String.format("由【%s】修改为【%s】", statusOld == 1 ? "已提交" : "未提交", updateStatusReqVO.getStatus() == 1 ? "已提交" : "未提交"));
customerOperateLogService.createOperateLog(customerOperateLogCreateReqVO);
}
}
......
......@@ -11,3 +11,11 @@ GET {{baseUrl}}/customer/followup/page?pageNo=1&pageSize=10&followMethods[0]=1&f
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
### 客户跟进修改状态
PUT {{baseUrl}}//customer/followup/update-status
Authorization: Bearer {{token}}
tenant-id: {{adminTenentId}}
Content-Type: application/json
{"ids":[513,512],"status":1}
\ No newline at end of file
......@@ -56,7 +56,7 @@ public enum CustomerOperateTypeEnum {
FOLLOWUP_CREATE(25, "新增跟进纪录"),
FOLLOWUP_UPDATE(26, "编辑跟进纪录"),
FOLLOWUP_COMMIT(27, "提交跟进纪录"),
FOLLOWUP_UPDATE_STATUS(27, "修改跟进状态"),
......
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