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 +