mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
Compare commits
6 Commits
v3.6.2_spr
...
v3.6.2last
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a857680d0 | |||
| a47d0984dc | |||
| e333b126b6 | |||
| 3618842f44 | |||
| fd8c848c9e | |||
| 09614a0239 |
@ -4971,10 +4971,10 @@ CREATE TABLE `sys_gateway_route` (
|
|||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Records of sys_gateway_route
|
-- Records of sys_gateway_route
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
INSERT INTO `sys_gateway_route` VALUES ('1331051599401857026', 'jeecg-demo-websocket', 'jeecg-demo-websocket', 'lb:ws://jeecg-demo', '[{\"args\":[\"/vxeSocket/**\"],\"name\":\"Path\"}]', '[{\"args\":[{\"value\":\"#{@ipKeyResolver}\",\"key\":\"key-resolver\"},{\"value\":20,\"key\":\"redis-rate-limiter.replenishRate\"},{\"value\":20,\"key\":\"redis-rate-limiter.burstCapacity\"}],\"name\":\"RequestRateLimiter\",\"title\":\"限流过滤器\"}]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-24 09:46:46', NULL, NULL, NULL);
|
INSERT INTO `sys_gateway_route` VALUES ('1331051599401857026', 'jeecg-demo-websocket', 'jeecg-demo-websocket', 'lb:ws://jeecg-demo', '[{\"args\":[\"/vxeSocket/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-24 09:46:46', NULL, NULL, NULL);
|
||||||
INSERT INTO `sys_gateway_route` VALUES ('jeecg-cloud-websocket', 'jeecg-system-websocket', 'jeecg-system-websocket', 'lb:ws://jeecg-system', '[{\"args\":[\"/websocket/**\",\"/eoaSocket/**\",\"/newsWebsocket/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
|
INSERT INTO `sys_gateway_route` VALUES ('jeecg-cloud-websocket', 'jeecg-system-websocket', 'jeecg-system-websocket', 'lb:ws://jeecg-system', '[{\"args\":[\"/websocket/**\",\"/eoaSocket/**\",\"/newsWebsocket/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
|
||||||
INSERT INTO `sys_gateway_route` VALUES ('jeecg-demo', 'jeecg-demo', 'jeecg-demo', 'lb://jeecg-demo', '[{\"args\":[\"/mock/**\",\"/bigscreen/template1/**\",\"/bigscreen/template2/**\",\"/test/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
|
INSERT INTO `sys_gateway_route` VALUES ('jeecg-demo', 'jeecg-demo', 'jeecg-demo', 'lb://jeecg-demo', '[{\"args\":[\"/mock/**\",\"/bigscreen/template1/**\",\"/bigscreen/template2/**\",\"/test/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
|
||||||
INSERT INTO `sys_gateway_route` VALUES ('jeecg-system', 'jeecg-system', 'jeecg-system', 'lb://jeecg-system', '[{\"args\":[\"/sys/**\",\"/online/**\",\"/bigscreen/**\",\"/jmreport/**\",\"/druid/**\",\"/generic/**\",\"/actuator/**\",\"/drag/**\",\"/oauth2/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
|
INSERT INTO `sys_gateway_route` VALUES ('jeecg-system', 'jeecg-system', 'jeecg-system', 'lb://jeecg-system', '[{\"args\":[\"/sys/**\",\"/online/**\",\"/bigscreen/**\",\"/jmreport/**\",\"/druid/**\",\"/generic/**\",\"/actuator/**\",\"/drag/**\"],\"name\":\"Path\"}]', '[]', NULL, NULL, NULL, NULL, 1, 'admin', '2020-11-16 19:41:51', NULL, NULL, NULL);
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
-- Table structure for sys_log
|
-- Table structure for sys_log
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@ -9,10 +9,6 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>jeecg-boot-base-core</artifactId>
|
<artifactId>jeecg-boot-base-core</artifactId>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<spring-boot.version>3.1.5</spring-boot.version>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<id>aliyun</id>
|
<id>aliyun</id>
|
||||||
@ -47,22 +43,12 @@
|
|||||||
<!--jeecg-tools-->
|
<!--jeecg-tools-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>jeecg-boot-common3</artifactId>
|
<artifactId>jeecg-boot-common</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!--集成springmvc框架并实现自动配置 -->
|
<!--集成springmvc框架并实现自动配置 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-tomcat</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- websocket -->
|
<!-- websocket -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -119,14 +105,14 @@
|
|||||||
<!-- druid -->
|
<!-- druid -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.alibaba</groupId>
|
<groupId>com.alibaba</groupId>
|
||||||
<artifactId>druid-spring-boot-3-starter</artifactId>
|
<artifactId>druid-spring-boot-starter</artifactId>
|
||||||
<version>${druid.version}</version>
|
<version>${druid.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- 动态数据源 -->
|
<!-- 动态数据源 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.baomidou</groupId>
|
<groupId>com.baomidou</groupId>
|
||||||
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||||
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -178,12 +164,6 @@
|
|||||||
<groupId>org.apache.shiro</groupId>
|
<groupId>org.apache.shiro</groupId>
|
||||||
<artifactId>shiro-spring-boot-starter</artifactId>
|
<artifactId>shiro-spring-boot-starter</artifactId>
|
||||||
<version>${shiro.version}</version>
|
<version>${shiro.version}</version>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-spring</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- shiro-redis -->
|
<!-- shiro-redis -->
|
||||||
<dependency>
|
<dependency>
|
||||||
@ -199,61 +179,13 @@
|
|||||||
<artifactId>checkstyle</artifactId>
|
<artifactId>checkstyle</artifactId>
|
||||||
<groupId>com.puppycrawl.tools</groupId>
|
<groupId>com.puppycrawl.tools</groupId>
|
||||||
</exclusion>
|
</exclusion>
|
||||||
<!-- TODO shiro 无法使用 spring boot 3.X 自带的jedis,降版本处理 -->
|
|
||||||
<exclusion>
|
|
||||||
<artifactId>jedis</artifactId>
|
|
||||||
<groupId>redis.clients</groupId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<!-- TODO shiro 无法使用 spring boot 3.X 自带的jedis,降版本处理 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>redis.clients</groupId>
|
|
||||||
<artifactId>jedis</artifactId>
|
|
||||||
<version>${jedis.version}</version>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-spring</artifactId>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
<version>${shiro.version}</version>
|
|
||||||
<!-- 排除仍使用了javax.servlet的依赖 -->
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-core</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-web</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
|
||||||
<!-- 引入适配jakarta的依赖包 -->
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-core</artifactId>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
<version>${shiro.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-web</artifactId>
|
|
||||||
<classifier>jakarta</classifier>
|
|
||||||
<version>${shiro.version}</version>
|
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.apache.shiro</groupId>
|
|
||||||
<artifactId>shiro-core</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- knife4j -->
|
<!-- knife4j -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.github.xiaoymin</groupId>
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
<artifactId>knife4j-openapi3-jakarta-spring-boot-starter</artifactId>
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
<version>${knife4j-spring-boot-starter.version}</version>
|
<version>${knife4j-spring-boot-starter.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -267,7 +199,7 @@
|
|||||||
|
|
||||||
<!-- AutoPoi Excel工具类-->
|
<!-- AutoPoi Excel工具类-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot3</groupId>
|
<groupId>org.jeecgframework</groupId>
|
||||||
<artifactId>autopoi-web</artifactId>
|
<artifactId>autopoi-web</artifactId>
|
||||||
<version>${autopoi-web.version}</version>
|
<version>${autopoi-web.version}</version>
|
||||||
<exclusions>
|
<exclusions>
|
||||||
@ -310,16 +242,6 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.xkcoding.justauth</groupId>
|
<groupId>com.xkcoding.justauth</groupId>
|
||||||
<artifactId>justauth-spring-boot-starter</artifactId>
|
<artifactId>justauth-spring-boot-starter</artifactId>
|
||||||
<exclusions>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
<exclusion>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
|
||||||
</exclusion>
|
|
||||||
</exclusions>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.squareup.okhttp3</groupId>
|
<groupId>com.squareup.okhttp3</groupId>
|
||||||
|
|||||||
@ -2,7 +2,7 @@ package org.jeecg.common.api.dto;
|
|||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
package org.jeecg.common.api.vo;
|
package org.jeecg.common.api.vo;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|
||||||
@ -14,7 +15,7 @@ import java.io.Serializable;
|
|||||||
* @date 2019年1月19日
|
* @date 2019年1月19日
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Schema(description="接口返回对象")
|
@ApiModel(value="接口返回对象", description="接口返回对象")
|
||||||
public class Result<T> implements Serializable {
|
public class Result<T> implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
@ -22,31 +23,31 @@ public class Result<T> implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 成功标志
|
* 成功标志
|
||||||
*/
|
*/
|
||||||
@Schema(description = "成功标志")
|
@ApiModelProperty(value = "成功标志")
|
||||||
private boolean success = true;
|
private boolean success = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回处理消息
|
* 返回处理消息
|
||||||
*/
|
*/
|
||||||
@Schema(description = "返回处理消息")
|
@ApiModelProperty(value = "返回处理消息")
|
||||||
private String message = "";
|
private String message = "";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回代码
|
* 返回代码
|
||||||
*/
|
*/
|
||||||
@Schema(description = "返回代码")
|
@ApiModelProperty(value = "返回代码")
|
||||||
private Integer code = 0;
|
private Integer code = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 返回数据对象 data
|
* 返回数据对象 data
|
||||||
*/
|
*/
|
||||||
@Schema(description = "返回数据对象")
|
@ApiModelProperty(value = "返回数据对象")
|
||||||
private T result;
|
private T result;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 时间戳
|
* 时间戳
|
||||||
*/
|
*/
|
||||||
@Schema(description = "时间戳")
|
@ApiModelProperty(value = "时间戳")
|
||||||
private long timestamp = System.currentTimeMillis();
|
private long timestamp = System.currentTimeMillis();
|
||||||
|
|
||||||
public Result() {
|
public Result() {
|
||||||
|
|||||||
@ -24,10 +24,10 @@ import org.springframework.core.LocalVariableTableParameterNameDiscoverer;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.validation.BindingResult;
|
import org.springframework.validation.BindingResult;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|||||||
@ -293,6 +293,13 @@ public class DictAspect {
|
|||||||
log.debug("translateDictFromTableByKeys.dictCode:" + dictCode);
|
log.debug("translateDictFromTableByKeys.dictCode:" + dictCode);
|
||||||
log.debug("translateDictFromTableByKeys.values:" + values);
|
log.debug("translateDictFromTableByKeys.values:" + values);
|
||||||
//update-begin---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
//update-begin---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
||||||
|
|
||||||
|
//update-begin---author:wangshuai---date:2024-01-09---for:微服务下为空报错没有参数需要传递空字符串---
|
||||||
|
if(null == dataSource){
|
||||||
|
dataSource = "";
|
||||||
|
}
|
||||||
|
//update-end---author:wangshuai---date:2024-01-09---for:微服务下为空报错没有参数需要传递空字符串---
|
||||||
|
|
||||||
List<DictModel> texts = commonApi.translateDictFromTableByKeys(table, text, code, values, dataSource);
|
List<DictModel> texts = commonApi.translateDictFromTableByKeys(table, text, code, values, dataSource);
|
||||||
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
//update-end---author:chenrui ---date:20231221 for:[issues/#5643]解决分布式下表字典跨库无法查询问题------------
|
||||||
log.debug("translateDictFromTableByKeys.result:" + texts);
|
log.debug("translateDictFromTableByKeys.result:" + texts);
|
||||||
|
|||||||
@ -21,7 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@ -23,9 +23,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|||||||
@ -9,10 +9,10 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: Entity基类
|
* @Description: Entity基类
|
||||||
@ -30,20 +30,20 @@ public class JeecgEntity implements Serializable {
|
|||||||
* ID
|
* ID
|
||||||
*/
|
*/
|
||||||
@TableId(type = IdType.ASSIGN_ID)
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
@Schema(description = "ID")
|
@ApiModelProperty(value = "ID")
|
||||||
private java.lang.String id;
|
private java.lang.String id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人
|
* 创建人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "创建人")
|
@ApiModelProperty(value = "创建人")
|
||||||
@Excel(name = "创建人", width = 15)
|
@Excel(name = "创建人", width = 15)
|
||||||
private java.lang.String createBy;
|
private java.lang.String createBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建时间
|
* 创建时间
|
||||||
*/
|
*/
|
||||||
@Schema(description = "创建时间")
|
@ApiModelProperty(value = "创建时间")
|
||||||
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "创建时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@ -52,14 +52,14 @@ public class JeecgEntity implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 更新人
|
* 更新人
|
||||||
*/
|
*/
|
||||||
@Schema(description = "更新人")
|
@ApiModelProperty(value = "更新人")
|
||||||
@Excel(name = "更新人", width = 15)
|
@Excel(name = "更新人", width = 15)
|
||||||
private java.lang.String updateBy;
|
private java.lang.String updateBy;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新时间
|
* 更新时间
|
||||||
*/
|
*/
|
||||||
@Schema(description = "更新时间")
|
@ApiModelProperty(value = "更新时间")
|
||||||
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "更新时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import org.jeecg.common.system.vo.SysUserCacheInfo;
|
|||||||
import org.jeecg.common.util.SpringContextUtils;
|
import org.jeecg.common.util.SpringContextUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@ -11,10 +11,10 @@ import com.google.common.base.Joiner;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import jakarta.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
|||||||
@ -19,6 +19,8 @@ public class SysFilesModel {
|
|||||||
private String storeType;
|
private String storeType;
|
||||||
/**文件大小(kb)*/
|
/**文件大小(kb)*/
|
||||||
private Double fileSize;
|
private Double fileSize;
|
||||||
|
/**租户id*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -67,4 +69,12 @@ public class SysFilesModel {
|
|||||||
public void setFileSize(Double fileSize) {
|
public void setFileSize(Double fileSize) {
|
||||||
this.fileSize = fileSize;
|
this.fileSize = fileSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTenantId() {
|
||||||
|
return tenantId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTenantId(String tenantId) {
|
||||||
|
this.tenantId = tenantId;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -5,7 +5,7 @@ import java.util.Map;
|
|||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import org.springframework.jdbc.datasource.DriverManagerDataSource;
|
|||||||
import org.springframework.util.FileCopyUtils;
|
import org.springframework.util.FileCopyUtils;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package org.jeecg.common.util;
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package org.jeecg.common.util;
|
package org.jeecg.common.util;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.constant.ServiceNameConstants;
|
import org.jeecg.common.constant.ServiceNameConstants;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.jeecg.common.exception.JeecgBoot401Exception;
|
|||||||
import org.jeecg.common.system.util.JwtUtil;
|
import org.jeecg.common.system.util.JwtUtil;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author scott
|
* @Author scott
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import org.jeecg.common.constant.CommonConstant;
|
|||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
@ -413,7 +413,7 @@ public class oConvertUtils {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
String[] childs = (String[]) childArray.toArray();
|
String[] childs = childArray.toArray(new String[]{});
|
||||||
for (String v : childs) {
|
for (String v : childs) {
|
||||||
if (!isIn(v, all)) {
|
if (!isIn(v, all)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jeecg.config;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.jeecg.common.api.CommonAPI;
|
import org.jeecg.common.api.CommonAPI;
|
||||||
import org.jeecg.common.system.vo.DictModel;
|
import org.jeecg.common.system.vo.DictModel;
|
||||||
|
|||||||
@ -2,9 +2,7 @@ package org.jeecg.config;
|
|||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import com.alibaba.druid.spring.boot3.autoconfigure.DruidDataSourceAutoConfigure;
|
import javax.servlet.*;
|
||||||
import com.alibaba.druid.spring.boot3.autoconfigure.properties.DruidStatProperties;
|
|
||||||
import jakarta.servlet.*;
|
|
||||||
|
|
||||||
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
|
||||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
@ -13,6 +11,8 @@ import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
|
||||||
|
import com.alibaba.druid.spring.boot.autoconfigure.properties.DruidStatProperties;
|
||||||
import com.alibaba.druid.util.Utils;
|
import com.alibaba.druid.util.Utils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,183 +1,183 @@
|
|||||||
//package org.jeecg.config;
|
package org.jeecg.config;
|
||||||
//
|
|
||||||
// 已使用swagger3config平替
|
|
||||||
//import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
|
||||||
//import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
//import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
//import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
//import org.springframework.beans.factory.config.BeanPostProcessor;
|
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||||
//import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
//import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
//import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
//import org.springframework.util.ReflectionUtils;
|
import org.springframework.util.ReflectionUtils;
|
||||||
//import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
//import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
//import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
|
import org.springframework.web.servlet.mvc.method.RequestMappingInfoHandlerMapping;
|
||||||
//import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
|
import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration;
|
||||||
//import springfox.documentation.builders.ApiInfoBuilder;
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
//import springfox.documentation.builders.ParameterBuilder;
|
import springfox.documentation.builders.ParameterBuilder;
|
||||||
//import springfox.documentation.builders.PathSelectors;
|
import springfox.documentation.builders.PathSelectors;
|
||||||
//import springfox.documentation.builders.RequestHandlerSelectors;
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
//import springfox.documentation.oas.annotations.EnableOpenApi;
|
import springfox.documentation.oas.annotations.EnableOpenApi;
|
||||||
//import springfox.documentation.schema.ModelRef;
|
import springfox.documentation.schema.ModelRef;
|
||||||
//import springfox.documentation.service.*;
|
import springfox.documentation.service.*;
|
||||||
//import springfox.documentation.spi.DocumentationType;
|
import springfox.documentation.spi.DocumentationType;
|
||||||
//import springfox.documentation.spi.service.contexts.SecurityContext;
|
import springfox.documentation.spi.service.contexts.SecurityContext;
|
||||||
//import springfox.documentation.spring.web.plugins.Docket;
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
//import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
|
import springfox.documentation.spring.web.plugins.WebFluxRequestHandlerProvider;
|
||||||
//import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
|
import springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider;
|
||||||
//import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
//
|
|
||||||
//import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
//import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
//import java.util.Collections;
|
import java.util.Collections;
|
||||||
//import java.util.List;
|
import java.util.List;
|
||||||
//import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * @Author scott
|
* @Author scott
|
||||||
// */
|
*/
|
||||||
//@Configuration
|
@Configuration
|
||||||
//@EnableSwagger2 //开启 Swagger2
|
@EnableSwagger2 //开启 Swagger2
|
||||||
//@EnableKnife4j //开启 knife4j,可以不写
|
@EnableKnife4j //开启 knife4j,可以不写
|
||||||
//@Import(BeanValidatorPluginsConfiguration.class)
|
@Import(BeanValidatorPluginsConfiguration.class)
|
||||||
//public class Swagger2Config implements WebMvcConfigurer {
|
public class Swagger2Config implements WebMvcConfigurer {
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// *
|
*
|
||||||
// * 显示swagger-ui.html文档展示页,还必须注入swagger资源:
|
* 显示swagger-ui.html文档展示页,还必须注入swagger资源:
|
||||||
// *
|
*
|
||||||
// * @param registry
|
* @param registry
|
||||||
// */
|
*/
|
||||||
// @Override
|
@Override
|
||||||
// public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||||
// registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
|
registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||||
// registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||||||
// registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等
|
* swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等
|
||||||
// *
|
*
|
||||||
// * @return Docket
|
* @return Docket
|
||||||
// */
|
*/
|
||||||
// @Bean(value = "defaultApi2")
|
@Bean(value = "defaultApi2")
|
||||||
// public Docket defaultApi2() {
|
public Docket defaultApi2() {
|
||||||
// return new Docket(DocumentationType.SWAGGER_2)
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
// .apiInfo(apiInfo())
|
.apiInfo(apiInfo())
|
||||||
// .select()
|
.select()
|
||||||
// //此包路径下的类,才生成接口文档
|
//此包路径下的类,才生成接口文档
|
||||||
// .apis(RequestHandlerSelectors.basePackage("org.jeecg"))
|
.apis(RequestHandlerSelectors.basePackage("org.jeecg"))
|
||||||
// //加了ApiOperation注解的类,才生成接口文档
|
//加了ApiOperation注解的类,才生成接口文档
|
||||||
// .apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
|
.apis(RequestHandlerSelectors.withClassAnnotation(RestController.class))
|
||||||
// .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
.apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
|
||||||
// .paths(PathSelectors.any())
|
.paths(PathSelectors.any())
|
||||||
// .build()
|
.build()
|
||||||
// .securitySchemes(Collections.singletonList(securityScheme()))
|
.securitySchemes(Collections.singletonList(securityScheme()))
|
||||||
// .securityContexts(securityContexts())
|
.securityContexts(securityContexts())
|
||||||
// .globalOperationParameters(setHeaderToken());
|
.globalOperationParameters(setHeaderToken());
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /***
|
/***
|
||||||
// * oauth2配置
|
* oauth2配置
|
||||||
// * 需要增加swagger授权回调地址
|
* 需要增加swagger授权回调地址
|
||||||
// * http://localhost:8888/webjars/springfox-swagger-ui/o2c.html
|
* http://localhost:8888/webjars/springfox-swagger-ui/o2c.html
|
||||||
// * @return
|
* @return
|
||||||
// */
|
*/
|
||||||
// @Bean
|
@Bean
|
||||||
// SecurityScheme securityScheme() {
|
SecurityScheme securityScheme() {
|
||||||
// return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
|
return new ApiKey(CommonConstant.X_ACCESS_TOKEN, CommonConstant.X_ACCESS_TOKEN, "header");
|
||||||
// }
|
}
|
||||||
// /**
|
/**
|
||||||
// * JWT token
|
* JWT token
|
||||||
// * @return
|
* @return
|
||||||
// */
|
*/
|
||||||
// private List<Parameter> setHeaderToken() {
|
private List<Parameter> setHeaderToken() {
|
||||||
// ParameterBuilder tokenPar = new ParameterBuilder();
|
ParameterBuilder tokenPar = new ParameterBuilder();
|
||||||
// List<Parameter> pars = new ArrayList<>();
|
List<Parameter> pars = new ArrayList<>();
|
||||||
// tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
tokenPar.name(CommonConstant.X_ACCESS_TOKEN).description("token").modelRef(new ModelRef("string")).parameterType("header").required(false).build();
|
||||||
// pars.add(tokenPar.build());
|
pars.add(tokenPar.build());
|
||||||
// return pars;
|
return pars;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * api文档的详细信息函数,注意这里的注解引用的是哪个
|
* api文档的详细信息函数,注意这里的注解引用的是哪个
|
||||||
// *
|
*
|
||||||
// * @return
|
* @return
|
||||||
// */
|
*/
|
||||||
// private ApiInfo apiInfo() {
|
private ApiInfo apiInfo() {
|
||||||
// return new ApiInfoBuilder()
|
return new ApiInfoBuilder()
|
||||||
// // //大标题
|
// //大标题
|
||||||
// .title("JeecgBoot 后台服务API接口文档")
|
.title("JeecgBoot 后台服务API接口文档")
|
||||||
// // 版本号
|
// 版本号
|
||||||
// .version("1.0")
|
.version("1.0")
|
||||||
//// .termsOfServiceUrl("NO terms of service")
|
// .termsOfServiceUrl("NO terms of service")
|
||||||
// // 描述
|
// 描述
|
||||||
// .description("后台API接口")
|
.description("后台API接口")
|
||||||
// // 作者
|
// 作者
|
||||||
// .contact(new Contact("北京国炬信息技术有限公司","www.jeccg.com","jeecgos@163.com"))
|
.contact(new Contact("北京国炬信息技术有限公司","www.jeccg.com","jeecgos@163.com"))
|
||||||
// .license("The Apache License, Version 2.0")
|
.license("The Apache License, Version 2.0")
|
||||||
// .licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
|
||||||
// .build();
|
.build();
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 新增 securityContexts 保持登录状态
|
* 新增 securityContexts 保持登录状态
|
||||||
// */
|
*/
|
||||||
// private List<SecurityContext> securityContexts() {
|
private List<SecurityContext> securityContexts() {
|
||||||
// return new ArrayList(
|
return new ArrayList(
|
||||||
// Collections.singleton(SecurityContext.builder()
|
Collections.singleton(SecurityContext.builder()
|
||||||
// .securityReferences(defaultAuth())
|
.securityReferences(defaultAuth())
|
||||||
// .forPaths(PathSelectors.regex("^(?!auth).*$"))
|
.forPaths(PathSelectors.regex("^(?!auth).*$"))
|
||||||
// .build())
|
.build())
|
||||||
// );
|
);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// private List<SecurityReference> defaultAuth() {
|
private List<SecurityReference> defaultAuth() {
|
||||||
// AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
|
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
|
||||||
// AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
|
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
|
||||||
// authorizationScopes[0] = authorizationScope;
|
authorizationScopes[0] = authorizationScope;
|
||||||
// return new ArrayList(
|
return new ArrayList(
|
||||||
// Collections.singleton(new SecurityReference(CommonConstant.X_ACCESS_TOKEN, authorizationScopes)));
|
Collections.singleton(new SecurityReference(CommonConstant.X_ACCESS_TOKEN, authorizationScopes)));
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 解决springboot2.6 和springfox不兼容问题
|
* 解决springboot2.6 和springfox不兼容问题
|
||||||
// * @return
|
* @return
|
||||||
// */
|
*/
|
||||||
// @Bean
|
@Bean
|
||||||
// public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
|
public static BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
|
||||||
// return new BeanPostProcessor() {
|
return new BeanPostProcessor() {
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
|
||||||
// if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
|
if (bean instanceof WebMvcRequestHandlerProvider || bean instanceof WebFluxRequestHandlerProvider) {
|
||||||
// customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
|
customizeSpringfoxHandlerMappings(getHandlerMappings(bean));
|
||||||
// }
|
}
|
||||||
// return bean;
|
return bean;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
|
private <T extends RequestMappingInfoHandlerMapping> void customizeSpringfoxHandlerMappings(List<T> mappings) {
|
||||||
// List<T> copy = mappings.stream()
|
List<T> copy = mappings.stream()
|
||||||
// .filter(mapping -> mapping.getPatternParser() == null)
|
.filter(mapping -> mapping.getPatternParser() == null)
|
||||||
// .collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
// mappings.clear();
|
mappings.clear();
|
||||||
// mappings.addAll(copy);
|
mappings.addAll(copy);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
// private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
|
private List<RequestMappingInfoHandlerMapping> getHandlerMappings(Object bean) {
|
||||||
// try {
|
try {
|
||||||
// Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
|
Field field = ReflectionUtils.findField(bean.getClass(), "handlerMappings");
|
||||||
// field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
// return (List<RequestMappingInfoHandlerMapping>) field.get(bean);
|
return (List<RequestMappingInfoHandlerMapping>) field.get(bean);
|
||||||
// } catch (IllegalArgumentException | IllegalAccessException e) {
|
} catch (IllegalArgumentException | IllegalAccessException e) {
|
||||||
// throw new IllegalStateException(e);
|
throw new IllegalStateException(e);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
//
|
|
||||||
//}
|
}
|
||||||
|
|||||||
@ -1,59 +0,0 @@
|
|||||||
package org.jeecg.config;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.models.Components;
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
|
||||||
import io.swagger.v3.oas.models.Paths;
|
|
||||||
import io.swagger.v3.oas.models.info.Contact;
|
|
||||||
import io.swagger.v3.oas.models.info.Info;
|
|
||||||
import io.swagger.v3.oas.models.info.License;
|
|
||||||
import io.swagger.v3.oas.models.security.SecurityRequirement;
|
|
||||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
|
||||||
import org.springdoc.core.models.GroupedOpenApi;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
||||||
|
|
||||||
@Configuration
|
|
||||||
public class Swagger3Config implements WebMvcConfigurer {
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* 显示swagger-ui.html文档展示页,还必须注入swagger资源:
|
|
||||||
*
|
|
||||||
* @param registry
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
||||||
registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
|
|
||||||
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
|
||||||
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GroupedOpenApi swaggerOpenApi() {
|
|
||||||
return GroupedOpenApi.builder()
|
|
||||||
.group("default")
|
|
||||||
.packagesToScan("org.jeecg")
|
|
||||||
// 剔除以下几个包路径的接口生成文档
|
|
||||||
.packagesToExclude("org.jeecg.modules.drag", "org.jeecg.modules.online", "org.jeecg.modules.jmreport")
|
|
||||||
// 加了Operation注解的方法,才生成接口文档
|
|
||||||
.addOpenApiMethodFilter(method -> method.isAnnotationPresent(Operation.class))
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public OpenAPI customOpenAPI() {
|
|
||||||
return new OpenAPI()
|
|
||||||
.info(new Info()
|
|
||||||
.title("JeecgBoot 后台服务API接口文档")
|
|
||||||
.version("1.0")
|
|
||||||
.contact(new Contact().name("北京国炬信息技术有限公司").url("www.jeccg.com").email("jeecgos@163.com"))
|
|
||||||
.description( "后台API接口")
|
|
||||||
.termsOfService("NO terms of service")
|
|
||||||
.license(new License().name("Apache 2.0").url("http://www.apache.org/licenses/LICENSE-2.0.html"))
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package org.jeecg.config;
|
|
||||||
|
|
||||||
import io.undertow.server.DefaultByteBufferPool;
|
|
||||||
import io.undertow.websockets.jsr.WebSocketDeploymentInfo;
|
|
||||||
import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
|
|
||||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
@Component
|
|
||||||
public class UndertowCustomizer implements WebServerFactoryCustomizer<UndertowServletWebServerFactory> {
|
|
||||||
@Override
|
|
||||||
public void customize(UndertowServletWebServerFactory factory) {
|
|
||||||
factory.addDeploymentInfoCustomizers(deploymentInfo -> {
|
|
||||||
WebSocketDeploymentInfo webSocketDeploymentInfo = new WebSocketDeploymentInfo();
|
|
||||||
webSocketDeploymentInfo.setBuffers(new DefaultByteBufferPool(false, 1024));
|
|
||||||
deploymentInfo.addServletContextAttribute("io.undertow.websockets.jsr.WebSocketDeploymentInfo", webSocketDeploymentInfo);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -10,15 +10,12 @@ import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
|||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||||
import io.micrometer.core.instrument.MeterRegistry;
|
|
||||||
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
import io.micrometer.prometheus.PrometheusMeterRegistry;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import org.springframework.beans.factory.InitializingBean;
|
import org.springframework.beans.factory.InitializingBean;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.beans.factory.config.BeanPostProcessor;
|
import org.springframework.beans.factory.config.BeanPostProcessor;
|
||||||
import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
|
import org.springframework.boot.actuate.trace.http.InMemoryHttpTraceRepository;
|
||||||
import org.springframework.boot.actuate.web.exchanges.InMemoryHttpExchangeRepository;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Conditional;
|
import org.springframework.context.annotation.Conditional;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
@ -33,6 +30,7 @@ import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
|
|||||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
@ -135,11 +133,8 @@ public class WebMvcConfiguration implements WebMvcConfigurer {
|
|||||||
* https://blog.csdn.net/u013810234/article/details/110097201
|
* https://blog.csdn.net/u013810234/article/details/110097201
|
||||||
*/
|
*/
|
||||||
@Bean
|
@Bean
|
||||||
public InMemoryHttpExchangeRepository getInMemoryHttpTrace(){
|
public InMemoryHttpTraceRepository getInMemoryHttpTrace(){
|
||||||
InMemoryHttpExchangeRepository repository = new InMemoryHttpExchangeRepository();
|
return new InMemoryHttpTraceRepository();
|
||||||
// 默认保存1000条http请求记录
|
|
||||||
repository.setCapacity(1000);
|
|
||||||
return repository;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.config.filter;
|
|||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.config.sign.util.BodyReaderHttpServletRequestWrapper;
|
import org.jeecg.config.sign.util.BodyReaderHttpServletRequestWrapper;
|
||||||
|
|
||||||
import jakarta.servlet.*;
|
import javax.servlet.*;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -7,9 +7,9 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.common.util.TokenUtils;
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
|
|
||||||
import jakarta.servlet.*;
|
import javax.servlet.*;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -17,9 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.util.AntPathMatcher;
|
import org.springframework.util.AntPathMatcher;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.config.mybatis.ThreadLocalDataHelper;
|
import org.jeecg.config.mybatis.ThreadLocalDataHelper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import org.apache.commons.lang3.StringUtils;
|
|||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 动态数据源切换拦截器
|
* 动态数据源切换拦截器
|
||||||
|
|||||||
@ -28,8 +28,8 @@ import org.springframework.util.StringUtils;
|
|||||||
import redis.clients.jedis.HostAndPort;
|
import redis.clients.jedis.HostAndPort;
|
||||||
import redis.clients.jedis.JedisCluster;
|
import redis.clients.jedis.JedisCluster;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.Filter;
|
import javax.servlet.Filter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -125,7 +125,7 @@ public class ShiroConfig {
|
|||||||
filterChainDefinitionMap.put("/swagger-ui.html", "anon");
|
filterChainDefinitionMap.put("/swagger-ui.html", "anon");
|
||||||
filterChainDefinitionMap.put("/swagger**/**", "anon");
|
filterChainDefinitionMap.put("/swagger**/**", "anon");
|
||||||
filterChainDefinitionMap.put("/webjars/**", "anon");
|
filterChainDefinitionMap.put("/webjars/**", "anon");
|
||||||
filterChainDefinitionMap.put("/v3/**", "anon");
|
filterChainDefinitionMap.put("/v2/**", "anon");
|
||||||
|
|
||||||
// update-begin--Author:sunjianlei Date:20210510 for:排除消息通告查看详情页面(用于第三方APP)
|
// update-begin--Author:sunjianlei Date:20210510 for:排除消息通告查看详情页面(用于第三方APP)
|
||||||
filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon");
|
filterChainDefinitionMap.put("/sys/annountCement/show/**", "anon");
|
||||||
|
|||||||
@ -22,8 +22,8 @@ import org.jeecg.common.util.oConvertUtils;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import org.apache.shiro.web.servlet.AbstractShiroFilter;
|
|||||||
import org.apache.shiro.mgt.SecurityManager;
|
import org.apache.shiro.mgt.SecurityManager;
|
||||||
import org.springframework.beans.factory.BeanInitializationException;
|
import org.springframework.beans.factory.BeanInitializationException;
|
||||||
|
|
||||||
import jakarta.servlet.Filter;
|
import javax.servlet.Filter;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -12,10 +12,10 @@ import org.springframework.http.HttpHeaders;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 鉴权登录拦截器
|
* @Description: 鉴权登录拦截器
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
package org.jeecg.config.shiro.filters;
|
package org.jeecg.config.shiro.filters;
|
||||||
|
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.ServletResponse;
|
import javax.servlet.ServletResponse;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.shiro.subject.Subject;
|
import org.apache.shiro.subject.Subject;
|
||||||
import org.apache.shiro.web.filter.AccessControlFilter;
|
import org.apache.shiro.web.filter.AccessControlFilter;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration;
|
|||||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签名 拦截器配置
|
* 签名 拦截器配置
|
||||||
|
|||||||
@ -4,8 +4,8 @@ package org.jeecg.config.sign.interceptor;
|
|||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
package org.jeecg.config.sign.util;
|
package org.jeecg.config.sign.util;
|
||||||
|
|
||||||
import jakarta.servlet.ReadListener;
|
import javax.servlet.ReadListener;
|
||||||
import jakarta.servlet.ServletInputStream;
|
import javax.servlet.ServletInputStream;
|
||||||
import jakarta.servlet.ServletRequest;
|
import javax.servlet.ServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletRequestWrapper;
|
import javax.servlet.http.HttpServletRequestWrapper;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ import java.util.Map;
|
|||||||
import java.util.SortedMap;
|
import java.util.SortedMap;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.constant.SymbolConstant;
|
import org.jeecg.common.constant.SymbolConstant;
|
||||||
|
|||||||
@ -12,8 +12,8 @@ import org.jeecg.common.util.SpringContextUtils;
|
|||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 服务端提供方——feign接口
|
* 服务端提供方——feign接口
|
||||||
|
|||||||
@ -6,8 +6,8 @@ import org.apache.commons.io.IOUtils;
|
|||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.swing.filechooser.FileSystemView;
|
import javax.swing.filechooser.FileSystemView;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.jeecg.modules.demo.mock.vxe.entity.MockEntity;
|
|||||||
import org.jeecg.modules.demo.mock.vxe.websocket.VxeSocket;
|
import org.jeecg.modules.demo.mock.vxe.websocket.VxeSocket;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
|
|||||||
@ -6,12 +6,12 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.jeecg.common.constant.VxeSocketConst;
|
import org.jeecg.common.constant.VxeSocketConst;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.websocket.OnClose;
|
import javax.websocket.OnClose;
|
||||||
import jakarta.websocket.OnMessage;
|
import javax.websocket.OnMessage;
|
||||||
import jakarta.websocket.OnOpen;
|
import javax.websocket.OnOpen;
|
||||||
import jakarta.websocket.Session;
|
import javax.websocket.Session;
|
||||||
import jakarta.websocket.server.PathParam;
|
import javax.websocket.server.PathParam;
|
||||||
import jakarta.websocket.server.ServerEndpoint;
|
import javax.websocket.server.ServerEndpoint;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|||||||
@ -4,12 +4,13 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import io.swagger.annotations.ApiParam;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.mgt.DefaultSecurityManager;
|
import org.apache.shiro.mgt.DefaultSecurityManager;
|
||||||
@ -29,6 +30,8 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
@ -41,7 +44,7 @@ import java.util.List;
|
|||||||
* @Version:V2.0
|
* @Version:V2.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "单表DEMO")
|
@Api(tags = "单表DEMO")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/test/jeecgDemo")
|
@RequestMapping("/test/jeecgDemo")
|
||||||
public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoService> {
|
public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoService> {
|
||||||
@ -60,7 +63,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "获取所有Demo数据列表")
|
@ApiOperation(value = "获取Demo数据列表", notes = "获取所有Demo数据列表")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
|
@PermissionData(pageComponent = "jeecg/JeecgDemoList")
|
||||||
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
public Result<?> list(JeecgDemo jeecgDemo, @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
||||||
@ -85,7 +88,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
*/
|
*/
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
@AutoLog(value = "添加测试DEMO")
|
@AutoLog(value = "添加测试DEMO")
|
||||||
@Operation(summary = "添加DEMO")
|
@ApiOperation(value = "添加DEMO", notes = "添加DEMO")
|
||||||
public Result<?> add(@RequestBody JeecgDemo jeecgDemo) {
|
public Result<?> add(@RequestBody JeecgDemo jeecgDemo) {
|
||||||
jeecgDemoService.save(jeecgDemo);
|
jeecgDemoService.save(jeecgDemo);
|
||||||
return Result.OK("添加成功!");
|
return Result.OK("添加成功!");
|
||||||
@ -98,7 +101,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编辑DEMO", operateType = CommonConstant.OPERATE_TYPE_3)
|
@AutoLog(value = "编辑DEMO", operateType = CommonConstant.OPERATE_TYPE_3)
|
||||||
@Operation(summary = "编辑DEMO")
|
@ApiOperation(value = "编辑DEMO", notes = "编辑DEMO")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody JeecgDemo jeecgDemo) {
|
public Result<?> edit(@RequestBody JeecgDemo jeecgDemo) {
|
||||||
jeecgDemoService.updateById(jeecgDemo);
|
jeecgDemoService.updateById(jeecgDemo);
|
||||||
@ -113,7 +116,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
*/
|
*/
|
||||||
@AutoLog(value = "删除测试DEMO")
|
@AutoLog(value = "删除测试DEMO")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
@Operation(summary = "通过ID删除DEMO")
|
@ApiOperation(value = "通过ID删除DEMO", notes = "通过ID删除DEMO")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
jeecgDemoService.removeById(id);
|
jeecgDemoService.removeById(id);
|
||||||
return Result.OK("删除成功!");
|
return Result.OK("删除成功!");
|
||||||
@ -126,7 +129,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
@Operation(summary = "批量删除DEMO")
|
@ApiOperation(value = "批量删除DEMO", notes = "批量删除DEMO")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.jeecgDemoService.removeByIds(Arrays.asList(ids.split(",")));
|
this.jeecgDemoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
return Result.OK("批量删除成功!");
|
return Result.OK("批量删除成功!");
|
||||||
@ -139,8 +142,8 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
@Operation(summary = "通过ID查询DEMO")
|
@ApiOperation(value = "通过ID查询DEMO", notes = "通过ID查询DEMO")
|
||||||
public Result<?> queryById(/*@ApiParam(name = "id", value = "示例id", required = true)*/ @RequestParam(name = "id", required = true) String id) {
|
public Result<?> queryById(@ApiParam(name = "id", value = "示例id", required = true) @RequestParam(name = "id", required = true) String id) {
|
||||||
JeecgDemo jeecgDemo = jeecgDemoService.getById(id);
|
JeecgDemo jeecgDemo = jeecgDemoService.getById(id);
|
||||||
return Result.OK(jeecgDemo);
|
return Result.OK(jeecgDemo);
|
||||||
}
|
}
|
||||||
@ -472,7 +475,7 @@ public class JeecgDemoController extends JeecgController<JeecgDemo, IJeecgDemoSe
|
|||||||
* 测试Mono对象
|
* 测试Mono对象
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "Mono测试")
|
@ApiOperation("Mono测试")
|
||||||
@GetMapping(value ="/test")
|
@GetMapping(value ="/test")
|
||||||
public Mono<String> test() {
|
public Mono<String> test() {
|
||||||
//解决shiro报错No SecurityManager accessible to the calling code, either bound to the org.apache.shiro
|
//解决shiro报错No SecurityManager accessible to the calling code, either bound to the org.apache.shiro
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
package org.jeecg.modules.demo.test.controller;
|
package org.jeecg.modules.demo.test.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.lettuce.core.dynamic.annotation.Param;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
@ -10,10 +11,7 @@ import org.jeecg.modules.demo.test.entity.JeecgDemo;
|
|||||||
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
|
import org.jeecg.modules.demo.test.service.IJeecgDemoService;
|
||||||
import org.jeecg.modules.demo.test.service.IJeecgDynamicDataService;
|
import org.jeecg.modules.demo.test.service.IJeecgDynamicDataService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -23,7 +21,7 @@ import java.util.List;
|
|||||||
* @Date:2020-04-21
|
* @Date:2020-04-21
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "动态数据源测试")
|
@Api(tags = "动态数据源测试")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/test/dynamic")
|
@RequestMapping("/test/dynamic")
|
||||||
public class JeecgDynamicDataController extends JeecgController<JeecgDemo, IJeecgDemoService> {
|
public class JeecgDynamicDataController extends JeecgController<JeecgDemo, IJeecgDemoService> {
|
||||||
@ -39,7 +37,7 @@ public class JeecgDynamicDataController extends JeecgController<JeecgDemo, IJeec
|
|||||||
*/
|
*/
|
||||||
@PostMapping(value = "/test1")
|
@PostMapping(value = "/test1")
|
||||||
@AutoLog(value = "动态切换数据源")
|
@AutoLog(value = "动态切换数据源")
|
||||||
@Operation(summary = "动态切换数据源")
|
@ApiOperation(value = "动态切换数据源", notes = "动态切换数据源")
|
||||||
public Result<List<JeecgDemo>> selectSpelByKey(@RequestParam(required = false) String dsName) {
|
public Result<List<JeecgDemo>> selectSpelByKey(@RequestParam(required = false) String dsName) {
|
||||||
List<JeecgDemo> list = jeecgDynamicDataService.selectSpelByKey(dsName);
|
List<JeecgDemo> list = jeecgDynamicDataService.selectSpelByKey(dsName);
|
||||||
return Result.OK(list);
|
return Result.OK(list);
|
||||||
|
|||||||
@ -17,7 +17,7 @@ import org.springframework.beans.BeanUtils;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package org.jeecg.modules.demo.test.entity;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.Version;
|
import com.baomidou.mybatisplus.annotation.Version;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import org.jeecg.common.system.base.entity.JeecgEntity;
|
import org.jeecg.common.system.base.entity.JeecgEntity;
|
||||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
@ -11,6 +10,8 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
@ -24,59 +25,59 @@ import lombok.experimental.Accessors;
|
|||||||
@Data
|
@Data
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
@Schema(description="测试DEMO")
|
@ApiModel(value="测试DEMO对象", description="测试DEMO")
|
||||||
@TableName("demo")
|
@TableName("demo")
|
||||||
public class JeecgDemo extends JeecgEntity implements Serializable {
|
public class JeecgDemo extends JeecgEntity implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
/** 姓名 */
|
/** 姓名 */
|
||||||
@Excel(name="姓名",width=25)
|
@Excel(name="姓名",width=25)
|
||||||
@Schema(description = "姓名")
|
@ApiModelProperty(value = "姓名")
|
||||||
private java.lang.String name;
|
private java.lang.String name;
|
||||||
/** 关键词 */
|
/** 关键词 */
|
||||||
@Schema(description = "关键词")
|
@ApiModelProperty(value = "关键词")
|
||||||
@Excel(name="关键词",width=15)
|
@Excel(name="关键词",width=15)
|
||||||
private java.lang.String keyWord;
|
private java.lang.String keyWord;
|
||||||
/** 打卡时间 */
|
/** 打卡时间 */
|
||||||
@Schema(description = "打卡时间")
|
@ApiModelProperty(value = "打卡时间")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
@Excel(name="打卡时间",width=20,format="yyyy-MM-dd HH:mm:ss")
|
@Excel(name="打卡时间",width=20,format="yyyy-MM-dd HH:mm:ss")
|
||||||
private java.util.Date punchTime;
|
private java.util.Date punchTime;
|
||||||
/** 工资 */
|
/** 工资 */
|
||||||
@Schema(description = "工资",example = "0")
|
@ApiModelProperty(value = "工资",example = "0")
|
||||||
@Excel(name="工资",type = 4,width=15)
|
@Excel(name="工资",type = 4,width=15)
|
||||||
private java.math.BigDecimal salaryMoney;
|
private java.math.BigDecimal salaryMoney;
|
||||||
/** 奖金 */
|
/** 奖金 */
|
||||||
@Schema(description = "奖金",example = "0")
|
@ApiModelProperty(value = "奖金",example = "0")
|
||||||
@Excel(name="奖金",type = 4,width=15)
|
@Excel(name="奖金",type = 4,width=15)
|
||||||
private java.lang.Double bonusMoney;
|
private java.lang.Double bonusMoney;
|
||||||
/** 性别 {男:1,女:2} */
|
/** 性别 {男:1,女:2} */
|
||||||
@Schema(description = "性别")
|
@ApiModelProperty(value = "性别")
|
||||||
@Excel(name = "性别", width = 15, dicCode = "sex")
|
@Excel(name = "性别", width = 15, dicCode = "sex")
|
||||||
private java.lang.String sex;
|
private java.lang.String sex;
|
||||||
/** 年龄 */
|
/** 年龄 */
|
||||||
@Schema(description = "年龄",example = "0")
|
@ApiModelProperty(value = "年龄",example = "0")
|
||||||
@Excel(name="年龄",type = 4,width=15)
|
@Excel(name="年龄",type = 4,width=15)
|
||||||
private java.lang.Integer age;
|
private java.lang.Integer age;
|
||||||
/** 生日 */
|
/** 生日 */
|
||||||
@Schema(description = "生日")
|
@ApiModelProperty(value = "生日")
|
||||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name="生日",format="yyyy-MM-dd")
|
@Excel(name="生日",format="yyyy-MM-dd")
|
||||||
private java.util.Date birthday;
|
private java.util.Date birthday;
|
||||||
/** 邮箱 */
|
/** 邮箱 */
|
||||||
@Schema(description = "邮箱")
|
@ApiModelProperty(value = "邮箱")
|
||||||
@Excel(name="邮箱",width=30)
|
@Excel(name="邮箱",width=30)
|
||||||
private java.lang.String email;
|
private java.lang.String email;
|
||||||
/** 个人简介 */
|
/** 个人简介 */
|
||||||
@Schema(description = "个人简介")
|
@ApiModelProperty(value = "个人简介")
|
||||||
private java.lang.String content;
|
private java.lang.String content;
|
||||||
/** 部门编码 */
|
/** 部门编码 */
|
||||||
@Excel(name="部门编码",width=25)
|
@Excel(name="部门编码",width=25)
|
||||||
@Schema(description = "部门编码")
|
@ApiModelProperty(value = "部门编码")
|
||||||
private java.lang.String sysOrgCode;
|
private java.lang.String sysOrgCode;
|
||||||
|
|
||||||
// @Schema(description = "租户ID")
|
@ApiModelProperty(value = "租户ID")
|
||||||
private java.lang.Integer tenantId;
|
private java.lang.Integer tenantId;
|
||||||
/** 乐观锁字段 */
|
/** 乐观锁字段 */
|
||||||
@Version
|
@Version
|
||||||
|
|||||||
@ -18,7 +18,7 @@ import org.jeecg.modules.demo.mock.vxe.websocket.VxeSocket;
|
|||||||
import org.jeecg.modules.dlglong.entity.MockEntity;
|
import org.jeecg.modules.dlglong.entity.MockEntity;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
|||||||
* @return 部门 parentIds
|
* @return 部门 parentIds
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/getDepartParentIdsByDepIds")
|
@GetMapping("/sys/api/getDepartParentIdsByDepIds")
|
||||||
Set<String> getDepartParentIdsByDepIds(@RequestParam("depIds") Set depIds);
|
Set<String> getDepartParentIdsByDepIds(@RequestParam("depIds") Set<String> depIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 9通过用户账号查询部门 name
|
* 9通过用户账号查询部门 name
|
||||||
@ -213,7 +213,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryAllUser")
|
@GetMapping("/sys/api/queryAllUser")
|
||||||
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize);
|
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) Integer pageSize);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -761,7 +761,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
|||||||
@GetMapping("/sys/api/dictTableWhiteListCheckByDict")
|
@GetMapping("/sys/api/dictTableWhiteListCheckByDict")
|
||||||
boolean dictTableWhiteListCheckByDict(
|
boolean dictTableWhiteListCheckByDict(
|
||||||
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
||||||
@RequestParam(value = "fields", required = false) String[] fields
|
@RequestParam(value = "fields", required = false) String... fields
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -133,7 +133,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryAllUser(String userIds, Integer pageNo, int pageSize) {
|
public JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -446,7 +446,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dictTableWhiteListCheckByDict(String tableOrDictCode, String[] fields) {
|
public boolean dictTableWhiteListCheckByDict(String tableOrDictCode, String... fields) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,7 @@
|
|||||||
<artifactId>hibernate-core</artifactId>
|
<artifactId>hibernate-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot3</groupId>
|
<groupId>org.jeecgframework.boot</groupId>
|
||||||
<artifactId>hibernate-re</artifactId>
|
<artifactId>hibernate-re</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@ -32,12 +32,12 @@
|
|||||||
<!-- 积木报表 -->
|
<!-- 积木报表 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.jimureport</groupId>
|
<groupId>org.jeecgframework.jimureport</groupId>
|
||||||
<artifactId>jimureport-spring-boot3-starter-fastjson2</artifactId>
|
<artifactId>jimureport-spring-boot-starter</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jeecgframework.boot3</groupId>
|
<groupId>org.jeecgframework.jimureport</groupId>
|
||||||
<artifactId>jimureport-drag</artifactId>
|
<artifactId>jimureport-drag</artifactId>
|
||||||
<version>2.0.2</version>
|
<version>2.0.1</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- 积木报表 mongo redis 支持包
|
<!-- 积木报表 mongo redis 支持包
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@ -1,33 +1,33 @@
|
|||||||
//package org.jeecg.config.init;
|
package org.jeecg.config.init;
|
||||||
//
|
|
||||||
//import org.apache.catalina.Context;
|
import org.apache.catalina.Context;
|
||||||
//import org.apache.tomcat.util.scan.StandardJarScanner;
|
import org.apache.tomcat.util.scan.StandardJarScanner;
|
||||||
//import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||||
//import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
//import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * @Description: TomcatFactoryConfig
|
* @Description: TomcatFactoryConfig
|
||||||
// * @author: scott
|
* @author: scott
|
||||||
// * @date: 2021年01月25日 11:40
|
* @date: 2021年01月25日 11:40
|
||||||
// */
|
*/
|
||||||
//@Configuration
|
@Configuration
|
||||||
//public class TomcatFactoryConfig {
|
public class TomcatFactoryConfig {
|
||||||
// /**
|
/**
|
||||||
// * tomcat-embed-jasper引用后提示jar找不到的问题
|
* tomcat-embed-jasper引用后提示jar找不到的问题
|
||||||
// */
|
*/
|
||||||
// @Bean
|
@Bean
|
||||||
// public TomcatServletWebServerFactory tomcatFactory() {
|
public TomcatServletWebServerFactory tomcatFactory() {
|
||||||
// TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
|
TomcatServletWebServerFactory factory = new TomcatServletWebServerFactory() {
|
||||||
// @Override
|
@Override
|
||||||
// protected void postProcessContext(Context context) {
|
protected void postProcessContext(Context context) {
|
||||||
// ((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
|
((StandardJarScanner) context.getJarScanner()).setScanManifest(false);
|
||||||
// }
|
}
|
||||||
// };
|
};
|
||||||
// factory.addConnectorCustomizers(connector -> {
|
factory.addConnectorCustomizers(connector -> {
|
||||||
// connector.setProperty("relaxedPathChars", "[]{}");
|
connector.setProperty("relaxedPathChars", "[]{}");
|
||||||
// connector.setProperty("relaxedQueryChars", "[]{}");
|
connector.setProperty("relaxedQueryChars", "[]{}");
|
||||||
// });
|
});
|
||||||
// return factory;
|
return factory;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|||||||
@ -1,81 +1,81 @@
|
|||||||
//package org.jeecg.config.jimureport;
|
package org.jeecg.config.jimureport;
|
||||||
//
|
|
||||||
//import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
//import org.jeecg.common.system.util.JwtUtil;
|
import org.jeecg.common.system.util.JwtUtil;
|
||||||
//import org.jeecg.common.system.vo.SysUserCacheInfo;
|
import org.jeecg.common.system.vo.SysUserCacheInfo;
|
||||||
//import org.jeecg.common.util.RedisUtil;
|
import org.jeecg.common.util.RedisUtil;
|
||||||
//import org.jeecg.common.util.TokenUtils;
|
import org.jeecg.common.util.TokenUtils;
|
||||||
//import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
|
import org.jeecg.modules.jmreport.api.JmReportTokenServiceI;
|
||||||
//import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
import org.jeecg.modules.system.service.impl.SysBaseApiImpl;
|
||||||
//import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
//import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
//import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
//import org.springframework.util.CollectionUtils;
|
import org.springframework.util.CollectionUtils;
|
||||||
//
|
|
||||||
//import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
//import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
//import java.util.Map;
|
import java.util.Map;
|
||||||
//import java.util.Set;
|
import java.util.Set;
|
||||||
//
|
|
||||||
///**
|
/**
|
||||||
// * 自定义积木报表鉴权(如果不进行自定义,则所有请求不做权限控制)
|
* 自定义积木报表鉴权(如果不进行自定义,则所有请求不做权限控制)
|
||||||
// * * 1.自定义获取登录token
|
* * 1.自定义获取登录token
|
||||||
// * * 2.自定义获取登录用户
|
* * 2.自定义获取登录用户
|
||||||
// * @author: jeecg-boot
|
* @author: jeecg-boot
|
||||||
// */
|
*/
|
||||||
//
|
|
||||||
//
|
|
||||||
//@Slf4j
|
@Slf4j
|
||||||
//@Component
|
@Component
|
||||||
//public class JimuReportTokenService implements JmReportTokenServiceI {
|
public class JimuReportTokenService implements JmReportTokenServiceI {
|
||||||
// @Autowired
|
@Autowired
|
||||||
// private SysBaseApiImpl sysBaseApi;
|
private SysBaseApiImpl sysBaseApi;
|
||||||
// @Autowired
|
@Autowired
|
||||||
// @Lazy
|
@Lazy
|
||||||
// private RedisUtil redisUtil;
|
private RedisUtil redisUtil;
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public String getToken(HttpServletRequest request) {
|
public String getToken(HttpServletRequest request) {
|
||||||
// return TokenUtils.getTokenByRequest(request);
|
return TokenUtils.getTokenByRequest(request);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public String getUsername(String token) {
|
public String getUsername(String token) {
|
||||||
// return JwtUtil.getUsername(token);
|
return JwtUtil.getUsername(token);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public String[] getRoles(String token) {
|
public String[] getRoles(String token) {
|
||||||
// String username = JwtUtil.getUsername(token);
|
String username = JwtUtil.getUsername(token);
|
||||||
// Set roles = sysBaseApi.getUserRoleSet(username);
|
Set roles = sysBaseApi.getUserRoleSet(username);
|
||||||
// if(CollectionUtils.isEmpty(roles)){
|
if(CollectionUtils.isEmpty(roles)){
|
||||||
// return null;
|
return null;
|
||||||
// }
|
}
|
||||||
// return (String[]) roles.toArray(new String[roles.size()]);
|
return (String[]) roles.toArray(new String[roles.size()]);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public Boolean verifyToken(String token) {
|
public Boolean verifyToken(String token) {
|
||||||
// return TokenUtils.verifyToken(token, sysBaseApi, redisUtil);
|
return TokenUtils.verifyToken(token, sysBaseApi, redisUtil);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// @Override
|
@Override
|
||||||
// public Map<String, Object> getUserInfo(String token) {
|
public Map<String, Object> getUserInfo(String token) {
|
||||||
// Map<String, Object> map = new HashMap(5);
|
Map<String, Object> map = new HashMap(5);
|
||||||
// String username = JwtUtil.getUsername(token);
|
String username = JwtUtil.getUsername(token);
|
||||||
// //此处通过token只能拿到一个信息 用户账号 后面的就是根据账号获取其他信息 查询数据或是走redis 用户根据自身业务可自定义
|
//此处通过token只能拿到一个信息 用户账号 后面的就是根据账号获取其他信息 查询数据或是走redis 用户根据自身业务可自定义
|
||||||
// SysUserCacheInfo userInfo = null;
|
SysUserCacheInfo userInfo = null;
|
||||||
// try {
|
try {
|
||||||
// userInfo = sysBaseApi.getCacheUser(username);
|
userInfo = sysBaseApi.getCacheUser(username);
|
||||||
// } catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// log.error("获取用户信息异常:"+ e.getMessage());
|
log.error("获取用户信息异常:"+ e.getMessage());
|
||||||
// return map;
|
return map;
|
||||||
// }
|
}
|
||||||
// //设置账号名
|
//设置账号名
|
||||||
// map.put(SYS_USER_CODE, userInfo.getSysUserCode());
|
map.put(SYS_USER_CODE, userInfo.getSysUserCode());
|
||||||
// //设置部门编码
|
//设置部门编码
|
||||||
// map.put(SYS_ORG_CODE, userInfo.getSysOrgCode());
|
map.put(SYS_ORG_CODE, userInfo.getSysOrgCode());
|
||||||
// // 将所有信息存放至map 解析sql/api会根据map的键值解析
|
// 将所有信息存放至map 解析sql/api会根据map的键值解析
|
||||||
// return map;
|
return map;
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import org.jeecg.modules.system.entity.SysTenantPack;
|
|||||||
import org.jeecg.modules.system.entity.SysTenantPackUser;
|
import org.jeecg.modules.system.entity.SysTenantPackUser;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
|||||||
@ -347,7 +347,7 @@ public class SystemApiController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/queryAllUser")
|
@GetMapping("/queryAllUser")
|
||||||
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) int pageSize){
|
public JSONObject queryAllUser(@RequestParam(name="userIds",required=false)String userIds, @RequestParam(name="pageNo",required=false) Integer pageNo,@RequestParam(name="pageSize",required=false) Integer pageSize){
|
||||||
return sysBaseApi.queryAllUser(userIds, pageNo, pageSize);
|
return sysBaseApi.queryAllUser(userIds, pageNo, pageSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -578,7 +578,7 @@ public class SystemApiController {
|
|||||||
* @param tenantId 新的租户ID
|
* @param tenantId 新的租户ID
|
||||||
* @return Map<String, String> Map<原字典编码, 新字典编码>
|
* @return Map<String, String> Map<原字典编码, 新字典编码>
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/copyLowAppDict")
|
@GetMapping("/copyLowAppDict")
|
||||||
Map<String, String> copyLowAppDict(@RequestParam("originalAppId") String originalAppId, @RequestParam("appId") String appId, @RequestParam("tenantId") String tenantId) {
|
Map<String, String> copyLowAppDict(@RequestParam("originalAppId") String originalAppId, @RequestParam("appId") String appId, @RequestParam("tenantId") String tenantId) {
|
||||||
return sysBaseApi.copyLowAppDict(originalAppId, appId, tenantId);
|
return sysBaseApi.copyLowAppDict(originalAppId, appId, tenantId);
|
||||||
}
|
}
|
||||||
@ -732,14 +732,6 @@ public class SystemApiController {
|
|||||||
this.sysBaseApi.saveDataLog(dataLogDto);
|
this.sysBaseApi.saveDataLog(dataLogDto);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/addSysFiles")
|
|
||||||
public void addSysFiles(@RequestBody SysFilesModel sysFilesModel){this.sysBaseApi.addSysFiles(sysFilesModel);}
|
|
||||||
|
|
||||||
@GetMapping("/getFileUrl")
|
|
||||||
public String getFileUrl(@RequestParam(name="fileId") String fileId){
|
|
||||||
return this.sysBaseApi.getFileUrl(fileId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 更新头像
|
* 更新头像
|
||||||
* @param loginUser
|
* @param loginUser
|
||||||
@ -858,7 +850,7 @@ public class SystemApiController {
|
|||||||
* @param deptIds
|
* @param deptIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserIdsByDeptIds")
|
@GetMapping("/queryUserIdsByDeptIds")
|
||||||
public List<String> queryUserIdsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
public List<String> queryUserIdsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
||||||
return sysBaseApi.queryUserIdsByDeptIds(deptIds);
|
return sysBaseApi.queryUserIdsByDeptIds(deptIds);
|
||||||
}
|
}
|
||||||
@ -868,7 +860,7 @@ public class SystemApiController {
|
|||||||
* @param deptIds
|
* @param deptIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserAccountsByDeptIds")
|
@GetMapping("/queryUserAccountsByDeptIds")
|
||||||
public List<String> queryUserAccountsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
public List<String> queryUserAccountsByDeptIds(@RequestParam("deptIds") List<String> deptIds){
|
||||||
return sysBaseApi.queryUserAccountsByDeptIds(deptIds);
|
return sysBaseApi.queryUserAccountsByDeptIds(deptIds);
|
||||||
}
|
}
|
||||||
@ -878,7 +870,7 @@ public class SystemApiController {
|
|||||||
* @param roleCodes
|
* @param roleCodes
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserIdsByRoleds")
|
@GetMapping("/queryUserIdsByRoleds")
|
||||||
public List<String> queryUserIdsByRoleds(@RequestParam("roleCodes") List<String> roleCodes){
|
public List<String> queryUserIdsByRoleds(@RequestParam("roleCodes") List<String> roleCodes){
|
||||||
return sysBaseApi.queryUserIdsByRoleds(roleCodes);
|
return sysBaseApi.queryUserIdsByRoleds(roleCodes);
|
||||||
}
|
}
|
||||||
@ -888,7 +880,7 @@ public class SystemApiController {
|
|||||||
* @param positionIds
|
* @param positionIds
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/queryUserIdsByPositionIds")
|
@GetMapping("/queryUserIdsByPositionIds")
|
||||||
public List<String> queryUserIdsByPositionIds(@RequestParam("positionIds") List<String> positionIds){
|
public List<String> queryUserIdsByPositionIds(@RequestParam("positionIds") List<String> positionIds){
|
||||||
return sysBaseApi.queryUserIdsByPositionIds(positionIds);
|
return sysBaseApi.queryUserIdsByPositionIds(positionIds);
|
||||||
}
|
}
|
||||||
@ -900,7 +892,7 @@ public class SystemApiController {
|
|||||||
* @param orgCode 部门编码
|
* @param orgCode 部门编码
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/getUserAccountsByDepCode")
|
@GetMapping("/getUserAccountsByDepCode")
|
||||||
public List<String> getUserAccountsByDepCode(String orgCode){
|
public List<String> getUserAccountsByDepCode(String orgCode){
|
||||||
return sysBaseApi.getUserAccountsByDepCode(orgCode);
|
return sysBaseApi.getUserAccountsByDepCode(orgCode);
|
||||||
}
|
}
|
||||||
@ -911,7 +903,7 @@ public class SystemApiController {
|
|||||||
* @param selectSql
|
* @param selectSql
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/dictTableWhiteListCheckBySql")
|
@GetMapping("/dictTableWhiteListCheckBySql")
|
||||||
public boolean dictTableWhiteListCheckBySql(@RequestParam("selectSql") String selectSql) {
|
public boolean dictTableWhiteListCheckBySql(@RequestParam("selectSql") String selectSql) {
|
||||||
return sysBaseApi.dictTableWhiteListCheckBySql(selectSql);
|
return sysBaseApi.dictTableWhiteListCheckBySql(selectSql);
|
||||||
}
|
}
|
||||||
@ -923,10 +915,10 @@ public class SystemApiController {
|
|||||||
* @param fields 如果传的是dictCode,则该参数必须传null
|
* @param fields 如果传的是dictCode,则该参数必须传null
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/sys/api/dictTableWhiteListCheckByDict")
|
@GetMapping("/dictTableWhiteListCheckByDict")
|
||||||
public boolean dictTableWhiteListCheckByDict(
|
public boolean dictTableWhiteListCheckByDict(
|
||||||
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
@RequestParam("tableOrDictCode") String tableOrDictCode,
|
||||||
@RequestParam(value = "fields", required = false) String[] fields
|
@RequestParam(value = "fields", required = false) String... fields
|
||||||
) {
|
) {
|
||||||
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
|
return sysBaseApi.dictTableWhiteListCheckByDict(tableOrDictCode, fields);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,8 @@ package org.jeecg.modules.cas.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|||||||
@ -2,8 +2,8 @@ package org.jeecg.modules.message.controller;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.modules.message.controller;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.jeecg.common.api.dto.message.MessageDTO;
|
import org.jeecg.common.api.dto.message.MessageDTO;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|||||||
@ -18,8 +18,8 @@ import org.springframework.mail.javamail.JavaMailSender;
|
|||||||
import org.springframework.mail.javamail.MimeMessageHelper;
|
import org.springframework.mail.javamail.MimeMessageHelper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.mail.MessagingException;
|
import javax.mail.MessagingException;
|
||||||
import jakarta.mail.internet.MimeMessage;
|
import javax.mail.internet.MimeMessage;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import org.jeecg.modules.system.mapper.SysAnnouncementSendMapper;
|
|||||||
import org.jeecg.modules.system.mapper.SysUserMapper;
|
import org.jeecg.modules.system.mapper.SysUserMapper;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|||||||
@ -2,9 +2,9 @@ package org.jeecg.modules.message.websocket;
|
|||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import jakarta.websocket.*;
|
import javax.websocket.*;
|
||||||
import jakarta.websocket.server.PathParam;
|
import javax.websocket.server.PathParam;
|
||||||
import jakarta.websocket.server.ServerEndpoint;
|
import javax.websocket.server.ServerEndpoint;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.jeecg.common.base.BaseMap;
|
import org.jeecg.common.base.BaseMap;
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import org.springframework.web.bind.annotation.GetMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.swing.filechooser.FileSystemView;
|
import javax.swing.filechooser.FileSystemView;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
package org.jeecg.modules.oss.controller;
|
package org.jeecg.modules.oss.controller;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.modules.quartz.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@ -30,8 +30,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -47,7 +47,7 @@ import java.util.Map;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/quartzJob")
|
@RequestMapping("/sys/quartzJob")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "定时任务接口")
|
@Api(tags = "定时任务接口")
|
||||||
public class QuartzJobController {
|
public class QuartzJobController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IQuartzJobService quartzJobService;
|
private IQuartzJobService quartzJobService;
|
||||||
@ -154,7 +154,7 @@ public class QuartzJobController {
|
|||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@RequiresPermissions("system:quartzJob:pause")
|
@RequiresPermissions("system:quartzJob:pause")
|
||||||
@GetMapping(value = "/pause")
|
@GetMapping(value = "/pause")
|
||||||
@Operation(summary = "停止定时任务")
|
@ApiOperation(value = "停止定时任务")
|
||||||
public Result<Object> pauseJob(@RequestParam(name = "id") String id) {
|
public Result<Object> pauseJob(@RequestParam(name = "id") String id) {
|
||||||
QuartzJob job = quartzJobService.getById(id);
|
QuartzJob job = quartzJobService.getById(id);
|
||||||
if (job == null) {
|
if (job == null) {
|
||||||
@ -173,7 +173,7 @@ public class QuartzJobController {
|
|||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@RequiresPermissions("system:quartzJob:resume")
|
@RequiresPermissions("system:quartzJob:resume")
|
||||||
@GetMapping(value = "/resume")
|
@GetMapping(value = "/resume")
|
||||||
@Operation(summary = "启动定时任务")
|
@ApiOperation(value = "启动定时任务")
|
||||||
public Result<Object> resumeJob(@RequestParam(name = "id") String id) {
|
public Result<Object> resumeJob(@RequestParam(name = "id") String id) {
|
||||||
QuartzJob job = quartzJobService.getById(id);
|
QuartzJob job = quartzJobService.getById(id);
|
||||||
if (job == null) {
|
if (job == null) {
|
||||||
|
|||||||
@ -20,8 +20,8 @@ import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|||||||
import org.springframework.web.servlet.HandlerMapping;
|
import org.springframework.web.servlet.HandlerMapping;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
package org.jeecg.modules.system.controller;
|
package org.jeecg.modules.system.controller;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
@ -12,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Title: DuplicateCheckAction
|
* @Title: DuplicateCheckAction
|
||||||
@ -24,7 +24,7 @@ import jakarta.servlet.http.HttpServletRequest;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/duplicate")
|
@RequestMapping("/sys/duplicate")
|
||||||
@Tag(name="重复校验")
|
@Api(tags="重复校验")
|
||||||
public class DuplicateCheckController {
|
public class DuplicateCheckController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -36,7 +36,7 @@ public class DuplicateCheckController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/check", method = RequestMethod.GET)
|
@RequestMapping(value = "/check", method = RequestMethod.GET)
|
||||||
@Operation(summary = "重复校验接口")
|
@ApiOperation("重复校验接口")
|
||||||
public Result<String> doDuplicateCheck(DuplicateCheckVo duplicateCheckVo, HttpServletRequest request) {
|
public Result<String> doDuplicateCheck(DuplicateCheckVo duplicateCheckVo, HttpServletRequest request) {
|
||||||
log.debug("----duplicate check------:"+ duplicateCheckVo.toString());
|
log.debug("----duplicate check------:"+ duplicateCheckVo.toString());
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.aliyuncs.exceptions.ClientException;
|
import com.aliyuncs.exceptions.ClientException;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
@ -34,9 +34,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ import java.util.stream.Collectors;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys")
|
@RequestMapping("/sys")
|
||||||
@Tag(name="用户登录")
|
@Api(tags="用户登录")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class LoginController {
|
public class LoginController {
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -70,9 +70,9 @@ public class LoginController {
|
|||||||
|
|
||||||
private final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
|
private final String BASE_CHECK_CODES = "qwertyuiplkjhgfdsazxcvbnmQWERTYUPLKJHGFDSAZXCVBNM1234567890";
|
||||||
|
|
||||||
@Operation(summary = "登录接口")
|
@ApiOperation("登录接口")
|
||||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
||||||
public Result<JSONObject> login(@RequestBody SysLoginModel sysLoginModel){
|
public Result<JSONObject> login(@RequestBody SysLoginModel sysLoginModel, HttpServletRequest request){
|
||||||
Result<JSONObject> result = new Result<JSONObject>();
|
Result<JSONObject> result = new Result<JSONObject>();
|
||||||
String username = sysLoginModel.getUsername();
|
String username = sysLoginModel.getUsername();
|
||||||
String password = sysLoginModel.getPassword();
|
String password = sysLoginModel.getPassword();
|
||||||
@ -132,7 +132,7 @@ public class LoginController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//用户登录信息
|
//用户登录信息
|
||||||
userInfo(sysUser, result);
|
userInfo(sysUser, result, request);
|
||||||
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
||||||
redisUtil.del(realKey);
|
redisUtil.del(realKey);
|
||||||
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
//update-begin--Author:liusq Date:20210126 for:登录成功,删除redis中的验证码
|
||||||
@ -158,10 +158,10 @@ public class LoginController {
|
|||||||
JSONObject obj=new JSONObject();
|
JSONObject obj=new JSONObject();
|
||||||
|
|
||||||
//update-begin---author:scott ---date:2022-06-20 for:vue3前端,支持自定义首页-----------
|
//update-begin---author:scott ---date:2022-06-20 for:vue3前端,支持自定义首页-----------
|
||||||
String version = request.getHeader(CommonConstant.VERSION);
|
String vue3Version = request.getHeader(CommonConstant.VERSION);
|
||||||
//update-begin---author:liusq ---date:2022-06-29 for:接口返回值修改,同步修改这里的判断逻辑-----------
|
//update-begin---author:liusq ---date:2022-06-29 for:接口返回值修改,同步修改这里的判断逻辑-----------
|
||||||
SysRoleIndex roleIndex = sysUserService.getDynamicIndexByUserRole(username, version);
|
SysRoleIndex roleIndex = sysUserService.getDynamicIndexByUserRole(username, vue3Version);
|
||||||
if (oConvertUtils.isNotEmpty(version) && roleIndex != null && oConvertUtils.isNotEmpty(roleIndex.getUrl())) {
|
if (oConvertUtils.isNotEmpty(vue3Version) && roleIndex != null && oConvertUtils.isNotEmpty(roleIndex.getUrl())) {
|
||||||
String homePath = roleIndex.getUrl();
|
String homePath = roleIndex.getUrl();
|
||||||
if (!homePath.startsWith(SymbolConstant.SINGLE_SLASH)) {
|
if (!homePath.startsWith(SymbolConstant.SINGLE_SLASH)) {
|
||||||
homePath = SymbolConstant.SINGLE_SLASH + homePath;
|
homePath = SymbolConstant.SINGLE_SLASH + homePath;
|
||||||
@ -173,6 +173,7 @@ public class LoginController {
|
|||||||
|
|
||||||
obj.put("userInfo",sysUser);
|
obj.put("userInfo",sysUser);
|
||||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||||
|
|
||||||
result.setResult(obj);
|
result.setResult(obj);
|
||||||
result.success("");
|
result.success("");
|
||||||
}
|
}
|
||||||
@ -395,9 +396,9 @@ public class LoginController {
|
|||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary ="手机号登录接口")
|
@ApiOperation("手机号登录接口")
|
||||||
@PostMapping("/phoneLogin")
|
@PostMapping("/phoneLogin")
|
||||||
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject) {
|
public Result<JSONObject> phoneLogin(@RequestBody JSONObject jsonObject, HttpServletRequest request) {
|
||||||
Result<JSONObject> result = new Result<JSONObject>();
|
Result<JSONObject> result = new Result<JSONObject>();
|
||||||
String phone = jsonObject.getString("mobile");
|
String phone = jsonObject.getString("mobile");
|
||||||
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
//update-begin-author:taoyan date:2022-11-7 for: issues/4109 平台用户登录失败锁定用户
|
||||||
@ -427,7 +428,7 @@ public class LoginController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
//用户信息
|
//用户信息
|
||||||
userInfo(sysUser, result);
|
userInfo(sysUser, result, request);
|
||||||
//添加日志
|
//添加日志
|
||||||
baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
|
baseCommonService.addLog("用户名: " + sysUser.getUsername() + ",登录成功!", CommonConstant.LOG_TYPE_1, null);
|
||||||
|
|
||||||
@ -442,7 +443,7 @@ public class LoginController {
|
|||||||
* @param result
|
* @param result
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result) {
|
private Result<JSONObject> userInfo(SysUser sysUser, Result<JSONObject> result, HttpServletRequest request) {
|
||||||
String username = sysUser.getUsername();
|
String username = sysUser.getUsername();
|
||||||
String syspassword = sysUser.getPassword();
|
String syspassword = sysUser.getPassword();
|
||||||
// 获取用户部门信息
|
// 获取用户部门信息
|
||||||
@ -482,7 +483,15 @@ public class LoginController {
|
|||||||
// update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
// update-end--Author:wangshuai Date:20200805 for:如果用戶为选择部门,数据库为存在上一次登录部门,则取一条存进去
|
||||||
obj.put("multi_depart", 2);
|
obj.put("multi_depart", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//update-begin---author:scott ---date:2024-01-05 for:【QQYUN-7802】前端在登录时加载了两次数据字典,建议优化下,避免数据字典太多时可能产生的性能问题 #956---
|
||||||
|
// login接口,在vue3前端下不加载字典数据,vue2下加载字典
|
||||||
|
String vue3Version = request.getHeader(CommonConstant.VERSION);
|
||||||
|
if(oConvertUtils.isEmpty(vue3Version)){
|
||||||
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
obj.put("sysAllDictItems", sysDictService.queryAllDictItems());
|
||||||
|
}
|
||||||
|
//end-begin---author:scott ---date:2024-01-05 for:【QQYUN-7802】前端在登录时加载了两次数据字典,建议优化下,避免数据字典太多时可能产生的性能问题 #956---
|
||||||
|
|
||||||
result.setResult(obj);
|
result.setResult(obj);
|
||||||
result.success("登录成功");
|
result.success("登录成功");
|
||||||
return result;
|
return result;
|
||||||
@ -507,7 +516,7 @@ public class LoginController {
|
|||||||
* @param response
|
* @param response
|
||||||
* @param key
|
* @param key
|
||||||
*/
|
*/
|
||||||
@Operation(summary ="获取验证码")
|
@ApiOperation("获取验证码")
|
||||||
@GetMapping(value = "/randomImage/{key}")
|
@GetMapping(value = "/randomImage/{key}")
|
||||||
public Result<String> randomImage(HttpServletResponse response,@PathVariable("key") String key){
|
public Result<String> randomImage(HttpServletResponse response,@PathVariable("key") String key){
|
||||||
Result<String> res = new Result<String>();
|
Result<String> res = new Result<String>();
|
||||||
@ -648,7 +657,7 @@ public class LoginController {
|
|||||||
/**
|
/**
|
||||||
* 登录二维码
|
* 登录二维码
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "登录二维码")
|
@ApiOperation(value = "登录二维码", notes = "登录二维码")
|
||||||
@GetMapping("/getLoginQrcode")
|
@GetMapping("/getLoginQrcode")
|
||||||
public Result<?> getLoginQrcode() {
|
public Result<?> getLoginQrcode() {
|
||||||
String qrcodeId = CommonConstant.LOGIN_QRCODE_PRE+IdWorker.getIdStr();
|
String qrcodeId = CommonConstant.LOGIN_QRCODE_PRE+IdWorker.getIdStr();
|
||||||
@ -662,7 +671,7 @@ public class LoginController {
|
|||||||
/**
|
/**
|
||||||
* 扫码二维码
|
* 扫码二维码
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "扫码登录二维码")
|
@ApiOperation(value = "扫码登录二维码", notes = "扫码登录二维码")
|
||||||
@PostMapping("/scanLoginQrcode")
|
@PostMapping("/scanLoginQrcode")
|
||||||
public Result<?> scanLoginQrcode(@RequestParam String qrcodeId, @RequestParam String token) {
|
public Result<?> scanLoginQrcode(@RequestParam String qrcodeId, @RequestParam String token) {
|
||||||
Object check = redisUtil.get(CommonConstant.LOGIN_QRCODE + qrcodeId);
|
Object check = redisUtil.get(CommonConstant.LOGIN_QRCODE + qrcodeId);
|
||||||
@ -679,7 +688,7 @@ public class LoginController {
|
|||||||
/**
|
/**
|
||||||
* 获取用户扫码后保存的token
|
* 获取用户扫码后保存的token
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "获取用户扫码后保存的token")
|
@ApiOperation(value = "获取用户扫码后保存的token", notes = "获取用户扫码后保存的token")
|
||||||
@GetMapping("/getQrcodeToken")
|
@GetMapping("/getQrcodeToken")
|
||||||
public Result getQrcodeToken(@RequestParam String qrcodeId) {
|
public Result getQrcodeToken(@RequestParam String qrcodeId) {
|
||||||
Object token = redisUtil.get(CommonConstant.LOGIN_QRCODE_TOKEN + qrcodeId);
|
Object token = redisUtil.get(CommonConstant.LOGIN_QRCODE_TOKEN + qrcodeId);
|
||||||
|
|||||||
@ -47,9 +47,9 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jeecg.modules.system.controller;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|||||||
@ -32,8 +32,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|||||||
@ -4,8 +4,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
@ -17,8 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@ -30,7 +30,7 @@ import java.util.Arrays;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "编码校验规则")
|
@Api(tags = "编码校验规则")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/checkRule")
|
@RequestMapping("/sys/checkRule")
|
||||||
public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCheckRuleService> {
|
public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCheckRuleService> {
|
||||||
@ -48,7 +48,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-分页列表查询")
|
@AutoLog(value = "编码校验规则-分页列表查询")
|
||||||
@Operation(summary = "编码校验规则-分页列表查询")
|
@ApiOperation(value = "编码校验规则-分页列表查询", notes = "编码校验规则-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result queryPageList(
|
public Result queryPageList(
|
||||||
SysCheckRule sysCheckRule,
|
SysCheckRule sysCheckRule,
|
||||||
@ -70,7 +70,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-通过Code校验传入的值")
|
@AutoLog(value = "编码校验规则-通过Code校验传入的值")
|
||||||
@Operation(summary = "编码校验规则-通过Code校验传入的值")
|
@ApiOperation(value = "编码校验规则-通过Code校验传入的值", notes = "编码校验规则-通过Code校验传入的值")
|
||||||
@GetMapping(value = "/checkByCode")
|
@GetMapping(value = "/checkByCode")
|
||||||
public Result checkByCode(
|
public Result checkByCode(
|
||||||
@RequestParam(name = "ruleCode") String ruleCode,
|
@RequestParam(name = "ruleCode") String ruleCode,
|
||||||
@ -97,7 +97,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-添加")
|
@AutoLog(value = "编码校验规则-添加")
|
||||||
@Operation(summary = "编码校验规则-添加")
|
@ApiOperation(value = "编码校验规则-添加", notes = "编码校验规则-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result add(@RequestBody SysCheckRule sysCheckRule) {
|
public Result add(@RequestBody SysCheckRule sysCheckRule) {
|
||||||
sysCheckRuleService.save(sysCheckRule);
|
sysCheckRuleService.save(sysCheckRule);
|
||||||
@ -111,7 +111,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-编辑")
|
@AutoLog(value = "编码校验规则-编辑")
|
||||||
@Operation(summary = "编码校验规则-编辑")
|
@ApiOperation(value = "编码校验规则-编辑", notes = "编码校验规则-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result edit(@RequestBody SysCheckRule sysCheckRule) {
|
public Result edit(@RequestBody SysCheckRule sysCheckRule) {
|
||||||
sysCheckRuleService.updateById(sysCheckRule);
|
sysCheckRuleService.updateById(sysCheckRule);
|
||||||
@ -125,7 +125,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-通过id删除")
|
@AutoLog(value = "编码校验规则-通过id删除")
|
||||||
@Operation(summary = "编码校验规则-通过id删除")
|
@ApiOperation(value = "编码校验规则-通过id删除", notes = "编码校验规则-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result delete(@RequestParam(name = "id", required = true) String id) {
|
public Result delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
sysCheckRuleService.removeById(id);
|
sysCheckRuleService.removeById(id);
|
||||||
@ -139,7 +139,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-批量删除")
|
@AutoLog(value = "编码校验规则-批量删除")
|
||||||
@Operation(summary = "编码校验规则-批量删除")
|
@ApiOperation(value = "编码校验规则-批量删除", notes = "编码校验规则-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.sysCheckRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysCheckRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
@ -153,7 +153,7 @@ public class SysCheckRuleController extends JeecgController<SysCheckRule, ISysCh
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "编码校验规则-通过id查询")
|
@AutoLog(value = "编码校验规则-通过id查询")
|
||||||
@Operation(summary = "编码校验规则-通过id查询")
|
@ApiOperation(value = "编码校验规则-通过id查询", notes = "编码校验规则-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysCheckRule sysCheckRule = sysCheckRuleService.getById(id);
|
SysCheckRule sysCheckRule = sysCheckRuleService.getById(id);
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.modules.system.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.dto.DataLogDTO;
|
import org.jeecg.common.api.dto.DataLogDTO;
|
||||||
@ -23,8 +23,8 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ import java.util.List;
|
|||||||
* @Date: 2022-07-19
|
* @Date: 2022-07-19
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Tag(name = "系统评论回复表")
|
@Api(tags = "系统评论回复表")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/comment")
|
@RequestMapping("/sys/comment")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -59,7 +59,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @param sysComment
|
* @param sysComment
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "系统评论回复表-列表查询")
|
@ApiOperation(value = "系统评论回复表-列表查询", notes = "系统评论回复表-列表查询")
|
||||||
@GetMapping(value = "/listByForm")
|
@GetMapping(value = "/listByForm")
|
||||||
public Result<IPage<SysCommentVO>> queryListByForm(SysComment sysComment) {
|
public Result<IPage<SysCommentVO>> queryListByForm(SysComment sysComment) {
|
||||||
List<SysCommentVO> list = sysCommentService.queryFormCommentInfo(sysComment);
|
List<SysCommentVO> list = sysCommentService.queryFormCommentInfo(sysComment);
|
||||||
@ -74,7 +74,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @param sysComment
|
* @param sysComment
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "系统评论回复表-列表查询")
|
@ApiOperation(value = "系统评论回复表-列表查询", notes = "系统评论回复表-列表查询")
|
||||||
@GetMapping(value = "/fileList")
|
@GetMapping(value = "/fileList")
|
||||||
public Result<IPage<SysCommentFileVo>> queryFileList(SysComment sysComment) {
|
public Result<IPage<SysCommentFileVo>> queryFileList(SysComment sysComment) {
|
||||||
List<SysCommentFileVo> list = sysCommentService.queryFormFileList(sysComment.getTableName(), sysComment.getTableDataId());
|
List<SysCommentFileVo> list = sysCommentService.queryFormFileList(sysComment.getTableName(), sysComment.getTableDataId());
|
||||||
@ -83,14 +83,14 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
return Result.OK(pageList);
|
return Result.OK(pageList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "系统评论表-添加文本")
|
@ApiOperation(value = "系统评论表-添加文本", notes = "系统评论表-添加文本")
|
||||||
@PostMapping(value = "/addText")
|
@PostMapping(value = "/addText")
|
||||||
public Result<String> addText(@RequestBody SysComment sysComment) {
|
public Result<String> addText(@RequestBody SysComment sysComment) {
|
||||||
String commentId = sysCommentService.saveOne(sysComment);
|
String commentId = sysCommentService.saveOne(sysComment);
|
||||||
return Result.OK(commentId);
|
return Result.OK(commentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "系统评论表-添加文件")
|
@ApiOperation(value = "系统评论表-添加文件", notes = "系统评论表-添加文件")
|
||||||
@PostMapping(value = "/addFile")
|
@PostMapping(value = "/addFile")
|
||||||
public Result<String> addFile(HttpServletRequest request) {
|
public Result<String> addFile(HttpServletRequest request) {
|
||||||
try {
|
try {
|
||||||
@ -107,7 +107,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @param request
|
* @param request
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "系统评论表-添加文件")
|
@ApiOperation(value = "系统评论表-添加文件", notes = "系统评论表-添加文件")
|
||||||
@PostMapping(value = "/appAddFile")
|
@PostMapping(value = "/appAddFile")
|
||||||
public Result<String> appAddFile(HttpServletRequest request) {
|
public Result<String> appAddFile(HttpServletRequest request) {
|
||||||
try {
|
try {
|
||||||
@ -119,7 +119,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "系统评论回复表-通过id删除")
|
@ApiOperation(value = "系统评论回复表-通过id删除", notes = "系统评论回复表-通过id删除")
|
||||||
@DeleteMapping(value = "/deleteOne")
|
@DeleteMapping(value = "/deleteOne")
|
||||||
public Result<String> deleteOne(@RequestParam(name = "id", required = true) String id) {
|
public Result<String> deleteOne(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysComment comment = sysCommentService.getById(id);
|
SysComment comment = sysCommentService.getById(id);
|
||||||
@ -162,7 +162,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "系统评论回复表-分页列表查询")
|
//@AutoLog(value = "系统评论回复表-分页列表查询")
|
||||||
@Operation(summary = "系统评论回复表-分页列表查询")
|
@ApiOperation(value = "系统评论回复表-分页列表查询", notes = "系统评论回复表-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<SysComment>> queryPageList(SysComment sysComment,
|
public Result<IPage<SysComment>> queryPageList(SysComment sysComment,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -181,7 +181,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @param sysComment
|
* @param sysComment
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary = "系统评论回复表-添加")
|
@ApiOperation(value = "系统评论回复表-添加", notes = "系统评论回复表-添加")
|
||||||
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:add")
|
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:add")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<String> add(@RequestBody SysComment sysComment) {
|
public Result<String> add(@RequestBody SysComment sysComment) {
|
||||||
@ -196,7 +196,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "系统评论回复表-编辑")
|
//@AutoLog(value = "系统评论回复表-编辑")
|
||||||
@Operation(summary = "系统评论回复表-编辑")
|
@ApiOperation(value = "系统评论回复表-编辑", notes = "系统评论回复表-编辑")
|
||||||
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:edit")
|
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:edit")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<String> edit(@RequestBody SysComment sysComment) {
|
public Result<String> edit(@RequestBody SysComment sysComment) {
|
||||||
@ -211,7 +211,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "系统评论回复表-通过id删除")
|
//@AutoLog(value = "系统评论回复表-通过id删除")
|
||||||
@Operation(summary= "系统评论回复表-通过id删除")
|
@ApiOperation(value = "系统评论回复表-通过id删除", notes = "系统评论回复表-通过id删除")
|
||||||
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:delete")
|
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:delete")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
@ -226,7 +226,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "系统评论回复表-批量删除")
|
//@AutoLog(value = "系统评论回复表-批量删除")
|
||||||
@Operation(summary = "系统评论回复表-批量删除")
|
@ApiOperation(value = "系统评论回复表-批量删除", notes = "系统评论回复表-批量删除")
|
||||||
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:deleteBatch")
|
//@RequiresPermissions("org.jeecg.modules.demo:sys_comment:deleteBatch")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
@ -241,7 +241,7 @@ public class SysCommentController extends JeecgController<SysComment, ISysCommen
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
//@AutoLog(value = "系统评论回复表-通过id查询")
|
//@AutoLog(value = "系统评论回复表-通过id查询")
|
||||||
@Operation(summary = "系统评论回复表-通过id查询")
|
@ApiOperation(value = "系统评论回复表-通过id查询", notes = "系统评论回复表-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<SysComment> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<SysComment> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysComment sysComment = sysCommentService.getById(id);
|
SysComment sysComment = sysCommentService.getById(id);
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jeecg.modules.system.controller;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
|
|||||||
@ -3,16 +3,16 @@ package org.jeecg.modules.system.controller;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.dynamic.datasource.DynamicRoutingDataSource;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.config.TenantContext;
|
import org.jeecg.common.config.TenantContext;
|
||||||
@ -30,6 +30,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.sql.DataSource;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -40,7 +43,7 @@ import java.util.List;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "多数据源管理")
|
@Api(tags = "多数据源管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/dataSource")
|
@RequestMapping("/sys/dataSource")
|
||||||
public class SysDataSourceController extends JeecgController<SysDataSource, ISysDataSourceService> {
|
public class SysDataSourceController extends JeecgController<SysDataSource, ISysDataSourceService> {
|
||||||
@ -59,7 +62,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-分页列表查询")
|
@AutoLog(value = "多数据源管理-分页列表查询")
|
||||||
@Operation(summary = "多数据源管理-分页列表查询")
|
@ApiOperation(value = "多数据源管理-分页列表查询", notes = "多数据源管理-分页列表查询")
|
||||||
@RequiresPermissions("system:datasource:list")
|
@RequiresPermissions("system:datasource:list")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(
|
public Result<?> queryPageList(
|
||||||
@ -108,7 +111,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-添加")
|
@AutoLog(value = "多数据源管理-添加")
|
||||||
@Operation(summary = "多数据源管理-添加")
|
@ApiOperation(value = "多数据源管理-添加", notes = "多数据源管理-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysDataSource sysDataSource) {
|
public Result<?> add(@RequestBody SysDataSource sysDataSource) {
|
||||||
//update-begin-author:taoyan date:2022-8-10 for: jdbc连接地址漏洞问题
|
//update-begin-author:taoyan date:2022-8-10 for: jdbc连接地址漏洞问题
|
||||||
@ -129,7 +132,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-编辑")
|
@AutoLog(value = "多数据源管理-编辑")
|
||||||
@Operation(summary = "多数据源管理-编辑")
|
@ApiOperation(value = "多数据源管理-编辑", notes = "多数据源管理-编辑")
|
||||||
@RequestMapping(value = "/edit", method ={RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method ={RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysDataSource sysDataSource) {
|
public Result<?> edit(@RequestBody SysDataSource sysDataSource) {
|
||||||
//update-begin-author:taoyan date:2022-8-10 for: jdbc连接地址漏洞问题
|
//update-begin-author:taoyan date:2022-8-10 for: jdbc连接地址漏洞问题
|
||||||
@ -150,7 +153,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-通过id删除")
|
@AutoLog(value = "多数据源管理-通过id删除")
|
||||||
@Operation(summary = "多数据源管理-通过id删除")
|
@ApiOperation(value = "多数据源管理-通过id删除", notes = "多数据源管理-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||||
return sysDataSourceService.deleteDataSource(id);
|
return sysDataSourceService.deleteDataSource(id);
|
||||||
@ -163,7 +166,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-批量删除")
|
@AutoLog(value = "多数据源管理-批量删除")
|
||||||
@Operation(summary = "多数据源管理-批量删除")
|
@ApiOperation(value = "多数据源管理-批量删除", notes = "多数据源管理-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||||
List<String> idList = Arrays.asList(ids.split(","));
|
List<String> idList = Arrays.asList(ids.split(","));
|
||||||
@ -182,7 +185,7 @@ public class SysDataSourceController extends JeecgController<SysDataSource, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "多数据源管理-通过id查询")
|
@AutoLog(value = "多数据源管理-通过id查询")
|
||||||
@Operation(summary = "多数据源管理-通过id查询")
|
@ApiOperation(value = "多数据源管理-通过id查询", notes = "多数据源管理-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id") String id) throws InterruptedException {
|
public Result<?> queryById(@RequestParam(name = "id") String id) throws InterruptedException {
|
||||||
SysDataSource sysDataSource = sysDataSourceService.getById(id);
|
SysDataSource sysDataSource = sysDataSourceService.getById(id);
|
||||||
|
|||||||
@ -40,8 +40,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
|||||||
@ -1,20 +1,18 @@
|
|||||||
package org.jeecg.modules.system.controller;
|
package org.jeecg.modules.system.controller;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.constant.CommonConstant;
|
import org.jeecg.common.constant.CommonConstant;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
|
||||||
import org.jeecg.common.system.query.QueryGenerator;
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.jeecg.modules.base.service.BaseCommonService;
|
import org.jeecg.modules.base.service.BaseCommonService;
|
||||||
@ -24,15 +22,20 @@ import org.jeecg.modules.system.entity.SysPermission;
|
|||||||
import org.jeecg.modules.system.entity.SysPermissionDataRule;
|
import org.jeecg.modules.system.entity.SysPermissionDataRule;
|
||||||
import org.jeecg.modules.system.model.TreeModel;
|
import org.jeecg.modules.system.model.TreeModel;
|
||||||
import org.jeecg.modules.system.service.ISysDepartPermissionService;
|
import org.jeecg.modules.system.service.ISysDepartPermissionService;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.modules.system.service.ISysDepartRolePermissionService;
|
import org.jeecg.modules.system.service.ISysDepartRolePermissionService;
|
||||||
import org.jeecg.modules.system.service.ISysPermissionDataRuleService;
|
import org.jeecg.modules.system.service.ISysPermissionDataRuleService;
|
||||||
import org.jeecg.modules.system.service.ISysPermissionService;
|
import org.jeecg.modules.system.service.ISysPermissionService;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
import java.util.*;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 部门权限表
|
* @Description: 部门权限表
|
||||||
@ -41,7 +44,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name="部门权限表")
|
@Api(tags="部门权限表")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/sysDepartPermission")
|
@RequestMapping("/sys/sysDepartPermission")
|
||||||
public class SysDepartPermissionController extends JeecgController<SysDepartPermission, ISysDepartPermissionService> {
|
public class SysDepartPermissionController extends JeecgController<SysDepartPermission, ISysDepartPermissionService> {
|
||||||
@ -69,7 +72,7 @@ public class SysDepartPermissionController extends JeecgController<SysDepartPerm
|
|||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门权限表-分页列表查询")
|
@ApiOperation(value="部门权限表-分页列表查询", notes="部门权限表-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(SysDepartPermission sysDepartPermission,
|
public Result<?> queryPageList(SysDepartPermission sysDepartPermission,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@ -87,7 +90,7 @@ public class SysDepartPermissionController extends JeecgController<SysDepartPerm
|
|||||||
* @param sysDepartPermission
|
* @param sysDepartPermission
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门权限表-添加")
|
@ApiOperation(value="部门权限表-添加", notes="部门权限表-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysDepartPermission sysDepartPermission) {
|
public Result<?> add(@RequestBody SysDepartPermission sysDepartPermission) {
|
||||||
sysDepartPermissionService.save(sysDepartPermission);
|
sysDepartPermissionService.save(sysDepartPermission);
|
||||||
@ -100,7 +103,7 @@ public class SysDepartPermissionController extends JeecgController<SysDepartPerm
|
|||||||
* @param sysDepartPermission
|
* @param sysDepartPermission
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门权限表-编辑")
|
@ApiOperation(value="部门权限表-编辑", notes="部门权限表-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysDepartPermission sysDepartPermission) {
|
public Result<?> edit(@RequestBody SysDepartPermission sysDepartPermission) {
|
||||||
sysDepartPermissionService.updateById(sysDepartPermission);
|
sysDepartPermissionService.updateById(sysDepartPermission);
|
||||||
@ -113,7 +116,7 @@ public class SysDepartPermissionController extends JeecgController<SysDepartPerm
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门权限表-通过id删除")
|
@ApiOperation(value="部门权限表-通过id删除", notes="部门权限表-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
sysDepartPermissionService.removeById(id);
|
sysDepartPermissionService.removeById(id);
|
||||||
@ -126,7 +129,7 @@ public class SysDepartPermissionController extends JeecgController<SysDepartPerm
|
|||||||
* @param ids
|
* @param ids
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门权限表-批量删除")
|
@ApiOperation(value="部门权限表-批量删除", notes="部门权限表-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
this.sysDepartPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysDepartPermissionService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
@ -139,7 +142,7 @@ public class SysDepartPermissionController extends JeecgController<SysDepartPerm
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门权限表-通过id查询")
|
@ApiOperation(value="部门权限表-通过id查询", notes="部门权限表-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
SysDepartPermission sysDepartPermission = sysDepartPermissionService.getById(id);
|
SysDepartPermission sysDepartPermission = sysDepartPermissionService.getById(id);
|
||||||
|
|||||||
@ -2,12 +2,9 @@ package org.jeecg.modules.system.controller;
|
|||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
import javax.annotation.Resource;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import jakarta.annotation.Resource;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
@ -32,6 +29,8 @@ import org.jeecg.common.system.base.controller.JeecgController;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 部门角色
|
* @Description: 部门角色
|
||||||
@ -40,7 +39,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name="部门角色")
|
@Api(tags="部门角色")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/sysDepartRole")
|
@RequestMapping("/sys/sysDepartRole")
|
||||||
public class SysDepartRoleController extends JeecgController<SysDepartRole, ISysDepartRoleService> {
|
public class SysDepartRoleController extends JeecgController<SysDepartRole, ISysDepartRoleService> {
|
||||||
@ -71,7 +70,7 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
|
|||||||
* @param req
|
* @param req
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门角色-分页列表查询")
|
@ApiOperation(value="部门角色-分页列表查询", notes="部门角色-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(SysDepartRole sysDepartRole,
|
public Result<?> queryPageList(SysDepartRole sysDepartRole,
|
||||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
@ -109,7 +108,7 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:depart:role:add")
|
@RequiresPermissions("system:depart:role:add")
|
||||||
@Operation(summary="部门角色-添加")
|
@ApiOperation(value="部门角色-添加", notes="部门角色-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysDepartRole sysDepartRole) {
|
public Result<?> add(@RequestBody SysDepartRole sysDepartRole) {
|
||||||
sysDepartRoleService.save(sysDepartRole);
|
sysDepartRoleService.save(sysDepartRole);
|
||||||
@ -122,7 +121,7 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
|
|||||||
* @param sysDepartRole
|
* @param sysDepartRole
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门角色-编辑")
|
@ApiOperation(value="部门角色-编辑", notes="部门角色-编辑")
|
||||||
@RequiresPermissions("system:depart:role:edit")
|
@RequiresPermissions("system:depart:role:edit")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysDepartRole sysDepartRole) {
|
public Result<?> edit(@RequestBody SysDepartRole sysDepartRole) {
|
||||||
@ -137,7 +136,7 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "部门角色-通过id删除")
|
@AutoLog(value = "部门角色-通过id删除")
|
||||||
@Operation(summary="部门角色-通过id删除")
|
@ApiOperation(value="部门角色-通过id删除", notes="部门角色-通过id删除")
|
||||||
@RequiresPermissions("system:depart:role:delete")
|
@RequiresPermissions("system:depart:role:delete")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
@ -152,7 +151,7 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "部门角色-批量删除")
|
@AutoLog(value = "部门角色-批量删除")
|
||||||
@Operation(summary="部门角色-批量删除")
|
@ApiOperation(value="部门角色-批量删除", notes="部门角色-批量删除")
|
||||||
@RequiresPermissions("system:depart:role:deleteBatch")
|
@RequiresPermissions("system:depart:role:deleteBatch")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
@ -166,7 +165,7 @@ public class SysDepartRoleController extends JeecgController<SysDepartRole, ISys
|
|||||||
* @param id
|
* @param id
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary="部门角色-通过id查询")
|
@ApiOperation(value="部门角色-通过id查询", notes="部门角色-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
SysDepartRole sysDepartRole = sysDepartRoleService.getById(id);
|
SysDepartRole sysDepartRole = sysDepartRoleService.getById(id);
|
||||||
|
|||||||
@ -42,8 +42,8 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|||||||
@ -4,11 +4,11 @@ package org.jeecg.modules.system.controller;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
@ -40,7 +40,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
* @Author zhangweijian
|
* @Author zhangweijian
|
||||||
* @since 2018-12-28
|
* @since 2018-12-28
|
||||||
*/
|
*/
|
||||||
@Tag(name = "数据字典")
|
@Api(tags = "数据字典")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/dictItem")
|
@RequestMapping("/sys/dictItem")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@ -162,7 +162,7 @@ public class SysDictItemController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/dictItemCheck", method = RequestMethod.GET)
|
@RequestMapping(value = "/dictItemCheck", method = RequestMethod.GET)
|
||||||
@Operation(summary = "字典重复校验接口")
|
@ApiOperation("字典重复校验接口")
|
||||||
public Result<Object> doDictItemCheck(SysDictItem sysDictItem, HttpServletRequest request) {
|
public Result<Object> doDictItemCheck(SysDictItem sysDictItem, HttpServletRequest request) {
|
||||||
Long num = Long.valueOf(0);
|
Long num = Long.valueOf(0);
|
||||||
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<SysDictItem>();
|
LambdaQueryWrapper<SysDictItem> queryWrapper = new LambdaQueryWrapper<SysDictItem>();
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.modules.system.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
@ -16,8 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,7 +27,7 @@ import java.util.Arrays;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "知识库-文档管理")
|
@Api(tags = "知识库-文档管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/files")
|
@RequestMapping("/sys/files")
|
||||||
public class SysFilesController extends JeecgController<SysFiles, ISysFilesService> {
|
public class SysFilesController extends JeecgController<SysFiles, ISysFilesService> {
|
||||||
@ -44,7 +44,7 @@ public class SysFilesController extends JeecgController<SysFiles, ISysFilesServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "知识库-文档管理-分页列表查询")
|
@AutoLog(value = "知识库-文档管理-分页列表查询")
|
||||||
@Operation(summary = "知识库-文档管理-分页列表查询")
|
@ApiOperation(value = "知识库-文档管理-分页列表查询", notes = "知识库-文档管理-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(SysFiles sysFiles,
|
public Result<?> queryPageList(SysFiles sysFiles,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -63,7 +63,7 @@ public class SysFilesController extends JeecgController<SysFiles, ISysFilesServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "知识库-文档管理-添加")
|
@AutoLog(value = "知识库-文档管理-添加")
|
||||||
@Operation(summary = "知识库-文档管理-添加")
|
@ApiOperation(value = "知识库-文档管理-添加", notes = "知识库-文档管理-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysFiles sysFiles) {
|
public Result<?> add(@RequestBody SysFiles sysFiles) {
|
||||||
sysFilesService.save(sysFiles);
|
sysFilesService.save(sysFiles);
|
||||||
@ -77,7 +77,7 @@ public class SysFilesController extends JeecgController<SysFiles, ISysFilesServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "知识库-文档管理-编辑")
|
@AutoLog(value = "知识库-文档管理-编辑")
|
||||||
@Operation(summary = "知识库-文档管理-编辑")
|
@ApiOperation(value = "知识库-文档管理-编辑", notes = "知识库-文档管理-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysFiles sysFiles) {
|
public Result<?> edit(@RequestBody SysFiles sysFiles) {
|
||||||
sysFilesService.updateById(sysFiles);
|
sysFilesService.updateById(sysFiles);
|
||||||
@ -91,7 +91,7 @@ public class SysFilesController extends JeecgController<SysFiles, ISysFilesServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "知识库-文档管理-通过id删除")
|
@AutoLog(value = "知识库-文档管理-通过id删除")
|
||||||
@Operation(summary = "知识库-文档管理-通过id删除")
|
@ApiOperation(value = "知识库-文档管理-通过id删除", notes = "知识库-文档管理-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
sysFilesService.removeById(id);
|
sysFilesService.removeById(id);
|
||||||
@ -105,7 +105,7 @@ public class SysFilesController extends JeecgController<SysFiles, ISysFilesServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "知识库-文档管理-批量删除")
|
@AutoLog(value = "知识库-文档管理-批量删除")
|
||||||
@Operation(summary = "知识库-文档管理-批量删除")
|
@ApiOperation(value = "知识库-文档管理-批量删除", notes = "知识库-文档管理-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.sysFilesService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysFilesService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
@ -119,7 +119,7 @@ public class SysFilesController extends JeecgController<SysFiles, ISysFilesServi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "知识库-文档管理-通过id查询")
|
@AutoLog(value = "知识库-文档管理-通过id查询")
|
||||||
@Operation(summary = "知识库-文档管理-通过id查询")
|
@ApiOperation(value = "知识库-文档管理-通过id查询", notes = "知识库-文档管理-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysFiles sysFiles = sysFilesService.getById(id);
|
SysFiles sysFiles = sysFilesService.getById(id);
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
@ -19,8 +19,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -30,7 +30,7 @@ import java.util.Arrays;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "填值规则")
|
@Api(tags = "填值规则")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/fillRule")
|
@RequestMapping("/sys/fillRule")
|
||||||
public class SysFillRuleController extends JeecgController<SysFillRule, ISysFillRuleService> {
|
public class SysFillRuleController extends JeecgController<SysFillRule, ISysFillRuleService> {
|
||||||
@ -47,7 +47,7 @@ public class SysFillRuleController extends JeecgController<SysFillRule, ISysFill
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-分页列表查询")
|
@AutoLog(value = "填值规则-分页列表查询")
|
||||||
@Operation(summary = "填值规则-分页列表查询")
|
@ApiOperation(value = "填值规则-分页列表查询", notes = "填值规则-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(SysFillRule sysFillRule,
|
public Result<?> queryPageList(SysFillRule sysFillRule,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -78,7 +78,7 @@ public class SysFillRuleController extends JeecgController<SysFillRule, ISysFill
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-添加")
|
@AutoLog(value = "填值规则-添加")
|
||||||
@Operation(summary = "填值规则-添加")
|
@ApiOperation(value = "填值规则-添加", notes = "填值规则-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysFillRule sysFillRule) {
|
public Result<?> add(@RequestBody SysFillRule sysFillRule) {
|
||||||
sysFillRuleService.save(sysFillRule);
|
sysFillRuleService.save(sysFillRule);
|
||||||
@ -92,7 +92,7 @@ public class SysFillRuleController extends JeecgController<SysFillRule, ISysFill
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-编辑")
|
@AutoLog(value = "填值规则-编辑")
|
||||||
@Operation(summary = "填值规则-编辑")
|
@ApiOperation(value = "填值规则-编辑", notes = "填值规则-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysFillRule sysFillRule) {
|
public Result<?> edit(@RequestBody SysFillRule sysFillRule) {
|
||||||
sysFillRuleService.updateById(sysFillRule);
|
sysFillRuleService.updateById(sysFillRule);
|
||||||
@ -106,7 +106,7 @@ public class SysFillRuleController extends JeecgController<SysFillRule, ISysFill
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-通过id删除")
|
@AutoLog(value = "填值规则-通过id删除")
|
||||||
@Operation(summary = "填值规则-通过id删除")
|
@ApiOperation(value = "填值规则-通过id删除", notes = "填值规则-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
sysFillRuleService.removeById(id);
|
sysFillRuleService.removeById(id);
|
||||||
@ -120,7 +120,7 @@ public class SysFillRuleController extends JeecgController<SysFillRule, ISysFill
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-批量删除")
|
@AutoLog(value = "填值规则-批量删除")
|
||||||
@Operation(summary = "填值规则-批量删除")
|
@ApiOperation(value = "填值规则-批量删除", notes = "填值规则-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.sysFillRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysFillRuleService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
@ -134,7 +134,7 @@ public class SysFillRuleController extends JeecgController<SysFillRule, ISysFill
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "填值规则-通过id查询")
|
@AutoLog(value = "填值规则-通过id查询")
|
||||||
@Operation(summary = "填值规则-通过id查询")
|
@ApiOperation(value = "填值规则-通过id查询", notes = "填值规则-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysFillRule sysFillRule = sysFillRuleService.getById(id);
|
SysFillRule sysFillRule = sysFillRuleService.getById(id);
|
||||||
|
|||||||
@ -3,8 +3,8 @@ package org.jeecg.modules.system.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
@ -16,8 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -27,7 +27,7 @@ import java.util.Arrays;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "表单评论文件")
|
@Api(tags = "表单评论文件")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/formFile")
|
@RequestMapping("/sys/formFile")
|
||||||
public class SysFormFileController extends JeecgController<SysFormFile, ISysFormFileService> {
|
public class SysFormFileController extends JeecgController<SysFormFile, ISysFormFileService> {
|
||||||
@ -44,7 +44,7 @@ public class SysFormFileController extends JeecgController<SysFormFile, ISysForm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "表单评论文件-分页列表查询")
|
@AutoLog(value = "表单评论文件-分页列表查询")
|
||||||
@Operation(summary = "表单评论文件-分页列表查询")
|
@ApiOperation(value = "表单评论文件-分页列表查询", notes = "表单评论文件-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(SysFormFile sysFormFile,
|
public Result<?> queryPageList(SysFormFile sysFormFile,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -63,7 +63,7 @@ public class SysFormFileController extends JeecgController<SysFormFile, ISysForm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "表单评论文件-添加")
|
@AutoLog(value = "表单评论文件-添加")
|
||||||
@Operation(summary = "表单评论文件-添加")
|
@ApiOperation(value = "表单评论文件-添加", notes = "表单评论文件-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysFormFile sysFormFile) {
|
public Result<?> add(@RequestBody SysFormFile sysFormFile) {
|
||||||
sysFormFileService.save(sysFormFile);
|
sysFormFileService.save(sysFormFile);
|
||||||
@ -77,7 +77,7 @@ public class SysFormFileController extends JeecgController<SysFormFile, ISysForm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "表单评论文件-编辑")
|
@AutoLog(value = "表单评论文件-编辑")
|
||||||
@Operation(summary = "表单评论文件-编辑")
|
@ApiOperation(value = "表单评论文件-编辑", notes = "表单评论文件-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysFormFile sysFormFile) {
|
public Result<?> edit(@RequestBody SysFormFile sysFormFile) {
|
||||||
sysFormFileService.updateById(sysFormFile);
|
sysFormFileService.updateById(sysFormFile);
|
||||||
@ -91,7 +91,7 @@ public class SysFormFileController extends JeecgController<SysFormFile, ISysForm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "表单评论文件-通过id删除")
|
@AutoLog(value = "表单评论文件-通过id删除")
|
||||||
@Operation(summary = "表单评论文件-通过id删除")
|
@ApiOperation(value = "表单评论文件-通过id删除", notes = "表单评论文件-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
sysFormFileService.removeById(id);
|
sysFormFileService.removeById(id);
|
||||||
@ -105,7 +105,7 @@ public class SysFormFileController extends JeecgController<SysFormFile, ISysForm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "表单评论文件-批量删除")
|
@AutoLog(value = "表单评论文件-批量删除")
|
||||||
@Operation(summary = "表单评论文件-批量删除")
|
@ApiOperation(value = "表单评论文件-批量删除", notes = "表单评论文件-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.sysFormFileService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysFormFileService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
@ -119,7 +119,7 @@ public class SysFormFileController extends JeecgController<SysFormFile, ISysForm
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "表单评论文件-通过id查询")
|
@AutoLog(value = "表单评论文件-通过id查询")
|
||||||
@Operation(summary = "表单评论文件-通过id查询")
|
@ApiOperation(value = "表单评论文件-通过id查询", notes = "表单评论文件-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysFormFile sysFormFile = sysFormFileService.getById(id);
|
SysFormFile sysFormFile = sysFormFileService.getById(id);
|
||||||
|
|||||||
@ -3,9 +3,10 @@ package org.jeecg.modules.system.controller;
|
|||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
@ -22,7 +23,7 @@ import java.util.List;
|
|||||||
* @Date: 2020-05-26
|
* @Date: 2020-05-26
|
||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Tag(name = "gateway路由管理")
|
@Api(tags = "gateway路由管理")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/gatewayRoute")
|
@RequestMapping("/sys/gatewayRoute")
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package org.jeecg.modules.system.controller;
|
|||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|||||||
@ -27,7 +27,7 @@ import org.jeecg.modules.system.util.PermissionDataUtil;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|||||||
@ -5,8 +5,8 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
@ -34,8 +34,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLDecoder;
|
import java.net.URLDecoder;
|
||||||
@ -52,7 +52,7 @@ import java.util.stream.Collectors;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "职务表")
|
@Api(tags = "职务表")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/position")
|
@RequestMapping("/sys/position")
|
||||||
public class SysPositionController {
|
public class SysPositionController {
|
||||||
@ -76,7 +76,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-分页列表查询")
|
@AutoLog(value = "职务表-分页列表查询")
|
||||||
@Operation(summary = "职务表-分页列表查询")
|
@ApiOperation(value = "职务表-分页列表查询", notes = "职务表-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<IPage<SysPosition>> queryPageList(SysPosition sysPosition,
|
public Result<IPage<SysPosition>> queryPageList(SysPosition sysPosition,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -104,7 +104,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-添加")
|
@AutoLog(value = "职务表-添加")
|
||||||
@Operation(summary = "职务表-添加")
|
@ApiOperation(value = "职务表-添加", notes = "职务表-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<SysPosition> add(@RequestBody SysPosition sysPosition) {
|
public Result<SysPosition> add(@RequestBody SysPosition sysPosition) {
|
||||||
Result<SysPosition> result = new Result<SysPosition>();
|
Result<SysPosition> result = new Result<SysPosition>();
|
||||||
@ -132,7 +132,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-编辑")
|
@AutoLog(value = "职务表-编辑")
|
||||||
@Operation(summary = "职务表-编辑")
|
@ApiOperation(value = "职务表-编辑", notes = "职务表-编辑")
|
||||||
@RequestMapping(value = "/edit", method ={RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method ={RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<SysPosition> edit(@RequestBody SysPosition sysPosition) {
|
public Result<SysPosition> edit(@RequestBody SysPosition sysPosition) {
|
||||||
Result<SysPosition> result = new Result<SysPosition>();
|
Result<SysPosition> result = new Result<SysPosition>();
|
||||||
@ -157,7 +157,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-通过id删除")
|
@AutoLog(value = "职务表-通过id删除")
|
||||||
@Operation(summary = "职务表-通过id删除")
|
@ApiOperation(value = "职务表-通过id删除", notes = "职务表-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
try {
|
try {
|
||||||
@ -178,7 +178,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-批量删除")
|
@AutoLog(value = "职务表-批量删除")
|
||||||
@Operation(summary = "职务表-批量删除")
|
@ApiOperation(value = "职务表-批量删除", notes = "职务表-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<SysPosition> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<SysPosition> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
Result<SysPosition> result = new Result<SysPosition>();
|
Result<SysPosition> result = new Result<SysPosition>();
|
||||||
@ -198,7 +198,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-通过id查询")
|
@AutoLog(value = "职务表-通过id查询")
|
||||||
@Operation(summary = "职务表-通过id查询")
|
@ApiOperation(value = "职务表-通过id查询", notes = "职务表-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<SysPosition> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<SysPosition> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
Result<SysPosition> result = new Result<SysPosition>();
|
Result<SysPosition> result = new Result<SysPosition>();
|
||||||
@ -298,7 +298,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-通过code查询")
|
@AutoLog(value = "职务表-通过code查询")
|
||||||
@Operation(summary = "职务表-通过code查询")
|
@ApiOperation(value = "职务表-通过code查询", notes = "职务表-通过code查询")
|
||||||
@GetMapping(value = "/queryByCode")
|
@GetMapping(value = "/queryByCode")
|
||||||
public Result<SysPosition> queryByCode(@RequestParam(name = "code", required = true) String code) {
|
public Result<SysPosition> queryByCode(@RequestParam(name = "code", required = true) String code) {
|
||||||
Result<SysPosition> result = new Result<SysPosition>();
|
Result<SysPosition> result = new Result<SysPosition>();
|
||||||
@ -322,7 +322,7 @@ public class SysPositionController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "职务表-通过多个查询")
|
@AutoLog(value = "职务表-通过多个查询")
|
||||||
@Operation(summary = "职务表-通过多个id查询")
|
@ApiOperation(value = "职务表-通过多个id查询", notes = "职务表-通过多个id查询")
|
||||||
@GetMapping(value = "/queryByIds")
|
@GetMapping(value = "/queryByIds")
|
||||||
public Result<List<SysPosition>> queryByIds(@RequestParam(name = "ids") String ids) {
|
public Result<List<SysPosition>> queryByIds(@RequestParam(name = "ids") String ids) {
|
||||||
Result<List<SysPosition>> result = new Result<>();
|
Result<List<SysPosition>> result = new Result<>();
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import java.util.HashMap;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.PageDTO;
|
||||||
|
|||||||
@ -1,11 +1,8 @@
|
|||||||
package org.jeecg.modules.system.controller;
|
package org.jeecg.modules.system.controller;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
@ -25,6 +22,8 @@ import org.jeecg.common.system.base.controller.JeecgController;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 角色首页配置
|
* @Description: 角色首页配置
|
||||||
@ -33,7 +32,7 @@ import org.springframework.web.servlet.ModelAndView;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "角色首页配置")
|
@Api(tags = "角色首页配置")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/sysRoleIndex")
|
@RequestMapping("/sys/sysRoleIndex")
|
||||||
public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRoleIndexService> {
|
public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRoleIndexService> {
|
||||||
@ -50,7 +49,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "角色首页配置-分页列表查询")
|
@AutoLog(value = "角色首页配置-分页列表查询")
|
||||||
@Operation(summary = "角色首页配置-分页列表查询")
|
@ApiOperation(value = "角色首页配置-分页列表查询", notes = "角色首页配置-分页列表查询")
|
||||||
@GetMapping(value = "/list")
|
@GetMapping(value = "/list")
|
||||||
public Result<?> queryPageList(SysRoleIndex sysRoleIndex,
|
public Result<?> queryPageList(SysRoleIndex sysRoleIndex,
|
||||||
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
||||||
@ -70,7 +69,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:roleindex:add")
|
@RequiresPermissions("system:roleindex:add")
|
||||||
@AutoLog(value = "角色首页配置-添加")
|
@AutoLog(value = "角色首页配置-添加")
|
||||||
@Operation(summary = "角色首页配置-添加")
|
@ApiOperation(value = "角色首页配置-添加", notes = "角色首页配置-添加")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
||||||
public Result<?> add(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
public Result<?> add(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
||||||
@ -86,7 +85,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
*/
|
*/
|
||||||
@RequiresPermissions("system:roleindex:edit")
|
@RequiresPermissions("system:roleindex:edit")
|
||||||
@AutoLog(value = "角色首页配置-编辑")
|
@AutoLog(value = "角色首页配置-编辑")
|
||||||
@Operation(summary = "角色首页配置-编辑")
|
@ApiOperation(value = "角色首页配置-编辑", notes = "角色首页配置-编辑")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
||||||
public Result<?> edit(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
public Result<?> edit(@RequestBody SysRoleIndex sysRoleIndex,HttpServletRequest request) {
|
||||||
@ -101,7 +100,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "角色首页配置-通过id删除")
|
@AutoLog(value = "角色首页配置-通过id删除")
|
||||||
@Operation(summary = "角色首页配置-通过id删除")
|
@ApiOperation(value = "角色首页配置-通过id删除", notes = "角色首页配置-通过id删除")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> delete(@RequestParam(name = "id", required = true) String id) {
|
||||||
sysRoleIndexService.removeById(id);
|
sysRoleIndexService.removeById(id);
|
||||||
@ -115,7 +114,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "角色首页配置-批量删除")
|
@AutoLog(value = "角色首页配置-批量删除")
|
||||||
@Operation(summary = "角色首页配置-批量删除")
|
@ApiOperation(value = "角色首页配置-批量删除", notes = "角色首页配置-批量删除")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids) {
|
||||||
this.sysRoleIndexService.removeByIds(Arrays.asList(ids.split(",")));
|
this.sysRoleIndexService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
@ -129,7 +128,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "角色首页配置-通过id查询")
|
@AutoLog(value = "角色首页配置-通过id查询")
|
||||||
@Operation(summary = "角色首页配置-通过id查询")
|
@ApiOperation(value = "角色首页配置-通过id查询", notes = "角色首页配置-通过id查询")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
SysRoleIndex sysRoleIndex = sysRoleIndexService.getById(id);
|
SysRoleIndex sysRoleIndex = sysRoleIndexService.getById(id);
|
||||||
@ -166,7 +165,7 @@ public class SysRoleIndexController extends JeecgController<SysRoleIndex, ISysRo
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "角色首页配置-通过code查询")
|
@AutoLog(value = "角色首页配置-通过code查询")
|
||||||
@Operation(summary = "角色首页配置-通过code查询")
|
@ApiOperation(value = "角色首页配置-通过code查询", notes = "角色首页配置-通过code查询")
|
||||||
@GetMapping(value = "/queryByCode")
|
@GetMapping(value = "/queryByCode")
|
||||||
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
//@DynamicTable(value = DynamicTableConstant.SYS_ROLE_INDEX)
|
||||||
public Result<?> queryByCode(@RequestParam(name = "roleCode", required = true) String roleCode,HttpServletRequest request) {
|
public Result<?> queryByCode(@RequestParam(name = "roleCode", required = true) String roleCode,HttpServletRequest request) {
|
||||||
|
|||||||
@ -3,11 +3,10 @@ package org.jeecg.modules.system.controller;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
import org.jeecg.common.system.base.controller.JeecgController;
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
@ -17,6 +16,8 @@ import org.jeecg.modules.system.service.ISysTableWhiteListService;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 系统表白名单
|
* @Description: 系统表白名单
|
||||||
* @Author: jeecg-boot
|
* @Author: jeecg-boot
|
||||||
@ -24,7 +25,7 @@ import org.springframework.web.bind.annotation.*;
|
|||||||
* @Version: V1.0
|
* @Version: V1.0
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Tag(name = "系统表白名单")
|
@Api(tags = "系统表白名单")
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/sys/tableWhiteList")
|
@RequestMapping("/sys/tableWhiteList")
|
||||||
public class SysTableWhiteListController extends JeecgController<SysTableWhiteList, ISysTableWhiteListService> {
|
public class SysTableWhiteListController extends JeecgController<SysTableWhiteList, ISysTableWhiteListService> {
|
||||||
@ -62,7 +63,7 @@ public class SysTableWhiteListController extends JeecgController<SysTableWhiteLi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "系统表白名单-添加")
|
@AutoLog(value = "系统表白名单-添加")
|
||||||
@Operation(summary = "系统表白名单-添加")
|
@ApiOperation(value = "系统表白名单-添加", notes = "系统表白名单-添加")
|
||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@PostMapping(value = "/add")
|
@PostMapping(value = "/add")
|
||||||
public Result<?> add(@RequestBody SysTableWhiteList sysTableWhiteList) {
|
public Result<?> add(@RequestBody SysTableWhiteList sysTableWhiteList) {
|
||||||
@ -80,7 +81,7 @@ public class SysTableWhiteListController extends JeecgController<SysTableWhiteLi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "系统表白名单-编辑")
|
@AutoLog(value = "系统表白名单-编辑")
|
||||||
@Operation(summary = "系统表白名单-编辑")
|
@ApiOperation(value = "系统表白名单-编辑", notes = "系统表白名单-编辑")
|
||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST})
|
||||||
public Result<?> edit(@RequestBody SysTableWhiteList sysTableWhiteList) {
|
public Result<?> edit(@RequestBody SysTableWhiteList sysTableWhiteList) {
|
||||||
@ -98,7 +99,7 @@ public class SysTableWhiteListController extends JeecgController<SysTableWhiteLi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "系统表白名单-通过id删除")
|
@AutoLog(value = "系统表白名单-通过id删除")
|
||||||
@Operation(summary = "系统表白名单-通过id删除")
|
@ApiOperation(value = "系统表白名单-通过id删除", notes = "系统表白名单-通过id删除")
|
||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@DeleteMapping(value = "/delete")
|
@DeleteMapping(value = "/delete")
|
||||||
public Result<?> delete(@RequestParam(name = "id") String id) {
|
public Result<?> delete(@RequestParam(name = "id") String id) {
|
||||||
@ -116,7 +117,7 @@ public class SysTableWhiteListController extends JeecgController<SysTableWhiteLi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "系统表白名单-批量删除")
|
@AutoLog(value = "系统表白名单-批量删除")
|
||||||
@Operation(summary = "系统表白名单-批量删除")
|
@ApiOperation(value = "系统表白名单-批量删除", notes = "系统表白名单-批量删除")
|
||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@DeleteMapping(value = "/deleteBatch")
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
public Result<?> deleteBatch(@RequestParam(name = "ids") String ids) {
|
||||||
@ -134,7 +135,7 @@ public class SysTableWhiteListController extends JeecgController<SysTableWhiteLi
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@AutoLog(value = "系统表白名单-通过id查询")
|
@AutoLog(value = "系统表白名单-通过id查询")
|
||||||
@Operation(summary = "系统表白名单-通过id查询")
|
@ApiOperation(value = "系统表白名单-通过id查询", notes = "系统表白名单-通过id查询")
|
||||||
@RequiresRoles("admin")
|
@RequiresRoles("admin")
|
||||||
@GetMapping(value = "/queryById")
|
@GetMapping(value = "/queryById")
|
||||||
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) {
|
||||||
|
|||||||
@ -35,7 +35,7 @@ import org.jeecg.modules.system.vo.tenant.TenantPackUserCount;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* minio文件上传示例
|
* minio文件上传示例
|
||||||
|
|||||||
@ -7,8 +7,8 @@ import java.util.Arrays;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.jeecg.common.api.vo.Result;
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
|||||||
@ -46,8 +46,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|||||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@ -1428,7 +1428,7 @@ public class SysUserController {
|
|||||||
//------------------------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------------------------
|
||||||
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
//是否开启系统管理模块的多租户数据隔离【SAAS多租户模式】
|
||||||
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
if (MybatisPlusSaasConfig.OPEN_SYSTEM_TENANT_CONTROL) {
|
||||||
String tenantId = TokenUtils.getTenantIdByRequest(request);
|
String tenantId = oConvertUtils.getString(TokenUtils.getTenantIdByRequest(request),"-1");
|
||||||
//update-begin---author:wangshuai ---date:20221223 for:[QQYUN-3371]租户逻辑改造,改成关系表------------
|
//update-begin---author:wangshuai ---date:20221223 for:[QQYUN-3371]租户逻辑改造,改成关系表------------
|
||||||
List<String> userIds = userTenantService.getUserIdsByTenantId(Integer.valueOf(tenantId));
|
List<String> userIds = userTenantService.getUserIdsByTenantId(Integer.valueOf(tenantId));
|
||||||
if (oConvertUtils.listIsNotEmpty(userIds)) {
|
if (oConvertUtils.listIsNotEmpty(userIds)) {
|
||||||
|
|||||||
@ -20,7 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.data.redis.core.RedisTemplate;
|
import org.springframework.data.redis.core.RedisTemplate;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import org.jeecg.common.constant.SymbolConstant;
|
|||||||
import org.jeecg.common.constant.enums.MessageTypeEnum;
|
import org.jeecg.common.constant.enums.MessageTypeEnum;
|
||||||
import org.jeecg.common.system.util.JwtUtil;
|
import org.jeecg.common.system.util.JwtUtil;
|
||||||
import org.jeecg.common.system.vo.LoginUser;
|
import org.jeecg.common.system.vo.LoginUser;
|
||||||
|
import org.jeecg.common.util.TokenUtils;
|
||||||
import org.jeecg.common.util.oConvertUtils;
|
import org.jeecg.common.util.oConvertUtils;
|
||||||
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
import org.jeecg.config.mybatis.MybatisPlusSaasConfig;
|
||||||
import org.jeecg.modules.system.entity.SysThirdAccount;
|
import org.jeecg.modules.system.entity.SysThirdAccount;
|
||||||
@ -22,11 +23,13 @@ import org.jeecg.modules.system.service.ISysThirdAccountService;
|
|||||||
import org.jeecg.modules.system.service.ISysThirdAppConfigService;
|
import org.jeecg.modules.system.service.ISysThirdAppConfigService;
|
||||||
import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl;
|
import org.jeecg.modules.system.service.impl.ThirdAppDingtalkServiceImpl;
|
||||||
import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl;
|
import org.jeecg.modules.system.service.impl.ThirdAppWechatEnterpriseServiceImpl;
|
||||||
|
import org.jeecg.modules.system.vo.thirdapp.JwSysUserDepartVo;
|
||||||
|
import org.jeecg.modules.system.vo.thirdapp.JwUserDepartVo;
|
||||||
import org.jeecg.modules.system.vo.thirdapp.SyncInfoVo;
|
import org.jeecg.modules.system.vo.thirdapp.SyncInfoVo;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -518,4 +521,46 @@ public class ThirdAppController {
|
|||||||
return Result.ok("解绑成功");
|
return Result.ok("解绑成功");
|
||||||
}
|
}
|
||||||
//========================end 应用低代码账号设置第三方账号绑定 ================================
|
//========================end 应用低代码账号设置第三方账号绑定 ================================
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取企业微信绑定的用户信息
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getThirdUserByWechat")
|
||||||
|
public Result<JwSysUserDepartVo> getThirdUserByWechat(HttpServletRequest request){
|
||||||
|
//获取企业微信配置
|
||||||
|
Integer tenantId = oConvertUtils.getInt(TokenUtils.getTenantIdByRequest(request),0);
|
||||||
|
SysThirdAppConfig config = appConfigService.getThirdConfigByThirdType(tenantId, MessageTypeEnum.QYWX.getType());
|
||||||
|
if (null != config) {
|
||||||
|
JwSysUserDepartVo list = wechatEnterpriseService.getThirdUserByWechat(tenantId);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
return Result.error("企业微信尚未配置,请配置企业微信");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同步企业微信部门和用户到本地
|
||||||
|
* @param jwUserDepartJson
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/sync/wechatEnterprise/departAndUser/toLocal")
|
||||||
|
public Result<SyncInfoVo> syncWechatEnterpriseDepartAndUserToLocal(@RequestParam(name = "jwUserDepartJson") String jwUserDepartJson,HttpServletRequest request){
|
||||||
|
int tenantId = oConvertUtils.getInt(TokenUtils.getTenantIdByRequest(request), 0);
|
||||||
|
SyncInfoVo syncInfoVo = wechatEnterpriseService.syncWechatEnterpriseDepartAndUserToLocal(jwUserDepartJson,tenantId);
|
||||||
|
return Result.ok(syncInfoVo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询被绑定的企业微信用户
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getThirdUserBindByWechat")
|
||||||
|
public Result<List<JwUserDepartVo>> getThirdUserBindByWechat(HttpServletRequest request){
|
||||||
|
int tenantId = oConvertUtils.getInt(TokenUtils.getTenantIdByRequest(request), 0);
|
||||||
|
List<JwUserDepartVo> jwSysUserDepartVos = wechatEnterpriseService.getThirdUserBindByWechat(tenantId);
|
||||||
|
return Result.ok(jwSysUserDepartVos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import cn.hutool.core.util.RandomUtil;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.xkcoding.justauth.AuthRequestFactory;
|
import com.xkcoding.justauth.AuthRequestFactory;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import me.zhyd.oauth.model.AuthCallback;
|
import me.zhyd.oauth.model.AuthCallback;
|
||||||
import me.zhyd.oauth.model.AuthResponse;
|
import me.zhyd.oauth.model.AuthResponse;
|
||||||
@ -32,8 +32,8 @@ import org.springframework.stereotype.Controller;
|
|||||||
import org.springframework.ui.ModelMap;
|
import org.springframework.ui.ModelMap;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import jakarta.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
@ -270,7 +270,7 @@ public class ThirdLoginController {
|
|||||||
* @param jsonObject
|
* @param jsonObject
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@Operation(summary ="手机号登录接口")
|
@ApiOperation("手机号登录接口")
|
||||||
@PostMapping("/bindingThirdPhone")
|
@PostMapping("/bindingThirdPhone")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Result<String> bindingThirdPhone(@RequestBody JSONObject jsonObject) {
|
public Result<String> bindingThirdPhone(@RequestBody JSONObject jsonObject) {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user