合同管理接口开发

This commit is contained in:
liang.chao 2024-12-13 10:51:34 +08:00
parent 0347e19cce
commit 76c38b8620
3 changed files with 3 additions and 1 deletions

View File

@ -52,7 +52,7 @@ public class BmContractController extends BaseController {
return AjaxResult.error("修改失败");
}
}
@ApiOperation(value = "合同修改")
@ApiOperation(value = "合同删除")
@PostMapping("/del")
public AjaxResult del(@RequestBody BmContract bmContract) {
Integer i = bmContractService.del(bmContract);

View File

@ -26,6 +26,7 @@ public class BmContractServiceImpl implements BmContractService {
@Override
public List<BmContract> list(BmContract bmContract) {
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
return bmContractMapper.list(bmContract);
}

View File

@ -22,6 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="list" resultType="com.bonus.material.contract.domain.BmContract">
select id, contract_code as contractCode, contract_name as contractName, status, create_time as createTime, update_time as updateTime, owner_id as ownerId, owner_com as ownerCom from bm_contract
<where>
owner_com = #{ownerCom}
<if test="contractCode != null and contractCode != ''">
and contract_code like concat('%', #{contractCode}, '%')
</if>