springdoc、openapi、swagger v3

This commit is contained in:
thinkgem
2023-07-03 15:41:49 +08:00
parent b371d685d4
commit 3271bb3afc
24 changed files with 195 additions and 183 deletions

View File

@@ -17,7 +17,7 @@ import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import com.jeesite.common.utils.excel.fieldtype.CompanyType;
import com.jeesite.common.utils.excel.fieldtype.OfficeType;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.Valid;
@@ -125,7 +125,7 @@ public class EmpUser extends User {
super.setRefObj(employee);
}
@ApiModelProperty("根据各种编码查询")
@Schema(description = "根据各种编码查询")
public String[] getCodes() {
return codes;
}

View File

@@ -13,7 +13,7 @@ import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
@@ -130,7 +130,7 @@ public class Employee extends DataEntity<Employee> {
this.company = company;
}
@ApiModelProperty("根据岗位编码查询")
@Schema(description = "根据岗位编码查询")
public String getPostCode() {
return postCode;
}
@@ -147,7 +147,7 @@ public class Employee extends DataEntity<Employee> {
this.employeePostList = employeePostList;
}
@ApiModelProperty("员工岗位关系")
@Schema(description = "员工岗位关系")
public String getEmployeePosts() {
// List<String> list = ListUtils.extractToList(employeePostList, "postCode");
// return StringUtils.join(list, ",");

View File

@@ -14,7 +14,7 @@ import com.jeesite.common.lang.TimeUtils;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
@@ -230,7 +230,7 @@ public class Log extends DataEntity<Log> {
this.executeTime = executeTime;
}
@ApiModelProperty("格式化后的执行时间")
@Schema(description = "格式化后的执行时间")
public String getExecuteTimeFormat(){
if (executeTime == null) {
executeTime = 0L;

View File

@@ -16,8 +16,8 @@ import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import com.jeesite.modules.sys.utils.EmpUtils;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
@@ -44,6 +44,7 @@ import jakarta.validation.constraints.Size;
@Column(includeEntity=Extend.class, attrName="extend"),
}, extWhereKeys="dsf", orderBy="a.tree_sorts, a.office_code"
)
@Schema
public class Office extends TreeEntity<Office> {
private static final long serialVersionUID = 1L;
@@ -57,6 +58,9 @@ public class Office extends TreeEntity<Office> {
private String address; // 联系地址
private String zipCode; // 邮政编码
private String email; // 邮箱
@Hidden
@Schema(hidden = true)
private Extend extend; // 扩展字段
private String companyCode; // 根据公司查询机构,组织机构所属公司
@@ -82,6 +86,8 @@ public class Office extends TreeEntity<Office> {
}
@Override
@Hidden
@Schema(hidden = true)
public Office getParent() {
return parent;
}
@@ -139,7 +145,7 @@ public class Office extends TreeEntity<Office> {
this.officeType = officeType;
}
@ApiModelProperty("包含某机构类型")
@Schema(description = "包含某机构类型")
public String[] getOfficeType_in(){
return sqlMap.getWhere().getValue("office_type", QueryType.IN);
}
@@ -192,7 +198,9 @@ public class Office extends TreeEntity<Office> {
public void setEmail(String email) {
this.email = email;
}
@Hidden
@Schema(hidden = true)
public Extend getExtend() {
return extend;
}
@@ -201,7 +209,7 @@ public class Office extends TreeEntity<Office> {
this.extend = extend;
}
@ApiModelProperty("公司编码")
@Schema(description = "公司编码")
public String getCompanyCode() {
return companyCode;
}

View File

@@ -9,7 +9,7 @@ import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
@@ -75,7 +75,7 @@ public class Post extends DataEntity<Post> {
this.postName = postName;
}
@ApiModelProperty("模糊查询岗位名称")
@Schema(description = "模糊查询岗位名称")
public String getPostName_like() {
return sqlMap().getWhere().getValue("post_name", QueryType.LIKE);
}
@@ -101,7 +101,7 @@ public class Post extends DataEntity<Post> {
this.postSort = postSort;
}
@ApiModelProperty("根据员工编码查询")
@Schema(description = "根据员工编码查询")
public String getEmpCode() {
return empCode;
}

View File

@@ -4,22 +4,6 @@
*/
package com.jeesite.modules.sys.web;
import java.util.Date;
import java.util.Map;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authc.AuthenticationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.codec.DesUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.config.Global;
@@ -35,12 +19,25 @@ import com.jeesite.modules.sys.service.UserService;
import com.jeesite.modules.sys.utils.PwdUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import com.jeesite.modules.sys.utils.ValidCodeUtils;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.Parameters;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authc.AuthenticationException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.annotations.ApiIgnore;
import java.util.Date;
import java.util.Map;
/**
* 账号自助服务Controller
@@ -48,7 +45,7 @@ import springfox.documentation.annotations.ApiIgnore;
* @version 2020-9-20
*/
@Controller
@Api(tags = "Account - 账号服务")
@Tag(name = "Account - 账号服务")
@RequestMapping(value = "/account")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class AccountController extends BaseController{
@@ -64,11 +61,11 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "getLoginValidCode")
@ResponseBody
@ApiOperation(value = "获取登录的短信或邮件验证码")
@ApiImplicitParams({
@ApiImplicitParam(name = "username", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
@ApiImplicitParam(name = "validType", value = "验证方式mobile、email", required = true),
@Operation(summary = "获取登录的短信或邮件验证码")
@Parameters({
@Parameter(name = "username", description = "登录账号", required = true),
@Parameter(name = "validCode", description = "图片验证码,防止重复机器人", required = true),
@Parameter(name = "validType", description = "验证方式mobile、email", required = true),
})
public String getLoginValidCode(String username, String validCode, String validType, HttpServletRequest request) {
return getValidCode("login", username, validCode, validType, request, "登录验证码");
@@ -80,10 +77,10 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "loginByValidCode")
@ResponseBody
@ApiOperation(value = "根据短信或邮件验证码登录系统")
@ApiImplicitParams({
@ApiImplicitParam(name = "username", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "loginValidCode", value = "手机或邮箱接受的验证码", required = true),
@Operation(summary = "根据短信或邮件验证码登录系统")
@Parameters({
@Parameter(name = "username", description = "登录账号", required = true),
@Parameter(name = "loginValidCode", description = "手机或邮箱接受的验证码", required = true),
})
public String loginByValidCode(String username, String loginValidCode, HttpServletRequest request, HttpServletResponse response) {
if (!Global.getConfigToBoolean("user.loginByValidCode", "true")) {
@@ -109,7 +106,7 @@ public class AccountController extends BaseController{
* 忘记密码页面
*/
@GetMapping(value = "forgetPwd")
@ApiIgnore
@Hidden
public String forgetPwd(Model model) {
return "modules/sys/forgetPwd";
}
@@ -121,11 +118,11 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "getFpValidCode")
@ResponseBody
@ApiOperation(value = "获取找回密码的短信或邮件验证码")
@ApiImplicitParams({
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
@ApiImplicitParam(name = "validType", value = "验证方式mobile、email", required = true),
@Operation(summary = "获取找回密码的短信或邮件验证码")
@Parameters({
@Parameter(name = "loginCode", description = "登录账号", required = true),
@Parameter(name = "validCode", description = "图片验证码,防止重复机器人", required = true),
@Parameter(name = "validType", description = "验证方式mobile、email", required = true),
})
public String getFpValidCode(User user, String validCode, String validType, HttpServletRequest request) {
return getValidCode("fp", user.getLoginCode(), validCode, validType, request, "找回密码");
@@ -136,11 +133,11 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "savePwdByValidCode")
@ResponseBody
@ApiOperation(value = "根据短信或邮件验证码重置密码")
@ApiImplicitParams({
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "fpValidCode", value = "手机或邮箱接受的验证码", required = true),
@ApiImplicitParam(name = "password", value = "新密码", required = true, paramType="query", type="String"),
@Operation(summary = "根据短信或邮件验证码重置密码")
@Parameters({
@Parameter(name = "loginCode", description = "登录账号", required = true),
@Parameter(name = "fpValidCode", description = "手机或邮箱接受的验证码", required = true),
@Parameter(name = "password", description = "新密码", required = true),
})
public String savePwdByValidCode(User user, String fpValidCode, HttpServletRequest request) {
String userCode = UserUtils.getCache("fp" + "UserCode");
@@ -243,10 +240,10 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "getPwdQuestion")
@ResponseBody
@ApiOperation(value = "获取找回密码的保密问题")
@ApiImplicitParams({
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
@Operation(summary = "获取找回密码的保密问题")
@Parameters({
@Parameter(name = "loginCode", description = "登录账号", required = true),
@Parameter(name = "validCode", description = "图片验证码,防止重复机器人", required = true),
})
public String getPwdQuestion(User user, String validCode, HttpServletRequest request) {
// 校验图片验证码,防止重复机器人。
@@ -289,13 +286,13 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "savePwdByPwdQuestion")
@ResponseBody
@ApiOperation(value = "根据保密问题重置密码")
@ApiImplicitParams({
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "pwdQuestionAnswer", value = "保密问题答案1", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "pwdQuestionAnswer2", value = "保密问题答案2", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "pwdQuestionAnswer3", value = "保密问题答案3", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "password", value = "新密码", required = true, paramType="query", type="String"),
@Operation(summary = "根据保密问题重置密码")
@Parameters({
@Parameter(name = "loginCode", description = "登录账号", required = true),
@Parameter(name = "pwdQuestionAnswer", description = "保密问题答案1", required = true),
@Parameter(name = "pwdQuestionAnswer2", description = "保密问题答案2", required = true),
@Parameter(name = "pwdQuestionAnswer3", description = "保密问题答案3", required = true),
@Parameter(name = "password", description = "新密码", required = true),
})
public String savePwdByPwdQuestion(User user, HttpServletRequest request) {
String userCode = UserUtils.getCache("fpUserCode");
@@ -342,7 +339,7 @@ public class AccountController extends BaseController{
* @param user 用户信息参数
*/
@GetMapping(value = "registerUser")
@ApiIgnore
@Hidden
public String registerUser(User user, HttpServletRequest request) {
return "modules/sys/registerUser";
}
@@ -354,17 +351,17 @@ public class AccountController extends BaseController{
*/
@PostMapping(value = "getRegValidCode")
@ResponseBody
@ApiOperation(value = "获取注册用户短信或邮件验证码")
@ApiImplicitParams({
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "userName", value = "用户姓名", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "email", value = "电子邮箱", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "mobile", value = "手机号码", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "corpCode_", value = "租户编号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "corpName_", value = "租户名称", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "userType", value = "用户类型employee", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "validCode", value = "图片验证码,防止重复机器人", required = true),
@ApiImplicitParam(name = "validType", value = "验证方式mobile、email", required = true),
@Operation(summary = "获取注册用户短信或邮件验证码")
@Parameters({
@Parameter(name = "loginCode", description = "登录账号", required = true),
@Parameter(name = "userName", description = "用户姓名", required = true),
@Parameter(name = "email", description = "电子邮箱", required = true),
@Parameter(name = "mobile", description = "手机号码", required = true),
@Parameter(name = "corpCode_", description = "租户编号", required = true),
@Parameter(name = "corpName_", description = "租户名称", required = true),
@Parameter(name = "userType", description = "用户类型employee", required = true),
@Parameter(name = "validCode", description = "图片验证码,防止重复机器人", required = true),
@Parameter(name = "validType", description = "验证方式mobile、email", required = true),
})
public String getRegValidCode(User user, String validCode, String validType, HttpServletRequest request) {
// 校验图片验证码,防止重复机器人。
@@ -427,15 +424,15 @@ public class AccountController extends BaseController{
/**
* 根据短信或邮件验证码注册用户(通过邮箱、手机号)
* @param user 用户信息参数
* @param validType 验证方式mobile、email
* @param regValidCode 注册验证码
*/
@PostMapping(value = "saveRegByValidCode")
@ResponseBody
@ApiOperation(value = "根据短信或邮件验证码注册用户")
@ApiImplicitParams({
@ApiImplicitParam(name = "loginCode", value = "登录账号", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "password", value = "登录密码", required = true, paramType="query", type="String"),
@ApiImplicitParam(name = "regValidCode", value = "手机或邮箱接受的验证码", required = true),
@Operation(summary = "根据短信或邮件验证码注册用户")
@Parameters({
@Parameter(name = "loginCode", description = "登录账号", required = true),
@Parameter(name = "password", description = "登录密码", required = true),
@Parameter(name = "regValidCode", description = "手机或邮箱接受的验证码", required = true),
})
public String saveRegByValidCode(User user, String regValidCode, HttpServletRequest request) {
if (!"true".equals(Global.getConfig("sys.account.registerUser"))){

View File

@@ -16,7 +16,7 @@ import com.jeesite.modules.sys.entity.Company;
import com.jeesite.modules.sys.service.AreaService;
import com.jeesite.modules.sys.utils.AreaUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -39,7 +39,7 @@ import java.util.Map;
* @version 2014-8-19
*/
@Controller
@Api(tags = "Area - 行政区划")
@Tag(name = "Area - 行政区划")
@RequestMapping(value = "${adminPath}/sys/area")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class AreaController extends BaseController {

View File

@@ -2,7 +2,7 @@ package com.jeesite.modules.sys.web;
import javax.annotation.PostConstruct;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.stereotype.Controller;
@@ -22,7 +22,7 @@ import com.jeesite.modules.sys.utils.UserUtils;
* @version 20167-8-27
*/
@Controller
@Api(tags = "Cache - 缓存管理")
@Tag(name = "Cache - 缓存管理")
@RequestMapping(value = "${adminPath}/sys/cache")
public class CacheController extends BaseController {

View File

@@ -15,7 +15,7 @@ import com.jeesite.modules.sys.entity.Office;
import com.jeesite.modules.sys.service.CompanyService;
import com.jeesite.modules.sys.service.OfficeService;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -37,7 +37,7 @@ import java.util.Map;
* @version 2014-8-19
*/
@Controller
@Api(tags = "Company - 公司管理")
@Tag(name = "Company - 公司管理")
@RequestMapping(value = "${adminPath}/sys/company")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class CompanyController extends BaseController {

View File

@@ -7,7 +7,7 @@ package com.jeesite.modules.sys.web;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -28,7 +28,7 @@ import com.jeesite.modules.sys.service.LogService;
* @version 2013-6-2
*/
@Controller
@Api(tags = "Log - 访问日志")
@Tag(name = "Log - 访问日志")
@RequestMapping(value = "${adminPath}/sys/log")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class LogController extends BaseController {

View File

@@ -17,7 +17,7 @@ import com.jeesite.modules.sys.entity.Menu;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.utils.PwdUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@@ -42,7 +42,7 @@ import java.util.Map;
* @version 2020-9-19
*/
@Controller
@Api(tags = "Login - 登录公共")
@Tag(name = "Login - 登录公共")
@RequestMapping(value = "${adminPath}")
@ConditionalOnProperty(name="user.enabled", havingValue="true", matchIfMissing=true)
public class LoginController extends BaseController{

View File

@@ -4,24 +4,6 @@
*/
package com.jeesite.modules.sys.web;
import java.util.List;
import java.util.Map;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.config.Global;
@@ -35,6 +17,22 @@ import com.jeesite.modules.sys.entity.Office;
import com.jeesite.modules.sys.service.OfficeService;
import com.jeesite.modules.sys.utils.UserUtils;
import com.jeesite.modules.sys.web.user.EmpUserController;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
import java.util.Map;
/**
* 机构Controller
@@ -42,7 +40,7 @@ import com.jeesite.modules.sys.web.user.EmpUserController;
* @version 2014-8-19
*/
@Controller
@Api(tags = "Office - 组织机构")
@Tag(name = "Office - 组织机构")
@RequestMapping(value = "${adminPath}/sys/office")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class OfficeController extends BaseController {

View File

@@ -4,27 +4,6 @@
*/
package com.jeesite.modules.sys.web;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.support.DefaultSubjectContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.config.Global;
@@ -36,6 +15,21 @@ import com.jeesite.common.shiro.session.SessionDAO;
import com.jeesite.common.web.BaseController;
import com.jeesite.modules.sys.utils.SysCacheUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.session.Session;
import org.apache.shiro.subject.PrincipalCollection;
import org.apache.shiro.subject.support.DefaultSubjectContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.*;
/**
* 在线用户Controller
@@ -43,7 +37,7 @@ import com.jeesite.modules.sys.utils.UserUtils;
* @version 2022-3-10
*/
@Controller
@Api(tags = "Online - 在线用户")
@Tag(name = "Online - 在线用户")
@RequestMapping(value = "${adminPath}/sys/online")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class OnlineController extends BaseController{

View File

@@ -13,7 +13,9 @@ import com.jeesite.common.web.BaseController;
import com.jeesite.modules.sys.entity.Post;
import com.jeesite.modules.sys.entity.PostRole;
import com.jeesite.modules.sys.service.PostService;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -25,8 +27,6 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
@@ -36,7 +36,7 @@ import java.util.Map;
* @version 2017-03-25
*/
@Controller
@Api(tags = "Post - 岗位管理")
@Tag(name = "Post - 岗位管理")
@RequestMapping(value = "${adminPath}/sys/post")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class PostController extends BaseController {

View File

@@ -13,7 +13,7 @@ import com.jeesite.common.web.BaseController;
import com.jeesite.common.web.http.ServletUtils;
import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -32,7 +32,7 @@ import jakarta.servlet.http.HttpServletResponse;
* @version 2020-9-19
*/
@Controller
@Api(tags = "SSO - 单点登录")
@Tag(name = "SSO - 单点登录")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class SsoController extends BaseController{

View File

@@ -4,26 +4,6 @@
*/
package com.jeesite.modules.sys.web.user;
import java.util.List;
import java.util.Map;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.session.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import com.jeesite.common.collect.ListUtils;
import com.jeesite.common.collect.MapUtils;
import com.jeesite.common.config.Global;
@@ -37,6 +17,20 @@ import com.jeesite.modules.sys.entity.User;
import com.jeesite.modules.sys.service.RoleService;
import com.jeesite.modules.sys.service.UserService;
import com.jeesite.modules.sys.utils.UserUtils;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.session.Session;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
/**
* 租户和系统管理员Controller
@@ -44,7 +38,7 @@ import com.jeesite.modules.sys.utils.UserUtils;
* @version 2017-03-26
*/
@Controller
@Api(tags = "CorpAdmin - 租户管理员管理")
@Tag(name = "CorpAdmin - 租户管理员管理")
@RequestMapping(value = "${adminPath}/sys/corpAdmin")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class CorpAdminController extends BaseController {

View File

@@ -10,7 +10,7 @@ import java.util.Map;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.Logical;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.apache.shiro.subject.Subject;
@@ -62,7 +62,7 @@ import com.jeesite.modules.sys.utils.UserUtils;
* @version 2017-03-26
*/
@Controller
@Api(tags = "EmpUser - 员工用户管理")
@Tag(name = "EmpUser - 员工用户管理")
@RequestMapping(value = "${adminPath}/sys/empUser")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class EmpUserController extends BaseController {

View File

@@ -9,7 +9,7 @@ import java.util.List;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -36,7 +36,7 @@ import com.jeesite.modules.sys.utils.ModuleUtils;
* @version 2017-12-12
*/
@Controller
@Api(tags = "SecAdmin - 二级管理员管理")
@Tag(name = "SecAdmin - 二级管理员管理")
@RequestMapping(value = "${adminPath}/sys/secAdmin")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
public class SecAdminController extends BaseController {

View File

@@ -4,6 +4,7 @@
*/
package com.jeesite.modules.sys.web.user;
import io.swagger.v3.oas.annotations.Hidden;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
@@ -29,7 +30,6 @@ import com.jeesite.modules.sys.service.UserService;
import com.jeesite.modules.sys.utils.PwdUtils;
import com.jeesite.modules.sys.utils.UserUtils;
import springfox.documentation.annotations.ApiIgnore;
/**
* 用户Controller
@@ -37,9 +37,9 @@ import springfox.documentation.annotations.ApiIgnore;
* @version 2017-3-21
*/
@Controller
@ApiIgnore
@RequestMapping(value = "${adminPath}/sys/user")
@ConditionalOnProperty(name={"user.enabled","web.core.enabled"}, havingValue="true", matchIfMissing=true)
@Hidden
public class UserController extends BaseController {
@Autowired