| | |
| | | package cn.iocoder.yudao.module.crm.api.contract; |
| | | |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.framework.common.util.object.BeanUtils; |
| | | import cn.iocoder.yudao.module.crm.api.contract.dto.CrmContractCreateFromSaleOrderReqDTO; |
| | | import cn.iocoder.yudao.module.crm.api.contract.dto.CrmContractRespDTO; |
| | | import cn.iocoder.yudao.module.crm.dal.dataobject.contract.CrmContractDO; |
| | | import cn.iocoder.yudao.module.crm.service.contract.CrmContractService; |
| | | import jakarta.annotation.Resource; |
| | | import org.springframework.context.annotation.Lazy; |
| | |
| | | /** |
| | | * CRM 合同 API 实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(CrmContractApi.PREFIX) |
| | |
| | | private CrmContractService contractService; |
| | | |
| | | @Override |
| | | public CommonResult<CrmContractRespDTO> createContractDraftFromSaleOrder(CrmContractCreateFromSaleOrderReqDTO reqDTO) { |
| | | CrmContractDO contract = contractService.createContractDraftFromSaleOrder(reqDTO); |
| | | return success(BeanUtils.toBean(contract, CrmContractRespDTO.class)); |
| | | } |
| | | |
| | | @Override |
| | | public CommonResult<Boolean> updateContractStatus(Long id, Integer status) { |
| | | contractService.updateContractStatus(id, status); |
| | | return success(true); |