From 443d65531c34f7f469412eae560a5df8829a8998 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Wed, 18 Dec 2024 15:37:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=BC=E5=90=88=E6=9F=A5=E8=AF=A2-=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=AE=A2=E5=8D=95=E8=AF=A6=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bonus/material/device/domain/DevInfo.java | 3 +++ .../material/device/mapper/DevInfoMapper.java | 2 ++ .../device/service/impl/DevInfoServiceImpl.java | 8 +++++++- .../mapper/material/device/DevInfoMapper.xml | 17 +++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java index e3a4b5d..f582973 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/domain/DevInfo.java @@ -270,4 +270,7 @@ public class DevInfo extends BaseEntity { @ApiModelProperty(value = "上传人") private String nickName; + + @ApiModelProperty(value = "租赁次数") + private Integer rentNum; } diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java index b7d68c4..0415553 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/device/mapper/DevInfoMapper.java @@ -189,5 +189,7 @@ public interface DevInfoMapper { List getTagDevList(DevInfoVo devInfoVo); List getDevList(DevInfoVo devInfo); + + DevInfo getDevStatus(DevInfoVo devInfoVo); } 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 7b0095b..f206312 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 @@ -761,7 +761,13 @@ public class DevInfoServiceImpl implements DevInfoService { @Override public List getDevList(DevInfoVo devInfo) { - return devInfoMapper.getDevList(devInfo); + List devList = devInfoMapper.getDevList(devInfo); + for (DevInfoVo devInfoVo : devList) { + DevInfo devInfo1 = devInfoMapper.getDevStatus(devInfoVo); + devInfoVo.setRentNum(devInfo1.getRentNum()); + devInfoVo.setMaStatus(devInfo1.getMaStatus()); + } + return devList; } @Override 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 0d7ed19..22a292a 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 @@ -855,5 +855,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ORDER BY d.create_time DESC +