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.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
@ -47,11 +48,13 @@ public class BaseEntity implements Serializable {
private String updateBy;
@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;
@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;
/* 分组校验 */

View File

@ -13,8 +13,10 @@
* See the License for the specific language governing permissions and
* 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.Data;
import lombok.NoArgsConstructor;
@ -29,20 +31,19 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class TableInfo {
/** 表名称 */
@ApiModelProperty(value = "表名称")
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;
/** 数据库引擎 */
@ApiModelProperty(value = "数据库引擎")
private Object engine;
/** 编码集 */
@ApiModelProperty(value = "编码集")
private Object coding;
/** 备注 */
@ApiModelProperty(value = "备注")
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.extension.plugins.pagination.Page;
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.Param;
import java.util.List;

View File

@ -20,7 +20,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
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.service.GenConfigService;
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 me.zhengjie.domain.GenConfig;
import me.zhengjie.domain.ColumnInfo;
import me.zhengjie.domain.vo.TableInfo;
import me.zhengjie.domain.dto.TableInfo;
import me.zhengjie.utils.PageResult;
import org.springframework.http.ResponseEntity;
import javax.servlet.http.HttpServletRequest;

View File

@ -23,7 +23,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.zhengjie.domain.GenConfig;
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.mapper.ColumnInfoMapper;
import me.zhengjie.service.GeneratorService;

View File

@ -370,7 +370,7 @@ public class GenUtil {
}
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)) {

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
</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
from information_schema.tables
where table_schema = (select database())

View File

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

View File

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

View File

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

View File

@ -16,7 +16,7 @@
package ${package}.service;
import ${package}.domain.${className};
import ${package}.domain.vo.${className}QueryCriteria;
import ${package}.domain.dto.${className}QueryCriteria;
import java.util.Map;
import java.util.List;
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.service.impl.ServiceImpl;
import ${package}.service.${className}Service;
import ${package}.domain.vo.${className}QueryCriteria;
import ${package}.domain.dto.${className}QueryCriteria;
import ${package}.mapper.${className}Mapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

View File

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

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package me.zhengjie.domain.vo;
package me.zhengjie.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.sql.Timestamp;
import java.util.List;
@ -27,11 +28,15 @@ import java.util.List;
@Data
public class SysLogQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry;
@ApiModelProperty(value = "用户名称")
private String username;
@ApiModelProperty(value = "日志类型")
private String logType;
@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.extension.plugins.pagination.Page;
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.Param;
@ -36,7 +36,10 @@ public interface SysLogMapper extends BaseMapper<SysLog> {
List<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria);
IPage<SysLog> queryAll(@Param("criteria") SysLogQueryCriteria criteria, Page<SysLog> page);
IPage<SysLog> queryAllByUser(@Param("criteria") SysLogQueryCriteria criteria, Page<SysLog> page);
String getExceptionDetails(@Param("id") Long id);
void deleteByLevel(@Param("logType") String logType);
}

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.domain.SysLog;
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.SecurityUtils;
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.service.IService;
import me.zhengjie.domain.SysLog;
import me.zhengjie.domain.vo.SysLogQueryCriteria;
import me.zhengjie.domain.dto.SysLogQueryCriteria;
import me.zhengjie.utils.PageResult;
import org.aspectj.lang.ProceedingJoinPoint;
import javax.servlet.http.HttpServletResponse;

View File

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

View File

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

View File

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

