Commit c80cae7a authored by zhengyi's avatar zhengyi

跟进修改状态接口调整

parent 6e461c76
...@@ -203,20 +203,9 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu ...@@ -203,20 +203,9 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
@Override @Override
public void updateFollowupStatus(CustomerFollowupUpdateStatusReqVO updateStatusReqVO) { public void updateFollowupStatus(CustomerFollowupUpdateStatusReqVO updateStatusReqVO) {
Long updateId = updateStatusReqVO.getId();
List<Long> ids = updateStatusReqVO.getIds(); List<Long> ids = updateStatusReqVO.getIds();
List<Long> idList = new ArrayList<>(); for (Long id : ids) {
// id + ids 到idList
if (updateId!= null) {
idList.add(updateId);
}
if (CollectionUtil.isNotEmpty(ids)) {
idList.addAll(ids);
}
for (Long id : idList) {
CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id); CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id);
if (customerFollowupDO == null) { if (customerFollowupDO == null) {
throw exception(FOLLOWUP_NOT_EXISTS); throw exception(FOLLOWUP_NOT_EXISTS);
...@@ -227,7 +216,7 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu ...@@ -227,7 +216,7 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
} }
} }
for (Long id : idList) { for (Long id : ids) {
CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id); CustomerFollowupDO customerFollowupDO = followupMapper.selectById(id);
customerFollowupDO.setStatus(updateStatusReqVO.getStatus()); customerFollowupDO.setStatus(updateStatusReqVO.getStatus());
...@@ -238,7 +227,6 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu ...@@ -238,7 +227,6 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
if (customerId != null) { if (customerId != null) {
CustomerDO customer = customerMapper.selectById(customerId); CustomerDO customer = customerMapper.selectById(customerId);
if (customer != null) { if (customer != null) {
// 插入日志 // 插入日志
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser(); LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
//保存客户捞取记录 //保存客户捞取记录
......
...@@ -14,9 +14,6 @@ import java.util.List; ...@@ -14,9 +14,6 @@ import java.util.List;
@ToString(callSuper = true) @ToString(callSuper = true)
public class CustomerFollowupUpdateStatusReqVO { public class CustomerFollowupUpdateStatusReqVO {
@ApiModelProperty(value = "主键", required = true)
@NotNull(message = "主键不能为空")
private Long id;
//ids //ids
@ApiModelProperty(value = "主键列表", required = true) @ApiModelProperty(value = "主键列表", required = true)
......
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