版本修改 4-26 todo

This commit is contained in:
fkf
2023-04-26 18:04:59 +08:00
parent 6b0592905c
commit 07a81c7c14
125 changed files with 1946 additions and 1600 deletions

View File

@@ -1,116 +0,0 @@
package com.yxt.demo.common.core.constant;
/**
* 通用常量信息
*/
public class Constants {
/**
* UTF-8 字符集
*/
public static final String UTF8 = "UTF-8";
/**
* GBK 字符集
*/
public static final String GBK = "GBK";
/**
* RMI 远程方法调用
*/
public static final String LOOKUP_RMI = "rmi://";
/**
* LDAP 远程方法调用
*/
public static final String LOOKUP_LDAP = "ldap://";
/**
* http请求
*/
public static final String HTTP = "http://";
/**
* https请求
*/
public static final String HTTPS = "https://";
/**
* 成功标记
*/
public static final Integer SUCCESS = 200;
/**
* 失败标记
*/
public static final Integer FAIL = 500;
/**
* 登录成功
*/
public static final String LOGIN_SUCCESS = "Success";
/**
* 注销
*/
public static final String LOGOUT = "Logout";
/**
* 注册
*/
public static final String REGISTER = "Register";
/**
* 登录失败
*/
public static final String LOGIN_FAIL = "Error";
/**
* 当前记录起始索引
*/
public static final String PAGE_NUM = "pageNum";
/**
* 每页显示记录数
*/
public static final String PAGE_SIZE = "pageSize";
/**
* 排序列
*/
public static final String ORDER_BY_COLUMN = "orderByColumn";
/**
* 排序的方向 "desc" 或者 "asc".
*/
public static final String IS_ASC = "isAsc";
/**
* 验证码 redis key
*/
public static final String CAPTCHA_CODE_KEY = "captcha_codes:";
/**
* 验证码有效期(分钟)
*/
public static final long CAPTCHA_EXPIRATION = 2;
/**
* 令牌有效期(分钟)
*/
public final static long TOKEN_EXPIRE = 720;
/**
* 参数管理 cache key
*/
public static final String SYS_CONFIG_KEY = "sys_config:";
/**
* 字典管理 cache key
*/
public static final String SYS_DICT_KEY = "sys_dict:";
/**
* 资源映射路径 前缀
*/
public static final String RESOURCE_PREFIX = "/profile";
}

View File

@@ -1,34 +0,0 @@
package com.yxt.demo.common.core.constant;
/**
* @Author dimengzhe
* @Date 2022/7/23 22:37
* @Description
*/
public enum StatusEnum {
/**
* 状态分类
*/
SUCCESS(200, "成功"),
FAIL(500, "失败"),
OVERDUE(5000, "登录状态已过期");
private int code;
private String msg;
public int getCode() {
return code;
}
public String getMsg() {
return msg;
}
StatusEnum(int code, String msg) {
this.code = code;
this.msg = msg;
}
}

View File

