|
@@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.employee.api.dto.EmployeeRespDTO;
|
|
|
import cn.iocoder.yudao.module.infra.api.file.FileApi;
|
|
|
import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
@@ -251,11 +252,11 @@ public class CustomerContractServiceImpl implements CustomerContractService {
|
|
|
if (GeneralStatusEnum.NO.getStatus().equals(customerContractDO.getClosed())) {
|
|
|
throw exception(CUSTOMER_CONTRACT_NOT_CLOSED);
|
|
|
}
|
|
|
- CustomerContractDO build = CustomerContractDO.builder()
|
|
|
- .id(id)
|
|
|
- .closed(GeneralStatusEnum.NO.getStatus())
|
|
|
- .build();
|
|
|
- return customerContractMapper.updateById(build);
|
|
|
+ LambdaUpdateWrapper<CustomerContractDO> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
|
|
+ lambdaUpdateWrapper.set(CustomerContractDO::getClosed, GeneralStatusEnum.NO.getStatus())
|
|
|
+ .set(CustomerContractDO::getCloseReason, null)
|
|
|
+ .eq(CustomerContractDO::getId, id);
|
|
|
+ return customerContractMapper.update(lambdaUpdateWrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|