From c01ed443034b84cce73a99309604f23d121d735e Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Tue, 17 Dec 2024 10:18:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=90=8C=E7=AE=A1=E7=90=86=E6=95=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/BmContractServiceImpl.java | 16 ++++++++-------- .../material/contract/BmContractMapper.xml | 7 ++++--- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/contract/service/impl/BmContractServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/contract/service/impl/BmContractServiceImpl.java index 04376be..9b1cfcf 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/contract/service/impl/BmContractServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/contract/service/impl/BmContractServiceImpl.java @@ -32,12 +32,12 @@ public class BmContractServiceImpl implements BmContractService { public List list(BmContract bmContract) { bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); List list = bmContractMapper.list(bmContract); - for (BmContract contract : list) { + /* for (BmContract contract : list) { BmFileInfo bmFileInfo = new BmFileInfo(); bmFileInfo.setModelId(Long.valueOf(contract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L); List bmFileInfos = bmFileInfoMapper.selectBmFileInfoList(bmFileInfo); contract.setBmFileInfoList(bmFileInfos); - } + }*/ return list; } @@ -48,7 +48,7 @@ public class BmContractServiceImpl implements BmContractService { bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); bmContract.setStatus(0); Integer add = bmContractMapper.add(bmContract); - if (add > 0) { + /* if (add > 0) { if (bmContract.getBmFileInfoList().size() > 0) { for (BmFileInfo bmFileInfo : bmContract.getBmFileInfoList()) { bmFileInfo.setModelId(Long.valueOf(bmContract.getId())); @@ -59,7 +59,7 @@ public class BmContractServiceImpl implements BmContractService { bmFileInfoMapper.insertBmFileInfo(bmFileInfo); } } - } + }*/ return add; } @@ -68,7 +68,7 @@ public class BmContractServiceImpl implements BmContractService { bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid()); bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId()); Integer edit = bmContractMapper.edit(bmContract); - if (edit > 0) { + /* if (edit > 0) { if (bmContract.getBmFileInfoList().size() > 0) { BmFileInfo fileInfo = new BmFileInfo(); fileInfo.setModelId(Long.valueOf(bmContract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L); @@ -82,18 +82,18 @@ public class BmContractServiceImpl implements BmContractService { bmFileInfoMapper.insertBmFileInfo(bmFileInfo); } } - } + }*/ return edit; } @Override public Integer del(BmContract bmContract) { Integer del = bmContractMapper.del(bmContract); - if (del > 0) { + /* if (del > 0) { BmFileInfo fileInfo = new BmFileInfo(); fileInfo.setModelId(Long.valueOf(bmContract.getId())).setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT).setFileType(0L); bmFileInfoMapper.deleteBmFileInfo(fileInfo); - } + }*/ return del; } diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/contract/BmContractMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/contract/BmContractMapper.xml index a46e057..42dcf73 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/contract/BmContractMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/contract/BmContractMapper.xml @@ -4,13 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - insert into bm_contract(contract_code, contract_name, status, create_time, owner_id, owner_com) - values(#{contractCode}, #{contractName}, #{status}, now(), #{ownerId}, #{ownerCom}) + insert into bm_contract(contract_code, contract_name, status, create_time, owner_id, owner_com, content) + values(#{contractCode}, #{contractName}, #{status}, now(), #{ownerId}, #{ownerCom}, #{content}) update bm_contract set contract_name = #{contractName}, status = #{status}, + content = #{content}, owner_id = #{ownerId}, owner_com = #{ownerCom}, update_time = now() @@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"