@@ -1,127 +0,0 @@
package com.yxt.demo.common.core.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.UUID;
/**
* @author dimengzhe
* @date 2021/9/3 16:06
* @description
*/
public class BaseEntity extends Entity {
@ApiModelProperty("字符型编号")
private String sid = UUID.randomUUID().toString();
@ApiModelProperty("记录版本,锁")
private Integer lockVersion = 0;
@ApiModelProperty("记录创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime = new Date();
@ApiModelProperty("记录最后修改时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date modifyTime = new Date();
@ApiModelProperty("记录状态值")
private Integer state = 0;
@ApiModelProperty("记录是否可用0:可用(默认)1:不可用")
private Integer isEnable = 0;
@ApiModelProperty("记录是否被删除0:未删除(默认)1:已经删除")
private Integer isDelete = 0;
@ApiModelProperty("备注信息")
private String remarks;
@ApiModelProperty("创建者")
private String createBySid;
@ApiModelProperty("更新者")
private String updateBySid;
public String getSid() {
return sid;
}
public void setSid(String sid) {
this.sid = sid;
}
public Integer getLockVersion() {
return lockVersion;
}
public void setLockVersion(Integer lockVersion) {
this.lockVersion = lockVersion;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getModifyTime() {
return modifyTime;
}
public void setModifyTime(Date modifyTime) {
this.modifyTime = modifyTime;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
public Integer getIsEnable() {
return isEnable;
}
public void setIsEnable(Integer isEnable) {
this.isEnable = isEnable;
}
public Integer getIsDelete() {
return isDelete;
}
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getCreateBySid() {
return createBySid;
}
public void setCreateBySid(String createBySid) {
this.createBySid = createBySid;
}
public String getUpdateBySid() {
return updateBySid;
}
public void setUpdateBySid(String updateBySid) {
this.updateBySid = updateBySid;
}
}

View File

@@ -1,55 +0,0 @@
package com.yxt.demo.common.core.domain;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
/**
* @author dimengzhe
* @date 2021/9/3 16:06
* @description
*/
public class Entity implements Serializable {
@ApiModelProperty("ID唯一编号")
private Integer id;
@ApiModelProperty("ID值的字符串形式")
public String getIdStr() {
if (null == id) {
return "";
}
return "" + id;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Override
public String toString() {
return "ClassName:" + getClass().getName() + ";id:" + getId();
}
@Override
public int hashCode() {
int id2 = Long.hashCode(getId());
return super.hashCode() + id2;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof Entity)) {
return false;
}
Entity entity = (Entity) obj;
return this.getId().equals(entity.getId());
}
}

View File

@@ -9,4 +9,5 @@ import com.yxt.demo.common.core.vo.Vo;
*/
public interface Query extends Vo {
}

View File

@@ -1,141 +0,0 @@
package com.yxt.demo.common.core.result;
import com.yxt.demo.common.core.constant.Constants;
import com.yxt.demo.common.core.constant.StatusEnum;
import java.io.Serializable;
/**
* @Author dimengzhe
* @Date 2021/8/23 16:42
* @Description 返回结果
*/
public class ResultBean<T> implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 成功
*/
public static final int SUCCESS = Constants.SUCCESS;
/**
* 失败
*/
public static final int FAIL = Constants.FAIL;
private int code;
private String msg;
private T data;
private Boolean success;
public ResultBean() {
}
public ResultBean(boolean success) {
this.success = success;
}
public ResultBean(boolean success, String msg) {
this.success = success;
this.msg = msg;
}
public ResultBean(boolean success, String msg, int code) {
this.success = success;
this.msg = msg;
this.code = code;
}
public ResultBean(T data) {
this.success = true;
this.data = data;
}
public ResultBean(int code, T data) {
this.success = true;
this.code = code;
this.data = data;
}
public ResultBean(int code, String msg, T data) {
this.success = true;
this.code = code;
this.msg = msg;
this.data = data;
}
public boolean getSuccess() {
return success;
}
public ResultBean<T> setSuccess(boolean success) {
this.success = success;
return this;
}
public String getMsg() {
return msg;
}
public ResultBean<T> setMsg(String msg) {
this.msg = msg;
return this;
}
public int getCode() {
return code;
}
public ResultBean<T> setCode(int code) {
this.code = code;
return this;
}
public T getData() {
return data;
}
public ResultBean<T> setData(T data) {
this.data = data;
return this;
}
/**
* 1.类实例化的非静态方法调用 2.类不实例化的静态方法调用
*
* @return
*/
public ResultBean<T> success() {
this.setSuccess(true);
this.setCode(StatusEnum.SUCCESS.getCode());
this.setMsg("操作成功!");
return this;
}
public ResultBean<T> fail() {
this.setSuccess(false);
this.setCode(StatusEnum.FAIL.getCode());
this.setMsg("操作失败!");
return this;
}
public static <T> ResultBean<T> fireSuccess() {
ResultBean<T> rb = new ResultBean<T>();
rb.setSuccess(true);
rb.setCode(StatusEnum.SUCCESS.getCode());
rb.setMsg("操作成功!");
return rb;
}
public static <T> ResultBean<T> fireFail() {
ResultBean<T> rb = new ResultBean<T>();
rb.setSuccess(false);
rb.setCode(StatusEnum.FAIL.getCode());
rb.setMsg("操作失败!");
return rb;
}
}

View File

@@ -1,8 +1,8 @@
package com.yxt.demo.common.core.vo;
import cn.hutool.core.bean.BeanUtil;
import com.yxt.demo.common.core.domain.Entity;
import javax.swing.text.html.parser.Entity;
import java.io.Serializable;
import java.util.Map;