Commit 1feddc30 authored by Smile's avatar Smile Committed by wux

任务103 跟进记录调整

parent e11e9bea
...@@ -175,7 +175,7 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu ...@@ -175,7 +175,7 @@ public class CustomerFollowupServiceImpl extends AbstractService<CustomerFollowu
if (Objects.isNull(followup.getFollowUserId())){ if (Objects.isNull(followup.getFollowUserId())){
throw exception(CUSTOMER_SERVICE_NOT_NULL); throw exception(CUSTOMER_SERVICE_NOT_NULL);
} }
if (Objects.isNull(followup.getSaleStage())){ if (Objects.isNull(followup.getSaleStage())&& followup.getFollowType() == 2){
throw exception(SALE_STAGE_NOT_NULL); throw exception(SALE_STAGE_NOT_NULL);
} }
// if (Objects.isNull(followup.getResultType())){ // if (Objects.isNull(followup.getResultType())){
......
...@@ -35,6 +35,14 @@ public interface OfferService extends IService<OfferDO> { ...@@ -35,6 +35,14 @@ public interface OfferService extends IService<OfferDO> {
void updateOffer(@Valid OfferUpdateReqVO updateReqVO); void updateOffer(@Valid OfferUpdateReqVO updateReqVO);
/**
* 客户跟进更新报价单管理
*
* @param updateReqVO 更新信息
*/
void updateOfferByCustomerFollow(@Valid OfferUpdateByCustomerFollowReqVO updateReqVO);
/** /**
* 删除报价单管理 * 删除报价单管理
* *
......
...@@ -610,6 +610,26 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl ...@@ -610,6 +610,26 @@ public class OfferServiceImpl extends AbstractService<OfferMapper, OfferDO> impl
} }
} }
@Override
@Transactional(rollbackFor = Exception.class)
public void updateOfferByCustomerFollow(OfferUpdateByCustomerFollowReqVO updateReqVO) {
OfferDO offerDO = offerMapper.selectById(updateReqVO.getOfferId());
if (Objects.isNull(offerDO)) {
throw exception(OFFER_NOT_EXISTS);
}
if (Objects.nonNull(updateReqVO.getCargoStatus())) {
offerDO.setCargoStatus(updateReqVO.getCargoStatus());
}
if (Objects.nonNull(updateReqVO.getSaleStage())) {
offerDO.setSaleStage(updateReqVO.getSaleStage());
}
String updater = String.valueOf(SecurityFrameworkUtils.getLoginUserId());
offerDO.setUpdateTime(new Date());
offerDO.setUpdater(updater);
offerMapper.updateById(offerDO);
}
@Override @Override
public void deleteOffer(Long id) { public void deleteOffer(Long id) {
// 删除 // 删除
......
package cn.iocoder.yudao.module.sale.vo.offer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import javax.validation.constraints.NotNull;
@ApiModel("管理后台 - 报价单管理更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class OfferUpdateByCustomerFollowReqVO extends OfferBaseVO {
@ApiModelProperty(value = "主键ID", required = true)
@NotNull(message = "主键ID不能为空")
private Long offerId;
}
...@@ -79,6 +79,14 @@ public class OfferController { ...@@ -79,6 +79,14 @@ public class OfferController {
return success(true); return success(true);
} }
@PutMapping("/updateByCustomerFollow")
@ApiOperation("客户跟进更新报价单管理")
// @PreAuthorize("@ss.hasPermission('ecw:offer:update')")
public CommonResult<Boolean> updateOfferByCustomerFollow(@Valid @RequestBody OfferUpdateByCustomerFollowReqVO updateReqVO) {
offerService.updateOfferByCustomerFollow(updateReqVO);
return success(true);
}
@PutMapping("/update/result") @PutMapping("/update/result")
@ApiOperation("更新报价单结果") @ApiOperation("更新报价单结果")
......
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