View File

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

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,7 +27,9 @@ import java.util.List;
@Data
public class AppQueryCriteria{
@ApiModelProperty(value = "名称")
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
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,9 +27,12 @@ import java.util.List;
@Data
public class DatabaseQueryCriteria{
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "数据源")
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
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,9 +27,12 @@ import java.util.List;
@Data
public class DeployHistoryQueryCriteria{
@ApiModelProperty(value = "模糊查询")
private String blurry;
@ApiModelProperty(value = "部署ID")
private Long deployId;
@ApiModelProperty(value = "部署时间")
private List<Timestamp> deployDate;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,11 +27,9 @@ import java.util.List;
@Data
public class DeployQueryCriteria{
@ApiModelProperty(value = "应用名称")
private String appName;
private List<Timestamp> createTime;
private Long offset;
private Long size;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,7 +27,9 @@ import java.util.List;
@Data
public class ServerQueryCriteria {
@ApiModelProperty(value = "模糊查询")
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.extension.plugins.pagination.Page;
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.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.extension.plugins.pagination.Page;
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.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.extension.plugins.pagination.Page;
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.Param;
import java.util.List;

View File

@ -16,8 +16,10 @@
package me.zhengjie.modules.mnt.mapper;
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.vo.DeployQueryCriteria;
import me.zhengjie.modules.mnt.domain.dto.DeployQueryCriteria;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -31,11 +33,12 @@ import java.util.Set;
@Mapper
public interface DeployMapper extends BaseMapper<Deploy> {
Long countAll(@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);
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.extension.plugins.pagination.Page;
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.Param;
import java.util.List;

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.App;
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 org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.mnt.domain.Database;
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.utils.FileUtil;
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.DeployHistory;
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.PageResult;
import org.springframework.http.HttpStatus;
@ -65,7 +65,7 @@ public class DeployController {
@GetMapping
@PreAuthorize("@el.check('deploy:list')")
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("新增部署")

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.DeployHistory;
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 org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -22,7 +22,7 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.mnt.domain.Server;
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 org.springframework.http.HttpStatus;
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.service.IService;
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 javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;
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.service.IService;
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 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.service.IService;
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 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 me.zhengjie.modules.mnt.domain.Deploy;
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 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.service.IService;
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 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.DeployServerMapper;
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.PageResult;
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.mapper.DatabaseMapper;
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.utils.FileUtil;
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.mapper.DeployHistoryMapper;
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.FileUtil;
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.DateUtil;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
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.DeployService;
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.ScpClientUtil;
import me.zhengjie.modules.mnt.websocket.MsgType;
@ -65,10 +66,8 @@ public class DeployServiceImpl extends ServiceImpl<DeployMapper, Deploy> impleme
@Override
public PageResult<Deploy> queryAll(DeployQueryCriteria criteria, Page<Object> page) {
criteria.setOffset(page.offset());
List<Deploy> deploys = deployMapper.findAll(criteria);
Long total = deployMapper.countAll(criteria);
return PageUtil.toPage(deploys, total);
IPage<Deploy> deploys = deployMapper.findAll(criteria, page);
return PageUtil.toPage(deploys);
}
@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.ServerMapper;
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.utils.FileUtil;
import me.zhengjie.utils.PageResult;

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,9 +27,12 @@ import java.util.List;
@Data
public class QuartzJobQueryCriteria {
@ApiModelProperty(value = "定时任务名称")
private String jobName;
@ApiModelProperty(value = "是否成功")
private Boolean isSuccess;
@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.extension.plugins.pagination.Page;
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.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.extension.plugins.pagination.Page;
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.Param;
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.QuartzLog;
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.SpringBeanHolder;
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 me.zhengjie.modules.quartz.domain.QuartzJob;
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 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.QuartzLogMapper;
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.utils.*;
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.TemplateEngine;
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.QuartzLog;
import me.zhengjie.modules.quartz.mapper.QuartzLogMapper;
@ -106,8 +106,8 @@ public class ExecutionJob extends QuartzJobBean {
EmailService emailService = SpringBeanHolder.getBean(EmailService.class);
// 邮箱报警
if(StringUtils.isNoneBlank(quartzJob.getEmail())){
EmailVo emailVo = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e));
emailService.send(emailVo, emailService.find());
EmailDto emailDto = taskAlarm(quartzJob, ThrowableUtil.getStackTrace(e));
emailService.send(emailDto, emailService.find());
}
}
} finally {
@ -115,17 +115,17 @@ public class ExecutionJob extends QuartzJobBean {
}
}
private EmailVo taskAlarm(QuartzJob quartzJob, String msg) {
EmailVo emailVo = new EmailVo();
emailVo.setSubject("定时任务【"+ quartzJob.getJobName() +"】执行失败,请尽快处理!");
private EmailDto taskAlarm(QuartzJob quartzJob, String msg) {
EmailDto emailDto = new EmailDto();
emailDto.setSubject("定时任务【"+ quartzJob.getJobName() +"】执行失败,请尽快处理!");
Map<String, Object> data = new HashMap<>(16);
data.put("task", quartzJob);
data.put("msg", msg);
TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH));
Template template = engine.getTemplate("taskAlarm.ftl");
emailVo.setContent(template.render(data));
emailDto.setContent(template.render(data));
List<String> emails = Arrays.asList(quartzJob.getEmail().split("[,]"));
emailVo.setTos(emails);
return emailVo;
emailDto.setTos(emails);
return emailDto;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,15 +27,21 @@ import java.util.List;
@Data
public class DeptQueryCriteria{
@ApiModelProperty(value = "部门id集合")
private List<Long> ids;
@ApiModelProperty(value = "部门名称")
private String name;
@ApiModelProperty(value = "是否启用")
private Boolean enabled;
@ApiModelProperty(value = "上级部门")
private Long pid;
@ApiModelProperty(value = "PID为空查询")
private Boolean pidIsNull;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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;
/**
@ -24,7 +25,9 @@ import lombok.Data;
@Data
public class DictDetailQueryCriteria {
@ApiModelProperty(value = "标签")
private String label;
@ApiModelProperty(value = "字典名称")
private String dictName;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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;
/**
@ -24,5 +25,6 @@ import lombok.Data;
@Data
public class DictQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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.NoArgsConstructor;
import java.sql.Timestamp;
@ -28,9 +29,12 @@ import java.util.List;
@NoArgsConstructor
public class JobQueryCriteria {
@ApiModelProperty(value = "岗位名称")
private String name;
@ApiModelProperty(value = "是否启用")
private Boolean enabled;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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.Data;
import java.io.Serializable;
@ -27,9 +28,12 @@ import java.io.Serializable;
@AllArgsConstructor
public class MenuMetaVo implements Serializable {
@ApiModelProperty(value = "菜单标题")
private String title;
@ApiModelProperty(value = "菜单图标")
private String icon;
@ApiModelProperty(value = "缓存")
private Boolean noCache;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,11 +27,15 @@ import java.util.List;
@Data
public class MenuQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
@ApiModelProperty(value = "PID为空查询")
private Boolean pidIsNull;
@ApiModelProperty(value = "PID")
private Long pid;
}

View File

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

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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 java.sql.Timestamp;
import java.util.List;
@ -26,7 +27,9 @@ import java.util.List;
@Data
public class RoleQueryCriteria {
@ApiModelProperty(value = "模糊查询")
private String blurry;
@ApiModelProperty(value = "创建时间")
private List<Timestamp> createTime;
}

View File

@ -13,8 +13,9 @@
* See the License for the specific language governing permissions and
* 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;
/**
@ -25,7 +26,9 @@ import lombok.Data;
@Data
public class UserPassVo {
@ApiModelProperty(value = "旧密码")
private String oldPass;
@ApiModelProperty(value = "新密码")
private String newPass;
}

View File

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

View File

@ -17,7 +17,7 @@ package me.zhengjie.modules.system.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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.Param;
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.extension.plugins.pagination.Page;
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.Param;
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.extension.plugins.pagination.Page;
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.Param;
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.extension.plugins.pagination.Page;
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.Param;
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 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.Param;
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.extension.plugins.pagination.Page;
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.Param;
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.extension.plugins.pagination.Page;
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.Param;
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.modules.system.domain.Dept;
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.PageUtil;
import org.springframework.http.HttpStatus;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Dict;
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 org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.DictDetail;
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 org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -23,7 +23,7 @@ import me.zhengjie.annotation.Log;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.system.domain.Job;
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 org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

View File

@ -22,9 +22,9 @@ import lombok.RequiredArgsConstructor;
import me.zhengjie.annotation.Log;
import me.zhengjie.modules.system.domain.Menu;
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.domain.vo.MenuQueryCriteria;
import me.zhengjie.modules.system.domain.dto.MenuQueryCriteria;
import me.zhengjie.utils.PageResult;
import me.zhengjie.utils.PageUtil;
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.exception.BadRequestException;
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.SecurityUtils;
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.domain.User;
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.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.utils.*;
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.ApiOperation;
import lombok.RequiredArgsConstructor;
import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.domain.dto.EmailDto;
import me.zhengjie.service.EmailService;
import me.zhengjie.modules.system.service.VerifyService;
import me.zhengjie.utils.enums.CodeBiEnum;
@ -44,16 +44,16 @@ public class VerifyController {
@PostMapping(value = "/resetEmail")
@ApiOperation("重置邮箱,发送验证码")
public ResponseEntity<Object> resetEmail(@RequestParam String email){
EmailVo emailVo = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey());
emailService.send(emailVo,emailService.find());
EmailDto emailDto = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_EMAIL_CODE.getKey());
emailService.send(emailDto,emailService.find());
return new ResponseEntity<>(HttpStatus.OK);
}
@PostMapping(value = "/email/resetPass")
@ApiOperation("重置密码,发送验证码")
public ResponseEntity<Object> resetPass(@RequestParam String email){
EmailVo emailVo = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_PWD_CODE.getKey());
emailService.send(emailVo,emailService.find());
EmailDto emailDto = verificationCodeService.sendEmail(email, CodeEnum.EMAIL_RESET_PWD_CODE.getKey());
emailService.send(emailDto,emailService.find());
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 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 java.io.IOException;
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.service.IService;
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 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.service.IService;
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 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.service.IService;
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 javax.servlet.http.HttpServletResponse;

View File

@ -17,8 +17,8 @@ package me.zhengjie.modules.system.service;
import com.baomidou.mybatisplus.extension.service.IService;
import me.zhengjie.modules.system.domain.Menu;
import me.zhengjie.modules.system.domain.vo.MenuQueryCriteria;
import me.zhengjie.modules.system.domain.vo.MenuVo;
import me.zhengjie.modules.system.domain.dto.MenuQueryCriteria;
import me.zhengjie.modules.system.domain.dto.MenuVo;
import javax.servlet.http.HttpServletResponse;
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.system.domain.Role;
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 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.service.IService;
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 org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;

View File

@ -15,7 +15,7 @@
*/
package me.zhengjie.modules.system.service;
import me.zhengjie.domain.vo.EmailVo;
import me.zhengjie.domain.dto.EmailDto;
/**
* @author Zheng Jie
@ -29,7 +29,7 @@ public interface VerifyService {
* @param key /
* @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.mapper.RoleMapper;
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.modules.system.mapper.DeptMapper;
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.DictDetail;
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.modules.system.mapper.DictDetailMapper;
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.DictDetail;
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.modules.system.mapper.DictMapper;
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.modules.system.domain.Job;
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.modules.system.mapper.JobMapper;
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.Role;
import me.zhengjie.modules.system.domain.User;
import me.zhengjie.modules.system.domain.vo.MenuMetaVo;
import me.zhengjie.modules.system.domain.vo.MenuVo;
import me.zhengjie.modules.system.domain.dto.MenuMetaVo;
import me.zhengjie.modules.system.domain.dto.MenuVo;
import me.zhengjie.exception.BadRequestException;
import me.zhengjie.exception.EntityExistException;
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.service.MenuService;
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 org.springframework.cache.annotation.CacheConfig;
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.UserMapper;
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 org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;

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