fix(customer): 修复私海客户流转公海功能中的分配状态设置问题
- 将接口路径从 /back 修改为 /back/{id} 并使用路径参数
- 修复客户流转公海时 isAssigned 字段设置错误的问题,将值从 1 改为 0
- 确保客户流转公海后正确标记为未分配状态
| | |
| | | * 私海客户流回公海 |
| | | */ |
| | | @Log(title = "客户档案", businessType = BusinessType.OTHER) |
| | | @PostMapping("/back") |
| | | public R back(Long id) { |
| | | @PostMapping("/back/{id}") |
| | | public R back(@PathVariable("id") Long id) { |
| | | return R.ok(customerService.back(id)); |
| | | } |
| | | } |
| | |
| | | //将客户的type改为1 且直接分配给当前用户 |
| | | Customer customer = customerMapper.selectById(id); |
| | | customer.setType(1); |
| | | customer.setIsAssigned(1); |
| | | customer.setIsAssigned(0); |
| | | return this.updateById(customer); |
| | | } |
| | | |