"src/git@gitlab.ruzhoukj.com:wujipeng/ops.git" did not exist on "84b0b23fe2cccbf244a16272a3572dea57fed6eb"
Commit d7468f3d authored by wujipeng's avatar wujipeng
Browse files

更新合同

parent e410e003
...@@ -49,5 +49,9 @@ public class ContractController { ...@@ -49,5 +49,9 @@ public class ContractController {
return Result.success(contractService.deleteContract(id)); return Result.success(contractService.deleteContract(id));
} }
@ApiOperation(value = "更新")
@PostMapping("/update")
public Result updateContract(@RequestBody ContractDTO contractDTO) {
return Result.success(contractService.updateContract(contractDTO));
}
} }
...@@ -45,4 +45,12 @@ public interface ContractService extends IService<ContractEntity> { ...@@ -45,4 +45,12 @@ public interface ContractService extends IService<ContractEntity> {
* @return Boolean * @return Boolean
*/ */
Boolean deleteContract(String id); Boolean deleteContract(String id);
/**
* 更新合同
*
* @param contractDTO contractDTO
* @return Boolean
*/
int updateContract(ContractDTO contractDTO);
} }
...@@ -75,4 +75,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity ...@@ -75,4 +75,9 @@ public class ContractServiceImpl extends ServiceImpl<ContractDao, ContractEntity
} }
return this.removeById(id); return this.removeById(id);
} }
@Override
public int updateContract(ContractDTO contractDTO) {
return baseMapper.updateById(BeanUtil.copyProperties(contractDTO, ContractEntity.class));
}
} }
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