first commit

This commit is contained in:
2023-04-26 19:48:44 +08:00
commit 6adac3aeb1
62 changed files with 2741 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>qiaoba-commons</artifactId>
<groupId>com.qiaoba</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>qiaoba-common-base</artifactId>
</project>

View File

@ -0,0 +1,21 @@
package com.qiaoba.common.base.constants;
/**
* BaseConstant
*
* @author ailanyin
* @version 1.0
* @since 2023-04-23 15:37:43
*/
public class BaseConstant {
/**
* UTF-8 字符集
*/
public static final String UTF8 = "UTF-8";
/**
* 默认的字符拼接/切割符号: ','(英文逗号)
*/
public static final String DEFAULT_SPLIT_STR = ",";
}

View File

@ -0,0 +1,53 @@
package com.qiaoba.common.base.entity;
import lombok.Getter;
import lombok.Setter;
import java.io.Serializable;
import java.util.Date;
/**
* BaseEntity
*
* @author ailanyin
* @version 1.0
* @since 2023-04-23 15:37:43
*/
@Getter
@Setter
public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 创建者
*/
private String createUser;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateUser;
/**
* 更新时间
*/
private Date updateTime;
/**
* 备注
*/
private String remark;
/**
* 租户Id
*/
private Long tenantId;
}

View File

@ -0,0 +1,31 @@
package com.qiaoba.common.base.enums;
import lombok.Getter;
/**
* BaseEnum
*
* @author ailanyin
* @version 1.0
* @since 2023-04-23 15:34:59
*/
@Getter
public enum BaseEnum {
// 是
YES("1" , ""),
// 否
NO("0" , ""),
// 正常
NORMAL("1" , "正常"),
// 不正常
ABNORMAL("0" , "不正常");
private final String code;
private final String info;
BaseEnum(String code, String info) {
this.code = code;
this.info = info;
}
}

View File

@ -0,0 +1,47 @@
package com.qiaoba.common.base.exceptions;
import lombok.Getter;
import lombok.Setter;
/**
* 自定义 业务异常
*
* @author ailanyin
* @version 1.0
* @since 2021-08-31
*/
@Getter
@Setter
public class ServiceException extends RuntimeException {
/**
* 错误码
*/
private Integer errorCode;
/**
* 错误信息
*/
private String message;
public ServiceException(String message) {
this.message = message;
}
public ServiceException(Integer code, String message) {
this.message = message;
this.errorCode = code;
}
/**
* 控制台不打印自定义错误的堆栈信息, 提高性能
*
* @return this
*/
@Override
public Throwable fillInStackTrace() {
return this;
}
}

View File

@ -0,0 +1 @@
null not found