refactor: 优化代码生成模板,优化项目结构

This commit is contained in:
Jie Zheng 2025-01-14 11:06:23 +08:00
parent 1b5b265d02
commit b9518dbec8
122 changed files with 328 additions and 262 deletions

View File

@ -17,6 +17,7 @@ package me.zhengjie.base;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -47,11 +48,13 @@ public class BaseEntity implements Serializable {
private String updateBy; private String updateBy;
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建时间", hidden = true) @ApiModelProperty(value = "创建时间: yyyy-MM-dd HH:mm:ss", hidden = true)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp createTime; private Timestamp createTime;
@TableField(fill = FieldFill.INSERT_UPDATE) @TableField(fill = FieldFill.INSERT_UPDATE)
@ApiModelProperty(value = "更新时间", hidden = true) @ApiModelProperty(value = "更新时间: yyyy-MM-dd HH:mm:ss", hidden = true)
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp updateTime; private Timestamp updateTime;
/* 分组校验 */ /* 分组校验 */

View File

@ -13,8 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.domain.vo; package me.zhengjie.domain.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -29,20 +31,19 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor @NoArgsConstructor
public class TableInfo { public class TableInfo {
/** 表名称 */ @ApiModelProperty(value = "表名称")
private Object tableName; private Object tableName;
/** 创建日期 */ @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期yyyy-MM-dd HH:mm:ss")
private Object createTime; private Object createTime;
/** 数据库引擎 */ @ApiModelProperty(value = "数据库引擎")
private Object engine; private Object engine;
/** 编码集 */ @ApiModelProperty(value = "编码集")
private Object coding; private Object coding;
/** 备注 */ @ApiModelProperty(value = "备注")
private Object remark; private Object remark;
} }

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.vo.TableInfo; import me.zhengjie.domain.dto.TableInfo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -20,7 +20,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.vo.TableInfo; import me.zhengjie.domain.dto.TableInfo;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.service.GenConfigService; import me.zhengjie.service.GenConfigService;
import me.zhengjie.service.GeneratorService; import me.zhengjie.service.GeneratorService;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.domain.GenConfig; import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.vo.TableInfo; import me.zhengjie.domain.dto.TableInfo;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;

View File

@ -23,7 +23,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import me.zhengjie.domain.GenConfig; import me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.ColumnInfo; import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.vo.TableInfo; import me.zhengjie.domain.dto.TableInfo;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.mapper.ColumnInfoMapper; import me.zhengjie.mapper.ColumnInfoMapper;
import me.zhengjie.service.GeneratorService; import me.zhengjie.service.GeneratorService;

View File

@ -370,7 +370,7 @@ public class GenUtil {
} }
if ("QueryCriteria".equals(templateName)) { if ("QueryCriteria".equals(templateName)) {
return packagePath + "domain" + File.separator + "vo" + File.separator + className + "QueryCriteria.java"; return packagePath + "domain" + File.separator + "dto" + File.separator + className + "QueryCriteria.java";
} }
if ("Mapper".equals(templateName)) { if ("Mapper".equals(templateName)) {

View File

@ -21,7 +21,7 @@
column_id, table_name, column_name, column_type, key_type, extra, remark, not_null, list_show, form_show, form_type, query_type, dict_name column_id, table_name, column_name, column_type, key_type, extra, remark, not_null, list_show, form_show, form_type, query_type, dict_name
</sql> </sql>
<select id="getTables" resultType="me.zhengjie.domain.vo.TableInfo"> <select id="getTables" resultType="me.zhengjie.domain.dto.TableInfo">
select table_name, create_time, engine, table_collation as coding, table_comment as remark select table_name, create_time, engine, table_collation as coding, table_comment as remark
from information_schema.tables from information_schema.tables
where table_schema = (select database()) where table_schema = (select database())

View File

@ -18,7 +18,7 @@ package ${package}.rest;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import ${package}.domain.${className}; import ${package}.domain.${className};
import ${package}.service.${className}Service; import ${package}.service.${className}Service;
import ${package}.domain.vo.${className}QueryCriteria; import ${package}.domain.dto.${className}QueryCriteria;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import java.util.List; import java.util.List;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@ -16,7 +16,7 @@
package ${package}.mapper; package ${package}.mapper;
import ${package}.domain.${className}; import ${package}.domain.${className};
import ${package}.domain.vo.${className}QueryCriteria; import ${package}.domain.dto.${className}QueryCriteria;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;

View File

@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package ${package}.domain.vo; package ${package}.domain.dto;
import lombok.Data; import lombok.Data;
<#if queryHasTimestamp> <#if queryHasTimestamp>

View File

@ -16,7 +16,7 @@
package ${package}.service; package ${package}.service;
import ${package}.domain.${className}; import ${package}.domain.${className};
import ${package}.domain.vo.${className}QueryCriteria; import ${package}.domain.dto.${className}QueryCriteria;
import java.util.Map; import java.util.Map;
import java.util.List; import java.util.List;
import java.io.IOException; import java.io.IOException;

View File

@ -30,7 +30,7 @@ import lombok.RequiredArgsConstructor;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import ${package}.service.${className}Service; import ${package}.service.${className}Service;
import ${package}.domain.vo.${className}QueryCriteria; import ${package}.domain.dto.${className}QueryCriteria;
import ${package}.mapper.${className}Mapper; import ${package}.mapper.${className}Mapper;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;

View File

@ -17,6 +17,8 @@ package me.zhengjie.domain;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*; import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
@ -36,39 +38,40 @@ public class SysLog implements Serializable {
@TableId(value = "log_id", type = IdType.AUTO) @TableId(value = "log_id", type = IdType.AUTO)
private Long id; private Long id;
/** 操作用户 */ @ApiModelProperty(value = "操作用户")
private String username; private String username;
/** 描述 */ @ApiModelProperty(value = "描述")
private String description; private String description;
/** 方法名 */ @ApiModelProperty(value = "方法名")
private String method; private String method;
/** 参数 */ @ApiModelProperty(value = "参数")
private String params; private String params;
/** 日志类型 */ @ApiModelProperty(value = "日志类型")
private String logType; private String logType;
/** 请求ip */ @ApiModelProperty(value = "请求ip")
private String requestIp; private String requestIp;
/** 地址 */ @ApiModelProperty(value = "地址")
private String address; private String address;
/** 浏览器 */ @ApiModelProperty(value = "浏览器")
private String browser; private String browser;
/** 请求耗时 */ @ApiModelProperty(value = "请求耗时")
private Long time; private Long time;
/** 异常详细 */ @ApiModelProperty(value = "异常详细")
@JSONField(serialize = false) @JSONField(serialize = false)
private String exceptionDetail; private String exceptionDetail;
/** 创建日期 */
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
@ApiModelProperty(value = "创建日期yyyy-MM-dd HH:mm:ss")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
private Timestamp createTime; private Timestamp createTime;
public SysLog(String logType, Long time) { public SysLog(String logType, Long time) {

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.domain.vo; package me.zhengjie.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -27,11 +28,15 @@ import java.util.List;
@Data @Data
public class SysLogQueryCriteria { public class SysLogQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
@ApiModelProperty(value = "用户名称")
private String username; private String username;
@ApiModelProperty(value = "日志类型")
private String logType; private String logType;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.domain.SysLog; import me.zhengjie.domain.SysLog;
import me.zhengjie.domain.vo.SysLogQueryCriteria; import me.zhengjie.domain.dto.SysLogQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -36,7 +36,10 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
List<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria); List<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria);
IPage<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria, Page<SysLog> page); IPage<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria, Page<SysLog> page);
IPage<SysLog> queryAllByUser(@Param("criteria") SysLogQueryCriteria criteria, Page<SysLog> page); IPage<SysLog> queryAllByUser(@Param("criteria") SysLogQueryCriteria criteria, Page<SysLog> page);
String getExceptionDetails(@Param("id") Long id); String getExceptionDetails(@Param("id") Long id);
void deleteByLevel(@Param("logType") String logType); void deleteByLevel(@Param("logType") String logType);
} }

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.domain.SysLog; import me.zhengjie.domain.SysLog;
import me.zhengjie.service.SysLogService; import me.zhengjie.service.SysLogService;
import me.zhengjie.domain.vo.SysLogQueryCriteria; import me.zhengjie.domain.dto.SysLogQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@ -18,7 +18,7 @@ package me.zhengjie.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.domain.SysLog; import me.zhengjie.domain.SysLog;
import me.zhengjie.domain.vo.SysLogQueryCriteria; import me.zhengjie.domain.dto.SysLogQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -24,7 +24,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.SysLog; import me.zhengjie.domain.SysLog;
import me.zhengjie.mapper.SysLogMapper; import me.zhengjie.mapper.SysLogMapper;
import me.zhengjie.service.SysLogService; import me.zhengjie.service.SysLogService;
import me.zhengjie.domain.vo.SysLogQueryCriteria; import me.zhengjie.domain.dto.SysLogQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.reflect.MethodSignature; import org.aspectj.lang.reflect.MethodSignature;

