From 351f6b015426c28f15aec285a1873b69db566072 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Tue, 3 Dec 2024 11:15:53 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8D=89=E7=A8=BF=E7=8A=B6=E6=80=81=E4=B8=8B?= =?UTF-8?q?=E5=AD=98=E5=82=A8=E4=B8=8A=E4=BC=A0=E4=BA=BA=E5=92=8C=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../material/device/service/impl/DevInfoServiceImpl.java | 6 ++++-- .../main/resources/mapper/material/device/DevInfoMapper.xml | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java index f894293..d7438db 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/service/impl/DevInfoServiceImpl.java @@ -328,13 +328,15 @@ public class DevInfoServiceImpl implements DevInfoService { @Transactional(rollbackFor = Exception.class) public AjaxResult insertDraft(DevInfo devInfo) { //获取用户信息 - Long userId = SecurityUtils.getUserId(); + Long userId = SecurityUtils.getLoginUser().getUserid(); //保存用户信息 - devInfo.setCreator(userId).setMaStatus(TO_BE_LISTED.getCode()); + devInfo.setCreator(userId).setMaStatus(TO_BE_LISTED.getCode()).setOwnId(userId); try { if (devInfo.getMaId() != null) { devInfoMapper.deleteDevInfoByMaId(devInfo.getMaId(), MaStatusEnum.UNDER_RENT.getCode()); } + String code = getString(); + devInfo.setCode(code); int insertedDraft = devInfoMapper.insertDraft(devInfo); if (insertedDraft == 0) { return AjaxResult.error("装备草稿保存失败,请修改后重试"); diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml index 87ace72..f5ee769 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/device/DevInfoMapper.xml @@ -584,6 +584,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" is_operator, is_active, update_by, + own_id, #{deviceName}, @@ -619,6 +620,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{isOperator}, 1, #{updateBy}, + #{ownId},