正在显示
27 个修改的文件
包含
316 行增加
和
15 行删除
| 1 | package com.zhonglai.luhui.device.domain; | 1 | package com.zhonglai.luhui.device.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.annotation.PublicSQLConfig; | 3 | import com.ruoyi.common.annotation.PublicSQLConfig; |
| 4 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 4 | import io.swagger.annotations.ApiModel; | 5 | import io.swagger.annotations.ApiModel; |
| 5 | import io.swagger.annotations.ApiModelProperty; | 6 | import io.swagger.annotations.ApiModelProperty; |
| 6 | 7 | ||
| @@ -13,7 +14,7 @@ import java.io.Serializable; | @@ -13,7 +14,7 @@ import java.io.Serializable; | ||
| 13 | * @date 2022-08-26 | 14 | * @date 2022-08-26 |
| 14 | */ | 15 | */ |
| 15 | @ApiModel("主机/网关") | 16 | @ApiModel("主机/网关") |
| 16 | -public class IotDevice implements Serializable | 17 | +public class IotDevice extends BaseEntity implements Serializable |
| 17 | { | 18 | { |
| 18 | @PublicSQLConfig(isSelect=false) | 19 | @PublicSQLConfig(isSelect=false) |
| 19 | private static final long serialVersionUID = 1L; | 20 | private static final long serialVersionUID = 1L; |
| @@ -132,7 +133,16 @@ public class IotDevice implements Serializable | @@ -132,7 +133,16 @@ public class IotDevice implements Serializable | ||
| 132 | 133 | ||
| 133 | @ApiModelProperty("产品标签") | 134 | @ApiModelProperty("产品标签") |
| 134 | private String label; | 135 | private String label; |
| 136 | + @ApiModelProperty("管理用户id") | ||
| 137 | + private Long sys_user_id; | ||
| 135 | 138 | ||
| 139 | + public Long getSys_user_id() { | ||
| 140 | + return sys_user_id; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + public void setSys_user_id(Long sys_user_id) { | ||
| 144 | + this.sys_user_id = sys_user_id; | ||
| 145 | + } | ||
| 136 | public String getLabel() { | 146 | public String getLabel() { |
| 137 | return label; | 147 | return label; |
| 138 | } | 148 | } |
| 1 | package com.zhonglai.luhui.device.domain; | 1 | package com.zhonglai.luhui.device.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.annotation.PublicSQLConfig; | 3 | import com.ruoyi.common.annotation.PublicSQLConfig; |
| 4 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 4 | import org.apache.commons.lang3.builder.ToStringBuilder; | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 5 | import org.apache.commons.lang3.builder.ToStringStyle; | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 6 | import io.swagger.annotations.ApiModel; | 7 | import io.swagger.annotations.ApiModel; |
| @@ -15,7 +16,7 @@ import java.io.Serializable; | @@ -15,7 +16,7 @@ import java.io.Serializable; | ||
| 15 | * @date 2022-08-26 | 16 | * @date 2022-08-26 |
| 16 | */ | 17 | */ |
| 17 | @ApiModel("产品") | 18 | @ApiModel("产品") |
| 18 | -public class IotProduct implements Serializable | 19 | +public class IotProduct extends BaseEntity implements Serializable |
| 19 | { | 20 | { |
| 20 | @PublicSQLConfig(isSelect=false) | 21 | @PublicSQLConfig(isSelect=false) |
| 21 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| @@ -74,6 +75,8 @@ public class IotProduct implements Serializable | @@ -74,6 +75,8 @@ public class IotProduct implements Serializable | ||
| 74 | @ApiModelProperty("订阅服务器id") | 75 | @ApiModelProperty("订阅服务器id") |
| 75 | private String subscribe_service_ip; | 76 | private String subscribe_service_ip; |
| 76 | 77 | ||
| 78 | + @ApiModelProperty("管理用户id") | ||
| 79 | + private Long sys_user_id; | ||
| 77 | public String getSubscribe_service_ip() { | 80 | public String getSubscribe_service_ip() { |
| 78 | return subscribe_service_ip; | 81 | return subscribe_service_ip; |
| 79 | } | 82 | } |
| @@ -82,6 +85,14 @@ public class IotProduct implements Serializable | @@ -82,6 +85,14 @@ public class IotProduct implements Serializable | ||
| 82 | this.subscribe_service_ip = subscribe_service_ip; | 85 | this.subscribe_service_ip = subscribe_service_ip; |
| 83 | } | 86 | } |
| 84 | 87 | ||
| 88 | + public Long getSys_user_id() { | ||
| 89 | + return sys_user_id; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setSys_user_id(Long sys_user_id) { | ||
| 93 | + this.sys_user_id = sys_user_id; | ||
| 94 | + } | ||
| 95 | + | ||
| 85 | public Integer getPurification_clas() { | 96 | public Integer getPurification_clas() { |
| 86 | return purification_clas; | 97 | return purification_clas; |
| 87 | } | 98 | } |
| 1 | package com.zhonglai.luhui.device.domain; | 1 | package com.zhonglai.luhui.device.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.annotation.PublicSQLConfig; | 3 | import com.ruoyi.common.annotation.PublicSQLConfig; |
| 4 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 4 | import org.apache.commons.lang3.builder.ToStringBuilder; | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 5 | import org.apache.commons.lang3.builder.ToStringStyle; | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 6 | import io.swagger.annotations.ApiModel; | 7 | import io.swagger.annotations.ApiModel; |
| @@ -15,7 +16,7 @@ import java.io.Serializable; | @@ -15,7 +16,7 @@ import java.io.Serializable; | ||
| 15 | * @date 2022-08-26 | 16 | * @date 2022-08-26 |
| 16 | */ | 17 | */ |
| 17 | @ApiModel("公司") | 18 | @ApiModel("公司") |
| 18 | -public class IotRole implements Serializable | 19 | +public class IotRole extends BaseEntity implements Serializable |
| 19 | { | 20 | { |
| 20 | @PublicSQLConfig(isSelect=false) | 21 | @PublicSQLConfig(isSelect=false) |
| 21 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| @@ -39,6 +40,16 @@ public class IotRole implements Serializable | @@ -39,6 +40,16 @@ public class IotRole implements Serializable | ||
| 39 | /** 是否使用(0否,1是) */ | 40 | /** 是否使用(0否,1是) */ |
| 40 | @ApiModelProperty("是否使用(0否,1是)") | 41 | @ApiModelProperty("是否使用(0否,1是)") |
| 41 | private Integer used; | 42 | private Integer used; |
| 43 | + @ApiModelProperty("管理用户id") | ||
| 44 | + private Long sys_user_id; | ||
| 45 | + | ||
| 46 | + public Long getSys_user_id() { | ||
| 47 | + return sys_user_id; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setSys_user_id(Long sys_user_id) { | ||
| 51 | + this.sys_user_id = sys_user_id; | ||
| 52 | + } | ||
| 42 | 53 | ||
| 43 | public void setCreate_time(Integer create_time) | 54 | public void setCreate_time(Integer create_time) |
| 44 | { | 55 | { |
| 1 | package com.zhonglai.luhui.device.domain; | 1 | package com.zhonglai.luhui.device.domain; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 3 | import com.ruoyi.system.domain.user.UserTerminalGroupRelation; | 4 | import com.ruoyi.system.domain.user.UserTerminalGroupRelation; |
| 4 | import com.ruoyi.common.annotation.PublicSQLConfig; | 5 | import com.ruoyi.common.annotation.PublicSQLConfig; |
| 5 | import org.apache.commons.lang3.builder.ToStringBuilder; | 6 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -16,7 +17,7 @@ import java.io.Serializable; | @@ -16,7 +17,7 @@ import java.io.Serializable; | ||
| 16 | * @date 2022-08-26 | 17 | * @date 2022-08-26 |
| 17 | */ | 18 | */ |
| 18 | @ApiModel("终端") | 19 | @ApiModel("终端") |
| 19 | -public class IotTerminal implements Serializable | 20 | +public class IotTerminal extends BaseEntity implements Serializable |
| 20 | { | 21 | { |
| 21 | @PublicSQLConfig(isSelect=false) | 22 | @PublicSQLConfig(isSelect=false) |
| 22 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; |
| @@ -66,7 +67,16 @@ public class IotTerminal implements Serializable | @@ -66,7 +67,16 @@ public class IotTerminal implements Serializable | ||
| 66 | 67 | ||
| 67 | @ApiModelProperty("操作令牌") | 68 | @ApiModelProperty("操作令牌") |
| 68 | private String operation_token; | 69 | private String operation_token; |
| 70 | + @ApiModelProperty("管理用户id") | ||
| 71 | + private Long sys_user_id; | ||
| 69 | 72 | ||
| 73 | + public Long getSys_user_id() { | ||
| 74 | + return sys_user_id; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setSys_user_id(Long sys_user_id) { | ||
| 78 | + this.sys_user_id = sys_user_id; | ||
| 79 | + } | ||
| 70 | public String getOperation_token() { | 80 | public String getOperation_token() { |
| 71 | return operation_token; | 81 | return operation_token; |
| 72 | } | 82 | } |
| 1 | package com.zhonglai.luhui.device.domain; | 1 | package com.zhonglai.luhui.device.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.annotation.PublicSQLConfig; | 3 | import com.ruoyi.common.annotation.PublicSQLConfig; |
| 4 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 4 | import org.apache.commons.lang3.builder.ToStringBuilder; | 5 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 5 | import org.apache.commons.lang3.builder.ToStringStyle; | 6 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 6 | import io.swagger.annotations.ApiModel; | 7 | import io.swagger.annotations.ApiModel; |
| @@ -15,7 +16,7 @@ import java.io.Serializable; | @@ -15,7 +16,7 @@ import java.io.Serializable; | ||
| 15 | * @date 2022-08-26 | 16 | * @date 2022-08-26 |
| 16 | */ | 17 | */ |
| 17 | @ApiModel("物模型模板") | 18 | @ApiModel("物模型模板") |
| 18 | -public class IotThingsModel implements Serializable | 19 | +public class IotThingsModel extends BaseEntity implements Serializable |
| 19 | { | 20 | { |
| 20 | @PublicSQLConfig(isSelect=false) | 21 | @PublicSQLConfig(isSelect=false) |
| 21 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| @@ -97,7 +98,16 @@ public class IotThingsModel implements Serializable | @@ -97,7 +98,16 @@ public class IotThingsModel implements Serializable | ||
| 97 | /** 数据定义 */ | 98 | /** 数据定义 */ |
| 98 | @ApiModelProperty("数据定义") | 99 | @ApiModelProperty("数据定义") |
| 99 | private String remark; | 100 | private String remark; |
| 101 | + @ApiModelProperty("管理用户id") | ||
| 102 | + private Long sys_user_id; | ||
| 100 | 103 | ||
| 104 | + public Long getSys_user_id() { | ||
| 105 | + return sys_user_id; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setSys_user_id(Long sys_user_id) { | ||
| 109 | + this.sys_user_id = sys_user_id; | ||
| 110 | + } | ||
| 101 | public String getAscription() { | 111 | public String getAscription() { |
| 102 | return ascription; | 112 | return ascription; |
| 103 | } | 113 | } |
| @@ -5,6 +5,7 @@ import java.util.List; | @@ -5,6 +5,7 @@ import java.util.List; | ||
| 5 | import java.util.Map; | 5 | import java.util.Map; |
| 6 | 6 | ||
| 7 | import com.alibaba.fastjson.JSONObject; | 7 | import com.alibaba.fastjson.JSONObject; |
| 8 | +import com.ruoyi.common.annotation.DataScope; | ||
| 8 | import com.ruoyi.common.core.domain.Message; | 9 | import com.ruoyi.common.core.domain.Message; |
| 9 | import com.ruoyi.common.exception.ServiceException; | 10 | import com.ruoyi.common.exception.ServiceException; |
| 10 | import com.ruoyi.common.utils.DateUtils; | 11 | import com.ruoyi.common.utils.DateUtils; |
| @@ -53,6 +54,7 @@ public class IotDeviceServiceImpl implements IIotDeviceService | @@ -53,6 +54,7 @@ public class IotDeviceServiceImpl implements IIotDeviceService | ||
| 53 | * @param iotDevice null | 54 | * @param iotDevice null |
| 54 | * @return null | 55 | * @return null |
| 55 | */ | 56 | */ |
| 57 | + @DataScope(deptAlias = "u",userAlias = "u") | ||
| 56 | @Override | 58 | @Override |
| 57 | public List<IotDevice> selectIotDeviceList(IotDevice iotDevice) | 59 | public List<IotDevice> selectIotDeviceList(IotDevice iotDevice) |
| 58 | { | 60 | { |
| 1 | package com.zhonglai.luhui.device.service.impl; | 1 | package com.zhonglai.luhui.device.service.impl; |
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | + | ||
| 5 | +import com.ruoyi.common.annotation.DataScope; | ||
| 4 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 5 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
| 6 | import com.zhonglai.luhui.device.mapper.IotProductMapper; | 8 | import com.zhonglai.luhui.device.mapper.IotProductMapper; |
| @@ -37,6 +39,7 @@ public class IotProductServiceImpl implements IIotProductService | @@ -37,6 +39,7 @@ public class IotProductServiceImpl implements IIotProductService | ||
| 37 | * @param iotProduct null | 39 | * @param iotProduct null |
| 38 | * @return null | 40 | * @return null |
| 39 | */ | 41 | */ |
| 42 | + @DataScope(deptAlias = "u",userAlias = "u") | ||
| 40 | @Override | 43 | @Override |
| 41 | public List<IotProduct> selectIotProductList(IotProduct iotProduct) | 44 | public List<IotProduct> selectIotProductList(IotProduct iotProduct) |
| 42 | { | 45 | { |
| @@ -2,6 +2,7 @@ package com.zhonglai.luhui.device.service.impl; | @@ -2,6 +2,7 @@ package com.zhonglai.luhui.device.service.impl; | ||
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | 4 | ||
| 5 | +import com.ruoyi.common.annotation.DataScope; | ||
| 5 | import com.zhonglai.luhui.device.domain.IotRole; | 6 | import com.zhonglai.luhui.device.domain.IotRole; |
| 6 | import com.zhonglai.luhui.device.mapper.IotRoleMapper; | 7 | import com.zhonglai.luhui.device.mapper.IotRoleMapper; |
| 7 | import com.zhonglai.luhui.device.service.IIotRoleService; | 8 | import com.zhonglai.luhui.device.service.IIotRoleService; |
| @@ -38,6 +39,7 @@ public class IotRoleServiceImpl implements IIotRoleService | @@ -38,6 +39,7 @@ public class IotRoleServiceImpl implements IIotRoleService | ||
| 38 | * @param iotRole null | 39 | * @param iotRole null |
| 39 | * @return null | 40 | * @return null |
| 40 | */ | 41 | */ |
| 42 | + @DataScope(deptAlias = "u",userAlias = "u") | ||
| 41 | @Override | 43 | @Override |
| 42 | public List<IotRole> selectIotRoleList(IotRole iotRole) | 44 | public List<IotRole> selectIotRoleList(IotRole iotRole) |
| 43 | { | 45 | { |
| @@ -5,6 +5,7 @@ import java.util.List; | @@ -5,6 +5,7 @@ import java.util.List; | ||
| 5 | import java.util.Map; | 5 | import java.util.Map; |
| 6 | 6 | ||
| 7 | import com.alibaba.fastjson.JSONObject; | 7 | import com.alibaba.fastjson.JSONObject; |
| 8 | +import com.ruoyi.common.annotation.DataScope; | ||
| 8 | import com.ruoyi.common.core.domain.Message; | 9 | import com.ruoyi.common.core.domain.Message; |
| 9 | import com.ruoyi.common.core.domain.ApiName; | 10 | import com.ruoyi.common.core.domain.ApiName; |
| 10 | import com.ruoyi.common.core.domain.DeviceCommandApi; | 11 | import com.ruoyi.common.core.domain.DeviceCommandApi; |
| @@ -64,6 +65,7 @@ public class IotTerminalServiceImpl implements IIotTerminalService | @@ -64,6 +65,7 @@ public class IotTerminalServiceImpl implements IIotTerminalService | ||
| 64 | * @param iotTerminal null | 65 | * @param iotTerminal null |
| 65 | * @return null | 66 | * @return null |
| 66 | */ | 67 | */ |
| 68 | + @DataScope(deptAlias = "u",userAlias = "u") | ||
| 67 | @Override | 69 | @Override |
| 68 | public List<IotTerminal> selectIotTerminalList(IotTerminal iotTerminal) | 70 | public List<IotTerminal> selectIotTerminalList(IotTerminal iotTerminal) |
| 69 | { | 71 | { |
| @@ -2,6 +2,7 @@ package com.zhonglai.luhui.device.service.impl; | @@ -2,6 +2,7 @@ package com.zhonglai.luhui.device.service.impl; | ||
| 2 | 2 | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | 4 | ||
| 5 | +import com.ruoyi.common.annotation.DataScope; | ||
| 5 | import com.zhonglai.luhui.device.domain.DistributionCurrencyModel; | 6 | import com.zhonglai.luhui.device.domain.DistributionCurrencyModel; |
| 6 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 7 | import org.springframework.stereotype.Service; | 8 | import org.springframework.stereotype.Service; |
| @@ -39,6 +40,7 @@ public class IotThingsModelServiceImpl implements IIotThingsModelService | @@ -39,6 +40,7 @@ public class IotThingsModelServiceImpl implements IIotThingsModelService | ||
| 39 | * @param iotThingsModel null | 40 | * @param iotThingsModel null |
| 40 | * @return null | 41 | * @return null |
| 41 | */ | 42 | */ |
| 43 | + @DataScope(deptAlias = "u",userAlias = "u") | ||
| 42 | @Override | 44 | @Override |
| 43 | public List<IotThingsModel> selectIotThingsModelList(IotThingsModel iotThingsModel) | 45 | public List<IotThingsModel> selectIotThingsModelList(IotThingsModel iotThingsModel) |
| 44 | { | 46 | { |
| @@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -36,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 36 | <result property="data_update_time" column="data_update_time" /> | 36 | <result property="data_update_time" column="data_update_time" /> |
| 37 | <result property="operation_token" column="operation_token" /> | 37 | <result property="operation_token" column="operation_token" /> |
| 38 | <result property="label" column="label" /> | 38 | <result property="label" column="label" /> |
| 39 | + <result property="sys_user_id" column="sys_user_id" /> | ||
| 39 | </resultMap> | 40 | </resultMap> |
| 40 | 41 | ||
| 41 | <sql id="selectIotDeviceVo"> | 42 | <sql id="selectIotDeviceVo"> |
| @@ -43,7 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -43,7 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 43 | </sql> | 44 | </sql> |
| 44 | 45 | ||
| 45 | <select id="selectIotDeviceList" parameterType="IotDevice" resultMap="IotDeviceResult"> | 46 | <select id="selectIotDeviceList" parameterType="IotDevice" resultMap="IotDeviceResult"> |
| 46 | - <include refid="selectIotDeviceVo"/> | 47 | + SELECT a.* FROM iot_device a |
| 48 | + LEFT JOIN `sys_user` u ON u.user_id = a.sys_user_id | ||
| 47 | <where> | 49 | <where> |
| 48 | <if test="status !=null"> | 50 | <if test="status !=null"> |
| 49 | and `status` = #{status} | 51 | and `status` = #{status} |
| @@ -57,7 +59,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -57,7 +59,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 57 | <if test="client_id != null and client_id != ''"> | 59 | <if test="client_id != null and client_id != ''"> |
| 58 | AND client_id like concat('%', #{client_id}, '%') | 60 | AND client_id like concat('%', #{client_id}, '%') |
| 59 | </if> | 61 | </if> |
| 62 | + <if test="sys_user_id !=null"> | ||
| 63 | + and `sys_user_id` = #{sys_user_id} | ||
| 64 | + </if> | ||
| 65 | + <if test="params.dataScope !=null and params.dataScope!=''"> | ||
| 66 | + <!-- 数据范围过滤 --> | ||
| 67 | + ${params.dataScope} | ||
| 68 | + </if> | ||
| 60 | </where> | 69 | </where> |
| 70 | + | ||
| 61 | </select> | 71 | </select> |
| 62 | 72 | ||
| 63 | <select id="selectIotDeviceByClient_id" parameterType="String" resultMap="IotDeviceResult"> | 73 | <select id="selectIotDeviceByClient_id" parameterType="String" resultMap="IotDeviceResult"> |
| @@ -95,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -95,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 95 | <if test="things_model_config != null">things_model_config,</if> | 105 | <if test="things_model_config != null">things_model_config,</if> |
| 96 | <if test="device_life != null">device_life,</if> | 106 | <if test="device_life != null">device_life,</if> |
| 97 | <if test="data_update_time != null">data_update_time,</if> | 107 | <if test="data_update_time != null">data_update_time,</if> |
| 108 | + <if test="sys_user_id != null">sys_user_id,</if> | ||
| 98 | create_time, | 109 | create_time, |
| 99 | </trim> | 110 | </trim> |
| 100 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 111 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| @@ -125,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -125,6 +136,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 125 | <if test="things_model_config != null">#{things_model_config},</if> | 136 | <if test="things_model_config != null">#{things_model_config},</if> |
| 126 | <if test="device_life != null">#{device_life},</if> | 137 | <if test="device_life != null">#{device_life},</if> |
| 127 | <if test="data_update_time != null">#{data_update_time},</if> | 138 | <if test="data_update_time != null">#{data_update_time},</if> |
| 139 | + <if test="sys_user_id != null">#{sys_user_id},</if> | ||
| 128 | UNIX_TIMESTAMP(NOW()), | 140 | UNIX_TIMESTAMP(NOW()), |
| 129 | </trim> | 141 | </trim> |
| 130 | </insert> | 142 | </insert> |
| @@ -159,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -159,6 +171,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 159 | <if test="things_model_config != null">things_model_config = #{things_model_config},</if> | 171 | <if test="things_model_config != null">things_model_config = #{things_model_config},</if> |
| 160 | <if test="device_life != null">device_life = #{device_life},</if> | 172 | <if test="device_life != null">device_life = #{device_life},</if> |
| 161 | <if test="data_update_time != null">data_update_time = #{data_update_time},</if> | 173 | <if test="data_update_time != null">data_update_time = #{data_update_time},</if> |
| 174 | + <if test="sys_user_id != null">sys_user_id = #{sys_user_id},</if> | ||
| 162 | </trim> | 175 | </trim> |
| 163 | where client_id = #{client_id} | 176 | where client_id = #{client_id} |
| 164 | </update> | 177 | </update> |
| @@ -21,14 +21,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -21,14 +21,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 21 | <result property="analysis_clas" column="analysis_clas" /> | 21 | <result property="analysis_clas" column="analysis_clas" /> |
| 22 | <result property="purification_clas" column="purification_clas" /> | 22 | <result property="purification_clas" column="purification_clas" /> |
| 23 | <result property="subscribe_service_ip" column="subscribe_service_ip" /> | 23 | <result property="subscribe_service_ip" column="subscribe_service_ip" /> |
| 24 | + <result property="sys_user_id" column="sys_user_id" /> | ||
| 24 | </resultMap> | 25 | </resultMap> |
| 25 | 26 | ||
| 26 | <sql id="selectIotProductVo"> | 27 | <sql id="selectIotProductVo"> |
| 27 | - select `id`,`mqtt_username`,`mqtt_password`,`product_name`,`mqtt_salt`,`create_time`,`encryption_type`,`open_encryption`,`used`,`role_id`,`is_sync_db`,`sync_db`,`analysis_clas`,`purification_clas`,`subscribe_service_ip` from iot_product | 28 | + select a.* from iot_product a |
| 28 | </sql> | 29 | </sql> |
| 29 | 30 | ||
| 30 | <select id="selectIotProductList" parameterType="IotProduct" resultMap="IotProductResult"> | 31 | <select id="selectIotProductList" parameterType="IotProduct" resultMap="IotProductResult"> |
| 31 | <include refid="selectIotProductVo"/> | 32 | <include refid="selectIotProductVo"/> |
| 33 | + LEFT JOIN `sys_user` u ON u.user_id = a.sys_user_id | ||
| 32 | <where> | 34 | <where> |
| 33 | <if test="product_name != null and product_name != ''"> | 35 | <if test="product_name != null and product_name != ''"> |
| 34 | AND `product_name` like concat('%', #{product_name}, '%') | 36 | AND `product_name` like concat('%', #{product_name}, '%') |
| @@ -42,6 +44,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -42,6 +44,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 42 | <if test="subscribe_service_ip != null and subscribe_service_ip != ''"> | 44 | <if test="subscribe_service_ip != null and subscribe_service_ip != ''"> |
| 43 | AND `subscribe_service_ip` like concat('%', #{subscribe_service_ip}, '%') | 45 | AND `subscribe_service_ip` like concat('%', #{subscribe_service_ip}, '%') |
| 44 | </if> | 46 | </if> |
| 47 | + <if test="sys_user_id !=null and sys_user_id != ''"> | ||
| 48 | + and sys_user_id = #{sys_user_id} | ||
| 49 | + </if> | ||
| 50 | + <if test="params.dataScope !=null and params.dataScope!=''"> | ||
| 51 | + <!-- 数据范围过滤 --> | ||
| 52 | + ${params.dataScope} | ||
| 53 | + </if> | ||
| 45 | </where> | 54 | </where> |
| 46 | </select> | 55 | </select> |
| 47 | 56 | ||
| @@ -65,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -65,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 65 | <if test="sync_db != null ">sync_db,</if> | 74 | <if test="sync_db != null ">sync_db,</if> |
| 66 | <if test="analysis_clas != null">analysis_clas,</if> | 75 | <if test="analysis_clas != null">analysis_clas,</if> |
| 67 | <if test="purification_clas != null ">purification_clas,</if> | 76 | <if test="purification_clas != null ">purification_clas,</if> |
| 77 | + <if test="sys_user_id != null">sys_user_id,</if> | ||
| 68 | create_time, | 78 | create_time, |
| 69 | </trim> | 79 | </trim> |
| 70 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 80 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| @@ -81,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -81,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 81 | <if test="sync_db != null">#{sync_db},</if> | 91 | <if test="sync_db != null">#{sync_db},</if> |
| 82 | <if test="analysis_clas != null">#{analysis_clas},</if> | 92 | <if test="analysis_clas != null">#{analysis_clas},</if> |
| 83 | <if test="purification_clas != null">#{purification_clas},</if> | 93 | <if test="purification_clas != null">#{purification_clas},</if> |
| 94 | + <if test="sys_user_id != null">#{sys_user_id},</if> | ||
| 84 | UNIX_TIMESTAMP(NOW()), | 95 | UNIX_TIMESTAMP(NOW()), |
| 85 | </trim> | 96 | </trim> |
| 86 | </insert> | 97 | </insert> |
| @@ -101,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -101,6 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 101 | <if test="sync_db != null">sync_db = #{sync_db},</if> | 112 | <if test="sync_db != null">sync_db = #{sync_db},</if> |
| 102 | <if test="analysis_clas != null">analysis_clas = #{analysis_clas},</if> | 113 | <if test="analysis_clas != null">analysis_clas = #{analysis_clas},</if> |
| 103 | <if test="purification_clas != null">purification_clas = #{purification_clas},</if> | 114 | <if test="purification_clas != null">purification_clas = #{purification_clas},</if> |
| 115 | + <if test="sys_user_id != null">sys_user_id = #{sys_user_id},</if> | ||
| 104 | </trim> | 116 | </trim> |
| 105 | where id = #{id} | 117 | where id = #{id} |
| 106 | </update> | 118 | </update> |
| @@ -10,15 +10,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -10,15 +10,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 10 | <result property="id" column="id" /> | 10 | <result property="id" column="id" /> |
| 11 | <result property="name" column="name" /> | 11 | <result property="name" column="name" /> |
| 12 | <result property="used" column="used" /> | 12 | <result property="used" column="used" /> |
| 13 | + <result property="sys_user_id" column="sys_user_id" /> | ||
| 13 | </resultMap> | 14 | </resultMap> |
| 14 | 15 | ||
| 15 | <sql id="selectIotRoleVo"> | 16 | <sql id="selectIotRoleVo"> |
| 16 | - select `create_time`, `describe`, `id`, `name`, `used` from iot_role | 17 | + select a.* from iot_role a |
| 17 | </sql> | 18 | </sql> |
| 18 | 19 | ||
| 19 | <select id="selectIotRoleList" parameterType="IotRole" resultMap="IotRoleResult"> | 20 | <select id="selectIotRoleList" parameterType="IotRole" resultMap="IotRoleResult"> |
| 20 | <include refid="selectIotRoleVo"/> | 21 | <include refid="selectIotRoleVo"/> |
| 22 | + LEFT JOIN `sys_user` u ON u.user_id = a.sys_user_id | ||
| 21 | <where> | 23 | <where> |
| 24 | + <if test="params.dataScope !=null and params.dataScope!=''"> | ||
| 25 | + <!-- 数据范围过滤 --> | ||
| 26 | + ${params.dataScope} | ||
| 27 | + </if> | ||
| 22 | </where> | 28 | </where> |
| 23 | </select> | 29 | </select> |
| 24 | 30 | ||
| @@ -33,12 +39,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -33,12 +39,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 33 | <if test="describe != null">`describe`,</if> | 39 | <if test="describe != null">`describe`,</if> |
| 34 | <if test="name != null">`name`,</if> | 40 | <if test="name != null">`name`,</if> |
| 35 | <if test="used != null">used,</if> | 41 | <if test="used != null">used,</if> |
| 42 | + <if test="sys_user_id != null">sys_user_id,</if> | ||
| 36 | create_time, | 43 | create_time, |
| 37 | </trim> | 44 | </trim> |
| 38 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 45 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 39 | <if test="describe != null">#{describe},</if> | 46 | <if test="describe != null">#{describe},</if> |
| 40 | <if test="name != null">#{name},</if> | 47 | <if test="name != null">#{name},</if> |
| 41 | <if test="used != null">#{used},</if> | 48 | <if test="used != null">#{used},</if> |
| 49 | + <if test="sys_user_id != null">#{sys_user_id},</if> | ||
| 42 | UNIX_TIMESTAMP(NOW()), | 50 | UNIX_TIMESTAMP(NOW()), |
| 43 | </trim> | 51 | </trim> |
| 44 | </insert> | 52 | </insert> |
| @@ -50,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -50,6 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 50 | <if test="describe != null">`describe` = #{describe},</if> | 58 | <if test="describe != null">`describe` = #{describe},</if> |
| 51 | <if test="name != null">`name` = #{name},</if> | 59 | <if test="name != null">`name` = #{name},</if> |
| 52 | <if test="used != null">used = #{used},</if> | 60 | <if test="used != null">used = #{used},</if> |
| 61 | + <if test="sys_user_id != null">sys_user_id = #{sys_user_id},</if> | ||
| 53 | </trim> | 62 | </trim> |
| 54 | where id = #{id} | 63 | where id = #{id} |
| 55 | </update> | 64 | </update> |
| @@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 18 | <result property="user_info_id" column="user_info_id" /> | 18 | <result property="user_info_id" column="user_info_id" /> |
| 19 | <result property="create_time" column="create_time" /> | 19 | <result property="create_time" column="create_time" /> |
| 20 | <result property="sensor_number" column="sensor_number" /> | 20 | <result property="sensor_number" column="sensor_number" /> |
| 21 | + <result property="sys_user_id" column="sys_user_id" /> | ||
| 21 | <association property="userTerminalGroupRelation" column="id" javaType="UserTerminalGroupRelation" resultMap="userTerminalGroupRelationResult" /> | 22 | <association property="userTerminalGroupRelation" column="id" javaType="UserTerminalGroupRelation" resultMap="userTerminalGroupRelationResult" /> |
| 22 | <association property="iotDevice" column="device_id" javaType="IotDevice" resultMap="iotDeviceResult" /> | 23 | <association property="iotDevice" column="device_id" javaType="IotDevice" resultMap="iotDeviceResult" /> |
| 23 | </resultMap> | 24 | </resultMap> |
| @@ -61,14 +62,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -61,14 +62,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 61 | <result property="device_life" column="device_life" /> | 62 | <result property="device_life" column="device_life" /> |
| 62 | <result property="data_update_time" column="d_data_update_time" /> | 63 | <result property="data_update_time" column="d_data_update_time" /> |
| 63 | <result property="label" column="label" /> | 64 | <result property="label" column="label" /> |
| 65 | + <result property="sys_user_id" column="sys_user_id" /> | ||
| 64 | </resultMap> | 66 | </resultMap> |
| 65 | 67 | ||
| 66 | <sql id="selectIotTerminalVo"> | 68 | <sql id="selectIotTerminalVo"> |
| 67 | - select * from iot_terminal | 69 | + select a.* from iot_terminal a |
| 68 | </sql> | 70 | </sql> |
| 69 | 71 | ||
| 70 | <select id="selectIotTerminalList" parameterType="IotTerminal" resultMap="IotTerminalResult"> | 72 | <select id="selectIotTerminalList" parameterType="IotTerminal" resultMap="IotTerminalResult"> |
| 71 | <include refid="selectIotTerminalVo"/> | 73 | <include refid="selectIotTerminalVo"/> |
| 74 | + LEFT JOIN `sys_user` u ON u.user_id = a.sys_user_id | ||
| 72 | <where> | 75 | <where> |
| 73 | <if test="device_id !=null and device_id != ''"> | 76 | <if test="device_id !=null and device_id != ''"> |
| 74 | and device_id = #{device_id} | 77 | and device_id = #{device_id} |
| @@ -82,6 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -82,6 +85,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 82 | <if test="mqtt_username != null and mqtt_username != ''"> | 85 | <if test="mqtt_username != null and mqtt_username != ''"> |
| 83 | AND `mqtt_username` like concat('%', #{mqtt_username}, '%') | 86 | AND `mqtt_username` like concat('%', #{mqtt_username}, '%') |
| 84 | </if> | 87 | </if> |
| 88 | + <if test="sys_user_id !=null and sys_user_id != ''"> | ||
| 89 | + and sys_user_id = #{sys_user_id} | ||
| 90 | + </if> | ||
| 91 | + <if test="params.dataScope !=null and params.dataScope!=''"> | ||
| 92 | + <!-- 数据范围过滤 --> | ||
| 93 | + ${params.dataScope} | ||
| 94 | + </if> | ||
| 85 | </where> | 95 | </where> |
| 86 | </select> | 96 | </select> |
| 87 | 97 | ||
| @@ -124,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -124,6 +134,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 124 | <if test="product_id != null">product_id,</if> | 134 | <if test="product_id != null">product_id,</if> |
| 125 | <if test="mqtt_username != null">mqtt_username,</if> | 135 | <if test="mqtt_username != null">mqtt_username,</if> |
| 126 | <if test="data_update_time != null">data_update_time,</if> | 136 | <if test="data_update_time != null">data_update_time,</if> |
| 137 | + <if test="sys_user_id != null and sys_user_id != ''">sys_user_id,</if> | ||
| 127 | </trim> | 138 | </trim> |
| 128 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 139 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| 129 | <if test="device_id != null">#{device_id},</if> | 140 | <if test="device_id != null">#{device_id},</if> |
| @@ -135,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -135,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 135 | <if test="product_id != null">#{product_id},</if> | 146 | <if test="product_id != null">#{product_id},</if> |
| 136 | <if test="mqtt_username != null">#{mqtt_username},</if> | 147 | <if test="mqtt_username != null">#{mqtt_username},</if> |
| 137 | <if test="data_update_time != null">#{data_update_time},</if> | 148 | <if test="data_update_time != null">#{data_update_time},</if> |
| 149 | + <if test="sys_user_id != null">#{sys_user_id},</if> | ||
| 138 | </trim> | 150 | </trim> |
| 139 | </insert> | 151 | </insert> |
| 140 | 152 | ||
| @@ -149,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -149,6 +161,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 149 | <if test="product_id != null">product_id = #{product_id},</if> | 161 | <if test="product_id != null">product_id = #{product_id},</if> |
| 150 | <if test="mqtt_username != null">mqtt_username = #{mqtt_username},</if> | 162 | <if test="mqtt_username != null">mqtt_username = #{mqtt_username},</if> |
| 151 | <if test="data_update_time != null">data_update_time = #{data_update_time},</if> | 163 | <if test="data_update_time != null">data_update_time = #{data_update_time},</if> |
| 164 | + <if test="sys_user_id != null">sys_user_id = #{sys_user_id},</if> | ||
| 152 | </trim> | 165 | </trim> |
| 153 | where id = #{id} | 166 | where id = #{id} |
| 154 | </update> | 167 | </update> |
| @@ -26,14 +26,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -26,14 +26,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 26 | <result property="config_names" column="config_names" /> | 26 | <result property="config_names" column="config_names" /> |
| 27 | <result property="view_type" column="view_type" /> | 27 | <result property="view_type" column="view_type" /> |
| 28 | <result property="ascription" column="ascription" /> | 28 | <result property="ascription" column="ascription" /> |
| 29 | + <result property="sys_user_id" column="sys_user_id" /> | ||
| 29 | </resultMap> | 30 | </resultMap> |
| 30 | 31 | ||
| 31 | <sql id="selectIotThingsModelVo"> | 32 | <sql id="selectIotThingsModelVo"> |
| 32 | - select create_by, create_time, data_type, del_flag, identifier, is_monitor, is_save_log, is_top, model_id, model_name, remark, specs, `type`, update_by, update_time, product_id,is_config,config_names,view_type,mqtt_username,ascription from iot_things_model | 33 | + select a.* from iot_things_model a |
| 33 | </sql> | 34 | </sql> |
| 34 | 35 | ||
| 35 | <select id="selectIotThingsModelList" parameterType="IotThingsModel" resultMap="IotThingsModelResult"> | 36 | <select id="selectIotThingsModelList" parameterType="IotThingsModel" resultMap="IotThingsModelResult"> |
| 36 | <include refid="selectIotThingsModelVo"/> | 37 | <include refid="selectIotThingsModelVo"/> |
| 38 | + LEFT JOIN `sys_user` u ON u.user_id = a.sys_user_id | ||
| 37 | <where> | 39 | <where> |
| 38 | <if test="create_by !=null and create_by != ''"> | 40 | <if test="create_by !=null and create_by != ''"> |
| 39 | and create_by = #{create_by} | 41 | and create_by = #{create_by} |
| @@ -68,6 +70,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -68,6 +70,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 68 | <if test="ascription !=null and ascription != ''"> | 70 | <if test="ascription !=null and ascription != ''"> |
| 69 | and ascription = #{ascription} | 71 | and ascription = #{ascription} |
| 70 | </if> | 72 | </if> |
| 73 | + <if test="sys_user_id !=null and sys_user_id != ''"> | ||
| 74 | + and sys_user_id = #{sys_user_id} | ||
| 75 | + </if> | ||
| 76 | + <if test="params.dataScope !=null and params.dataScope!=''"> | ||
| 77 | + <!-- 数据范围过滤 --> | ||
| 78 | + ${params.dataScope} | ||
| 79 | + </if> | ||
| 71 | </where> | 80 | </where> |
| 72 | </select> | 81 | </select> |
| 73 | 82 | ||
| @@ -106,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -106,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 106 | <if test="view_type != null">view_type,</if> | 115 | <if test="view_type != null">view_type,</if> |
| 107 | <if test="mqtt_username != null">mqtt_username,</if> | 116 | <if test="mqtt_username != null">mqtt_username,</if> |
| 108 | <if test="ascription != null">ascription,</if> | 117 | <if test="ascription != null">ascription,</if> |
| 118 | + <if test="sys_user_id != null">sys_user_id,</if> | ||
| 109 | create_time, | 119 | create_time, |
| 110 | </trim> | 120 | </trim> |
| 111 | <trim prefix="values (" suffix=")" suffixOverrides=","> | 121 | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| @@ -128,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -128,6 +138,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 128 | <if test="view_type != null">#{view_type},</if> | 138 | <if test="view_type != null">#{view_type},</if> |
| 129 | <if test="mqtt_username != null">#{mqtt_username},</if> | 139 | <if test="mqtt_username != null">#{mqtt_username},</if> |
| 130 | <if test="ascription != null">#{ascription},</if> | 140 | <if test="ascription != null">#{ascription},</if> |
| 141 | + <if test="sys_user_id != null">#{sys_user_id},</if> | ||
| 131 | TIMESTAMP(NOW()), | 142 | TIMESTAMP(NOW()), |
| 132 | </trim> | 143 | </trim> |
| 133 | </insert> | 144 | </insert> |
| @@ -155,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -155,6 +166,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 155 | <if test="view_type != null">view_type = #{view_type},</if> | 166 | <if test="view_type != null">view_type = #{view_type},</if> |
| 156 | <if test="mqtt_username != null">mqtt_username = #{mqtt_username},</if> | 167 | <if test="mqtt_username != null">mqtt_username = #{mqtt_username},</if> |
| 157 | <if test="ascription != null">ascription = #{ascription},</if> | 168 | <if test="ascription != null">ascription = #{ascription},</if> |
| 169 | + <if test="sys_user_id != null">sys_user_id = #{sys_user_id},</if> | ||
| 158 | </trim> | 170 | </trim> |
| 159 | where model_id = #{model_id} | 171 | where model_id = #{model_id} |
| 160 | </update> | 172 | </update> |
| 1 | +package com.zhonglai.luhui.admin.config; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.common.annotation.DataScope; | ||
| 4 | +import com.ruoyi.common.core.text.Convert; | ||
| 5 | +import com.ruoyi.common.tool.BaseEntity; | ||
| 6 | +import com.ruoyi.common.utils.StringUtils; | ||
| 7 | +import com.ruoyi.system.domain.entity.SysRole; | ||
| 8 | +import com.ruoyi.system.domain.entity.SysUser; | ||
| 9 | +import com.zhonglai.luhui.security.dto.BaseLoginUser; | ||
| 10 | +import com.zhonglai.luhui.security.utils.SecurityUtils; | ||
| 11 | +import org.aspectj.lang.JoinPoint; | ||
| 12 | +import org.aspectj.lang.annotation.Aspect; | ||
| 13 | +import org.aspectj.lang.annotation.Before; | ||
| 14 | +import org.springframework.stereotype.Component; | ||
| 15 | + | ||
| 16 | +import java.util.ArrayList; | ||
| 17 | +import java.util.List; | ||
| 18 | + | ||
| 19 | +/** | ||
| 20 | + * 数据过滤处理 | ||
| 21 | + * | ||
| 22 | + * @author ruoyi | ||
| 23 | + */ | ||
| 24 | +@Aspect | ||
| 25 | +@Component | ||
| 26 | +public class DataScopeAspect { | ||
| 27 | + /** | ||
| 28 | + * 全部数据权限 | ||
| 29 | + */ | ||
| 30 | + public static final String DATA_SCOPE_ALL = "1"; | ||
| 31 | + | ||
| 32 | + /** | ||
| 33 | + * 自定数据权限 | ||
| 34 | + */ | ||
| 35 | + public static final String DATA_SCOPE_CUSTOM = "2"; | ||
| 36 | + | ||
| 37 | + /** | ||
| 38 | + * 部门数据权限 | ||
| 39 | + */ | ||
| 40 | + public static final String DATA_SCOPE_DEPT = "3"; | ||
| 41 | + | ||
| 42 | + /** | ||
| 43 | + * 部门及以下数据权限 | ||
| 44 | + */ | ||
| 45 | + public static final String DATA_SCOPE_DEPT_AND_CHILD = "4"; | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 仅本人数据权限 | ||
| 49 | + */ | ||
| 50 | + public static final String DATA_SCOPE_SELF = "5"; | ||
| 51 | + | ||
| 52 | + /** | ||
| 53 | + * 数据权限过滤关键字 | ||
| 54 | + */ | ||
| 55 | + public static final String DATA_SCOPE = "dataScope"; | ||
| 56 | + | ||
| 57 | + @Before("@annotation(controllerDataScope)") | ||
| 58 | + public void doBefore(JoinPoint point, DataScope controllerDataScope) throws Throwable | ||
| 59 | + { | ||
| 60 | + clearDataScope(point); | ||
| 61 | + handleDataScope(point, controllerDataScope); | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + protected void handleDataScope(final JoinPoint joinPoint, DataScope controllerDataScope) | ||
| 65 | + { | ||
| 66 | + // 获取当前的用户 | ||
| 67 | + BaseLoginUser loginUser = SecurityUtils.getLoginUser(); | ||
| 68 | + if (StringUtils.isNotNull(loginUser)) | ||
| 69 | + { | ||
| 70 | + SysUser currentUser = (SysUser) loginUser.getUser(); | ||
| 71 | + // 如果是超级管理员,则不过滤数据 | ||
| 72 | + if (StringUtils.isNotNull(currentUser) && !currentUser.isAdmin()) | ||
| 73 | + { | ||
| 74 | + dataScopeFilter(joinPoint, currentUser, controllerDataScope.deptAlias(), | ||
| 75 | + controllerDataScope.userAlias()); | ||
| 76 | + } | ||
| 77 | + } | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + /** | ||
| 81 | + * 数据范围过滤 | ||
| 82 | + * | ||
| 83 | + * @param joinPoint 切点 | ||
| 84 | + * @param user 用户 | ||
| 85 | + * @param deptAlias 部门别名 | ||
| 86 | + * @param userAlias 用户别名 | ||
| 87 | + */ | ||
| 88 | + public static void dataScopeFilter(JoinPoint joinPoint, SysUser user, String deptAlias, String userAlias) | ||
| 89 | + { | ||
| 90 | + StringBuilder sqlString = new StringBuilder(); | ||
| 91 | + List<String> conditions = new ArrayList<String>(); | ||
| 92 | + | ||
| 93 | + for (SysRole role : user.getRoles()) | ||
| 94 | + { | ||
| 95 | + String dataScope = role.getDataScope(); | ||
| 96 | + if (!DATA_SCOPE_CUSTOM.equals(dataScope) && conditions.contains(dataScope)) | ||
| 97 | + { | ||
| 98 | + continue; | ||
| 99 | + } | ||
| 100 | + if (DATA_SCOPE_ALL.equals(dataScope)) | ||
| 101 | + { | ||
| 102 | + sqlString = new StringBuilder(); | ||
| 103 | + conditions.add(dataScope); | ||
| 104 | + break; | ||
| 105 | + } | ||
| 106 | + else if (DATA_SCOPE_CUSTOM.equals(dataScope)) | ||
| 107 | + { | ||
| 108 | + sqlString.append(StringUtils.format( | ||
| 109 | + " OR {}.dept_id IN ( SELECT dept_id FROM sys_role_dept WHERE role_id = {} ) ", deptAlias, | ||
| 110 | + role.getRoleId())); | ||
| 111 | + } | ||
| 112 | + else if (DATA_SCOPE_DEPT.equals(dataScope)) | ||
| 113 | + { | ||
| 114 | + sqlString.append(StringUtils.format(" OR {}.dept_id = {} ", deptAlias, user.getDeptId())); | ||
| 115 | + } | ||
| 116 | + else if (DATA_SCOPE_DEPT_AND_CHILD.equals(dataScope)) | ||
| 117 | + { | ||
| 118 | + sqlString.append(StringUtils.format( | ||
| 119 | + " OR {}.dept_id IN ( SELECT dept_id FROM sys_dept WHERE dept_id = {} or find_in_set( {} , ancestors ) )", | ||
| 120 | + deptAlias, user.getDeptId(), user.getDeptId())); | ||
| 121 | + } | ||
| 122 | + else if (DATA_SCOPE_SELF.equals(dataScope)) | ||
| 123 | + { | ||
| 124 | + if (StringUtils.isNotBlank(userAlias)) | ||
| 125 | + { | ||
| 126 | + sqlString.append(StringUtils.format(" OR {}.user_id = {} ", userAlias, user.getUserId())); | ||
| 127 | + } | ||
| 128 | + else | ||
| 129 | + { | ||
| 130 | + // 数据权限为仅本人且没有userAlias别名不查询任何数据 | ||
| 131 | + sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias)); | ||
| 132 | + } | ||
| 133 | + } | ||
| 134 | + conditions.add(dataScope); | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + // 多角色情况下,所有角色都不包含传递过来的权限字符,这个时候sqlString也会为空,所以要限制一下,不查询任何数据 | ||
| 138 | + if (StringUtils.isEmpty(conditions)) | ||
| 139 | + { | ||
| 140 | + sqlString.append(StringUtils.format(" OR {}.dept_id = 0 ", deptAlias)); | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + if (StringUtils.isNotBlank(sqlString.toString())) | ||
| 144 | + { | ||
| 145 | + Object params = joinPoint.getArgs()[0]; | ||
| 146 | + if (StringUtils.isNotNull(params) && params instanceof BaseEntity) | ||
| 147 | + { | ||
| 148 | + BaseEntity baseEntity = (BaseEntity) params; | ||
| 149 | + baseEntity.getParams().put(DATA_SCOPE, " AND (" + sqlString.substring(4) + ")"); | ||
| 150 | + } | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + /** | ||
| 155 | + * 拼接权限sql前先清空params.dataScope参数防止注入 | ||
| 156 | + */ | ||
| 157 | + private void clearDataScope(final JoinPoint joinPoint) | ||
| 158 | + { | ||
| 159 | + Object params = joinPoint.getArgs()[0]; | ||
| 160 | + if (StringUtils.isNotNull(params) && params instanceof BaseEntity) | ||
| 161 | + { | ||
| 162 | + BaseEntity baseEntity = (BaseEntity) params; | ||
| 163 | + baseEntity.getParams().put(DATA_SCOPE, ""); | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | +} |
| @@ -3,6 +3,7 @@ package com.zhonglai.luhui.admin.controller.iot; | @@ -3,6 +3,7 @@ package com.zhonglai.luhui.admin.controller.iot; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | 5 | ||
| 6 | +import com.ruoyi.common.annotation.DataScope; | ||
| 6 | import com.ruoyi.common.utils.DateUtils; | 7 | import com.ruoyi.common.utils.DateUtils; |
| 7 | import com.zhonglai.luhui.action.BaseController; | 8 | import com.zhonglai.luhui.action.BaseController; |
| 8 | import com.zhonglai.luhui.dao.service.PublicService; | 9 | import com.zhonglai.luhui.dao.service.PublicService; |
| @@ -92,6 +93,7 @@ public class IotDeviceController extends BaseController | @@ -92,6 +93,7 @@ public class IotDeviceController extends BaseController | ||
| 92 | @PostMapping("add") | 93 | @PostMapping("add") |
| 93 | public AjaxResult add(@RequestBody IotDevice iotDevice) | 94 | public AjaxResult add(@RequestBody IotDevice iotDevice) |
| 94 | { | 95 | { |
| 96 | + iotDevice.setSys_user_id(SecurityUtils.getUserId()); | ||
| 95 | iotDevice.setCreate_by(SecurityUtils.getUsername()); | 97 | iotDevice.setCreate_by(SecurityUtils.getUsername()); |
| 96 | iotDevice.setUpdate_time(DateUtils.getNowTimeMilly()); | 98 | iotDevice.setUpdate_time(DateUtils.getNowTimeMilly()); |
| 97 | return toAjax(iotDeviceService.insertIotDevice(iotDevice)); | 99 | return toAjax(iotDeviceService.insertIotDevice(iotDevice)); |
| @@ -4,6 +4,7 @@ import java.util.List; | @@ -4,6 +4,7 @@ import java.util.List; | ||
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | 5 | ||
| 6 | import com.zhonglai.luhui.action.BaseController; | 6 | import com.zhonglai.luhui.action.BaseController; |
| 7 | +import com.zhonglai.luhui.security.utils.SecurityUtils; | ||
| 7 | import com.zhonglai.luhui.sys.utils.ExcelUtil; | 8 | import com.zhonglai.luhui.sys.utils.ExcelUtil; |
| 8 | import io.swagger.annotations.Api; | 9 | import io.swagger.annotations.Api; |
| 9 | import io.swagger.annotations.ApiOperation; | 10 | import io.swagger.annotations.ApiOperation; |
| @@ -85,6 +86,7 @@ public class IotProductController extends BaseController | @@ -85,6 +86,7 @@ public class IotProductController extends BaseController | ||
| 85 | @PostMapping | 86 | @PostMapping |
| 86 | public AjaxResult add(@RequestBody IotProduct iotProduct) | 87 | public AjaxResult add(@RequestBody IotProduct iotProduct) |
| 87 | { | 88 | { |
| 89 | + iotProduct.setSys_user_id(SecurityUtils.getUserId()); | ||
| 88 | return toAjax(IotProductService.insertIotProduct(iotProduct)); | 90 | return toAjax(IotProductService.insertIotProduct(iotProduct)); |
| 89 | } | 91 | } |
| 90 | 92 |
| @@ -4,6 +4,7 @@ import java.util.List; | @@ -4,6 +4,7 @@ import java.util.List; | ||
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | 5 | ||
| 6 | import com.zhonglai.luhui.action.BaseController; | 6 | import com.zhonglai.luhui.action.BaseController; |
| 7 | +import com.zhonglai.luhui.security.utils.SecurityUtils; | ||
| 7 | import com.zhonglai.luhui.sys.utils.ExcelUtil; | 8 | import com.zhonglai.luhui.sys.utils.ExcelUtil; |
| 8 | import com.ruoyi.common.utils.DateUtils; | 9 | import com.ruoyi.common.utils.DateUtils; |
| 9 | import io.swagger.annotations.Api; | 10 | import io.swagger.annotations.Api; |
| @@ -86,6 +87,7 @@ public class IotRoleController extends BaseController | @@ -86,6 +87,7 @@ public class IotRoleController extends BaseController | ||
| 86 | @PostMapping | 87 | @PostMapping |
| 87 | public AjaxResult add(@RequestBody IotRole iotRole) | 88 | public AjaxResult add(@RequestBody IotRole iotRole) |
| 88 | { | 89 | { |
| 90 | + iotRole.setSys_user_id(SecurityUtils.getUserId()); | ||
| 89 | iotRole.setCreate_time(DateUtils.getNowTimeMilly()); | 91 | iotRole.setCreate_time(DateUtils.getNowTimeMilly()); |
| 90 | return toAjax(iotRoleService.insertIotRole(iotRole)); | 92 | return toAjax(iotRoleService.insertIotRole(iotRole)); |
| 91 | } | 93 | } |
lh-modules/lh-admin/src/main/java/com/zhonglai/luhui/admin/controller/iot/IotTerminalController.java
| @@ -4,6 +4,7 @@ import java.util.List; | @@ -4,6 +4,7 @@ import java.util.List; | ||
| 4 | import javax.servlet.http.HttpServletResponse; | 4 | import javax.servlet.http.HttpServletResponse; |
| 5 | 5 | ||
| 6 | import com.zhonglai.luhui.action.BaseController; | 6 | import com.zhonglai.luhui.action.BaseController; |
| 7 | +import com.zhonglai.luhui.security.utils.SecurityUtils; | ||
| 7 | import com.zhonglai.luhui.sys.utils.ExcelUtil; | 8 | import com.zhonglai.luhui.sys.utils.ExcelUtil; |
| 8 | import com.ruoyi.common.utils.DateUtils; | 9 | import com.ruoyi.common.utils.DateUtils; |
| 9 | import io.swagger.annotations.Api; | 10 | import io.swagger.annotations.Api; |
| @@ -86,6 +87,7 @@ public class IotTerminalController extends BaseController | @@ -86,6 +87,7 @@ public class IotTerminalController extends BaseController | ||
| 86 | @PostMapping | 87 | @PostMapping |
| 87 | public AjaxResult add(@RequestBody IotTerminal iotTerminal) | 88 | public AjaxResult add(@RequestBody IotTerminal iotTerminal) |
| 88 | { | 89 | { |
| 90 | + iotTerminal.setSys_user_id(SecurityUtils.getUserId()); | ||
| 89 | return toAjax(iotTerminalService.insertIotTerminal(iotTerminal)); | 91 | return toAjax(iotTerminalService.insertIotTerminal(iotTerminal)); |
| 90 | } | 92 | } |
| 91 | 93 |
| @@ -133,7 +133,7 @@ public class IotThingsModelController extends BaseController | @@ -133,7 +133,7 @@ public class IotThingsModelController extends BaseController | ||
| 133 | return AjaxResult.error("请输入数模型"); | 133 | return AjaxResult.error("请输入数模型"); |
| 134 | } | 134 | } |
| 135 | iotThingsModel.setSpecs(JSONObject.toJSONString(thingsModelItemBase)); | 135 | iotThingsModel.setSpecs(JSONObject.toJSONString(thingsModelItemBase)); |
| 136 | - | 136 | + iotThingsModel.setSys_user_id(SecurityUtils.getUserId()); |
| 137 | IotProduct iotProduct = iIotProductService.selectIotProductById(iotThingsModel.getProduct_id()); | 137 | IotProduct iotProduct = iIotProductService.selectIotProductById(iotThingsModel.getProduct_id()); |
| 138 | iotThingsModel.setMqtt_username(iotProduct.getMqtt_username()); | 138 | iotThingsModel.setMqtt_username(iotProduct.getMqtt_username()); |
| 139 | int ri = iotThingsModelService.insertIotThingsModel(iotThingsModel); | 139 | int ri = iotThingsModelService.insertIotThingsModel(iotThingsModel); |
| @@ -8,6 +8,7 @@ import com.zhonglai.luhui.device.analysis.comm.dto.DeviceSensorData; | @@ -8,6 +8,7 @@ import com.zhonglai.luhui.device.analysis.comm.dto.DeviceSensorData; | ||
| 8 | import com.zhonglai.luhui.device.analysis.comm.dto.LogDeviceOperation; | 8 | import com.zhonglai.luhui.device.analysis.comm.dto.LogDeviceOperation; |
| 9 | import com.zhonglai.luhui.device.domain.*; | 9 | import com.zhonglai.luhui.device.domain.*; |
| 10 | import com.zhonglai.luhui.device.protocol.factory.config.DeviceCach; | 10 | import com.zhonglai.luhui.device.protocol.factory.config.DeviceCach; |
| 11 | +import com.zhonglai.luhui.device.protocol.factory.config.PluginsClassLoader; | ||
| 11 | import com.zhonglai.luhui.device.protocol.factory.dto.ParserDeviceHostDto; | 12 | import com.zhonglai.luhui.device.protocol.factory.dto.ParserDeviceHostDto; |
| 12 | import com.zhonglai.luhui.device.protocol.factory.dto.ParserDeviceInfoDto; | 13 | import com.zhonglai.luhui.device.protocol.factory.dto.ParserDeviceInfoDto; |
| 13 | import com.zhonglai.luhui.device.protocol.factory.dto.ProtocolPurificationModel; | 14 | import com.zhonglai.luhui.device.protocol.factory.dto.ProtocolPurificationModel; |
| @@ -62,7 +63,8 @@ public class PersistenceDBService { | @@ -62,7 +63,8 @@ public class PersistenceDBService { | ||
| 62 | ParserDeviceHostDto parserDeviceHostDto = protocolPurificationModel.getParserDeviceHostDto(); | 63 | ParserDeviceHostDto parserDeviceHostDto = protocolPurificationModel.getParserDeviceHostDto(); |
| 63 | if (parserDeviceHostDto.getIotProduct().getIs_sync_db()==1 && null !=parserDeviceHostDto.getIotProduct().getSync_db() && 0!=parserDeviceHostDto.getIotProduct().getSync_db()) | 64 | if (parserDeviceHostDto.getIotProduct().getIs_sync_db()==1 && null !=parserDeviceHostDto.getIotProduct().getSync_db() && 0!=parserDeviceHostDto.getIotProduct().getSync_db()) |
| 64 | { | 65 | { |
| 65 | - ProtocolSyncFactory protocolSyncFactory = getProtocolSyncService(persistenceDBService.getClassnameFromIotProtocolClassId(parserDeviceHostDto.getIotProduct().getSync_db())); | 66 | + ProtocolSyncFactory protocolSyncFactory = PluginsClassLoader.getJarClass(ProtocolSyncFactory.class,persistenceDBService.getClassnameFromIotProtocolClassId(parserDeviceHostDto.getIotProduct().getSync_db())); |
| 67 | +// ProtocolSyncFactory protocolSyncFactory = getProtocolSyncService(persistenceDBService.getClassnameFromIotProtocolClassId(parserDeviceHostDto.getIotProduct().getSync_db())); | ||
| 66 | if(null != protocolSyncFactory) | 68 | if(null != protocolSyncFactory) |
| 67 | { | 69 | { |
| 68 | protocolSyncFactory.updateParserDeviceHostDto(parserDeviceHostDto); | 70 | protocolSyncFactory.updateParserDeviceHostDto(parserDeviceHostDto); |
| @@ -108,6 +108,7 @@ public class DefaultDbService { | @@ -108,6 +108,7 @@ public class DefaultDbService { | ||
| 108 | }else { | 108 | }else { |
| 109 | iotTerminal.setName(oldparserDeviceHostDto.getIotProduct().getProduct_name()+getLastSixChars(iotTerminal.getDevice_id())+"设备的第"+iotTerminal.getSensor_number()+"号终端"); | 109 | iotTerminal.setName(oldparserDeviceHostDto.getIotProduct().getProduct_name()+getLastSixChars(iotTerminal.getDevice_id())+"设备的第"+iotTerminal.getSensor_number()+"号终端"); |
| 110 | } | 110 | } |
| 111 | + iotTerminal.setSys_user_id(oldparserDeviceHostDto.getIotProduct().getSys_user_id()); | ||
| 111 | baseDao.insert(iotTerminal); | 112 | baseDao.insert(iotTerminal); |
| 112 | } | 113 | } |
| 113 | 114 |
| @@ -17,6 +17,7 @@ import org.springframework.stereotype.Service; | @@ -17,6 +17,7 @@ import org.springframework.stereotype.Service; | ||
| 17 | 17 | ||
| 18 | import java.util.List; | 18 | import java.util.List; |
| 19 | 19 | ||
| 20 | +@Service | ||
| 20 | public class LsyProtocolSyncFactoryImpl implements ProtocolSyncFactory { | 21 | public class LsyProtocolSyncFactoryImpl implements ProtocolSyncFactory { |
| 21 | 22 | ||
| 22 | private BaseDao lsy_baseDao = new BaseDao(new LsyDBFactoryImp()); | 23 | private BaseDao lsy_baseDao = new BaseDao(new LsyDBFactoryImp()); |
| @@ -9,6 +9,7 @@ import org.springframework.context.annotation.ComponentScan; | @@ -9,6 +9,7 @@ import org.springframework.context.annotation.ComponentScan; | ||
| 9 | "com.ruoyi.common", | 9 | "com.ruoyi.common", |
| 10 | "com.ruoyi.system", | 10 | "com.ruoyi.system", |
| 11 | "com.ruoyi.framework", | 11 | "com.ruoyi.framework", |
| 12 | + "com.zhonglai.luhui.config", | ||
| 12 | "com.zhonglai.luhui.datasource", | 13 | "com.zhonglai.luhui.datasource", |
| 13 | "com.zhonglai.luhui.dao", | 14 | "com.zhonglai.luhui.dao", |
| 14 | "com.zhonglai.luhui.sys", | 15 | "com.zhonglai.luhui.sys", |
| @@ -123,7 +123,7 @@ public class LoginService { | @@ -123,7 +123,7 @@ public class LoginService { | ||
| 123 | sysUser.setUserId(userId); | 123 | sysUser.setUserId(userId); |
| 124 | sysUser.setLoginIp(IpUtils.getIpAddr(ServletUtils.getRequest())); | 124 | sysUser.setLoginIp(IpUtils.getIpAddr(ServletUtils.getRequest())); |
| 125 | sysUser.setLoginDate(DateUtils.getNowDate()); | 125 | sysUser.setLoginDate(DateUtils.getNowDate()); |
| 126 | - sysUserService.updateUser(sysUser); | 126 | + sysUserService.updateUserProfile(sysUser); |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | /** | 129 | /** |
| @@ -29,7 +29,7 @@ mqtt: | @@ -29,7 +29,7 @@ mqtt: | ||
| 29 | client: | 29 | client: |
| 30 | #客户端操作时间 | 30 | #客户端操作时间 |
| 31 | operationTime: 10 | 31 | operationTime: 10 |
| 32 | - productids: 17 | 32 | + productids: 13 |
| 33 | 33 | ||
| 34 | #rocketmq配置信息 | 34 | #rocketmq配置信息 |
| 35 | rocketmq: | 35 | rocketmq: |
| @@ -37,4 +37,4 @@ rocketmq: | @@ -37,4 +37,4 @@ rocketmq: | ||
| 37 | name-server: 47.115.144.179:9876 | 37 | name-server: 47.115.144.179:9876 |
| 38 | consumerGroup: ${random.uuid} | 38 | consumerGroup: ${random.uuid} |
| 39 | topic: deviceCommandListen | 39 | topic: deviceCommandListen |
| 40 | - operationToken: 120.79.198.245lh-mqtt-service-listen | ||
| 40 | + operationToken: local_lh-mqtt-service-listen |
-
请 注册 或 登录 后发表评论