From 2188a27e0b6aa532406deb3eb66d6d1b5cfe00b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Sat, 28 Sep 2024 18:04:40 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=86=E8=8A=82=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/ss/device/domain/Device.java | 5 +++++ .../main/java/com/ruoyi/ss/device/domain/DeviceBO.java | 2 ++ .../java/com/ruoyi/ss/device/domain/DeviceQuery.java | 3 +++ .../java/com/ruoyi/ss/device/domain/vo/DeviceVO.java | 3 +++ .../java/com/ruoyi/ss/device/mapper/DeviceMapper.xml | 9 ++++++++- .../service/impl/TransactionBillServiceImpl.java | 2 +- .../web/controller/app/AppTransactionBillController.java | 2 +- 7 files changed, 23 insertions(+), 3 deletions(-) diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/Device.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/Device.java index 770b503a..519cbe35 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/Device.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/Device.java @@ -225,4 +225,9 @@ public class Device extends BaseEntity @Excel(name = "服务模式:1-直营模式,2-代理模式") @ApiModelProperty("服务模式") private String serviceMode; + + @Excel(name = "月费", readConverterExp = "元=") + @ApiModelProperty("月费") + @Min(value = 0, message = "月费不允许小于0") + private BigDecimal monthFee; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceBO.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceBO.java index 096677a9..5abecbfa 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceBO.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceBO.java @@ -40,6 +40,7 @@ public class DeviceBO extends Device { bo.setServiceMode(getServiceMode()); bo.setAgentServiceRate(getAgentServiceRate()); bo.setAgentId(getAgentId()); + bo.setMonthFee(getMonthFee()); return bo; } @@ -68,6 +69,7 @@ public class DeviceBO extends Device { bo.setServiceMode(getServiceMode()); bo.setAgentServiceRate(getAgentServiceRate()); bo.setAgentId(getAgentId()); + bo.setMonthFee(getMonthFee()); return bo; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java index 1919c94e..b01112ed 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/DeviceQuery.java @@ -79,4 +79,7 @@ public class DeviceQuery extends Device { @ApiModelProperty("模糊查询任意MAC") private String likeAnyMac; + + @ApiModelProperty("代理名称") + private String agentName; } diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/vo/DeviceVO.java b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/vo/DeviceVO.java index a2bd0c91..d1eff81c 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/vo/DeviceVO.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/domain/vo/DeviceVO.java @@ -81,6 +81,9 @@ public class DeviceVO extends Device implements IotDevice { @ApiModelProperty("最终生效的服务费率") private BigDecimal realServiceRate; + @ApiModelProperty("代理名称") + private String agentName; + @Override public String iotMac1() { return getMac(); diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml b/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml index 69334bf8..6a5bf585 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/device/mapper/DeviceMapper.xml @@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and sd.device_no like concat('%', #{deviceNo}, '%') and sd.lock_user_id = #{lockUserId} and agent_id = #{agentId} + and sua.user_name like concat('%', #{agentName}, '%') and service_mode = #{serviceMode} @@ -145,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" sd.agent_service_rate, sd.agent_id, sd.service_mode, + sd.month_fee, sm.model_name as model, sm.picture as picture, sm.tags as model_tags, @@ -154,11 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ss.contact_mobile as store_contact_mobile, su.phonenumber as user_mobile, su.user_name as user_name, - su.service_rate as user_service_rate + su.service_rate as user_service_rate, + sua.user_name as agent_name from sm_device sd left join sm_model sm on sm.model_id = sd.model_id left join sm_store ss on ss.store_id = sd.store_id left join sm_user su on su.user_id = sd.user_id + left join sm_user sua on sua.user_id = sd.agent_id