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