View File

@ -36,19 +36,19 @@ import java.io.Serializable;
public class Database extends BaseEntity implements Serializable { public class Database extends BaseEntity implements Serializable {
@TableId(value = "db_id", type = IdType.AUTO) @TableId(value = "db_id", type = IdType.AUTO)
@ApiModelProperty(value = "ID", hidden = true) @ApiModelProperty(value = "ID", hidden = true)
private String id; private String id;
@ApiModelProperty(value = "数据库名称") @ApiModelProperty(value = "数据库名称")
private String name; private String name;
@ApiModelProperty(value = "数据库连接地址") @ApiModelProperty(value = "数据库连接地址")
private String jdbcUrl; private String jdbcUrl;
@ApiModelProperty(value = "数据库密码") @ApiModelProperty(value = "数据库密码")
private String pwd; private String pwd;
@ApiModelProperty(value = "用户名") @ApiModelProperty(value = "用户名")
private String userName; private String userName;
public void copy(Database source){ public void copy(Database source){

View File

@ -52,6 +52,7 @@ public class Deploy extends BaseEntity implements Serializable {
private Set<Server> deploys; private Set<Server> deploys;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "应用")
private App app; private App app;
public void copy(Deploy source){ public void copy(Deploy source){

View File

@ -36,23 +36,23 @@ import java.sql.Timestamp;
public class DeployHistory implements Serializable { public class DeployHistory implements Serializable {
@TableId(value = "history_id", type = IdType.AUTO) @TableId(value = "history_id", type = IdType.AUTO)
@ApiModelProperty(value = "ID", hidden = true) @ApiModelProperty(value = "ID", hidden = true)
private String id; private String id;
@ApiModelProperty(value = "应用名称") @ApiModelProperty(value = "应用名称")
private String appName; private String appName;
@ApiModelProperty(value = "IP") @ApiModelProperty(value = "IP")
private String ip; private String ip;
@ApiModelProperty(value = "部署时间") @ApiModelProperty(value = "部署时间")
private Timestamp deployDate; private Timestamp deployDate;
@ApiModelProperty(value = "部署者") @ApiModelProperty(value = "部署者")
private String deployUser; private String deployUser;
@ApiModelProperty(value = "部署ID") @ApiModelProperty(value = "部署ID")
private Long deployId; private Long deployId;
public void copy(DeployHistory source){ public void copy(DeployHistory source){
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain.vo; package me.zhengjie.modules.mnt.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,7 +27,9 @@ import java.util.List;
@Data @Data
public class AppQueryCriteria{ public class AppQueryCriteria{
@ApiModelProperty(value = "名称")
private String name; private String name;
private List<Timestamp> createTime; @ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain.vo; package me.zhengjie.modules.mnt.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,9 +27,12 @@ import java.util.List;
@Data @Data
public class DatabaseQueryCriteria{ public class DatabaseQueryCriteria{
@ApiModelProperty(value = "名称")
private String name; private String name;
@ApiModelProperty(value = "数据源")
private String jdbcUrl; private String jdbcUrl;
private List<Timestamp> createTime; @ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain.vo; package me.zhengjie.modules.mnt.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,9 +27,12 @@ import java.util.List;
@Data @Data
public class DeployHistoryQueryCriteria{ public class DeployHistoryQueryCriteria{
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
@ApiModelProperty(value = "部署ID")
private Long deployId; private Long deployId;
@ApiModelProperty(value = "部署时间")
private List<Timestamp> deployDate; private List<Timestamp> deployDate;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain.vo; package me.zhengjie.modules.mnt.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,11 +27,9 @@ import java.util.List;
@Data @Data
public class DeployQueryCriteria{ public class DeployQueryCriteria{
@ApiModelProperty(value = "应用名称")
private String appName; private String appName;
private List<Timestamp> createTime; @ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
private Long offset;
private Long size;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.mnt.domain.vo; package me.zhengjie.modules.mnt.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,7 +27,9 @@ import java.util.List;
@Data @Data
public class ServerQueryCriteria { public class ServerQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
private List<Timestamp> createTime; @ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
} }

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.mnt.domain.App; import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -16,8 +16,10 @@
package me.zhengjie.modules.mnt.mapper; package me.zhengjie.modules.mnt.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import me.zhengjie.modules.mnt.domain.Deploy; import me.zhengjie.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
@ -31,11 +33,12 @@ import java.util.Set;
@Mapper @Mapper
public interface DeployMapper extends BaseMapper<Deploy> { public interface DeployMapper extends BaseMapper<Deploy> {
Long countAll(@Param("criteria") DeployQueryCriteria criteria);
List<Deploy> findAll(@Param("criteria") DeployQueryCriteria criteria); List<Deploy> findAll(@Param("criteria") DeployQueryCriteria criteria);
IPage<Deploy> findAll(@Param("criteria") DeployQueryCriteria criteria, Page<Object> page);
Set<Long> getIdByAppIds(@Param("appIds") Set<Long> appIds); Set<Long> getIdByAppIds(@Param("appIds") Set<Long> appIds);
Deploy getDeployById(@Param("deployId") Long deployId); Deploy getDeployById(@Param("deployId") Long deployId);
} }

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.mnt.domain.Server; import me.zhengjie.modules.mnt.domain.Server;
import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.App; import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.service.AppService; import me.zhengjie.modules.mnt.service.AppService;
import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.service.DatabaseService; import me.zhengjie.modules.mnt.service.DatabaseService;
import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria;
import me.zhengjie.modules.mnt.util.SqlUtils; import me.zhengjie.modules.mnt.util.SqlUtils;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.Deploy; import me.zhengjie.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.service.DeployService; import me.zhengjie.modules.mnt.service.DeployService;
import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@ -65,7 +65,7 @@ public class DeployController {
@GetMapping @GetMapping
@PreAuthorize("@el.check('deploy:list')") @PreAuthorize("@el.check('deploy:list')")
public ResponseEntity<PageResult<Deploy>> queryDeployData(DeployQueryCriteria criteria, Page<Object> page){ public ResponseEntity<PageResult<Deploy>> queryDeployData(DeployQueryCriteria criteria, Page<Object> page){
return new ResponseEntity<>(deployService.queryAll(criteria, page),HttpStatus.OK); return new ResponseEntity<>(deployService.queryAll(criteria, page),HttpStatus.OK);
} }
@Log("新增部署") @Log("新增部署")

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.service.DeployHistoryService; import me.zhengjie.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.Server; import me.zhengjie.modules.mnt.domain.Server;
import me.zhengjie.modules.mnt.service.ServerService; import me.zhengjie.modules.mnt.service.ServerService;
import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -18,13 +18,12 @@ package me.zhengjie.modules.mnt.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.mnt.domain.App; import me.zhengjie.modules.mnt.domain.App;
import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.mnt.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.mnt.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.mnt.domain.Deploy; import me.zhengjie.modules.mnt.domain.Deploy;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.mnt.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.mnt.domain.Server; import me.zhengjie.modules.mnt.domain.Server;
import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -24,7 +24,7 @@ import me.zhengjie.modules.mnt.mapper.AppMapper;
import me.zhengjie.modules.mnt.mapper.DeployMapper; import me.zhengjie.modules.mnt.mapper.DeployMapper;
import me.zhengjie.modules.mnt.mapper.DeployServerMapper; import me.zhengjie.modules.mnt.mapper.DeployServerMapper;
import me.zhengjie.modules.mnt.service.AppService; import me.zhengjie.modules.mnt.service.AppService;
import me.zhengjie.modules.mnt.domain.vo.AppQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.AppQueryCriteria;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.PageUtil; import me.zhengjie.utils.PageUtil;

View File

@ -23,7 +23,7 @@ import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.mnt.domain.Database; import me.zhengjie.modules.mnt.domain.Database;
import me.zhengjie.modules.mnt.mapper.DatabaseMapper; import me.zhengjie.modules.mnt.mapper.DatabaseMapper;
import me.zhengjie.modules.mnt.service.DatabaseService; import me.zhengjie.modules.mnt.service.DatabaseService;
import me.zhengjie.modules.mnt.domain.vo.DatabaseQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DatabaseQueryCriteria;
import me.zhengjie.modules.mnt.util.SqlUtils; import me.zhengjie.modules.mnt.util.SqlUtils;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.mnt.domain.DeployHistory; import me.zhengjie.modules.mnt.domain.DeployHistory;
import me.zhengjie.modules.mnt.mapper.DeployHistoryMapper; import me.zhengjie.modules.mnt.mapper.DeployHistoryMapper;
import me.zhengjie.modules.mnt.service.DeployHistoryService; import me.zhengjie.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.domain.vo.DeployHistoryQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployHistoryQueryCriteria;
import me.zhengjie.utils.DateUtil; import me.zhengjie.utils.DateUtil;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;

View File

@ -17,6 +17,7 @@ package me.zhengjie.modules.mnt.service.impl;
import cn.hutool.core.date.DatePattern; import cn.hutool.core.date.DatePattern;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -31,7 +32,7 @@ import me.zhengjie.modules.mnt.mapper.DeployServerMapper;
import me.zhengjie.modules.mnt.service.DeployHistoryService; import me.zhengjie.modules.mnt.service.DeployHistoryService;
import me.zhengjie.modules.mnt.service.DeployService; import me.zhengjie.modules.mnt.service.DeployService;
import me.zhengjie.modules.mnt.service.ServerService; import me.zhengjie.modules.mnt.service.ServerService;
import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria;
import me.zhengjie.modules.mnt.util.ExecuteShellUtil; import me.zhengjie.modules.mnt.util.ExecuteShellUtil;
import me.zhengjie.modules.mnt.util.ScpClientUtil; import me.zhengjie.modules.mnt.util.ScpClientUtil;
import me.zhengjie.modules.mnt.websocket.MsgType; import me.zhengjie.modules.mnt.websocket.MsgType;
@ -65,10 +66,8 @@ public class DeployServiceImpl extends ServiceImpl<DeployMapper, Deploy> impleme
@Override @Override
public PageResult<Deploy> queryAll(DeployQueryCriteria criteria, Page<Object> page) { public PageResult<Deploy> queryAll(DeployQueryCriteria criteria, Page<Object> page) {
criteria.setOffset(page.offset()); IPage<Deploy> deploys = deployMapper.findAll(criteria, page);
List<Deploy> deploys = deployMapper.findAll(criteria); return PageUtil.toPage(deploys);
Long total = deployMapper.countAll(criteria);
return PageUtil.toPage(deploys, total);
} }
@Override @Override

View File

@ -22,7 +22,7 @@ import me.zhengjie.modules.mnt.domain.Server;
import me.zhengjie.modules.mnt.mapper.DeployServerMapper; import me.zhengjie.modules.mnt.mapper.DeployServerMapper;
import me.zhengjie.modules.mnt.mapper.ServerMapper; import me.zhengjie.modules.mnt.mapper.ServerMapper;
import me.zhengjie.modules.mnt.service.ServerService; import me.zhengjie.modules.mnt.service.ServerService;
import me.zhengjie.modules.mnt.domain.vo.ServerQueryCriteria; import me.zhengjie.modules.mnt.domain.dto.ServerQueryCriteria;
import me.zhengjie.modules.mnt.util.ExecuteShellUtil; import me.zhengjie.modules.mnt.util.ExecuteShellUtil;
import me.zhengjie.utils.FileUtil; import me.zhengjie.utils.FileUtil;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.quartz.domain.vo; package me.zhengjie.modules.quartz.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,9 +27,12 @@ import java.util.List;
@Data @Data
public class QuartzJobQueryCriteria { public class QuartzJobQueryCriteria {
@ApiModelProperty(value = "定时任务名称")
private String jobName; private String jobName;
@ApiModelProperty(value = "是否成功")
private Boolean isSuccess; private Boolean isSuccess;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.quartz.domain.QuartzJob; import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; import me.zhengjie.modules.quartz.domain.dto.QuartzJobQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.quartz.domain.QuartzLog; import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; import me.zhengjie.modules.quartz.domain.dto.QuartzJobQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -25,7 +25,7 @@ import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.quartz.domain.QuartzJob; import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.QuartzLog; import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.service.QuartzJobService; import me.zhengjie.modules.quartz.service.QuartzJobService;
import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; import me.zhengjie.modules.quartz.domain.dto.QuartzJobQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.SpringBeanHolder; import me.zhengjie.utils.SpringBeanHolder;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.quartz.domain.QuartzJob; import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.QuartzLog; import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; import me.zhengjie.modules.quartz.domain.dto.QuartzJobQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -26,7 +26,7 @@ import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.mapper.QuartzJobMapper; import me.zhengjie.modules.quartz.mapper.QuartzJobMapper;
import me.zhengjie.modules.quartz.mapper.QuartzLogMapper; import me.zhengjie.modules.quartz.mapper.QuartzLogMapper;
import me.zhengjie.modules.quartz.service.QuartzJobService; import me.zhengjie.modules.quartz.service.QuartzJobService;
import me.zhengjie.modules.quartz.domain.vo.QuartzJobQueryCriteria; import me.zhengjie.modules.quartz.domain.dto.QuartzJobQueryCriteria;
import me.zhengjie.modules.quartz.utils.QuartzManage; import me.zhengjie.modules.quartz.utils.QuartzManage;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import org.quartz.CronExpression; import org.quartz.CronExpression;

View File

@ -19,7 +19,7 @@ import cn.hutool.extra.template.Template;
import cn.hutool.extra.template.TemplateConfig; import cn.hutool.extra.template.TemplateConfig;
import cn.hutool.extra.template.TemplateEngine; import cn.hutool.extra.template.TemplateEngine;
import cn.hutool.extra.template.TemplateUtil; import cn.hutool.extra.template.TemplateUtil;
import me.zhengjie.domain.vo.EmailVo; import me.zhengjie.domain.dto.EmailDto;
import me.zhengjie.modules.quartz.domain.QuartzJob; import me.zhengjie.modules.quartz.domain.QuartzJob;
import me.zhengjie.modules.quartz.domain.QuartzLog; import me.zhengjie.modules.quartz.domain.QuartzLog;
import me.zhengjie.modules.quartz.mapper.QuartzLogMapper; import me.zhengjie.modules.quartz.mapper.QuartzLogMapper;
@ -106,8 +106,8 @@ public class ExecutionJob extends QuartzJobBean {
EmailService emailService = SpringBeanHolder.getBean(EmailService.class); EmailService emailService = SpringBeanHolder.getBean(EmailService.class);
// 邮箱报警 // 邮箱报警
if(StringUtils.isNoneBlank(quartzJob.getEmail())){ if(StringUtils.isNoneBlank(quartzJob.getEmail())){
EmailVo emailVo = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e)); EmailDto emailDto = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e));
emailService.send(emailVo, emailService.find()); emailService.send(emailDto, emailService.find());
} }
} }
} finally { } finally {
@ -115,17 +115,17 @@ public class ExecutionJob extends QuartzJobBean {
} }
} }
private EmailVo taskAlarm(QuartzJob quartzJob, String msg) { private EmailDto taskAlarm(QuartzJob quartzJob, String msg) {
EmailVo emailVo = new EmailVo(); EmailDto emailDto = new EmailDto();
emailVo.setSubject("定时任务【"+ quartzJob.getJobName() +"】执行失败,请尽快处理!"); emailDto.setSubject("定时任务【"+ quartzJob.getJobName() +"】执行失败,请尽快处理!");
Map<String, Object> data = new HashMap<>(16); Map<String, Object> data = new HashMap<>(16);
data.put("task", quartzJob); data.put("task", quartzJob);
data.put("msg", msg); data.put("msg", msg);
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
Template template = engine.getTemplate("taskAlarm.ftl"); Template template = engine.getTemplate("taskAlarm.ftl");
emailVo.setContent(template.render(data)); emailDto.setContent(template.render(data));
List<String> emails = Arrays.asList(quartzJob.getEmail().split("[,]")); List<String> emails = Arrays.asList(quartzJob.getEmail().split("[,]"));
emailVo.setTos(emails); emailDto.setTos(emails);
return emailVo; return emailDto;
} }
} }

View File

@ -15,6 +15,7 @@
*/ */
package me.zhengjie.modules.security.service.dto; package me.zhengjie.modules.security.service.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
@ -28,12 +29,16 @@ import javax.validation.constraints.NotBlank;
public class AuthUserDto { public class AuthUserDto {
@NotBlank @NotBlank
@ApiModelProperty(value = "用户名")
private String username; private String username;
@NotBlank @NotBlank
@ApiModelProperty(value = "密码")
private String password; private String password;
@ApiModelProperty(value = "验证码")
private String code; private String code;
@ApiModelProperty(value = "验证码的key")
private String uuid = ""; private String uuid = "";
} }

View File

@ -15,6 +15,7 @@
*/ */
package me.zhengjie.modules.security.service.dto; package me.zhengjie.modules.security.service.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -30,5 +31,6 @@ import org.springframework.security.core.GrantedAuthority;
@AllArgsConstructor @AllArgsConstructor
public class AuthorityDto implements GrantedAuthority { public class AuthorityDto implements GrantedAuthority {
@ApiModelProperty(value = "角色名")
private String authority; private String authority;
} }

View File

@ -16,6 +16,7 @@
package me.zhengjie.modules.security.service.dto; package me.zhengjie.modules.security.service.dto;
import com.alibaba.fastjson.annotation.JSONField; import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -33,13 +34,17 @@ import java.util.stream.Collectors;
@AllArgsConstructor @AllArgsConstructor
public class JwtUserDto implements UserDetails { public class JwtUserDto implements UserDetails {
@ApiModelProperty(value = "用户")
private final User user; private final User user;
@ApiModelProperty(value = "数据权限")
private final List<Long> dataScopes; private final List<Long> dataScopes;
@ApiModelProperty(value = "角色")
private final List<AuthorityDto> authorities; private final List<AuthorityDto> authorities;
@Setter @Setter
@ApiModelProperty(value = "密码")
private String password; private String password;
public Set<String> getRoles() { public Set<String> getRoles() {

View File

@ -15,6 +15,7 @@
*/ */
package me.zhengjie.modules.security.service.dto; package me.zhengjie.modules.security.service.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
@ -29,45 +30,27 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
public class OnlineUserDto { public class OnlineUserDto {
/** @ApiModelProperty(value = "用户名")
* 用户名
*/
private String userName; private String userName;
/** @ApiModelProperty(value = "昵称")
* 昵称
*/
private String nickName; private String nickName;
/** @ApiModelProperty(value = "岗位")
* 岗位
*/
private String dept; private String dept;
/** @ApiModelProperty(value = "浏览器")
* 浏览器
*/
private String browser; private String browser;
/** @ApiModelProperty(value = "IP")
* IP
*/
private String ip; private String ip;
/** @ApiModelProperty(value = "地址")
* 地址
*/
private String address; private String address;
/** @ApiModelProperty(value = "token")
* token
*/
private String key; private String key;
/** @ApiModelProperty(value = "登录时间")
* 登录时间
*/
private Date loginTime; private Date loginTime;
} }

View File

@ -51,6 +51,7 @@ public class Dept extends BaseEntity implements Serializable {
private Set<Role> roles; private Set<Role> roles;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "子部门")
private List<Dept> children; private List<Dept> children;
@ApiModelProperty(value = "排序") @ApiModelProperty(value = "排序")

View File

@ -43,6 +43,7 @@ public class Dict extends BaseEntity implements Serializable {
private Long id; private Long id;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "字典详情")
private List<DictDetail> dictDetails; private List<DictDetail> dictDetails;
@NotBlank @NotBlank

View File

@ -45,6 +45,7 @@ public class DictDetail extends BaseEntity implements Serializable {
private Long dictId; private Long dictId;
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty(value = "字典")
private Dict dict; private Dict dict;
@ApiModelProperty(value = "字典标签") @ApiModelProperty(value = "字典标签")

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,15 +27,21 @@ import java.util.List;
@Data @Data
public class DeptQueryCriteria{ public class DeptQueryCriteria{
@ApiModelProperty(value = "部门id集合")
private List<Long> ids; private List<Long> ids;
@ApiModelProperty(value = "部门名称")
private String name; private String name;
@ApiModelProperty(value = "是否启用")
private Boolean enabled; private Boolean enabled;
@ApiModelProperty(value = "上级部门")
private Long pid; private Long pid;
@ApiModelProperty(value = "PID为空查询")
private Boolean pidIsNull; private Boolean pidIsNull;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -24,7 +25,9 @@ import lombok.Data;
@Data @Data
public class DictDetailQueryCriteria { public class DictDetailQueryCriteria {
@ApiModelProperty(value = "标签")
private String label; private String label;
@ApiModelProperty(value = "字典名称")
private String dictName; private String dictName;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -24,5 +25,6 @@ import lombok.Data;
@Data @Data
public class DictQueryCriteria { public class DictQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.sql.Timestamp; import java.sql.Timestamp;
@ -28,9 +29,12 @@ import java.util.List;
@NoArgsConstructor @NoArgsConstructor
public class JobQueryCriteria { public class JobQueryCriteria {
@ApiModelProperty(value = "岗位名称")
private String name; private String name;
@ApiModelProperty(value = "是否启用")
private Boolean enabled; private Boolean enabled;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -27,9 +28,12 @@ import java.io.Serializable;
@AllArgsConstructor @AllArgsConstructor
public class MenuMetaVo implements Serializable { public class MenuMetaVo implements Serializable {
@ApiModelProperty(value = "菜单标题")
private String title; private String title;
@ApiModelProperty(value = "菜单图标")
private String icon; private String icon;
@ApiModelProperty(value = "缓存")
private Boolean noCache; private Boolean noCache;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,11 +27,15 @@ import java.util.List;
@Data @Data
public class MenuQueryCriteria { public class MenuQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
@ApiModelProperty(value = "PID为空查询")
private Boolean pidIsNull; private Boolean pidIsNull;
@ApiModelProperty(value = "PID")
private Long pid; private Long pid;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
@ -27,19 +28,27 @@ import java.util.List;
@Data @Data
public class MenuVo implements Serializable { public class MenuVo implements Serializable {
@ApiModelProperty(value = "菜单名称")
private String name; private String name;
@ApiModelProperty(value = "路径")
private String path; private String path;
@ApiModelProperty(value = "隐藏状态")
private Boolean hidden; private Boolean hidden;
@ApiModelProperty(value = "重定向")
private String redirect; private String redirect;
@ApiModelProperty(value = "组件")
private String component; private String component;
@ApiModelProperty(value = "总是显示")
private Boolean alwaysShow; private Boolean alwaysShow;
@ApiModelProperty(value = "元数据")
private MenuMetaVo meta; private MenuMetaVo meta;
@ApiModelProperty(value = "子路由")
private List<MenuVo> children; private List<MenuVo> children;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
@ -26,7 +27,9 @@ import java.util.List;
@Data @Data
public class RoleQueryCriteria { public class RoleQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -25,7 +26,9 @@ import lombok.Data;
@Data @Data
public class UserPassVo { public class UserPassVo {
@ApiModelProperty(value = "旧密码")
private String oldPass; private String oldPass;
@ApiModelProperty(value = "新密码")
private String newPass; private String newPass;
} }

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package me.zhengjie.modules.system.domain.vo; package me.zhengjie.modules.system.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.sql.Timestamp; import java.sql.Timestamp;
@ -29,15 +30,21 @@ import java.util.Set;
@Data @Data
public class UserQueryCriteria implements Serializable { public class UserQueryCriteria implements Serializable {
@ApiModelProperty(value = "ID")
private Long id; private Long id;
@ApiModelProperty(value = "多个ID")
private Set<Long> deptIds = new HashSet<>(); private Set<Long> deptIds = new HashSet<>();
@ApiModelProperty(value = "模糊查询")
private String blurry; private String blurry;
@ApiModelProperty(value = "是否启用")
private Boolean enabled; private Boolean enabled;
@ApiModelProperty(value = "部门ID")
private Long deptId; private Long deptId;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime; private List<Timestamp> createTime;
} }

View File

@ -17,7 +17,7 @@ package me.zhengjie.modules.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.modules.system.domain.Dept; import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; import me.zhengjie.modules.system.domain.dto.DeptQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.system.domain.DictDetail; import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictDetailQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.system.domain.Dict; import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.system.domain.Job; import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; import me.zhengjie.modules.system.domain.dto.JobQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -17,7 +17,7 @@ package me.zhengjie.modules.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import me.zhengjie.modules.system.domain.Menu; import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; import me.zhengjie.modules.system.domain.dto.MenuQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.system.domain.Role; import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; import me.zhengjie.modules.system.domain.dto.RoleQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -19,7 +19,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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 me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; import me.zhengjie.modules.system.domain.dto.UserQueryCriteria;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dept; import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.service.DeptService; import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; import me.zhengjie.modules.system.domain.dto.DeptQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.PageUtil; import me.zhengjie.utils.PageUtil;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dict; import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.service.DictService; import me.zhengjie.modules.system.service.DictService;
import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.DictDetail; import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.service.DictDetailService; import me.zhengjie.modules.system.service.DictDetailService;
import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictDetailQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Job; import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.service.JobService; import me.zhengjie.modules.system.service.JobService;
import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; import me.zhengjie.modules.system.domain.dto.JobQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;

View File

@ -22,9 +22,9 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log; import me.zhengjie.annotation.Log;
import me.zhengjie.modules.system.domain.Menu; import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.vo.MenuVo; import me.zhengjie.modules.system.domain.dto.MenuVo;
import me.zhengjie.modules.system.service.MenuService; import me.zhengjie.modules.system.service.MenuService;
import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; import me.zhengjie.modules.system.domain.dto.MenuQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.PageUtil; import me.zhengjie.utils.PageUtil;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;

View File

@ -24,7 +24,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.modules.system.domain.Role; import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.service.RoleService; import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; import me.zhengjie.modules.system.domain.dto.RoleQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.SecurityUtils; import me.zhengjie.utils.SecurityUtils;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@ -27,10 +27,10 @@ import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.service.DataService; import me.zhengjie.modules.system.service.DataService;
import me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.vo.UserPassVo; import me.zhengjie.modules.system.domain.dto.UserPassVo;
import me.zhengjie.modules.system.service.DeptService; import me.zhengjie.modules.system.service.DeptService;
import me.zhengjie.modules.system.service.RoleService; import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; import me.zhengjie.modules.system.domain.dto.UserQueryCriteria;
import me.zhengjie.modules.system.service.VerifyService; import me.zhengjie.modules.system.service.VerifyService;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import me.zhengjie.modules.system.service.UserService; import me.zhengjie.modules.system.service.UserService;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.system.rest;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.vo.EmailVo; import me.zhengjie.domain.dto.EmailDto;
import me.zhengjie.service.EmailService; import me.zhengjie.service.EmailService;
import me.zhengjie.modules.system.service.VerifyService; import me.zhengjie.modules.system.service.VerifyService;
import me.zhengjie.utils.enums.CodeBiEnum; import me.zhengjie.utils.enums.CodeBiEnum;
@ -44,16 +44,16 @@ public class VerifyController {
@PostMapping(value = "/resetEmail") @PostMapping(value = "/resetEmail")
@ApiOperation("重置邮箱,发送验证码") @ApiOperation("重置邮箱,发送验证码")
public ResponseEntity<Object> resetEmail(@RequestParam String email){ public ResponseEntity<Object> resetEmail(@RequestParam String email){
EmailVo emailVo = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey()); EmailDto emailDto = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey());
emailService.send(emailVo,emailService.find()); emailService.send(emailDto,emailService.find());
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }
@PostMapping(value = "/email/resetPass") @PostMapping(value = "/email/resetPass")
@ApiOperation("重置密码,发送验证码") @ApiOperation("重置密码,发送验证码")
public ResponseEntity<Object> resetPass(@RequestParam String email){ public ResponseEntity<Object> resetPass(@RequestParam String email){
EmailVo emailVo = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_PWD_CODE.getKey()); EmailDto emailDto = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_PWD_CODE.getKey());
emailService.send(emailVo,emailService.find()); emailService.send(emailDto,emailService.find());
return new ResponseEntity<>(HttpStatus.OK); return new ResponseEntity<>(HttpStatus.OK);
} }

View File

@ -17,7 +17,7 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.Dept; import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; import me.zhengjie.modules.system.domain.dto.DeptQueryCriteria;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.DictDetail; import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictDetailQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import java.util.List; import java.util.List;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.Dict; import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.Job; import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; import me.zhengjie.modules.system.domain.dto.JobQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -17,8 +17,8 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.Menu; import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; import me.zhengjie.modules.system.domain.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.domain.vo.MenuVo; import me.zhengjie.modules.system.domain.dto.MenuVo;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;

View File

@ -20,7 +20,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.security.service.dto.AuthorityDto; import me.zhengjie.modules.security.service.dto.AuthorityDto;
import me.zhengjie.modules.system.domain.Role; import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; import me.zhengjie.modules.system.domain.dto.RoleQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -18,7 +18,7 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.UserQueryCriteria; import me.zhengjie.modules.system.domain.dto.UserQueryCriteria;
import me.zhengjie.utils.PageResult; import me.zhengjie.utils.PageResult;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;

View File

@ -15,7 +15,7 @@
*/ */
package me.zhengjie.modules.system.service; package me.zhengjie.modules.system.service;
import me.zhengjie.domain.vo.EmailVo; import me.zhengjie.domain.dto.EmailDto;
/** /**
* @author Zheng Jie * @author Zheng Jie
@ -29,7 +29,7 @@ public interface VerifyService {
* @param key / * @param key /
* @return / * @return /
*/ */
EmailVo sendEmail(String email, String key); EmailDto sendEmail(String email, String key);
/** /**

View File

@ -24,7 +24,7 @@ import me.zhengjie.modules.system.domain.Dept;
import me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.mapper.RoleMapper; import me.zhengjie.modules.system.mapper.RoleMapper;
import me.zhengjie.modules.system.mapper.UserMapper; import me.zhengjie.modules.system.mapper.UserMapper;
import me.zhengjie.modules.system.domain.vo.DeptQueryCriteria; import me.zhengjie.modules.system.domain.dto.DeptQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import me.zhengjie.modules.system.mapper.DeptMapper; import me.zhengjie.modules.system.mapper.DeptMapper;
import me.zhengjie.modules.system.service.DeptService; import me.zhengjie.modules.system.service.DeptService;

View File

@ -21,7 +21,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Dict; import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.domain.DictDetail; import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.mapper.DictMapper; import me.zhengjie.modules.system.mapper.DictMapper;
import me.zhengjie.modules.system.domain.vo.DictDetailQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictDetailQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import me.zhengjie.modules.system.mapper.DictDetailMapper; import me.zhengjie.modules.system.mapper.DictDetailMapper;
import me.zhengjie.modules.system.service.DictDetailService; import me.zhengjie.modules.system.service.DictDetailService;

View File

@ -23,7 +23,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Dict; import me.zhengjie.modules.system.domain.Dict;
import me.zhengjie.modules.system.domain.DictDetail; import me.zhengjie.modules.system.domain.DictDetail;
import me.zhengjie.modules.system.mapper.DictDetailMapper; import me.zhengjie.modules.system.mapper.DictDetailMapper;
import me.zhengjie.modules.system.domain.vo.DictQueryCriteria; import me.zhengjie.modules.system.domain.dto.DictQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import me.zhengjie.modules.system.mapper.DictMapper; import me.zhengjie.modules.system.mapper.DictMapper;
import me.zhengjie.modules.system.service.DictService; import me.zhengjie.modules.system.service.DictService;

View File

@ -22,7 +22,7 @@ import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException; import me.zhengjie.exception.EntityExistException;
import me.zhengjie.modules.system.domain.Job; import me.zhengjie.modules.system.domain.Job;
import me.zhengjie.modules.system.mapper.UserMapper; import me.zhengjie.modules.system.mapper.UserMapper;
import me.zhengjie.modules.system.domain.vo.JobQueryCriteria; import me.zhengjie.modules.system.domain.dto.JobQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import me.zhengjie.modules.system.mapper.JobMapper; import me.zhengjie.modules.system.mapper.JobMapper;
import me.zhengjie.modules.system.service.JobService; import me.zhengjie.modules.system.service.JobService;

View File

@ -22,8 +22,8 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.modules.system.domain.Menu; import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.domain.Role; import me.zhengjie.modules.system.domain.Role;
import me.zhengjie.modules.system.domain.User; import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.MenuMetaVo; import me.zhengjie.modules.system.domain.dto.MenuMetaVo;
import me.zhengjie.modules.system.domain.vo.MenuVo; import me.zhengjie.modules.system.domain.dto.MenuVo;
import me.zhengjie.exception.BadRequestException; import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException; import me.zhengjie.exception.EntityExistException;
import me.zhengjie.modules.system.mapper.MenuMapper; import me.zhengjie.modules.system.mapper.MenuMapper;
@ -31,7 +31,7 @@ import me.zhengjie.modules.system.mapper.RoleMenuMapper;
import me.zhengjie.modules.system.mapper.UserMapper; import me.zhengjie.modules.system.mapper.UserMapper;
import me.zhengjie.modules.system.service.MenuService; import me.zhengjie.modules.system.service.MenuService;
import me.zhengjie.modules.system.service.RoleService; import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria; import me.zhengjie.modules.system.domain.dto.MenuQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;

View File

@ -33,7 +33,7 @@ import me.zhengjie.modules.system.mapper.RoleMapper;
import me.zhengjie.modules.system.mapper.RoleMenuMapper; import me.zhengjie.modules.system.mapper.RoleMenuMapper;
import me.zhengjie.modules.system.mapper.UserMapper; import me.zhengjie.modules.system.mapper.UserMapper;
import me.zhengjie.modules.system.service.RoleService; import me.zhengjie.modules.system.service.RoleService;
import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria; import me.zhengjie.modules.system.domain.dto.RoleQueryCriteria;
import me.zhengjie.utils.*; import me.zhengjie.utils.*;
import org.springframework.cache.annotation.CacheConfig; import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;

Some files were not shown because too many files have changed in this diff Show More