正在显示
49 个修改的文件
包含
193 行增加
和
16 行删除
| @@ -44,7 +44,10 @@ public class IotTerminalController extends BaseController | @@ -44,7 +44,10 @@ public class IotTerminalController extends BaseController | ||
| 44 | public TableDataInfo list(IotTerminal iotTerminal) | 44 | public TableDataInfo list(IotTerminal iotTerminal) |
| 45 | { | 45 | { |
| 46 | startPage(); | 46 | startPage(); |
| 47 | - List<IotTerminal> list = iotTerminalService.selectIotTerminalList(iotTerminal); | 47 | + UserTerminalGroupRelation userTerminalGroupRelation = new UserTerminalGroupRelation(); |
| 48 | + userTerminalGroupRelation.setUser_info_id(getUserId().intValue()); | ||
| 49 | + iotTerminal.setUserTerminalGroupRelation(userTerminalGroupRelation); | ||
| 50 | + List<IotTerminal> list = iotTerminalService.selectIotTerminalListByUserId(iotTerminal); | ||
| 48 | return getDataTable(list); | 51 | return getDataTable(list); |
| 49 | } | 52 | } |
| 50 | 53 |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 3 | import org.apache.commons.lang3.builder.ToStringBuilder; | 4 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 4 | import org.apache.commons.lang3.builder.ToStringStyle; | 5 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 5 | import io.swagger.annotations.ApiModel; | 6 | import io.swagger.annotations.ApiModel; |
| @@ -16,6 +17,7 @@ import java.io.Serializable; | @@ -16,6 +17,7 @@ import java.io.Serializable; | ||
| 16 | @ApiModel("主机/网关") | 17 | @ApiModel("主机/网关") |
| 17 | public class IotDevice implements Serializable | 18 | public class IotDevice implements Serializable |
| 18 | { | 19 | { |
| 20 | + @PublicSQLConfig(isSelect=false) | ||
| 19 | private static final long serialVersionUID = 1L; | 21 | private static final long serialVersionUID = 1L; |
| 20 | 22 | ||
| 21 | /** 激活时间 */ | 23 | /** 激活时间 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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; |
| @@ -17,6 +18,7 @@ import java.io.Serializable; | @@ -17,6 +18,7 @@ import java.io.Serializable; | ||
| 17 | @ApiModel("topic权限控制") | 18 | @ApiModel("topic权限控制") |
| 18 | public class IotPermission implements Serializable | 19 | public class IotPermission implements Serializable |
| 19 | { | 20 | { |
| 21 | + @PublicSQLConfig(isSelect=false) | ||
| 20 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| 21 | 23 | ||
| 22 | /** 动作(PUBLISH,SUBSCRIBE,ALL) */ | 24 | /** 动作(PUBLISH,SUBSCRIBE,ALL) */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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; |
| @@ -17,6 +18,7 @@ import java.io.Serializable; | @@ -17,6 +18,7 @@ import java.io.Serializable; | ||
| 17 | @ApiModel("产品") | 18 | @ApiModel("产品") |
| 18 | public class IotProduct implements Serializable | 19 | public class IotProduct implements Serializable |
| 19 | { | 20 | { |
| 21 | + @PublicSQLConfig(isSelect=false) | ||
| 20 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| 21 | 23 | ||
| 22 | /** 创建时间 */ | 24 | /** 创建时间 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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 | import org.apache.commons.lang3.builder.ToStringBuilder; | 7 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 15 | @ApiModel("产品指标翻译") | 16 | @ApiModel("产品指标翻译") |
| 16 | public class IotProductTranslate extends BaseEntity | 17 | public class IotProductTranslate extends BaseEntity |
| 17 | { | 18 | { |
| 19 | + @PublicSQLConfig(isSelect=false) | ||
| 18 | private static final long serialVersionUID = 1L; | 20 | private static final long serialVersionUID = 1L; |
| 19 | 21 | ||
| 20 | /** 创建时间 */ | 22 | /** 创建时间 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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; |
| @@ -17,6 +18,7 @@ import java.io.Serializable; | @@ -17,6 +18,7 @@ import java.io.Serializable; | ||
| 17 | @ApiModel("公司") | 18 | @ApiModel("公司") |
| 18 | public class IotRole implements Serializable | 19 | public class IotRole implements Serializable |
| 19 | { | 20 | { |
| 21 | + @PublicSQLConfig(isSelect=false) | ||
| 20 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| 21 | 23 | ||
| 22 | /** 创建时间 */ | 24 | /** 创建时间 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 3 | import org.apache.commons.lang3.builder.ToStringBuilder; | 4 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| 4 | import org.apache.commons.lang3.builder.ToStringStyle; | 5 | import org.apache.commons.lang3.builder.ToStringStyle; |
| 5 | import io.swagger.annotations.ApiModel; | 6 | import io.swagger.annotations.ApiModel; |
| @@ -16,6 +17,7 @@ import java.io.Serializable; | @@ -16,6 +17,7 @@ import java.io.Serializable; | ||
| 16 | @ApiModel("终端") | 17 | @ApiModel("终端") |
| 17 | public class IotTerminal implements Serializable | 18 | public class IotTerminal implements Serializable |
| 18 | { | 19 | { |
| 20 | + @PublicSQLConfig(isSelect=false) | ||
| 19 | private static final long serialVersionUID = 1L; | 21 | private static final long serialVersionUID = 1L; |
| 20 | 22 | ||
| 21 | /** 网关id */ | 23 | /** 网关id */ |
| @@ -49,6 +51,26 @@ public class IotTerminal implements Serializable | @@ -49,6 +51,26 @@ public class IotTerminal implements Serializable | ||
| 49 | @ApiModelProperty("数据更新时间") | 51 | @ApiModelProperty("数据更新时间") |
| 50 | private Integer data_update_time; | 52 | private Integer data_update_time; |
| 51 | 53 | ||
| 54 | + private UserTerminalGroupRelation userTerminalGroupRelation; | ||
| 55 | + | ||
| 56 | + private IotDevice iotDevice; | ||
| 57 | + | ||
| 58 | + public IotDevice getIotDevice() { | ||
| 59 | + return iotDevice; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public void setIotDevice(IotDevice iotDevice) { | ||
| 63 | + this.iotDevice = iotDevice; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public UserTerminalGroupRelation getUserTerminalGroupRelation() { | ||
| 67 | + return userTerminalGroupRelation; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public void setUserTerminalGroupRelation(UserTerminalGroupRelation userTerminalGroupRelation) { | ||
| 71 | + this.userTerminalGroupRelation = userTerminalGroupRelation; | ||
| 72 | + } | ||
| 73 | + | ||
| 52 | public Integer getData_update_time() { | 74 | public Integer getData_update_time() { |
| 53 | return data_update_time; | 75 | return data_update_time; |
| 54 | } | 76 | } |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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; |
| @@ -17,6 +18,7 @@ import java.io.Serializable; | @@ -17,6 +18,7 @@ import java.io.Serializable; | ||
| 17 | @ApiModel("物模型模板") | 18 | @ApiModel("物模型模板") |
| 18 | public class IotThingsModel implements Serializable | 19 | public class IotThingsModel implements Serializable |
| 19 | { | 20 | { |
| 21 | + @PublicSQLConfig(isSelect=false) | ||
| 20 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| 21 | 23 | ||
| 22 | /** 创建者 */ | 24 | /** 创建者 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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 | import org.apache.commons.lang3.builder.ToStringBuilder; | 7 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 15 | @ApiModel("物模型模板") | 16 | @ApiModel("物模型模板") |
| 16 | public class IotThingsModelTemplate extends BaseEntity | 17 | public class IotThingsModelTemplate extends BaseEntity |
| 17 | { | 18 | { |
| 19 | + @PublicSQLConfig(isSelect=false) | ||
| 18 | private static final long serialVersionUID = 1L; | 20 | private static final long serialVersionUID = 1L; |
| 19 | 21 | ||
| 20 | /** 归属(0主键,1终端) */ | 22 | /** 归属(0主键,1终端) */ |
| @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; | @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; | ||
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | import com.ruoyi.system.domain.tool.Excel; | 4 | import com.ruoyi.system.domain.tool.Excel; |
| 5 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 5 | import io.swagger.annotations.ApiModel; | 6 | import io.swagger.annotations.ApiModel; |
| 6 | import io.swagger.annotations.ApiModelProperty; | 7 | import io.swagger.annotations.ApiModelProperty; |
| 7 | import org.apache.commons.lang3.builder.ToStringBuilder; | 8 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -18,6 +19,7 @@ import javax.validation.constraints.Size; | @@ -18,6 +19,7 @@ import javax.validation.constraints.Size; | ||
| 18 | @ApiModel(value = "SysConfig", description = "参数配置表") | 19 | @ApiModel(value = "SysConfig", description = "参数配置表") |
| 19 | public class SysConfig extends BaseEntity | 20 | public class SysConfig extends BaseEntity |
| 20 | { | 21 | { |
| 22 | + @PublicSQLConfig(isSelect=false) | ||
| 21 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; |
| 22 | 24 | ||
| 23 | /** 参数主键 */ | 25 | /** 参数主键 */ |
| @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; | @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; | ||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | import com.ruoyi.system.domain.tool.BaseEntity; | 4 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 5 | import com.ruoyi.system.domain.tool.Excel; | 5 | import com.ruoyi.system.domain.tool.Excel; |
| 6 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 6 | 7 | ||
| 7 | import java.util.Date; | 8 | import java.util.Date; |
| 8 | 9 | ||
| @@ -13,6 +14,7 @@ import java.util.Date; | @@ -13,6 +14,7 @@ import java.util.Date; | ||
| 13 | */ | 14 | */ |
| 14 | public class SysLogininfor extends BaseEntity | 15 | public class SysLogininfor extends BaseEntity |
| 15 | { | 16 | { |
| 17 | + @PublicSQLConfig(isSelect=false) | ||
| 16 | private static final long serialVersionUID = 1L; | 18 | private static final long serialVersionUID = 1L; |
| 17 | 19 | ||
| 18 | /** ID */ | 20 | /** ID */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | import com.ruoyi.system.domain.tool.Xss; | 5 | import com.ruoyi.system.domain.tool.Xss; |
| 5 | import io.swagger.annotations.ApiModel; | 6 | import io.swagger.annotations.ApiModel; |
| 6 | import io.swagger.annotations.ApiModelProperty; | 7 | import io.swagger.annotations.ApiModelProperty; |
| @@ -18,6 +19,7 @@ import javax.validation.constraints.Size; | @@ -18,6 +19,7 @@ import javax.validation.constraints.Size; | ||
| 18 | @ApiModel(value = "SysNotice", description = "通知公告表") | 19 | @ApiModel(value = "SysNotice", description = "通知公告表") |
| 19 | public class SysNotice extends BaseEntity | 20 | public class SysNotice extends BaseEntity |
| 20 | { | 21 | { |
| 22 | + @PublicSQLConfig(isSelect=false) | ||
| 21 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; |
| 22 | 24 | ||
| 23 | /** 公告ID */ | 25 | /** 公告ID */ |
| @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; | @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; | ||
| 3 | import com.fasterxml.jackson.annotation.JsonFormat; | 3 | import com.fasterxml.jackson.annotation.JsonFormat; |
| 4 | import com.ruoyi.system.domain.tool.BaseEntity; | 4 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 5 | import com.ruoyi.system.domain.tool.Excel; | 5 | import com.ruoyi.system.domain.tool.Excel; |
| 6 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 6 | import io.swagger.annotations.ApiModel; | 7 | import io.swagger.annotations.ApiModel; |
| 7 | import io.swagger.annotations.ApiModelProperty; | 8 | import io.swagger.annotations.ApiModelProperty; |
| 8 | 9 | ||
| @@ -16,6 +17,7 @@ import java.util.Date; | @@ -16,6 +17,7 @@ import java.util.Date; | ||
| 16 | @ApiModel(value = "SysOperLog", description = "操作日志记录表") | 17 | @ApiModel(value = "SysOperLog", description = "操作日志记录表") |
| 17 | public class SysOperLog extends BaseEntity | 18 | public class SysOperLog extends BaseEntity |
| 18 | { | 19 | { |
| 20 | + @PublicSQLConfig(isSelect=false) | ||
| 19 | private static final long serialVersionUID = 1L; | 21 | private static final long serialVersionUID = 1L; |
| 20 | 22 | ||
| 21 | /** 日志主键 */ | 23 | /** 日志主键 */ |
| @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; | @@ -2,6 +2,7 @@ package com.ruoyi.system.domain; | ||
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | import com.ruoyi.system.domain.tool.Excel; | 4 | import com.ruoyi.system.domain.tool.Excel; |
| 5 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 5 | import io.swagger.annotations.ApiModel; | 6 | import io.swagger.annotations.ApiModel; |
| 6 | import io.swagger.annotations.ApiModelProperty; | 7 | import io.swagger.annotations.ApiModelProperty; |
| 7 | import org.apache.commons.lang3.builder.ToStringBuilder; | 8 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -18,6 +19,7 @@ import javax.validation.constraints.Size; | @@ -18,6 +19,7 @@ import javax.validation.constraints.Size; | ||
| 18 | @ApiModel(value = "SysPost", description = "岗位表") | 19 | @ApiModel(value = "SysPost", description = "岗位表") |
| 19 | public class SysPost extends BaseEntity | 20 | public class SysPost extends BaseEntity |
| 20 | { | 21 | { |
| 22 | + @PublicSQLConfig(isSelect=false) | ||
| 21 | private static final long serialVersionUID = 1L; | 23 | private static final long serialVersionUID = 1L; |
| 22 | 24 | ||
| 23 | /** 岗位序号 */ | 25 | /** 岗位序号 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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 | import org.apache.commons.lang3.builder.ToStringBuilder; | 7 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 15 | @ApiModel("终端分组") | 16 | @ApiModel("终端分组") |
| 16 | public class UserTerminalGroup extends BaseEntity | 17 | public class UserTerminalGroup extends BaseEntity |
| 17 | { | 18 | { |
| 19 | + @PublicSQLConfig(isSelect=false) | ||
| 18 | private static final long serialVersionUID = 1L; | 20 | private static final long serialVersionUID = 1L; |
| 19 | 21 | ||
| 20 | /** 创建时间 */ | 22 | /** 创建时间 */ |
| 1 | package com.ruoyi.system.domain; | 1 | package com.ruoyi.system.domain; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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 | import org.apache.commons.lang3.builder.ToStringBuilder; | 7 | import org.apache.commons.lang3.builder.ToStringBuilder; |
| @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | @@ -15,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 15 | @ApiModel("终端分组关系") | 16 | @ApiModel("终端分组关系") |
| 16 | public class UserTerminalGroupRelation extends BaseEntity | 17 | public class UserTerminalGroupRelation extends BaseEntity |
| 17 | { | 18 | { |
| 19 | + @PublicSQLConfig(isSelect=false) | ||
| 18 | private static final long serialVersionUID = 1L; | 20 | private static final long serialVersionUID = 1L; |
| 19 | 21 | ||
| 20 | /** 创建时间 */ | 22 | /** 创建时间 */ |
| 1 | package com.ruoyi.system.domain.entity; | 1 | package com.ruoyi.system.domain.entity; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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 | 7 | ||
| @@ -17,6 +18,7 @@ import java.util.List; | @@ -17,6 +18,7 @@ import java.util.List; | ||
| 17 | */ | 18 | */ |
| 18 | public class SysDept extends BaseEntity | 19 | public class SysDept extends BaseEntity |
| 19 | { | 20 | { |
| 21 | + @PublicSQLConfig(isSelect=false) | ||
| 20 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| 21 | 23 | ||
| 22 | /** 部门ID */ | 24 | /** 部门ID */ |
| 1 | package com.ruoyi.system.domain.entity; | 1 | package com.ruoyi.system.domain.entity; |
| 2 | 2 | ||
| 3 | import com.ruoyi.system.domain.tool.BaseEntity; | 3 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 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 | 7 | ||
| @@ -17,6 +18,7 @@ import java.util.List; | @@ -17,6 +18,7 @@ import java.util.List; | ||
| 17 | */ | 18 | */ |
| 18 | public class SysMenu extends BaseEntity | 19 | public class SysMenu extends BaseEntity |
| 19 | { | 20 | { |
| 21 | + @PublicSQLConfig(isSelect=false) | ||
| 20 | private static final long serialVersionUID = 1L; | 22 | private static final long serialVersionUID = 1L; |
| 21 | 23 | ||
| 22 | /** 菜单ID */ | 24 | /** 菜单ID */ |
| @@ -15,6 +15,7 @@ import java.util.Map; | @@ -15,6 +15,7 @@ import java.util.Map; | ||
| 15 | */ | 15 | */ |
| 16 | public class BaseEntity implements Serializable | 16 | public class BaseEntity implements Serializable |
| 17 | { | 17 | { |
| 18 | + @PublicSQLConfig(isSelect=false) | ||
| 18 | private static final long serialVersionUID = 1L; | 19 | private static final long serialVersionUID = 1L; |
| 19 | 20 | ||
| 20 | /** 搜索值 */ | 21 | /** 搜索值 */ |
| 1 | package com.ruoyi.common.core.page; | 1 | package com.ruoyi.common.core.page; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | import java.io.Serializable; | 5 | import java.io.Serializable; |
| 4 | import java.util.List; | 6 | import java.util.List; |
| 5 | 7 | ||
| @@ -10,6 +12,7 @@ import java.util.List; | @@ -10,6 +12,7 @@ import java.util.List; | ||
| 10 | */ | 12 | */ |
| 11 | public class TableDataInfo implements Serializable | 13 | public class TableDataInfo implements Serializable |
| 12 | { | 14 | { |
| 15 | + @PublicSQLConfig(isSelect=false) | ||
| 13 | private static final long serialVersionUID = 1L; | 16 | private static final long serialVersionUID = 1L; |
| 14 | 17 | ||
| 15 | /** 总记录数 */ | 18 | /** 总记录数 */ |
| 1 | package com.ruoyi.common.exception; | 1 | package com.ruoyi.common.exception; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 演示模式异常 | 6 | * 演示模式异常 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception; | ||
| 7 | */ | 9 | */ |
| 8 | public class DemoModeException extends RuntimeException | 10 | public class DemoModeException extends RuntimeException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | public DemoModeException() | 15 | public DemoModeException() |
| 1 | package com.ruoyi.common.exception; | 1 | package com.ruoyi.common.exception; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 全局异常 | 6 | * 全局异常 |
| 5 | * | 7 | * |
| @@ -7,7 +9,7 @@ package com.ruoyi.common.exception; | @@ -7,7 +9,7 @@ package com.ruoyi.common.exception; | ||
| 7 | */ | 9 | */ |
| 8 | public class GlobalException extends RuntimeException | 10 | public class GlobalException extends RuntimeException |
| 9 | { | 11 | { |
| 10 | - | 12 | + @PublicSQLConfig(isSelect=false) |
| 11 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 12 | 14 | ||
| 13 | /** | 15 | /** |
| 1 | package com.ruoyi.common.exception; | 1 | package com.ruoyi.common.exception; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 业务异常 | 6 | * 业务异常 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception; | ||
| 7 | */ | 9 | */ |
| 8 | public final class ServiceException extends RuntimeException | 10 | public final class ServiceException extends RuntimeException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | /** | 15 | /** |
| @@ -2,6 +2,7 @@ package com.ruoyi.common.exception.base; | @@ -2,6 +2,7 @@ package com.ruoyi.common.exception.base; | ||
| 2 | 2 | ||
| 3 | import com.ruoyi.common.utils.MessageUtils; | 3 | import com.ruoyi.common.utils.MessageUtils; |
| 4 | import com.ruoyi.common.utils.StringUtils; | 4 | import com.ruoyi.common.utils.StringUtils; |
| 5 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 5 | 6 | ||
| 6 | /** | 7 | /** |
| 7 | * 基础异常 | 8 | * 基础异常 |
| @@ -10,6 +11,7 @@ import com.ruoyi.common.utils.StringUtils; | @@ -10,6 +11,7 @@ import com.ruoyi.common.utils.StringUtils; | ||
| 10 | */ | 11 | */ |
| 11 | public class BaseException extends RuntimeException | 12 | public class BaseException extends RuntimeException |
| 12 | { | 13 | { |
| 14 | + @PublicSQLConfig(isSelect=false) | ||
| 13 | private static final long serialVersionUID = 1L; | 15 | private static final long serialVersionUID = 1L; |
| 14 | 16 | ||
| 15 | /** | 17 | /** |
| 1 | package com.ruoyi.common.exception.file; | 1 | package com.ruoyi.common.exception.file; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.exception.base.BaseException; | 3 | import com.ruoyi.common.exception.base.BaseException; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | 5 | ||
| 5 | /** | 6 | /** |
| 6 | * 文件信息异常类 | 7 | * 文件信息异常类 |
| @@ -9,6 +10,7 @@ import com.ruoyi.common.exception.base.BaseException; | @@ -9,6 +10,7 @@ import com.ruoyi.common.exception.base.BaseException; | ||
| 9 | */ | 10 | */ |
| 10 | public class FileException extends BaseException | 11 | public class FileException extends BaseException |
| 11 | { | 12 | { |
| 13 | + @PublicSQLConfig(isSelect=false) | ||
| 12 | private static final long serialVersionUID = 1L; | 14 | private static final long serialVersionUID = 1L; |
| 13 | 15 | ||
| 14 | public FileException(String code, Object[] args) | 16 | public FileException(String code, Object[] args) |
ruoyi-common/src/main/java/com/ruoyi/common/exception/file/FileNameLengthLimitExceededException.java
| 1 | package com.ruoyi.common.exception.file; | 1 | package com.ruoyi.common.exception.file; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 文件名称超长限制异常类 | 6 | * 文件名称超长限制异常类 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.file; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.file; | ||
| 7 | */ | 9 | */ |
| 8 | public class FileNameLengthLimitExceededException extends FileException | 10 | public class FileNameLengthLimitExceededException extends FileException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | public FileNameLengthLimitExceededException(int defaultFileNameLength) | 15 | public FileNameLengthLimitExceededException(int defaultFileNameLength) |
| 1 | package com.ruoyi.common.exception.file; | 1 | package com.ruoyi.common.exception.file; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 文件名大小限制异常类 | 6 | * 文件名大小限制异常类 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.file; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.file; | ||
| 7 | */ | 9 | */ |
| 8 | public class FileSizeLimitExceededException extends FileException | 10 | public class FileSizeLimitExceededException extends FileException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | public FileSizeLimitExceededException(long defaultMaxSize) | 15 | public FileSizeLimitExceededException(long defaultMaxSize) |
| 1 | -package com.ruoyi.common.exception.file; import org.apache.commons.fileupload.FileUploadException; import java.util.Arrays; /** * 文件上传 误异常类 * * @author ruoyi */public class InvalidExtensionException extends FileUploadException{ private static final long serialVersionUID = 1L; private String[] allowedExtension; private String extension; private String filename; public InvalidExtensionException(String[] allowedExtension, String extension, String filename) { super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]"); this.allowedExtension = allowedExtension; this.extension = extension; this.filename = filename; } public String[] getAllowedExtension() { return allowedExtension; } public String getExtension() { return extension; } public String getFilename() { return filename; } public static class InvalidImageExtensionException extends InvalidExtensionException { private static final long serialVersionUID = 1L; public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } } public static class InvalidFlashExtensionException extends InvalidExtensionException { private static final long serialVersionUID = 1L; public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } } public static class InvalidMediaExtensionException extends InvalidExtensionException { private static final long serialVersionUID = 1L; public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } } public static class InvalidVideoExtensionException extends InvalidExtensionException { private static final long serialVersionUID = 1L; public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } }} | ||
| 1 | +package com.ruoyi.common.exception.file; import com.ruoyi.system.domain.tool.PublicSQLConfig;import org.apache.commons.fileupload.FileUploadException; import java.util.Arrays; /** * 文件上传 误异常类 * * @author ruoyi */public class InvalidExtensionException extends FileUploadException{ @PublicSQLConfig(isSelect=false) private static final long serialVersionUID = 1L; private String[] allowedExtension; private String extension; private String filename; public InvalidExtensionException(String[] allowedExtension, String extension, String filename) { super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]"); this.allowedExtension = allowedExtension; this.extension = extension; this.filename = filename; } public String[] getAllowedExtension() { return allowedExtension; } public String getExtension() { return extension; } public String getFilename() { return filename; } public static class InvalidImageExtensionException extends InvalidExtensionException { @PublicSQLConfig(isSelect=false) private static final long serialVersionUID = 1L; public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } } public static class InvalidFlashExtensionException extends InvalidExtensionException { @PublicSQLConfig(isSelect=false) private static final long serialVersionUID = 1L; public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } } public static class InvalidMediaExtensionException extends InvalidExtensionException { @PublicSQLConfig(isSelect=false) private static final long serialVersionUID = 1L; public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } } public static class InvalidVideoExtensionException extends InvalidExtensionException { @PublicSQLConfig(isSelect=false) private static final long serialVersionUID = 1L; public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename) { super(allowedExtension, extension, filename); } }} |
| 1 | package com.ruoyi.common.exception.user; | 1 | package com.ruoyi.common.exception.user; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 验证码错误异常类 | 6 | * 验证码错误异常类 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.user; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.user; | ||
| 7 | */ | 9 | */ |
| 8 | public class CaptchaException extends UserException | 10 | public class CaptchaException extends UserException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | public CaptchaException() | 15 | public CaptchaException() |
| 1 | package com.ruoyi.common.exception.user; | 1 | package com.ruoyi.common.exception.user; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 验证码失效异常类 | 6 | * 验证码失效异常类 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.user; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.user; | ||
| 7 | */ | 9 | */ |
| 8 | public class CaptchaExpireException extends UserException | 10 | public class CaptchaExpireException extends UserException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | public CaptchaExpireException() | 15 | public CaptchaExpireException() |
| 1 | package com.ruoyi.common.exception.user; | 1 | package com.ruoyi.common.exception.user; |
| 2 | 2 | ||
| 3 | import com.ruoyi.common.exception.base.BaseException; | 3 | import com.ruoyi.common.exception.base.BaseException; |
| 4 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | 5 | ||
| 5 | /** | 6 | /** |
| 6 | * 用户信息异常类 | 7 | * 用户信息异常类 |
| @@ -9,6 +10,7 @@ import com.ruoyi.common.exception.base.BaseException; | @@ -9,6 +10,7 @@ import com.ruoyi.common.exception.base.BaseException; | ||
| 9 | */ | 10 | */ |
| 10 | public class UserException extends BaseException | 11 | public class UserException extends BaseException |
| 11 | { | 12 | { |
| 13 | + @PublicSQLConfig(isSelect=false) | ||
| 12 | private static final long serialVersionUID = 1L; | 14 | private static final long serialVersionUID = 1L; |
| 13 | 15 | ||
| 14 | public UserException(String code, Object[] args) | 16 | public UserException(String code, Object[] args) |
| 1 | package com.ruoyi.common.exception.user; | 1 | package com.ruoyi.common.exception.user; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 4 | + | ||
| 3 | /** | 5 | /** |
| 4 | * 用户密码不正确或不符合规范异常类 | 6 | * 用户密码不正确或不符合规范异常类 |
| 5 | * | 7 | * |
| @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.user; | @@ -7,6 +9,7 @@ package com.ruoyi.common.exception.user; | ||
| 7 | */ | 9 | */ |
| 8 | public class UserPasswordNotMatchException extends UserException | 10 | public class UserPasswordNotMatchException extends UserException |
| 9 | { | 11 | { |
| 12 | + @PublicSQLConfig(isSelect=false) | ||
| 10 | private static final long serialVersionUID = 1L; | 13 | private static final long serialVersionUID = 1L; |
| 11 | 14 | ||
| 12 | public UserPasswordNotMatchException() | 15 | public UserPasswordNotMatchException() |
| @@ -26,11 +26,6 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> | @@ -26,11 +26,6 @@ public class FastJson2JsonRedisSerializer<T> implements RedisSerializer<T> | ||
| 26 | 26 | ||
| 27 | private Class<T> clazz; | 27 | private Class<T> clazz; |
| 28 | 28 | ||
| 29 | - static | ||
| 30 | - { | ||
| 31 | - ParserConfig.getGlobalInstance().setAutoTypeSupport(true); | ||
| 32 | - } | ||
| 33 | - | ||
| 34 | public FastJson2JsonRedisSerializer(Class<T> clazz) | 29 | public FastJson2JsonRedisSerializer(Class<T> clazz) |
| 35 | { | 30 | { |
| 36 | super(); | 31 | super(); |
| 1 | package com.ruoyi.framework.config; | 1 | package com.ruoyi.framework.config; |
| 2 | 2 | ||
| 3 | +import com.alibaba.fastjson.parser.ParserConfig; | ||
| 3 | import com.fasterxml.jackson.annotation.JsonAutoDetect; | 4 | import com.fasterxml.jackson.annotation.JsonAutoDetect; |
| 4 | import com.fasterxml.jackson.annotation.JsonTypeInfo; | 5 | import com.fasterxml.jackson.annotation.JsonTypeInfo; |
| 5 | import com.fasterxml.jackson.annotation.PropertyAccessor; | 6 | import com.fasterxml.jackson.annotation.PropertyAccessor; |
| @@ -30,6 +31,8 @@ public class RedisConfig extends CachingConfigurerSupport | @@ -30,6 +31,8 @@ public class RedisConfig extends CachingConfigurerSupport | ||
| 30 | RedisTemplate<Object, Object> template = new RedisTemplate<>(); | 31 | RedisTemplate<Object, Object> template = new RedisTemplate<>(); |
| 31 | template.setConnectionFactory(connectionFactory); | 32 | template.setConnectionFactory(connectionFactory); |
| 32 | 33 | ||
| 34 | + //配置 | ||
| 35 | + ParserConfig.getGlobalInstance().setAutoTypeSupport(true); | ||
| 33 | FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class); | 36 | FastJson2JsonRedisSerializer serializer = new FastJson2JsonRedisSerializer(Object.class); |
| 34 | 37 | ||
| 35 | ObjectMapper mapper = new ObjectMapper(); | 38 | ObjectMapper mapper = new ObjectMapper(); |
| @@ -3,6 +3,8 @@ package com.ruoyi.generator.domain; | @@ -3,6 +3,8 @@ package com.ruoyi.generator.domain; | ||
| 3 | import java.util.List; | 3 | import java.util.List; |
| 4 | import javax.validation.Valid; | 4 | import javax.validation.Valid; |
| 5 | import javax.validation.constraints.NotBlank; | 5 | import javax.validation.constraints.NotBlank; |
| 6 | + | ||
| 7 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 6 | import org.apache.commons.lang3.ArrayUtils; | 8 | import org.apache.commons.lang3.ArrayUtils; |
| 7 | import com.ruoyi.common.constant.GenConstants; | 9 | import com.ruoyi.common.constant.GenConstants; |
| 8 | import com.ruoyi.system.domain.tool.BaseEntity; | 10 | import com.ruoyi.system.domain.tool.BaseEntity; |
| @@ -15,6 +17,7 @@ import com.ruoyi.common.utils.StringUtils; | @@ -15,6 +17,7 @@ import com.ruoyi.common.utils.StringUtils; | ||
| 15 | */ | 17 | */ |
| 16 | public class GenTable extends BaseEntity | 18 | public class GenTable extends BaseEntity |
| 17 | { | 19 | { |
| 20 | + @PublicSQLConfig(isSelect=false) | ||
| 18 | private static final long serialVersionUID = 1L; | 21 | private static final long serialVersionUID = 1L; |
| 19 | 22 | ||
| 20 | /** 编号 */ | 23 | /** 编号 */ |
| @@ -3,6 +3,7 @@ package com.ruoyi.generator.domain; | @@ -3,6 +3,7 @@ package com.ruoyi.generator.domain; | ||
| 3 | import javax.validation.constraints.NotBlank; | 3 | import javax.validation.constraints.NotBlank; |
| 4 | import com.ruoyi.system.domain.tool.BaseEntity; | 4 | import com.ruoyi.system.domain.tool.BaseEntity; |
| 5 | import com.ruoyi.common.utils.StringUtils; | 5 | import com.ruoyi.common.utils.StringUtils; |
| 6 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 6 | 7 | ||
| 7 | /** | 8 | /** |
| 8 | * 代码生成业务字段表 gen_table_column | 9 | * 代码生成业务字段表 gen_table_column |
| @@ -11,6 +12,7 @@ import com.ruoyi.common.utils.StringUtils; | @@ -11,6 +12,7 @@ import com.ruoyi.common.utils.StringUtils; | ||
| 11 | */ | 12 | */ |
| 12 | public class GenTableColumn extends BaseEntity | 13 | public class GenTableColumn extends BaseEntity |
| 13 | { | 14 | { |
| 15 | + @PublicSQLConfig(isSelect=false) | ||
| 14 | private static final long serialVersionUID = 1L; | 16 | private static final long serialVersionUID = 1L; |
| 15 | 17 | ||
| 16 | /** 编号 */ | 18 | /** 编号 */ |
| @@ -9,6 +9,7 @@ import com.ruoyi.common.annotation.Excel; | @@ -9,6 +9,7 @@ import com.ruoyi.common.annotation.Excel; | ||
| 9 | #end | 9 | #end |
| 10 | import io.swagger.annotations.ApiModel; | 10 | import io.swagger.annotations.ApiModel; |
| 11 | import io.swagger.annotations.ApiModelProperty; | 11 | import io.swagger.annotations.ApiModelProperty; |
| 12 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 12 | 13 | ||
| 13 | /** | 14 | /** |
| 14 | * ${functionName}对象 ${tableName} | 15 | * ${functionName}对象 ${tableName} |
| @@ -24,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; | @@ -24,6 +25,7 @@ import io.swagger.annotations.ApiModelProperty; | ||
| 24 | #end | 25 | #end |
| 25 | public class ${ClassName} extends ${Entity} | 26 | public class ${ClassName} extends ${Entity} |
| 26 | { | 27 | { |
| 28 | + @PublicSQLConfig(isSelect=false) | ||
| 27 | private static final long serialVersionUID = 1L; | 29 | private static final long serialVersionUID = 1L; |
| 28 | 30 | ||
| 29 | #foreach ($column in $columns) | 31 | #foreach ($column in $columns) |
| @@ -4,6 +4,7 @@ package ${packageName}.domain; | @@ -4,6 +4,7 @@ package ${packageName}.domain; | ||
| 4 | import ${import}; | 4 | import ${import}; |
| 5 | #end | 5 | #end |
| 6 | import com.ruoyi.common.annotation.Excel; | 6 | import com.ruoyi.common.annotation.Excel; |
| 7 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 7 | 8 | ||
| 8 | /** | 9 | /** |
| 9 | * ${subTable.functionName}对象 ${subTableName} | 10 | * ${subTable.functionName}对象 ${subTableName} |
| @@ -13,6 +14,7 @@ import com.ruoyi.common.annotation.Excel; | @@ -13,6 +14,7 @@ import com.ruoyi.common.annotation.Excel; | ||
| 13 | */ | 14 | */ |
| 14 | public class ${subClassName} extends BaseEntity | 15 | public class ${subClassName} extends BaseEntity |
| 15 | { | 16 | { |
| 17 | + @PublicSQLConfig(isSelect=false) | ||
| 16 | private static final long serialVersionUID = 1L; | 18 | private static final long serialVersionUID = 1L; |
| 17 | 19 | ||
| 18 | #foreach ($column in $subTable.columns) | 20 | #foreach ($column in $subTable.columns) |
| 1 | package com.ruoyi.system.dto; | 1 | package com.ruoyi.system.dto; |
| 2 | 2 | ||
| 3 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 3 | import org.apache.commons.lang3.StringUtils; | 4 | import org.apache.commons.lang3.StringUtils; |
| 4 | 5 | ||
| 5 | import java.lang.reflect.Field; | 6 | import java.lang.reflect.Field; |
| @@ -12,7 +13,7 @@ import java.util.Map; | @@ -12,7 +13,7 @@ import java.util.Map; | ||
| 12 | public class PublicSQL { | 13 | public class PublicSQL { |
| 13 | private String changTableNameFromObject(Object object) | 14 | private String changTableNameFromObject(Object object) |
| 14 | { | 15 | { |
| 15 | - return com.ruoyi.common.utils.StringUtils.toUnderScoreCase(object.getClass().getName()); | 16 | + return com.ruoyi.common.utils.StringUtils.toUnderScoreCase(object.getClass().getSimpleName()); |
| 16 | } | 17 | } |
| 17 | 18 | ||
| 18 | 19 | ||
| @@ -751,9 +752,9 @@ public class PublicSQL { | @@ -751,9 +752,9 @@ public class PublicSQL { | ||
| 751 | return para.get("sql")+""; | 752 | return para.get("sql")+""; |
| 752 | } | 753 | } |
| 753 | 754 | ||
| 754 | - public String updateBySql(Map<String, Object> para) | 755 | + public String updateBySql(String sql) |
| 755 | { | 756 | { |
| 756 | - return para.get("sql")+""; | 757 | + return sql; |
| 757 | } | 758 | } |
| 758 | 759 | ||
| 759 | public static String escapeSql(String str) { | 760 | public static String escapeSql(String str) { |
| @@ -13,6 +13,11 @@ public class ApiLoginUser extends BaseLoginUser { | @@ -13,6 +13,11 @@ public class ApiLoginUser extends BaseLoginUser { | ||
| 13 | private Yu2leUserInfo yu2leUserInfo; | 13 | private Yu2leUserInfo yu2leUserInfo; |
| 14 | private Yu2leUserLogin yu2leUserLogin; | 14 | private Yu2leUserLogin yu2leUserLogin; |
| 15 | 15 | ||
| 16 | + public ApiLoginUser() | ||
| 17 | + { | ||
| 18 | + | ||
| 19 | + } | ||
| 20 | + | ||
| 16 | public ApiLoginUser(Yu2leUserInfo yu2leUserInfo,Yu2leUserLogin yu2leUserLogin) { | 21 | public ApiLoginUser(Yu2leUserInfo yu2leUserInfo,Yu2leUserLogin yu2leUserLogin) { |
| 17 | this.yu2leUserLogin = yu2leUserLogin; | 22 | this.yu2leUserLogin = yu2leUserLogin; |
| 18 | this.yu2leUserInfo = yu2leUserInfo; | 23 | this.yu2leUserInfo = yu2leUserInfo; |
| @@ -3,6 +3,7 @@ package com.ruoyi.system.login.dto; | @@ -3,6 +3,7 @@ package com.ruoyi.system.login.dto; | ||
| 3 | import com.alibaba.fastjson.annotation.JSONField; | 3 | import com.alibaba.fastjson.annotation.JSONField; |
| 4 | import com.ruoyi.common.core.domain.BaseLoginUser; | 4 | import com.ruoyi.common.core.domain.BaseLoginUser; |
| 5 | import com.ruoyi.system.domain.entity.SysUser; | 5 | import com.ruoyi.system.domain.entity.SysUser; |
| 6 | +import com.ruoyi.system.domain.tool.PublicSQLConfig; | ||
| 6 | import com.ruoyi.system.domain.tool.SysLogininforType; | 7 | import com.ruoyi.system.domain.tool.SysLogininforType; |
| 7 | import org.springframework.security.core.GrantedAuthority; | 8 | import org.springframework.security.core.GrantedAuthority; |
| 8 | 9 | ||
| @@ -16,6 +17,7 @@ import java.util.Set; | @@ -16,6 +17,7 @@ import java.util.Set; | ||
| 16 | */ | 17 | */ |
| 17 | public class SysLoginUser extends BaseLoginUser | 18 | public class SysLoginUser extends BaseLoginUser |
| 18 | { | 19 | { |
| 20 | + @PublicSQLConfig(isSelect=false) | ||
| 19 | private static final long serialVersionUID = 1L; | 21 | private static final long serialVersionUID = 1L; |
| 20 | 22 | ||
| 21 | /** | 23 | /** |
| @@ -28,7 +28,7 @@ public interface IotTerminalMapper | @@ -28,7 +28,7 @@ public interface IotTerminalMapper | ||
| 28 | * @return null集合 | 28 | * @return null集合 |
| 29 | */ | 29 | */ |
| 30 | public List<IotTerminal> selectIotTerminalList(IotTerminal iotTerminal); | 30 | public List<IotTerminal> selectIotTerminalList(IotTerminal iotTerminal); |
| 31 | - | 31 | + List<IotTerminal>selectIotTerminalListByUserId(IotTerminal iotTerminal); |
| 32 | /** | 32 | /** |
| 33 | * 新增null | 33 | * 新增null |
| 34 | * | 34 | * |
| @@ -30,6 +30,7 @@ public interface IIotTerminalService | @@ -30,6 +30,7 @@ public interface IIotTerminalService | ||
| 30 | */ | 30 | */ |
| 31 | public List<IotTerminal> selectIotTerminalList(IotTerminal iotTerminal); | 31 | public List<IotTerminal> selectIotTerminalList(IotTerminal iotTerminal); |
| 32 | 32 | ||
| 33 | + List<IotTerminal> selectIotTerminalListByUserId(IotTerminal iotTerminal); | ||
| 33 | /** | 34 | /** |
| 34 | * 新增null | 35 | * 新增null |
| 35 | * | 36 | * |
| @@ -55,6 +55,11 @@ public class IotTerminalServiceImpl implements IIotTerminalService | @@ -55,6 +55,11 @@ public class IotTerminalServiceImpl implements IIotTerminalService | ||
| 55 | return iotTerminalMapper.selectIotTerminalList(iotTerminal); | 55 | return iotTerminalMapper.selectIotTerminalList(iotTerminal); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | + @Override | ||
| 59 | + public List<IotTerminal> selectIotTerminalListByUserId(IotTerminal iotTerminal) { | ||
| 60 | + return iotTerminalMapper.selectIotTerminalListByUserId(iotTerminal); | ||
| 61 | + } | ||
| 62 | + | ||
| 58 | /** | 63 | /** |
| 59 | * 新增null | 64 | * 新增null |
| 60 | * | 65 | * |
| @@ -14,6 +14,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -14,6 +14,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 14 | <result property="product_id" column="product_id" /> | 14 | <result property="product_id" column="product_id" /> |
| 15 | <result property="mqtt_username" column="mqtt_username" /> | 15 | <result property="mqtt_username" column="mqtt_username" /> |
| 16 | <result property="data_update_time" column="data_update_time" /> | 16 | <result property="data_update_time" column="data_update_time" /> |
| 17 | + <association property="userTerminalGroupRelation" column="id" javaType="UserTerminalGroupRelation" resultMap="userTerminalGroupRelationResult" /> | ||
| 18 | + <association property="iotDevice" column="device_id" javaType="IotDevice" resultMap="iotDeviceResult" /> | ||
| 19 | + </resultMap> | ||
| 20 | + | ||
| 21 | + <resultMap type="UserTerminalGroupRelation" id="userTerminalGroupRelationResult"> | ||
| 22 | + <result property="create_time" column="create_time" /> | ||
| 23 | + <result property="iot_terminal_group_id" column="iot_terminal_group_id" /> | ||
| 24 | + <result property="iot_terminal_group_name" column="iot_terminal_group_name" /> | ||
| 25 | + <result property="iot_terminal_id" column="iot_terminal_id" /> | ||
| 26 | + <result property="user_info_id" column="user_info_id" /> | ||
| 27 | + </resultMap> | ||
| 28 | + | ||
| 29 | + <resultMap type="IotDevice" id="iotDeviceResult"> | ||
| 30 | + <result property="active_time" column="active_time" /> | ||
| 31 | + <result property="client_id" column="client_id" /> | ||
| 32 | + <result property="completion_auth" column="completion_auth" /> | ||
| 33 | + <result property="create_by" column="create_by" /> | ||
| 34 | + <result property="create_time" column="create_time" /> | ||
| 35 | + <result property="del_flag" column="del_flag" /> | ||
| 36 | + <result property="firmware_version" column="firmware_version" /> | ||
| 37 | + <result property="img_url" column="img_url" /> | ||
| 38 | + <result property="is_shadow" column="is_shadow" /> | ||
| 39 | + <result property="latitude" column="latitude" /> | ||
| 40 | + <result property="location_way" column="location_way" /> | ||
| 41 | + <result property="longitude" column="longitude" /> | ||
| 42 | + <result property="name" column="name" /> | ||
| 43 | + <result property="network_address" column="network_address" /> | ||
| 44 | + <result property="network_ip" column="network_ip" /> | ||
| 45 | + <result property="remark" column="remark" /> | ||
| 46 | + <result property="rssi" column="rssi" /> | ||
| 47 | + <result property="status" column="status" /> | ||
| 48 | + <result property="summary" column="summary" /> | ||
| 49 | + <result property="things_model_value" column="things_model_value" /> | ||
| 50 | + <result property="update_by" column="update_by" /> | ||
| 51 | + <result property="update_time" column="update_time" /> | ||
| 52 | + <result property="product_id" column="product_id" /> | ||
| 53 | + <result property="mqtt_username" column="mqtt_username" /> | ||
| 54 | + <result property="payload_type" column="payload_type" /> | ||
| 55 | + <result property="things_model_config" column="things_model_config" /> | ||
| 56 | + <result property="listen_service_ip" column="listen_service_ip" /> | ||
| 57 | + <result property="device_life" column="device_life" /> | ||
| 58 | + <result property="data_update_time" column="data_update_time" /> | ||
| 59 | + | ||
| 17 | </resultMap> | 60 | </resultMap> |
| 18 | 61 | ||
| 19 | <sql id="selectIotTerminalVo"> | 62 | <sql id="selectIotTerminalVo"> |
| @@ -38,6 +81,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -38,6 +81,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 38 | </where> | 81 | </where> |
| 39 | </select> | 82 | </select> |
| 40 | 83 | ||
| 84 | + <select id="selectIotTerminalListByUserId" parameterType="IotTerminal" resultMap="IotTerminalResult"> | ||
| 85 | + SELECT a.*,b.*,c.* FROM `iot_terminal` a LEFT JOIN `user_terminal_group_relation` b ON a.`id`=b.`iot_terminal_id` LEFT JOIN `iot_device` c ON c.client_id=a.`device_id` | ||
| 86 | + <where> | ||
| 87 | + <if test="device_id !=null and device_id != ''"> | ||
| 88 | + and a.device_id = #{device_id} | ||
| 89 | + </if> | ||
| 90 | + <if test="name != null and name != ''"> | ||
| 91 | + AND (a.`name` like concat('%', #{name}, '%') or a.`id` like concat('%', #{name}, '%') or a.device_id like concat('%', #{name}, '%')) | ||
| 92 | + </if> | ||
| 93 | + <if test="id != null and id != ''"> | ||
| 94 | + AND a.`id` like concat('%', #{id}, '%') | ||
| 95 | + </if> | ||
| 96 | + <if test="product_id !=null and product_id != ''"> | ||
| 97 | + and a.product_id = #{product_id} | ||
| 98 | + </if> | ||
| 99 | + <if test="mqtt_username != null and mqtt_username != ''"> | ||
| 100 | + AND a.`mqtt_username` = #{mqtt_username} | ||
| 101 | + </if> | ||
| 102 | + and b.user_info_id = #{userTerminalGroupRelation.user_info_id} | ||
| 103 | + </where> | ||
| 104 | + </select> | ||
| 105 | + | ||
| 41 | <select id="selectIotTerminalById" parameterType="String" resultMap="IotTerminalResult"> | 106 | <select id="selectIotTerminalById" parameterType="String" resultMap="IotTerminalResult"> |
| 42 | <include refid="selectIotTerminalVo"/> | 107 | <include refid="selectIotTerminalVo"/> |
| 43 | where id = #{id} | 108 | where id = #{id} |
| @@ -99,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -99,7 +164,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 99 | </foreach> | 164 | </foreach> |
| 100 | </delete> | 165 | </delete> |
| 101 | <select id="selectNotUserIotTerminalListByImei" parameterType="String" resultMap="IotTerminalResult"> | 166 | <select id="selectNotUserIotTerminalListByImei" parameterType="String" resultMap="IotTerminalResult"> |
| 102 | - SELECT a.* FROM `iot_terminal` a LEFT JOIN `user_terminal_group_relation` b ON a.`id`=b.`iot_terminal_id` WHERE b.user_info_id is not null AND a.`device_id`= #{device_id} | 167 | + SELECT a.* FROM `iot_terminal` a LEFT JOIN `user_terminal_group_relation` b ON a.`id`=b.`iot_terminal_id` WHERE b.user_info_id is null AND a.`device_id`= #{device_id} |
| 103 | </select> | 168 | </select> |
| 104 | 169 | ||
| 105 | </mapper> | 170 | </mapper> |
-
请 注册 或 登录 后发表评论