init project
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core;
|
||||
|
||||
import com.mt.wms.core.config.AutoConfiguration;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import java.lang.annotation.*;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
@Target(ElementType.TYPE)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Import(AutoConfiguration.class)
|
||||
@Documented
|
||||
@Inherited
|
||||
public @interface EnableMesCore {
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package com.mt.wms.core;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.generator.AutoGenerator;
|
||||
import com.baomidou.mybatisplus.generator.config.*;
|
||||
import com.baomidou.mybatisplus.generator.config.builder.ConfigBuilder;
|
||||
import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy;
|
||||
import com.mt.wms.core.utils.StringUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Created by FanYi on 2018-08-27 16:38.
|
||||
**/
|
||||
public class MyGenerator {
|
||||
/**
|
||||
* 数据库地址
|
||||
*/
|
||||
static String dbUrl = "jdbc:mysql://mysql.picaiba.com:30306/wms";
|
||||
static String userName = "wms";
|
||||
static String password = "1qaz@WS";
|
||||
/**
|
||||
* 是否去掉生成实体的属性名前缀
|
||||
*/
|
||||
static String[] fieldPrefix = new String[]{"t_"};
|
||||
|
||||
/**
|
||||
* 代码生成器
|
||||
*
|
||||
* @param include 需要包含的表名,允许正则表达式
|
||||
*/
|
||||
private static void generateByTablesWithInjectConfig(String[] include) {
|
||||
File file = new File("");
|
||||
String path = file.getAbsolutePath();
|
||||
// 全局配置
|
||||
GlobalConfig config = new GlobalConfig();
|
||||
// 开启 activeRecord 模式
|
||||
config.setActiveRecord(true)
|
||||
//生成目录
|
||||
.setOutputDir(path + "/src/main/java")
|
||||
//生成人
|
||||
.setAuthor("mt")
|
||||
// 是否覆盖文件
|
||||
.setFileOverride(true)
|
||||
// XML ResultMap
|
||||
.setBaseResultMap(true)
|
||||
// XML columList
|
||||
.setBaseColumnList(true)
|
||||
.setOpen(false)
|
||||
// 自定义文件命名,注意 %s 会自动填充表实体属性!
|
||||
.setMapperName("%sMapper")
|
||||
.setXmlName("%sMapper")
|
||||
.setServiceName("%sServiceBiz")
|
||||
.setServiceImplName("%sServiceBizImpl");
|
||||
|
||||
// 数据源配置
|
||||
DataSourceConfig dataSourceConfig = new DataSourceConfig();
|
||||
dataSourceConfig.setDbType(DbType.MYSQL)
|
||||
.setUrl(dbUrl)
|
||||
.setUsername(userName)
|
||||
.setPassword(password)
|
||||
.setDriverName("com.mysql.jdbc.Driver");
|
||||
// 策略配置
|
||||
StrategyConfig strategyConfig = new StrategyConfig();
|
||||
strategyConfig.setVersionFieldName("version")
|
||||
.setLogicDeleteFieldName("valid")
|
||||
.setCapitalMode(true)
|
||||
.setChainModel(true)
|
||||
.setEntityColumnConstant(true)
|
||||
.setEnableSqlFilter(false)
|
||||
.setNaming(NamingStrategy.underline_to_camel)
|
||||
.setEntityLombokModel(true)
|
||||
.setTablePrefix(fieldPrefix)
|
||||
.setEntityTableFieldAnnotationEnable(true)
|
||||
//修改替换成你需要的表名,多个表名传数组
|
||||
.setInclude(include);
|
||||
// 包配置
|
||||
PackageConfig packageConfig = new PackageConfig();
|
||||
packageConfig.setParent("com.mt.wms.core.dal")
|
||||
.setEntity("entity")
|
||||
.setMapper("mapper")
|
||||
.setService("service")
|
||||
.setServiceImpl("service.impl")
|
||||
.setXml("mapper");
|
||||
|
||||
//模板配置
|
||||
TemplateConfig templateConfig = new TemplateConfig();
|
||||
templateConfig.setController(null);
|
||||
|
||||
// 代码生成器
|
||||
// AutoGenerator generator = new AutoGenerator();
|
||||
MybatisPlusGenerator generator = new MybatisPlusGenerator();
|
||||
generator.setExcludeTables("t_service");
|
||||
generator.setGlobalConfig(config)
|
||||
.setDataSource(dataSourceConfig)
|
||||
.setStrategy(strategyConfig)
|
||||
.setPackageInfo(packageConfig)
|
||||
.setTemplate(templateConfig)
|
||||
.execute();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void generateCodeWithInjectConfigForAllTable() {
|
||||
generateByTablesWithInjectConfig(new String[]{"t_[a-zA-Z0-9_]*"});
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
generateByTablesWithInjectConfig(new String[]{"t_goods[a-zA-Z0-9_]*"});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static class MybatisPlusGenerator extends AutoGenerator {
|
||||
|
||||
/**
|
||||
* 需要排除的表名,允许正则表达式
|
||||
*/
|
||||
private String[] excludeTables = null;
|
||||
|
||||
@Override
|
||||
protected ConfigBuilder pretreatmentConfigBuilder(ConfigBuilder config) {
|
||||
super.pretreatmentConfigBuilder(config);
|
||||
if (excludeTables != null && excludeTables.length > 0) {
|
||||
List<String> excludeTableList = Arrays.stream(excludeTables).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
|
||||
config.setTableInfoList(config.getTableInfoList().stream()
|
||||
.filter(tableInfo -> {
|
||||
boolean excludeFlag = false;
|
||||
String tableName = tableInfo.getName();
|
||||
for (String excludeTableName : excludeTableList) {
|
||||
if (excludeTableName.equalsIgnoreCase(tableName) || Pattern.matches(excludeTableName, tableName)) {
|
||||
excludeFlag = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return !excludeFlag;
|
||||
}).collect(Collectors.toList()));
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
public AutoGenerator setExcludeTables(String... excludeTables) {
|
||||
this.excludeTables = excludeTables;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
418
6.program/wms-core/src/main/java/com/mt/wms/core/api/Assert.java
Normal file
418
6.program/wms-core/src/main/java/com/mt/wms/core/api/Assert.java
Normal file
@@ -0,0 +1,418 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.api;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
||||
import com.mt.wms.core.base.IErrorCode;
|
||||
import com.mt.wms.core.exception.ApiException;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 接口参数断言工具类
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public class Assert {
|
||||
|
||||
protected Assert() {
|
||||
// to do noting
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数等于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void eqZero(Integer num, IErrorCode errorCode) {
|
||||
if (num == null || num != 0) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数等于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void eqZero(Integer num, String message) {
|
||||
if (num == null || num != 0) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数小于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void ltZero(Integer num, IErrorCode errorCode) {
|
||||
if (num == null || num >= 0) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数小于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void ltZero(Integer num, String message) {
|
||||
if (num == null || num >= 0) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言小于等于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void leZero(Integer num, IErrorCode errorCode) {
|
||||
if (num == null || num > 0) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言小于等于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void leZero(Integer num, String message) {
|
||||
if (num == null || num > 0) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数大于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void gtZero(Integer num, IErrorCode errorCode) {
|
||||
if (num == null || num <= 0) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数大于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void gtZero(Integer num, String message) {
|
||||
if (num == null || num <= 0) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言大于等于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void geZero(Integer num, IErrorCode errorCode) {
|
||||
if (num == null || num < 0) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言大于等于0,否则抛出错误消息
|
||||
*
|
||||
* @param num 断言参数
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void geZero(Integer num, String message) {
|
||||
if (num == null || num < 0) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言num1大于num2,否则抛出错误消息
|
||||
*
|
||||
* @param num1 断言参数1
|
||||
* @param num2 断言参数2
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void gt(Integer num1, Integer num2, IErrorCode errorCode) {
|
||||
if (num1 <= num2) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言num1大于num2,否则抛出错误消息
|
||||
*
|
||||
* @param num1 断言参数1
|
||||
* @param num2 断言参数2
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void gt(Integer num1, Integer num2, String message) {
|
||||
if (num1 <= num2) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言num1大于等于num2,否则抛出错误消息
|
||||
*
|
||||
* @param num1 断言参数1
|
||||
* @param num2 断言参数2
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void ge(Integer num1, Integer num2, IErrorCode errorCode) {
|
||||
if (num1 < num2) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言num1大于等于num2,否则抛出错误消息
|
||||
*
|
||||
* @param num1 断言参数1
|
||||
* @param num2 断言参数2
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void ge(Integer num1, Integer num2, String message) {
|
||||
if (num1 < num2) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言obj1 eq obj2,否则抛出错误消息
|
||||
*
|
||||
* @param obj1 断言参数1
|
||||
* @param obj2 断言参数2
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void eq(Object obj1, Object obj2, IErrorCode errorCode) {
|
||||
if (!obj1.equals(obj2)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言obj1 eq obj2,否则抛出错误消息(错误码统一为{@link IErrorCode#CODE_FAILED})
|
||||
*
|
||||
* @param obj1 断言参数1
|
||||
* @param obj2 断言参数2
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void eq(Object obj1, Object obj2, String message) {
|
||||
if (!obj1.equals(obj2)) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数为true,否则抛出错误消息
|
||||
*
|
||||
* @param condition 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void isTrue(boolean condition, IErrorCode errorCode) {
|
||||
if (!condition) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数为false,否则抛出错误消息
|
||||
*
|
||||
* @param condition 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void isFalse(boolean condition, IErrorCode errorCode) {
|
||||
if (condition) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言给定的参数都为null,否则抛出错误消息
|
||||
*
|
||||
* @param errorCode 错误消息
|
||||
* @param conditions 断言参数
|
||||
*/
|
||||
public static void isNull(IErrorCode errorCode, Object... conditions) {
|
||||
if (ObjectUtils.isNotNull(conditions)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言给定的参数都不为null,否则抛出错误消息
|
||||
*
|
||||
* @param errorCode 错误消息
|
||||
* @param conditions 断言参数
|
||||
*/
|
||||
public static void notNull(IErrorCode errorCode, Object... conditions) {
|
||||
if (ObjectUtils.isNull(conditions)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言给定的参数都为null,否则抛出错误消息(错误码统一为{@link IErrorCode#CODE_FAILED})
|
||||
*
|
||||
* @param message 错误消息
|
||||
* @param conditions 断言参数
|
||||
*/
|
||||
public static void isNull(String message, Object... conditions) {
|
||||
if (ObjectUtils.isNotNull(conditions)) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言给定的参数都不为null,否则抛出错误消息(错误码统一为{@link IErrorCode#CODE_FAILED})
|
||||
*
|
||||
* @param message 错误消息
|
||||
* @param conditions 断言参数
|
||||
*/
|
||||
public static void notNull(String message, Object... conditions) {
|
||||
if (ObjectUtils.isNull(conditions)) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 抛出失败消息
|
||||
* </p>
|
||||
*
|
||||
* @param errorCode 异常错误码
|
||||
*/
|
||||
public static void fail(IErrorCode errorCode) {
|
||||
throw new ApiException(errorCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据断言条件判断是否抛出错误消息
|
||||
*
|
||||
* @param condition 断言条件,true则抛出错误消息,否则正常执行
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void fail(boolean condition, IErrorCode errorCode) {
|
||||
if (condition) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 抛出失败消息
|
||||
* </p>
|
||||
*
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void fail(String message) {
|
||||
throw new ApiException(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据断言条件判断是否抛出错误消息
|
||||
*
|
||||
* @param condition 断言条件,true则抛出错误消息,否则正常执行
|
||||
* @param message 错误消息
|
||||
*/
|
||||
public static void fail(boolean condition, String message) {
|
||||
if (condition) {
|
||||
Assert.fail(message);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数不为空,否则抛出错误消息
|
||||
*
|
||||
* @param array 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void notEmpty(Object[] array, IErrorCode errorCode) {
|
||||
if (ObjectUtils.isEmpty(array)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言数组中的对象没有null元素,否则抛出错误消息
|
||||
*
|
||||
* @param array 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void noNullElements(Object[] array, IErrorCode errorCode) {
|
||||
if (array != null) {
|
||||
for (Object element : array) {
|
||||
if (element == null) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数不为空,否则抛出错误消息
|
||||
*
|
||||
* @param collection 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void notEmpty(Collection<?> collection, IErrorCode errorCode) {
|
||||
if (CollectionUtils.isNotEmpty(collection)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言参数不为空,否则抛出错误消息
|
||||
*
|
||||
* @param map 断言参数
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void notEmpty(Map<?, ?> map, IErrorCode errorCode) {
|
||||
if (ObjectUtils.isEmpty(map)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 断言对象是给定类型的实例,否则抛出错误消息
|
||||
*
|
||||
* @param type 断言类型
|
||||
* @param obj 断言对象
|
||||
* @param errorCode 错误消息
|
||||
*/
|
||||
public static void isInstanceOf(Class<?> type, Object obj, IErrorCode errorCode) {
|
||||
Assert.notNull(errorCode, type);
|
||||
if (!type.isInstance(obj)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
public static void isAssignable(Class<?> superType, Class<?> subType, IErrorCode errorCode) {
|
||||
Assert.notNull(errorCode, superType);
|
||||
if (subType == null || !superType.isAssignableFrom(subType)) {
|
||||
Assert.fail(errorCode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 控制器基类
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
@RestController
|
||||
public abstract class BaseController extends BaseSupport {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public class BaseDto implements Serializable {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 接口请求参数基类
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public class BaseParam implements Serializable {
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
|
||||
/**
|
||||
* 服务基类
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public abstract class BaseService extends BaseSupport {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,255 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mt.wms.core.enums.WhetherEnum;
|
||||
import com.mt.wms.core.dto.LoginUser;
|
||||
import com.mt.wms.core.vo.R;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.core.NamedThreadLocal;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.servlet.http.HttpSession;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 接口支持基类
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public abstract class BaseSupport {
|
||||
private static final ThreadLocal<LoginUser> loginUserHolder = new NamedThreadLocal<>("LoginUser");
|
||||
|
||||
/**
|
||||
* 获取当前登录用户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected LoginUser getLoginUser() {
|
||||
// 后续完善拦截器再使用该方式
|
||||
// LoginUser loginUser = loginUserHolder.get();
|
||||
// if (loginUser != null) {
|
||||
// return loginUser;
|
||||
// }
|
||||
HttpSession session = getHttpServletRequest().getSession(false);
|
||||
LoginUser loginUser = null;
|
||||
if (session != null) {
|
||||
String loginUserJson = (String) session.getAttribute(LoginUser.HTTP_HEADER_NAME);
|
||||
if (StringUtils.isNotBlank(loginUserJson)) {
|
||||
loginUser = JSON.parseObject(loginUserJson, LoginUser.class);
|
||||
return loginUser;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前http请求对象
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected HttpServletRequest getHttpServletRequest() {
|
||||
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前http响应对象
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
protected HttpServletResponse getHttpServletResponse() {
|
||||
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 请求成功
|
||||
* </p>
|
||||
*
|
||||
* @param data 数据内容
|
||||
* @param <T> 对象泛型
|
||||
* @return
|
||||
*/
|
||||
protected <T> R<T> successful(T data) {
|
||||
return R.ok(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 请求成功
|
||||
* </p>
|
||||
*
|
||||
* @param msg 提示内容
|
||||
* @param data 数据内容
|
||||
* @param <T> 对象泛型
|
||||
* @return
|
||||
*/
|
||||
protected <T> R<T> successful(String msg, T data) {
|
||||
return R.ok(msg, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 请求失败
|
||||
* </p>
|
||||
*
|
||||
* @param code 错误码
|
||||
* @param msg 提示内容
|
||||
* @param <T> 对象泛型
|
||||
* @return
|
||||
*/
|
||||
protected <T> R<T> failed(int code, String msg) {
|
||||
return R.failed(code, msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 请求失败
|
||||
* </p>
|
||||
*
|
||||
* @param msg 提示内容
|
||||
* @param <T> 对象泛型
|
||||
* @return
|
||||
*/
|
||||
protected <T> R<T> failed(String msg) {
|
||||
return R.failed(msg);
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 请求失败
|
||||
* </p>
|
||||
*
|
||||
* @param errorCode 请求错误码
|
||||
* @param <T> 对象泛型
|
||||
* @return
|
||||
*/
|
||||
protected <T> R<T> failed(IErrorCode errorCode) {
|
||||
return R.failed(errorCode);
|
||||
}
|
||||
|
||||
protected R<String> addResult(boolean status) {
|
||||
return status ? successful("添加成功", null) : failed("添加失败");
|
||||
}
|
||||
|
||||
protected R<String> editResult(boolean status) {
|
||||
return status ? successful("修改成功", null) : failed("修改失败");
|
||||
}
|
||||
|
||||
protected R<String> delResult(boolean status) {
|
||||
return status ? successful("删除成功", null) : failed("删除失败");
|
||||
}
|
||||
|
||||
protected R<String> enabledResult(boolean status) {
|
||||
return status ? successful("已启用", null) : failed("已禁用");
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置公共字段值,一般用于创建新记录,包含以下字段:
|
||||
*
|
||||
* <p>
|
||||
* {@link CommonField#enabled}<br>
|
||||
* {@link CommonField#valid}<br>
|
||||
* {@link CommonField#creator}<br>
|
||||
* {@link CommonField#creatorName}<br>
|
||||
* {@link CommonField#createTime}<br>
|
||||
* {@link CommonField#updater}<br>
|
||||
* {@link CommonField#updaterName}<br>
|
||||
* {@link CommonField#updateTime}<br>
|
||||
* </p>
|
||||
*
|
||||
* @param t 需要设置的对象
|
||||
* @param ignoreProperties 忽略的字段
|
||||
* @param <T>
|
||||
*/
|
||||
protected <T extends Serializable> T setCommonField(T t, String... ignoreProperties) {
|
||||
CommonField commonField = CommonField.builder()
|
||||
.enabled(WhetherEnum.YES.getValue())
|
||||
.valid(WhetherEnum.YES.getValue())
|
||||
.createTime(LocalDateTime.now())
|
||||
.creator(getLoginUser().getUserId())
|
||||
.creatorName(getLoginUser().getUserName())
|
||||
.updateTime(LocalDateTime.now())
|
||||
.updater(getLoginUser().getUserId())
|
||||
.updaterName(getLoginUser().getUserName())
|
||||
.build();
|
||||
BeanUtils.copyProperties(commonField, t, ignoreProperties);
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置更新的公共字段值,一般用于更新记录,包含以下字段:
|
||||
*
|
||||
* <p>
|
||||
* {@link CommonField#updater}<br>
|
||||
* {@link CommonField#updaterName}<br>
|
||||
* {@link CommonField#updateTime}<br>
|
||||
* </p>
|
||||
*
|
||||
* @param t 需要设置的对象
|
||||
* @param <T>
|
||||
*/
|
||||
protected <T extends Serializable> T setUpdateCommonField(T t) {
|
||||
CommonField commonField = CommonField.builder()
|
||||
.updater(getLoginUser().getUserId())
|
||||
.updaterName(getLoginUser().getUserName())
|
||||
.updateTime(LocalDateTime.now())
|
||||
.build();
|
||||
BeanUtils.copyProperties(commonField, t, "enabled", "valid");
|
||||
return t;
|
||||
}
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
private static class CommonField implements Serializable {
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
private Integer enabled;
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
private Integer valid;
|
||||
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long creator;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String creatorName;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private Long updater;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updaterName;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 视图对象基类
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/7
|
||||
* @since 1.0
|
||||
*/
|
||||
public class BaseVo implements Serializable {
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 枚举接口
|
||||
*
|
||||
* @param <T>
|
||||
* @author jiff
|
||||
* @date 2018/11/7
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface IEnum<T extends Serializable> {
|
||||
|
||||
/**
|
||||
* 数据值
|
||||
*
|
||||
* @return 数据值
|
||||
*/
|
||||
T getValue();
|
||||
|
||||
/**
|
||||
* 标签名
|
||||
*
|
||||
* @return 标签名
|
||||
*/
|
||||
String getLabel();
|
||||
|
||||
/**
|
||||
* 备注,对数据值进行详细说明
|
||||
*
|
||||
* @return 备注
|
||||
*/
|
||||
String getRemark();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
|
||||
/**
|
||||
* api错误码定义
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface IErrorCode {
|
||||
/**
|
||||
* 成功
|
||||
*/
|
||||
int CODE_SUCCESSFUL = 0;
|
||||
/**
|
||||
* 失败
|
||||
*/
|
||||
int CODE_FAILED = 1;
|
||||
/**
|
||||
* 无效的请求参数
|
||||
*/
|
||||
int CODE_INVALID_PARAMETER = 2;
|
||||
/**
|
||||
* 数据未授权
|
||||
*/
|
||||
int CODE_FORBIDDEN_DATA = 9;
|
||||
/**
|
||||
* 用户已存在
|
||||
*/
|
||||
int CODE_USER_EXISTENT = 10;
|
||||
/**
|
||||
* 用户不存在
|
||||
*/
|
||||
int CODE_USER_NON_EXISTENT = 11;
|
||||
/**
|
||||
* 用户未登录
|
||||
*/
|
||||
int CODE_UNAUTHORIZED = 401;
|
||||
/**
|
||||
* 用户未授权
|
||||
*/
|
||||
int CODE_FORBIDDEN = 403;
|
||||
|
||||
/**
|
||||
* 错误编码:0、成功 否则失败
|
||||
*
|
||||
* @return 错误码:0、成功 否则失败
|
||||
*/
|
||||
int getCode();
|
||||
|
||||
/**
|
||||
* 错误描述
|
||||
*
|
||||
* @return 错误描述
|
||||
*/
|
||||
String getMsg();
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.base;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 树接口
|
||||
*
|
||||
* @param <T> 泛型参数
|
||||
* @author jiff
|
||||
* @date 2018/11/27
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface ITree<T extends ITree> {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*
|
||||
* @return ID
|
||||
*/
|
||||
Long getId();
|
||||
|
||||
/**
|
||||
* 父ID
|
||||
*
|
||||
* @return 父ID
|
||||
*/
|
||||
Long getParentId();
|
||||
|
||||
/**
|
||||
* 获取子列表
|
||||
*
|
||||
* @return 子列表
|
||||
*/
|
||||
List<T> getChildren();
|
||||
|
||||
/**
|
||||
* 设置子列表
|
||||
*
|
||||
* @param children 子列表
|
||||
* @return 当前对象
|
||||
*/
|
||||
T setChildren(List<T> children);
|
||||
|
||||
/**
|
||||
* 设置选中状态
|
||||
*
|
||||
* @param checked 选中状态,true:选中,否则未选中
|
||||
* @return 当前对象
|
||||
*/
|
||||
default T setChecked(boolean checked) {
|
||||
return (T) this;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2020.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2020-03-10
|
||||
* @since 1.0
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "wms.aliyun.sms")
|
||||
@Data
|
||||
@Validated
|
||||
public class AliyunSmsConfig {
|
||||
/**
|
||||
* 开发者标识
|
||||
*/
|
||||
@NotEmpty
|
||||
private String product;
|
||||
|
||||
@NotEmpty
|
||||
private String domain;
|
||||
/**
|
||||
* 访问密钥ID
|
||||
*/
|
||||
@NotEmpty
|
||||
private String accessKeyId;
|
||||
/**
|
||||
* 访问密钥
|
||||
*/
|
||||
@NotEmpty
|
||||
private String accessKeySecret;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import com.mt.wms.core.runner.MesApplicationRunner;
|
||||
import org.springframework.boot.ApplicationArguments;
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan({"com.mt.wms.core.config", "com.mt.wms.core.handler", "com.mt.wms.core.dal.service", "com.mt.wms.core.service", "com.mt.wms.core.utils"})
|
||||
public class AutoConfiguration {
|
||||
/**
|
||||
* springboot启动之后会调用{@link MesApplicationRunner#run(ApplicationArguments)}方法
|
||||
*
|
||||
* @param applicationContext
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public ApplicationRunner lisApplicationRunner(ApplicationContext applicationContext) {
|
||||
return new MesApplicationRunner(applicationContext);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (c) 2020.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </P>
|
||||
*
|
||||
* @author FanYi
|
||||
* @date 2020/7/6
|
||||
* @since 1.0
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "wms.common")
|
||||
@Data
|
||||
@Validated
|
||||
public class CommonConfig {
|
||||
|
||||
/**
|
||||
* 文件上传路径
|
||||
*/
|
||||
@NotEmpty
|
||||
private String uploadPath;
|
||||
|
||||
/**
|
||||
* 前端主机地址
|
||||
*/
|
||||
@NotEmpty
|
||||
private String webHost;
|
||||
/**
|
||||
* 后端主机地址
|
||||
*/
|
||||
@NotEmpty
|
||||
private String apiHost;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonParser;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationContext;
|
||||
import com.fasterxml.jackson.databind.JsonDeserializer;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
|
||||
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.time.Instant;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
|
||||
/**
|
||||
* @author shihairong
|
||||
* @email <shihairong@zimonet.com>
|
||||
* @description 针对Long型ID序列化超过16位后导致前端js处理丢失精度,改成序列化成String
|
||||
* @date 2020/12/31 11:37
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass(ObjectMapper.class)
|
||||
@AutoConfigureBefore(JacksonAutoConfiguration.class)
|
||||
public class JacksonConfig {
|
||||
|
||||
@Bean
|
||||
@Primary
|
||||
@ConditionalOnMissingBean(ObjectMapper.class)
|
||||
public ObjectMapper jacksonObjectMapper(Jackson2ObjectMapperBuilder builder) {
|
||||
ObjectMapper objectMapper = builder.createXmlMapper(false).build();
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
simpleModule.addDeserializer(LocalDateTime.class, new MesLocalDateTimeDeserializer());
|
||||
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
|
||||
objectMapper.registerModule(simpleModule);
|
||||
return objectMapper;
|
||||
}
|
||||
|
||||
class MesLocalDateTimeDeserializer extends JsonDeserializer<LocalDateTime> {
|
||||
|
||||
@Override
|
||||
public LocalDateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
|
||||
String text = jsonParser.getText();
|
||||
if (text == null || text.length() == 0) {
|
||||
return null;
|
||||
}
|
||||
if (text.length() > 10 && text.charAt(10) == 'T') {
|
||||
if (text.endsWith("Z")) {
|
||||
return LocalDateTime.ofInstant(Instant.parse(text), ZoneId.systemDefault());
|
||||
}
|
||||
}
|
||||
|
||||
return LocalDateTime.parse(text, DateTimeFormatter.ISO_LOCAL_DATE_TIME);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.OptimisticLockerInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize;
|
||||
import org.mybatis.spring.mapper.MapperScannerConfigurer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor() {
|
||||
PaginationInterceptor paginationInterceptor = new PaginationInterceptor();
|
||||
// 设置请求的页面大于最大页后操作, true调回到首页,false 继续请求 默认false
|
||||
// paginationInterceptor.setOverflow(false);
|
||||
// 设置最大单页限制数量,默认 500 条,-1 不受限制
|
||||
paginationInterceptor.setLimit(500);
|
||||
// 开启 count 的 join 优化,只针对部分 left join
|
||||
paginationInterceptor.setCountSqlParser(new JsqlParserCountOptimize(true));
|
||||
return paginationInterceptor;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public OptimisticLockerInterceptor optimisticLockerInterceptor() {
|
||||
return new OptimisticLockerInterceptor();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MapperScannerConfigurer mapperScannerConfigurer() {
|
||||
MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
|
||||
scannerConfigurer.setBasePackage("com.mt.wms.**.mapper*");
|
||||
return scannerConfigurer;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
/*
|
||||
* Copyright (c) 2019.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import org.redisson.Redisson;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.redisson.config.Config;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.data.redis.core.RedisOperations;
|
||||
import org.springframework.util.ReflectionUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* redis客户端,主要使用其分布式锁
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2019-08-25
|
||||
* @since 1.0
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({Redisson.class, RedisOperations.class})
|
||||
@AutoConfigureBefore(RedisAutoConfiguration.class)
|
||||
@EnableConfigurationProperties({RedissonProperties.class, RedisProperties.class})
|
||||
public class RedissonAutoConfiguration {
|
||||
|
||||
@Autowired
|
||||
private RedissonProperties redissonProperties;
|
||||
|
||||
@Autowired
|
||||
private RedisProperties redisProperties;
|
||||
|
||||
@Autowired
|
||||
private ApplicationContext ctx;
|
||||
|
||||
|
||||
@Bean(destroyMethod = "shutdown")
|
||||
@ConditionalOnMissingBean(RedissonClient.class)
|
||||
public RedissonClient redisson() throws IOException {
|
||||
Config config = null;
|
||||
Method clusterMethod = ReflectionUtils.findMethod(RedisProperties.class, "getCluster");
|
||||
Method timeoutMethod = ReflectionUtils.findMethod(RedisProperties.class, "getTimeout");
|
||||
Object timeoutValue = ReflectionUtils.invokeMethod(timeoutMethod, redisProperties);
|
||||
int timeout;
|
||||
if (null == timeoutValue) {
|
||||
timeout = 0;
|
||||
} else if (!(timeoutValue instanceof Integer)) {
|
||||
Method millisMethod = ReflectionUtils.findMethod(timeoutValue.getClass(), "toMillis");
|
||||
timeout = ((Long) ReflectionUtils.invokeMethod(millisMethod, timeoutValue)).intValue();
|
||||
} else {
|
||||
timeout = (Integer) timeoutValue;
|
||||
}
|
||||
|
||||
if (redissonProperties.getConfig() != null) {
|
||||
try {
|
||||
InputStream is = getConfigStream();
|
||||
config = Config.fromJSON(is);
|
||||
} catch (IOException e) {
|
||||
// trying next format
|
||||
try {
|
||||
InputStream is = getConfigStream();
|
||||
config = Config.fromYAML(is);
|
||||
} catch (IOException e1) {
|
||||
throw new IllegalArgumentException("Can't parse config", e1);
|
||||
}
|
||||
}
|
||||
} else if (redisProperties.getSentinel() != null) {
|
||||
Method nodesMethod = ReflectionUtils.findMethod(RedisProperties.Sentinel.class, "getNodes");
|
||||
Object nodesValue = ReflectionUtils.invokeMethod(nodesMethod, redisProperties.getSentinel());
|
||||
|
||||
String[] nodes;
|
||||
if (nodesValue instanceof String) {
|
||||
nodes = convert(Arrays.asList(((String) nodesValue).split(",")));
|
||||
} else {
|
||||
nodes = convert((List<String>) nodesValue);
|
||||
}
|
||||
|
||||
config = new Config();
|
||||
config.useSentinelServers()
|
||||
.setMasterName(redisProperties.getSentinel().getMaster())
|
||||
.addSentinelAddress(nodes)
|
||||
.setDatabase(redisProperties.getDatabase())
|
||||
.setConnectTimeout(timeout)
|
||||
.setPassword(redisProperties.getPassword());
|
||||
} else if (clusterMethod != null && ReflectionUtils.invokeMethod(clusterMethod, redisProperties) != null) {
|
||||
Object clusterObject = ReflectionUtils.invokeMethod(clusterMethod, redisProperties);
|
||||
Method nodesMethod = ReflectionUtils.findMethod(clusterObject.getClass(), "getNodes");
|
||||
List<String> nodesObject = (List) ReflectionUtils.invokeMethod(nodesMethod, clusterObject);
|
||||
|
||||
String[] nodes = convert(nodesObject);
|
||||
|
||||
config = new Config();
|
||||
config.useClusterServers()
|
||||
.addNodeAddress(nodes)
|
||||
.setConnectTimeout(timeout)
|
||||
.setPassword(redisProperties.getPassword());
|
||||
} else {
|
||||
config = new Config();
|
||||
String prefix = "redis://";
|
||||
Method method = ReflectionUtils.findMethod(RedisProperties.class, "isSsl");
|
||||
if (method != null && (Boolean) ReflectionUtils.invokeMethod(method, redisProperties)) {
|
||||
prefix = "rediss://";
|
||||
}
|
||||
|
||||
config.useSingleServer()
|
||||
.setAddress(prefix + redisProperties.getHost() + ":" + redisProperties.getPort())
|
||||
.setConnectTimeout(timeout)
|
||||
.setDatabase(redisProperties.getDatabase())
|
||||
.setPassword(redisProperties.getPassword());
|
||||
}
|
||||
|
||||
return Redisson.create(config);
|
||||
}
|
||||
|
||||
private String[] convert(List<String> nodesObject) {
|
||||
List<String> nodes = new ArrayList<String>(nodesObject.size());
|
||||
for (String node : nodesObject) {
|
||||
if (!node.startsWith("redis://") && !node.startsWith("rediss://")) {
|
||||
nodes.add("redis://" + node);
|
||||
} else {
|
||||
nodes.add(node);
|
||||
}
|
||||
}
|
||||
return nodes.toArray(new String[nodes.size()]);
|
||||
}
|
||||
|
||||
private InputStream getConfigStream() throws IOException {
|
||||
Resource resource = ctx.getResource(redissonProperties.getConfig());
|
||||
InputStream is = resource.getInputStream();
|
||||
return is;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright (c) 2019.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2019-08-25
|
||||
* @since 1.0
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "spring.redis.redisson")
|
||||
public class RedissonProperties {
|
||||
|
||||
private String config;
|
||||
|
||||
public String getConfig() {
|
||||
return config;
|
||||
}
|
||||
|
||||
public void setConfig(String config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 腾讯云公共配置
|
||||
* </p>
|
||||
*
|
||||
* @author Mr.ZhangShi
|
||||
* @version 1.0
|
||||
* @date 2020/8/10
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "wms.tencentcloud")
|
||||
@Data
|
||||
public class TencentCloudConfig {
|
||||
|
||||
/**
|
||||
* 账户id
|
||||
*/
|
||||
private String secretId;
|
||||
|
||||
/**
|
||||
* 账户密钥
|
||||
*/
|
||||
private String secretKey;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 腾讯云短信配置
|
||||
* </p>
|
||||
*
|
||||
* @author Mr.ZhangShi
|
||||
* @version 1.0
|
||||
* @date 2020/8/10
|
||||
*/
|
||||
@Component
|
||||
@ConfigurationProperties(prefix = "wms.tencentcloud.sms")
|
||||
@Data
|
||||
public class TencentCloudSmsConfig{
|
||||
|
||||
/**
|
||||
* 短信应用id
|
||||
*/
|
||||
private String appId;
|
||||
|
||||
/**
|
||||
* 短信应用key
|
||||
*/
|
||||
private String appKey;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import org.springframework.boot.web.servlet.MultipartConfigFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.servlet.MultipartConfigElement;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* </p>
|
||||
*
|
||||
* @author Mr.ZhangShi
|
||||
* @date 2019/4/28
|
||||
* @since 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class UploadFileConfig {
|
||||
|
||||
@Bean
|
||||
public MultipartConfigElement multipartConfigElement() {
|
||||
MultipartConfigFactory factory = new MultipartConfigFactory();
|
||||
//文件最大 KB,MB
|
||||
factory.setMaxFileSize("100MB");
|
||||
/// 设置总上传数据总大小
|
||||
factory.setMaxRequestSize("100MB");
|
||||
return factory.createMultipartConfig();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import org.hibernate.validator.HibernateValidator;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.validation.Validation;
|
||||
import javax.validation.Validator;
|
||||
import javax.validation.ValidatorFactory;
|
||||
|
||||
/**
|
||||
* 参数验证器配置,可以配置验证模式是快速失败返回还是普通模式,开发阶段先开启普通模式
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/6
|
||||
* @since 1.0
|
||||
*/
|
||||
@Configuration
|
||||
public class ValidatorConfig {
|
||||
@Bean
|
||||
public Validator validator() {
|
||||
ValidatorFactory validatorFactory = Validation.byProvider(HibernateValidator.class)
|
||||
.configure()
|
||||
//failFast:true 快速失败返回模式,false 普通模式
|
||||
.failFast(false)
|
||||
// .addProperty("hibernate.validator.fail_fast", "true")
|
||||
.buildValidatorFactory();
|
||||
Validator validator = validatorFactory.getValidator();
|
||||
|
||||
return validator;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright (c) 2020.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2020-03-10
|
||||
* @since 1.0
|
||||
*/
|
||||
@Component
|
||||
@ConditionalOnProperty(prefix = "wms.wechat", name = {"ma.appId"})
|
||||
@ConfigurationProperties(prefix = "wms.wechat")
|
||||
@Data
|
||||
@Validated
|
||||
public class WxConfig {
|
||||
|
||||
private String mchId;
|
||||
private String mchKey;
|
||||
@NotNull
|
||||
private WechatProperties ma;
|
||||
|
||||
|
||||
@Data
|
||||
public static class WechatProperties {
|
||||
/**
|
||||
* 应用ID
|
||||
*/
|
||||
private String appId;
|
||||
/**
|
||||
* 接口秘钥
|
||||
*/
|
||||
private String appSecret;
|
||||
/**
|
||||
* 微信公众号开发模式接口配置信息中的Token保持一致
|
||||
*/
|
||||
private String token;
|
||||
/**
|
||||
* 微信生成的 ASEKey
|
||||
*/
|
||||
private String aseKey;
|
||||
/**
|
||||
* 商户号
|
||||
*/
|
||||
private String mchId;
|
||||
/**
|
||||
* 商户秘钥
|
||||
*/
|
||||
private String mchKey;
|
||||
|
||||
/**
|
||||
* 证书路径
|
||||
*/
|
||||
private String keyPath;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.constants;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface CommonConstant {
|
||||
|
||||
|
||||
/**
|
||||
* 版本控制
|
||||
*/
|
||||
Integer VERSION = 0;
|
||||
|
||||
/**
|
||||
* 默认密码
|
||||
*/
|
||||
String DEFAULT_PASSWORD = "123456";
|
||||
|
||||
/**
|
||||
* 公共服务模块
|
||||
*/
|
||||
String API_MODULE_BASE = "api/";
|
||||
|
||||
/**
|
||||
* 公共服务模块
|
||||
*/
|
||||
String API_MODULE_COMMON = API_MODULE_BASE + "common/";
|
||||
|
||||
/**
|
||||
* 统一认证模块
|
||||
*/
|
||||
String API_MODULE_PASSPORT = API_MODULE_BASE + "passport/";
|
||||
|
||||
/**
|
||||
* 管理模块
|
||||
*/
|
||||
String API_MODULE_MANAGER = API_MODULE_BASE + "manager/";
|
||||
|
||||
/**
|
||||
* 用户管理模块
|
||||
*/
|
||||
String API_MODULE_UPMS = API_MODULE_BASE + "upms/";
|
||||
|
||||
|
||||
/**
|
||||
* 移动端模块
|
||||
*/
|
||||
String API_MODULE_MOBILE = API_MODULE_BASE + "mobile/";
|
||||
|
||||
/**
|
||||
* 报表端模块
|
||||
*/
|
||||
String API_MODULE_REPORT = API_MODULE_BASE + "report/";
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.constants;
|
||||
|
||||
/**
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface MessageQueueConstant {
|
||||
String SMS_CODE = "sms_code";
|
||||
String SMS_DINGTALK = "sms_dingtalk";
|
||||
String LOGIN_LOG = "login_log";
|
||||
String API_LOG = "api_log";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (c) 2018.
|
||||
* http://www.ulabcare.com
|
||||
*/
|
||||
|
||||
package com.mt.wms.core.constants;
|
||||
|
||||
import com.mt.wms.core.utils.StringUtils;
|
||||
|
||||
/**
|
||||
* redis key 常量定义类,为了防止key冲突,第一个命名空间尽量定义在该类中。
|
||||
* <p>
|
||||
* 建议使用命名空间格式设置key名称:
|
||||
* <p><pre>
|
||||
* 1.1 key = 用途:业务限定:key。
|
||||
* 例如:lock:order:xxx; sequence:order_no:xxx
|
||||
* 1.2 key采用小写结构,不采用驼峰格式,中间利用下滑线(_)做连接,例如:user_name、user_pass。
|
||||
* 1.3 key的长度限制在128字节之内,既可以节省空间,又可以加快查询速度。
|
||||
* </pre></p>
|
||||
*
|
||||
* @author jiff
|
||||
* @date 2018/11/1
|
||||
* @since 1.0
|
||||
*/
|
||||
public interface RedisConstant {
|
||||
/**
|
||||
* key命名空间分隔符{@value}
|
||||
*/
|
||||
String KEY_NAMESPACE_SEPARATOR = ":";
|
||||
|
||||
/**
|
||||
* 分布式锁的key命名空间
|
||||
*/
|
||||
String LOCK_PREFIX = "lock:";
|
||||
|
||||
/**
|
||||
* 短信的key命名空间{@value}
|
||||
*/
|
||||
String SMS_PREFIX = "sms";
|
||||
|
||||
/**
|
||||
* 微信的key命名空间{@value}
|
||||
*/
|
||||
String WECHAT_PREFIX = "wechat";
|
||||
|
||||
/**
|
||||
* 生成短信验证码键值
|
||||
*
|
||||
* @param mobile 手机号码
|
||||
* @return key
|
||||
*/
|
||||
static String genSmsCodeKey(String mobile) {
|
||||
return genKey(SMS_PREFIX, "code", mobile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成微信oauthCode键值
|
||||
*
|
||||
* @param appId appId
|
||||
* @param oauthCode oauthCode
|
||||
* @return key
|
||||
*/
|
||||
static String genWechatOauthCodeKey(String appId, String oauthCode) {
|
||||
return genKey(WECHAT_PREFIX, "oauth_code", appId, oauthCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成微信jsApiTicket键值
|
||||
*
|
||||
* @param appId appId
|
||||
* @return key
|
||||
*/
|
||||
static String genWechatJsApiTicketKey(String appId) {
|
||||
return genKey(WECHAT_PREFIX, "wechat_jsapi_ticket", appId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成微信weChatAccessTokenCode键值
|
||||
*
|
||||
* @param appId appId
|
||||
* @return key
|
||||
*/
|
||||
static String genWechatAccessTokenCodeKey(String appId) {
|
||||
return genKey(WECHAT_PREFIX, "wechat_access_token", appId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成redis键值
|
||||
*
|
||||
* @param keys 键值数组
|
||||
* @return key0:key1:key2:keyN
|
||||
*/
|
||||
static String genKey(String... keys) {
|
||||
return StringUtils.join(keys, KEY_NAMESPACE_SEPARATOR);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,448 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 登录日志表,存放历史会话信息
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_login_log")
|
||||
public class LoginLog extends Model<LoginLog> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会话ID
|
||||
*/
|
||||
@TableField("session_id")
|
||||
private String sessionId;
|
||||
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
@TableField("account_id")
|
||||
private Long accountId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
@TableField("corp_id")
|
||||
private Long corpId;
|
||||
|
||||
/**
|
||||
* 医院ID
|
||||
*/
|
||||
@TableField("hospital_id")
|
||||
private Long hospitalId;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
@TableField("org_id")
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
@TableField("account")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField("mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("corp_name")
|
||||
private String corpName;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@TableField("hospital_name")
|
||||
private String hospitalName;
|
||||
|
||||
/**
|
||||
* 组织名称,存放平台组织或者医院科室或者公司门店
|
||||
*/
|
||||
@TableField("org_name")
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 用户类型:1、平台用户,2、公司用户,3、医院用户,4、患者
|
||||
*/
|
||||
@TableField("user_type")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 应用类型:1、pc,2、app,3、wechat,4、miniapp
|
||||
*/
|
||||
@TableField("app_type")
|
||||
private Integer appType;
|
||||
|
||||
/**
|
||||
* 应用编码:暂未使用
|
||||
*/
|
||||
@TableField("app_code")
|
||||
private Integer appCode;
|
||||
|
||||
/**
|
||||
* 登录类型:1、自主登录,2、漫游登录
|
||||
*/
|
||||
@TableField("login_type")
|
||||
private Integer loginType;
|
||||
|
||||
/**
|
||||
* 退出类型:1、自主退出,2、管理退出,3,超时退出
|
||||
*/
|
||||
@TableField("logout_type")
|
||||
private Integer logoutType;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
@TableField("login_time")
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
/**
|
||||
* 退出时间
|
||||
*/
|
||||
@TableField("logout_time")
|
||||
private LocalDateTime logoutTime;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@TableField("device_class")
|
||||
private String deviceClass;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("device_name")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
@TableField("device_brand")
|
||||
private String deviceBrand;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@TableField("os")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 浏览器
|
||||
*/
|
||||
@TableField("browser")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@TableField("country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@TableField("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 地市
|
||||
*/
|
||||
@TableField("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
@TableField("county")
|
||||
private String county;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 精度
|
||||
*/
|
||||
@TableField("lng")
|
||||
private String lng;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("lat")
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 网络服务提供商
|
||||
*/
|
||||
@TableField("isp")
|
||||
private String isp;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@TableField("ip")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 用户代理,存放用户登录时客户端信息
|
||||
*/
|
||||
@TableField("user_agent")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 退出地址
|
||||
*/
|
||||
@TableField("logout_address")
|
||||
private String logoutAddress;
|
||||
|
||||
/**
|
||||
* 退出IP地址
|
||||
*/
|
||||
@TableField("logout_ip")
|
||||
private String logoutIp;
|
||||
|
||||
/**
|
||||
* 退出用户代理,存放用户退出时客户端信息
|
||||
*/
|
||||
@TableField("logout_user_agent")
|
||||
private String logoutUserAgent;
|
||||
|
||||
/**
|
||||
* 异常状态:0、正常,1、省份异常,2、地市异常,3、区县异常
|
||||
*/
|
||||
@TableField("abnormal_status")
|
||||
private Integer abnormalStatus;
|
||||
|
||||
/**
|
||||
* ip转地址状态:0、未获取,1、登录地址获取成功,2、退出地址获取成功,-1、登录地址获取失败,-2、退出地址获取失败
|
||||
*/
|
||||
@TableField("ip_to_address_status")
|
||||
private Integer ipToAddressStatus;
|
||||
|
||||
/**
|
||||
* ip转地址次数,最多转换3次,三次失败修改状态为失败(-1、-2)
|
||||
*/
|
||||
@TableField("ip_to_address_count")
|
||||
private Integer ipToAddressCount;
|
||||
|
||||
/**
|
||||
* ip转地址时间
|
||||
*/
|
||||
@TableField("ip_to_address_time")
|
||||
private LocalDateTime ipToAddressTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String SESSION_ID = "session_id";
|
||||
|
||||
public static final String ACCOUNT_ID = "account_id";
|
||||
|
||||
public static final String USER_ID = "user_id";
|
||||
|
||||
public static final String CORP_ID = "corp_id";
|
||||
|
||||
public static final String HOSPITAL_ID = "hospital_id";
|
||||
|
||||
public static final String ORG_ID = "org_id";
|
||||
|
||||
public static final String ACCOUNT = "account";
|
||||
|
||||
public static final String MOBILE = "mobile";
|
||||
|
||||
public static final String USER_NAME = "user_name";
|
||||
|
||||
public static final String CORP_NAME = "corp_name";
|
||||
|
||||
public static final String HOSPITAL_NAME = "hospital_name";
|
||||
|
||||
public static final String ORG_NAME = "org_name";
|
||||
|
||||
public static final String USER_TYPE = "user_type";
|
||||
|
||||
public static final String APP_TYPE = "app_type";
|
||||
|
||||
public static final String APP_CODE = "app_code";
|
||||
|
||||
public static final String LOGIN_TYPE = "login_type";
|
||||
|
||||
public static final String LOGOUT_TYPE = "logout_type";
|
||||
|
||||
public static final String LOGIN_TIME = "login_time";
|
||||
|
||||
public static final String LOGOUT_TIME = "logout_time";
|
||||
|
||||
public static final String DEVICE_CLASS = "device_class";
|
||||
|
||||
public static final String DEVICE_NAME = "device_name";
|
||||
|
||||
public static final String DEVICE_BRAND = "device_brand";
|
||||
|
||||
public static final String OS = "os";
|
||||
|
||||
public static final String BROWSER = "browser";
|
||||
|
||||
public static final String COUNTRY = "country";
|
||||
|
||||
public static final String PROVINCE = "province";
|
||||
|
||||
public static final String CITY = "city";
|
||||
|
||||
public static final String COUNTY = "county";
|
||||
|
||||
public static final String ADDRESS = "address";
|
||||
|
||||
public static final String LNG = "lng";
|
||||
|
||||
public static final String LAT = "lat";
|
||||
|
||||
public static final String ISP = "isp";
|
||||
|
||||
public static final String IP = "ip";
|
||||
|
||||
public static final String USER_AGENT = "user_agent";
|
||||
|
||||
public static final String LOGOUT_ADDRESS = "logout_address";
|
||||
|
||||
public static final String LOGOUT_IP = "logout_ip";
|
||||
|
||||
public static final String LOGOUT_USER_AGENT = "logout_user_agent";
|
||||
|
||||
public static final String ABNORMAL_STATUS = "abnormal_status";
|
||||
|
||||
public static final String IP_TO_ADDRESS_STATUS = "ip_to_address_status";
|
||||
|
||||
public static final String IP_TO_ADDRESS_COUNT = "ip_to_address_count";
|
||||
|
||||
public static final String IP_TO_ADDRESS_TIME = "ip_to_address_time";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,390 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 登录会话表,存放在线用户信息
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_login_session")
|
||||
public class LoginSession extends Model<LoginSession> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会话ID
|
||||
*/
|
||||
@TableField("session_id")
|
||||
private String sessionId;
|
||||
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
@TableField("account_id")
|
||||
private Long accountId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 公司ID
|
||||
*/
|
||||
@TableField("corp_id")
|
||||
private Long corpId;
|
||||
|
||||
/**
|
||||
* 医院ID
|
||||
*/
|
||||
@TableField("hospital_id")
|
||||
private Long hospitalId;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
@TableField("org_id")
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
@TableField("account")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField("mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 用户名称
|
||||
*/
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 公司名称
|
||||
*/
|
||||
@TableField("corp_name")
|
||||
private String corpName;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
*/
|
||||
@TableField("hospital_name")
|
||||
private String hospitalName;
|
||||
|
||||
/**
|
||||
* 组织名称,存放平台组织或者医院科室或者公司门店
|
||||
*/
|
||||
@TableField("org_name")
|
||||
private String orgName;
|
||||
|
||||
/**
|
||||
* 用户类型:1、平台用户,2、公司用户,3、医院用户,4、患者
|
||||
*/
|
||||
@TableField("user_type")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 应用类型:1、pc,2、app,3、wechat,4、miniapp
|
||||
*/
|
||||
@TableField("app_type")
|
||||
private Integer appType;
|
||||
|
||||
/**
|
||||
* 应用编码:暂未使用
|
||||
*/
|
||||
@TableField("app_code")
|
||||
private Integer appCode;
|
||||
|
||||
/**
|
||||
* 登录类型:1、自主登录,2、漫游登录
|
||||
*/
|
||||
@TableField("login_type")
|
||||
private Integer loginType;
|
||||
|
||||
/**
|
||||
* 登录时间
|
||||
*/
|
||||
@TableField("login_time")
|
||||
private LocalDateTime loginTime;
|
||||
|
||||
/**
|
||||
* 设备类型
|
||||
*/
|
||||
@TableField("device_class")
|
||||
private String deviceClass;
|
||||
|
||||
/**
|
||||
* 设备名称
|
||||
*/
|
||||
@TableField("device_name")
|
||||
private String deviceName;
|
||||
|
||||
/**
|
||||
* 设备品牌
|
||||
*/
|
||||
@TableField("device_brand")
|
||||
private String deviceBrand;
|
||||
|
||||
/**
|
||||
* 操作系统
|
||||
*/
|
||||
@TableField("os")
|
||||
private String os;
|
||||
|
||||
/**
|
||||
* 浏览器
|
||||
*/
|
||||
@TableField("browser")
|
||||
private String browser;
|
||||
|
||||
/**
|
||||
* 国家
|
||||
*/
|
||||
@TableField("country")
|
||||
private String country;
|
||||
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@TableField("province")
|
||||
private String province;
|
||||
|
||||
/**
|
||||
* 地市
|
||||
*/
|
||||
@TableField("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区县
|
||||
*/
|
||||
@TableField("county")
|
||||
private String county;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 精度
|
||||
*/
|
||||
@TableField("lng")
|
||||
private String lng;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("lat")
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 网络服务提供商
|
||||
*/
|
||||
@TableField("isp")
|
||||
private String isp;
|
||||
|
||||
/**
|
||||
* IP地址
|
||||
*/
|
||||
@TableField("ip")
|
||||
private String ip;
|
||||
|
||||
/**
|
||||
* 用户代理,存放用户登录时客户端信息
|
||||
*/
|
||||
@TableField("user_agent")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* ip转地址状态:0、未获取,1、登录地址获取成功,2、退出地址获取成功,-1、登录地址获取失败,-2、退出地址获取失败
|
||||
*/
|
||||
@TableField("ip_to_address_status")
|
||||
private Integer ipToAddressStatus;
|
||||
|
||||
/**
|
||||
* ip转地址次数,最多转换3次,三次失败修改状态为失败(-1、-2)
|
||||
*/
|
||||
@TableField("ip_to_address_count")
|
||||
private Integer ipToAddressCount;
|
||||
|
||||
/**
|
||||
* ip转地址时间
|
||||
*/
|
||||
@TableField("ip_to_address_time")
|
||||
private LocalDateTime ipToAddressTime;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String SESSION_ID = "session_id";
|
||||
|
||||
public static final String ACCOUNT_ID = "account_id";
|
||||
|
||||
public static final String USER_ID = "user_id";
|
||||
|
||||
public static final String CORP_ID = "corp_id";
|
||||
|
||||
public static final String HOSPITAL_ID = "hospital_id";
|
||||
|
||||
public static final String ORG_ID = "org_id";
|
||||
|
||||
public static final String ACCOUNT = "account";
|
||||
|
||||
public static final String MOBILE = "mobile";
|
||||
|
||||
public static final String USER_NAME = "user_name";
|
||||
|
||||
public static final String CORP_NAME = "corp_name";
|
||||
|
||||
public static final String HOSPITAL_NAME = "hospital_name";
|
||||
|
||||
public static final String ORG_NAME = "org_name";
|
||||
|
||||
public static final String USER_TYPE = "user_type";
|
||||
|
||||
public static final String APP_TYPE = "app_type";
|
||||
|
||||
public static final String APP_CODE = "app_code";
|
||||
|
||||
public static final String LOGIN_TYPE = "login_type";
|
||||
|
||||
public static final String LOGIN_TIME = "login_time";
|
||||
|
||||
public static final String DEVICE_CLASS = "device_class";
|
||||
|
||||
public static final String DEVICE_NAME = "device_name";
|
||||
|
||||
public static final String DEVICE_BRAND = "device_brand";
|
||||
|
||||
public static final String OS = "os";
|
||||
|
||||
public static final String BROWSER = "browser";
|
||||
|
||||
public static final String COUNTRY = "country";
|
||||
|
||||
public static final String PROVINCE = "province";
|
||||
|
||||
public static final String CITY = "city";
|
||||
|
||||
public static final String COUNTY = "county";
|
||||
|
||||
public static final String ADDRESS = "address";
|
||||
|
||||
public static final String LNG = "lng";
|
||||
|
||||
public static final String LAT = "lat";
|
||||
|
||||
public static final String ISP = "isp";
|
||||
|
||||
public static final String IP = "ip";
|
||||
|
||||
public static final String USER_AGENT = "user_agent";
|
||||
|
||||
public static final String IP_TO_ADDRESS_STATUS = "ip_to_address_status";
|
||||
|
||||
public static final String IP_TO_ADDRESS_COUNT = "ip_to_address_count";
|
||||
|
||||
public static final String IP_TO_ADDRESS_TIME = "ip_to_address_time";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 资源表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_resource")
|
||||
public class Resource extends Model<Resource> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 服务ID
|
||||
*/
|
||||
@TableField("service_id")
|
||||
private Long serviceId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 请求地址,可以用于前端ajax调用,后端用于做权限控制
|
||||
*/
|
||||
@TableField("url")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
|
||||
*/
|
||||
@TableField("method")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 子系统:0、common,1、platform,2、partner,3、hospital,4、patient 用于限定维护菜单资源关系,公共资源允许所有菜单关联,其他资源只允许对应的菜单关联,如:平台菜单只允许关联到公共资源和平台资源
|
||||
*/
|
||||
@TableField("subsystem")
|
||||
private Integer subsystem;
|
||||
|
||||
/**
|
||||
* 分类:0、common,1、pc,2、app,3、wechat,4、miniapp
|
||||
*/
|
||||
@TableField("category")
|
||||
private Integer category;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String SERVICE_ID = "service_id";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String URL = "url";
|
||||
|
||||
public static final String METHOD = "method";
|
||||
|
||||
public static final String SUBSYSTEM = "subsystem";
|
||||
|
||||
public static final String CATEGORY = "category";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_service")
|
||||
public class Service extends Model<Service> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信验证码表,过期时间和使用状态可以不用
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sms_code")
|
||||
public class SmsCode extends Model<SmsCode> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 手机号码
|
||||
*/
|
||||
@TableField("mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 1、注册 2、找回密码 3、动态密码
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 过期时间
|
||||
*/
|
||||
@TableField("expires_time")
|
||||
private LocalDateTime expiresTime;
|
||||
|
||||
/**
|
||||
* 使用状态:0、未使用,1、已使用
|
||||
*/
|
||||
@TableField("used_status")
|
||||
private Integer usedStatus;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String MOBILE = "mobile";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String EXPIRES_TIME = "expires_time";
|
||||
|
||||
public static final String USED_STATUS = "used_status";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信场景表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sms_scene")
|
||||
public class SmsScene extends Model<SmsScene> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公司ID,0为公用,默认使用0对应的短信场景
|
||||
*/
|
||||
@TableField("corp_id")
|
||||
private Long corpId;
|
||||
|
||||
/**
|
||||
* 场景类型 0、其他/未分类 1、注册 2、找回密码 3、动态密码 4、订单 5、支付 6、报告单 9、系统通知
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 场景编码,业务系统根据该编码区分不同的业务场景
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 场景名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 短信签名ID
|
||||
*/
|
||||
@TableField("sign_id")
|
||||
private Long signId;
|
||||
|
||||
/**
|
||||
* 短信模板ID
|
||||
*/
|
||||
@TableField("template_id")
|
||||
private Long templateId;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String CORP_ID = "corp_id";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String SIGN_ID = "sign_id";
|
||||
|
||||
public static final String TEMPLATE_ID = "template_id";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信发送表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sms_send")
|
||||
public class SmsSend extends Model<SmsSend> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公司ID,0为公用,默认使用0对应的短信场景
|
||||
*/
|
||||
@TableField("corp_id")
|
||||
private Long corpId;
|
||||
|
||||
/**
|
||||
* 短信场景ID
|
||||
*/
|
||||
@TableField("scene_id")
|
||||
private Long sceneId;
|
||||
|
||||
/**
|
||||
* 模板编号,第三方模板编码,如阿里云短信模板code
|
||||
*/
|
||||
@TableField("template_code")
|
||||
private String templateCode;
|
||||
|
||||
/**
|
||||
* 短信类型 0、其他/未分类 1、注册 2、找回密码 3、动态密码 4、订单 5、支付 6、报告单 9、系统通知
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 手机号码,多个号码用户英文逗号(,)分隔
|
||||
*/
|
||||
@TableField("mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 短信内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 关联ID,如:用户ID、订单ID等
|
||||
*/
|
||||
@TableField("relation_id")
|
||||
private String relationId;
|
||||
|
||||
/**
|
||||
* 短信接口测ID
|
||||
*/
|
||||
@TableField("sid")
|
||||
private String sid;
|
||||
|
||||
/**
|
||||
* 发送条数
|
||||
*/
|
||||
@TableField("send")
|
||||
private Integer send;
|
||||
|
||||
/**
|
||||
* 短信接口结果码
|
||||
*/
|
||||
@TableField("result_code")
|
||||
private String resultCode;
|
||||
|
||||
/**
|
||||
* 短信接口结果说明
|
||||
*/
|
||||
@TableField("result_info")
|
||||
private String resultInfo;
|
||||
|
||||
/**
|
||||
* 短信接口响应消息,完整的响应包
|
||||
*/
|
||||
@TableField("response")
|
||||
private String response;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String CORP_ID = "corp_id";
|
||||
|
||||
public static final String SCENE_ID = "scene_id";
|
||||
|
||||
public static final String TEMPLATE_CODE = "template_code";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String MOBILE = "mobile";
|
||||
|
||||
public static final String CONTENT = "content";
|
||||
|
||||
public static final String RELATION_ID = "relation_id";
|
||||
|
||||
public static final String SID = "sid";
|
||||
|
||||
public static final String SEND = "send";
|
||||
|
||||
public static final String RESULT_CODE = "result_code";
|
||||
|
||||
public static final String RESULT_INFO = "result_info";
|
||||
|
||||
public static final String RESPONSE = "response";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信签名表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sms_sign")
|
||||
public class SmsSign extends Model<SmsSign> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 签名名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@TableField("apply_time")
|
||||
private LocalDateTime applyTime;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String APPLY_TIME = "apply_time";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信模板表,用于定义阿里云短信模板
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sms_template")
|
||||
public class SmsTemplate extends Model<SmsTemplate> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 模板类型:1、验证码,2、短信通知
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 模板编号,第三方模板编码,如阿里云短信模板code
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 模板名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 模板内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 模板描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@TableField("apply_time")
|
||||
private LocalDateTime applyTime;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String CONTENT = "content";
|
||||
|
||||
public static final String DESCRIPTION = "description";
|
||||
|
||||
public static final String APPLY_TIME = "apply_time";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,160 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 数据字典表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_dict_data")
|
||||
public class SysDictData extends Model<SysDictData> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 字典类型ID
|
||||
*/
|
||||
@TableField("dict_type_id")
|
||||
private Long dictTypeId;
|
||||
|
||||
/**
|
||||
* 数据字典类型编号
|
||||
*/
|
||||
@TableField("type_code")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 数据字典类型名称
|
||||
*/
|
||||
@TableField("type_name")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 数据字典编号
|
||||
*/
|
||||
@TableField("data_code")
|
||||
private String dataCode;
|
||||
|
||||
/**
|
||||
* 数据字典名称
|
||||
*/
|
||||
@TableField("data_name")
|
||||
private String dataName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String DICT_TYPE_ID = "dict_type_id";
|
||||
|
||||
public static final String TYPE_CODE = "type_code";
|
||||
|
||||
public static final String TYPE_NAME = "type_name";
|
||||
|
||||
public static final String DATA_CODE = "data_code";
|
||||
|
||||
public static final String DATA_NAME = "data_name";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 数据字典类型表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_dict_type")
|
||||
public class SysDictType extends Model<SysDictType> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 数据字典类型
|
||||
*/
|
||||
@TableField("type_code")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@TableField("type_name")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String TYPE_CODE = "type_code";
|
||||
|
||||
public static final String TYPE_NAME = "type_name";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 文件表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_file")
|
||||
public class SysFile extends Model<SysFile> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 文件类型编号 如病例ID
|
||||
*/
|
||||
@TableField("type_code")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 文件编号
|
||||
*/
|
||||
@TableField("file_code")
|
||||
private String fileCode;
|
||||
|
||||
/**
|
||||
* 文件名称
|
||||
*/
|
||||
@TableField("file_name")
|
||||
private String fileName;
|
||||
|
||||
/**
|
||||
* 文件路径URL
|
||||
*/
|
||||
@TableField("file_url")
|
||||
private String fileUrl;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String TYPE_CODE = "type_code";
|
||||
|
||||
public static final String FILE_CODE = "file_code";
|
||||
|
||||
public static final String FILE_NAME = "file_name";
|
||||
|
||||
public static final String FILE_URL = "file_url";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 文件类型表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_file_type")
|
||||
public class SysFileType extends Model<SysFileType> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 文件类型编号
|
||||
*/
|
||||
@TableField("type_code")
|
||||
private String typeCode;
|
||||
|
||||
/**
|
||||
* 文件类型名称
|
||||
*/
|
||||
@TableField("type_name")
|
||||
private String typeName;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String TYPE_CODE = "type_code";
|
||||
|
||||
public static final String TYPE_NAME = "type_name";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_menu")
|
||||
public class SysMenu extends Model<SysMenu> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父菜单ID
|
||||
*/
|
||||
@TableField("parent_id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 菜单编码
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 菜单名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 菜单图标
|
||||
*/
|
||||
@TableField("icon")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 链接地址,可以是页面地址,也可以是函数事件
|
||||
*/
|
||||
@TableField("href")
|
||||
private String href;
|
||||
|
||||
/**
|
||||
* 请求地址,可以用于前端ajax调用,后端用于做权限控制
|
||||
*/
|
||||
@TableField("url")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
|
||||
*/
|
||||
@TableField("method")
|
||||
private String method;
|
||||
|
||||
/**
|
||||
* 权限,可以有多个,用逗号分隔,可用于第三方权限框架扩展
|
||||
*/
|
||||
@TableField("permission")
|
||||
private String permission;
|
||||
|
||||
/**
|
||||
* 分类:1、pc,2、app,3、wechat,4、miniapp
|
||||
*/
|
||||
@TableField("category")
|
||||
private Integer category;
|
||||
|
||||
/**
|
||||
* 类型:1、module,2、menu,3、button
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 层级,从1开始
|
||||
*/
|
||||
@TableField("level")
|
||||
private Integer level;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
@TableField("order_num")
|
||||
private Integer orderNum;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String PARENT_ID = "parent_id";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String ICON = "icon";
|
||||
|
||||
public static final String HREF = "href";
|
||||
|
||||
public static final String URL = "url";
|
||||
|
||||
public static final String METHOD = "method";
|
||||
|
||||
public static final String PERMISSION = "permission";
|
||||
|
||||
public static final String CATEGORY = "category";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String LEVEL = "level";
|
||||
|
||||
public static final String ORDER_NUM = "order_num";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单资源关系表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_menu_resource")
|
||||
public class SysMenuResource extends Model<SysMenuResource> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@TableField("menu_id")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 资源ID
|
||||
*/
|
||||
@TableField("resource_id")
|
||||
private Long resourceId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String MENU_ID = "menu_id";
|
||||
|
||||
public static final String RESOURCE_ID = "resource_id";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统组织表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_org")
|
||||
public class SysOrg extends Model<SysOrg> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 父组织ID
|
||||
*/
|
||||
@TableField("parent_id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 家谱ID,格式:/rootId/.../grandfatherId/parentId
|
||||
*/
|
||||
@TableField("genealogy_id")
|
||||
private String genealogyId;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@TableField("contact")
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String PARENT_ID = "parent_id";
|
||||
|
||||
public static final String GENEALOGY_ID = "genealogy_id";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String CONTACT = "contact";
|
||||
|
||||
public static final String PHONE = "phone";
|
||||
|
||||
public static final String ADDRESS = "address";
|
||||
|
||||
public static final String EMAIL = "email";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 岗位表,需根据岗位编码判断用户是否有销售、物流权限
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_post")
|
||||
public class SysPost extends Model<SysPost> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 上级岗位ID,第一个岗位的上级岗位ID填0
|
||||
*/
|
||||
@TableField("parent_id")
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 类型:0、内部岗位,1、代理商岗位
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 编码: 内部岗位:省区经理、provincial_manager,地市主管、area_manager,业务员、sale 代理商岗位:代理商、agent
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 预设标志:1 预设 0 非预设
|
||||
*/
|
||||
@TableField("preset")
|
||||
private Integer preset;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String PARENT_ID = "parent_id";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String PRESET = "preset";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_role")
|
||||
public class SysRole extends Model<SysRole> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色编码
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 角色名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 类型:1、平台,2、药店,3、医院
|
||||
*/
|
||||
@TableField("type")
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 分类:1、pc,2、app,3、wechat,4、miniapp
|
||||
*/
|
||||
@TableField("category")
|
||||
private Integer category;
|
||||
|
||||
/**
|
||||
* 管理角色标志:1 管理角色0 非管理角色,管理角色不允许修改角色菜单关系
|
||||
*/
|
||||
@TableField("manager_flag")
|
||||
private Integer managerFlag;
|
||||
|
||||
/**
|
||||
* 预设角色标志:1 预设 0 非预设
|
||||
*/
|
||||
@TableField("preset")
|
||||
private Integer preset;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String TYPE = "type";
|
||||
|
||||
public static final String CATEGORY = "category";
|
||||
|
||||
public static final String MANAGER_FLAG = "manager_flag";
|
||||
|
||||
public static final String PRESET = "preset";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色菜单关系表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_role_menu")
|
||||
public class SysRoleMenu extends Model<SysRoleMenu> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@TableField("role_id")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 菜单ID
|
||||
*/
|
||||
@TableField("menu_id")
|
||||
private Long menuId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String ROLE_ID = "role_id";
|
||||
|
||||
public static final String MENU_ID = "menu_id";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDate;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统用户表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_user")
|
||||
public class SysUser extends Model<SysUser> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 组织ID
|
||||
*/
|
||||
@TableField("org_id")
|
||||
private Long orgId;
|
||||
|
||||
/**
|
||||
* 帐号
|
||||
*/
|
||||
@TableField("account")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 密码,存放加密后的密码,加密方式:md5(password+nonce_str),转成小写存储
|
||||
*/
|
||||
@TableField("password")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
@TableField("code")
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 性别:1、男性,2、女性,0、未知
|
||||
*/
|
||||
@TableField("sex")
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 系统用户手机号
|
||||
*/
|
||||
@TableField("mobile")
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 电话号码
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
@TableField("idcard")
|
||||
private String idcard;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
@TableField("birthday")
|
||||
private LocalDate birthday;
|
||||
|
||||
/**
|
||||
* 系统用户邮箱
|
||||
*/
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@TableField("portrait")
|
||||
private String portrait;
|
||||
|
||||
/**
|
||||
* 微信
|
||||
*/
|
||||
@TableField("wechat")
|
||||
private String wechat;
|
||||
|
||||
/**
|
||||
* QQ
|
||||
*/
|
||||
@TableField("qq")
|
||||
private String qq;
|
||||
|
||||
/**
|
||||
* 联系地址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 密码随机串,用于加密明文密码
|
||||
*/
|
||||
@TableField("nonce_str")
|
||||
private String nonceStr;
|
||||
|
||||
/**
|
||||
* 修改密码时间
|
||||
*/
|
||||
@TableField("modify_password_time")
|
||||
private LocalDateTime modifyPasswordTime;
|
||||
|
||||
/**
|
||||
* 手机号码是否激活:0、未激活,1、激活,根据是否使用过短信验证码登录确认是否激活状态
|
||||
*/
|
||||
@TableField("mobile_enabled")
|
||||
private Integer mobileEnabled;
|
||||
|
||||
/**
|
||||
* 启用状态:0 、停用,1、启用
|
||||
*/
|
||||
@TableField("enabled")
|
||||
private Integer enabled;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String ORG_ID = "org_id";
|
||||
|
||||
public static final String ACCOUNT = "account";
|
||||
|
||||
public static final String PASSWORD = "password";
|
||||
|
||||
public static final String CODE = "code";
|
||||
|
||||
public static final String NAME = "name";
|
||||
|
||||
public static final String SEX = "sex";
|
||||
|
||||
public static final String MOBILE = "mobile";
|
||||
|
||||
public static final String PHONE = "phone";
|
||||
|
||||
public static final String IDCARD = "idcard";
|
||||
|
||||
public static final String BIRTHDAY = "birthday";
|
||||
|
||||
public static final String EMAIL = "email";
|
||||
|
||||
public static final String PORTRAIT = "portrait";
|
||||
|
||||
public static final String WECHAT = "wechat";
|
||||
|
||||
public static final String QQ = "qq";
|
||||
|
||||
public static final String ADDRESS = "address";
|
||||
|
||||
public static final String NONCE_STR = "nonce_str";
|
||||
|
||||
public static final String MODIFY_PASSWORD_TIME = "modify_password_time";
|
||||
|
||||
public static final String MOBILE_ENABLED = "mobile_enabled";
|
||||
|
||||
public static final String ENABLED = "enabled";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位关系表,先限定一个用只有一种岗位
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_user_post")
|
||||
public class SysUserPost extends Model<SysUserPost> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 岗位ID
|
||||
*/
|
||||
@TableField("post_id")
|
||||
private Long postId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String USER_ID = "user_id";
|
||||
|
||||
public static final String POST_ID = "post_id";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户角色关系表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_sys_user_role")
|
||||
public class SysUserRole extends Model<SysUserRole> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键,自增
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
@TableField("role_id")
|
||||
private Long roleId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String USER_ID = "user_id";
|
||||
|
||||
public static final String ROLE_ID = "role_id";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,208 @@
|
||||
package com.mt.wms.core.dal.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板消息表
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("t_wechat_template_message")
|
||||
public class WechatTemplateMessage extends Model<WechatTemplateMessage> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 账号ID
|
||||
*/
|
||||
@TableField("account_id")
|
||||
private Long accountId;
|
||||
|
||||
/**
|
||||
* 用户类型 1、平台 2、药店 3、医院 4、患者
|
||||
*/
|
||||
@TableField("user_type")
|
||||
private Integer userType;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 微信用户ID
|
||||
*/
|
||||
@TableField("open_id")
|
||||
private String openId;
|
||||
|
||||
/**
|
||||
* 消息模板ID
|
||||
*/
|
||||
@TableField("template_id")
|
||||
private String templateId;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 链接地址
|
||||
*/
|
||||
@TableField("url")
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* 消息ID
|
||||
*/
|
||||
@TableField("message_id")
|
||||
private String messageId;
|
||||
|
||||
/**
|
||||
* 状态 0、未发送 1、发送中 2、已发送 -1、失败
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 预留字段
|
||||
*/
|
||||
@TableField("reserved")
|
||||
private String reserved;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("remark")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志,是否有效:1 可用 0不可用
|
||||
*/
|
||||
@TableField("valid")
|
||||
@TableLogic
|
||||
private Integer valid;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@TableField("creator")
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
@TableField("creator_name")
|
||||
private String creatorName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@TableField("updater")
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* 更新人姓名
|
||||
*/
|
||||
@TableField("updater_name")
|
||||
private String updaterName;
|
||||
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
@TableField("version")
|
||||
@Version
|
||||
private Integer version;
|
||||
|
||||
|
||||
public static final String ID = "id";
|
||||
|
||||
public static final String ACCOUNT_ID = "account_id";
|
||||
|
||||
public static final String USER_TYPE = "user_type";
|
||||
|
||||
public static final String USER_ID = "user_id";
|
||||
|
||||
public static final String OPEN_ID = "open_id";
|
||||
|
||||
public static final String TEMPLATE_ID = "template_id";
|
||||
|
||||
public static final String TITLE = "title";
|
||||
|
||||
public static final String CONTENT = "content";
|
||||
|
||||
public static final String URL = "url";
|
||||
|
||||
public static final String MESSAGE_ID = "message_id";
|
||||
|
||||
public static final String STATUS = "status";
|
||||
|
||||
public static final String RESERVED = "reserved";
|
||||
|
||||
public static final String REMARK = "remark";
|
||||
|
||||
public static final String VALID = "valid";
|
||||
|
||||
public static final String CREATOR = "creator";
|
||||
|
||||
public static final String CREATOR_NAME = "creator_name";
|
||||
|
||||
public static final String CREATE_TIME = "create_time";
|
||||
|
||||
public static final String UPDATER = "updater";
|
||||
|
||||
public static final String UPDATER_NAME = "updater_name";
|
||||
|
||||
public static final String UPDATE_TIME = "update_time";
|
||||
|
||||
public static final String VERSION = "version";
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.LoginLog;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 登录日志表,存放历史会话信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface LoginLogMapper extends BaseMapper<LoginLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.LoginLogMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.LoginLog">
|
||||
<id column="id" property="id" />
|
||||
<result column="session_id" property="sessionId" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="corp_id" property="corpId" />
|
||||
<result column="hospital_id" property="hospitalId" />
|
||||
<result column="org_id" property="orgId" />
|
||||
<result column="account" property="account" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="corp_name" property="corpName" />
|
||||
<result column="hospital_name" property="hospitalName" />
|
||||
<result column="org_name" property="orgName" />
|
||||
<result column="user_type" property="userType" />
|
||||
<result column="app_type" property="appType" />
|
||||
<result column="app_code" property="appCode" />
|
||||
<result column="login_type" property="loginType" />
|
||||
<result column="logout_type" property="logoutType" />
|
||||
<result column="login_time" property="loginTime" />
|
||||
<result column="logout_time" property="logoutTime" />
|
||||
<result column="device_class" property="deviceClass" />
|
||||
<result column="device_name" property="deviceName" />
|
||||
<result column="device_brand" property="deviceBrand" />
|
||||
<result column="os" property="os" />
|
||||
<result column="browser" property="browser" />
|
||||
<result column="country" property="country" />
|
||||
<result column="province" property="province" />
|
||||
<result column="city" property="city" />
|
||||
<result column="county" property="county" />
|
||||
<result column="address" property="address" />
|
||||
<result column="lng" property="lng" />
|
||||
<result column="lat" property="lat" />
|
||||
<result column="isp" property="isp" />
|
||||
<result column="ip" property="ip" />
|
||||
<result column="user_agent" property="userAgent" />
|
||||
<result column="logout_address" property="logoutAddress" />
|
||||
<result column="logout_ip" property="logoutIp" />
|
||||
<result column="logout_user_agent" property="logoutUserAgent" />
|
||||
<result column="abnormal_status" property="abnormalStatus" />
|
||||
<result column="ip_to_address_status" property="ipToAddressStatus" />
|
||||
<result column="ip_to_address_count" property="ipToAddressCount" />
|
||||
<result column="ip_to_address_time" property="ipToAddressTime" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, session_id, account_id, user_id, corp_id, hospital_id, org_id, account, mobile, user_name, corp_name, hospital_name, org_name, user_type, app_type, app_code, login_type, logout_type, login_time, logout_time, device_class, device_name, device_brand, os, browser, country, province, city, county, address, lng, lat, isp, ip, user_agent, logout_address, logout_ip, logout_user_agent, abnormal_status, ip_to_address_status, ip_to_address_count, ip_to_address_time, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.LoginSession;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 登录会话表,存放在线用户信息 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface LoginSessionMapper extends BaseMapper<LoginSession> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.LoginSessionMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.LoginSession">
|
||||
<id column="id" property="id" />
|
||||
<result column="session_id" property="sessionId" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="corp_id" property="corpId" />
|
||||
<result column="hospital_id" property="hospitalId" />
|
||||
<result column="org_id" property="orgId" />
|
||||
<result column="account" property="account" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="user_name" property="userName" />
|
||||
<result column="corp_name" property="corpName" />
|
||||
<result column="hospital_name" property="hospitalName" />
|
||||
<result column="org_name" property="orgName" />
|
||||
<result column="user_type" property="userType" />
|
||||
<result column="app_type" property="appType" />
|
||||
<result column="app_code" property="appCode" />
|
||||
<result column="login_type" property="loginType" />
|
||||
<result column="login_time" property="loginTime" />
|
||||
<result column="device_class" property="deviceClass" />
|
||||
<result column="device_name" property="deviceName" />
|
||||
<result column="device_brand" property="deviceBrand" />
|
||||
<result column="os" property="os" />
|
||||
<result column="browser" property="browser" />
|
||||
<result column="country" property="country" />
|
||||
<result column="province" property="province" />
|
||||
<result column="city" property="city" />
|
||||
<result column="county" property="county" />
|
||||
<result column="address" property="address" />
|
||||
<result column="lng" property="lng" />
|
||||
<result column="lat" property="lat" />
|
||||
<result column="isp" property="isp" />
|
||||
<result column="ip" property="ip" />
|
||||
<result column="user_agent" property="userAgent" />
|
||||
<result column="ip_to_address_status" property="ipToAddressStatus" />
|
||||
<result column="ip_to_address_count" property="ipToAddressCount" />
|
||||
<result column="ip_to_address_time" property="ipToAddressTime" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, session_id, account_id, user_id, corp_id, hospital_id, org_id, account, mobile, user_name, corp_name, hospital_name, org_name, user_type, app_type, app_code, login_type, login_time, device_class, device_name, device_brand, os, browser, country, province, city, county, address, lng, lat, isp, ip, user_agent, ip_to_address_status, ip_to_address_count, ip_to_address_time, remark, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.Resource;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 资源表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface ResourceMapper extends BaseMapper<Resource> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.ResourceMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.Resource">
|
||||
<id column="id" property="id" />
|
||||
<result column="service_id" property="serviceId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="url" property="url" />
|
||||
<result column="method" property="method" />
|
||||
<result column="subsystem" property="subsystem" />
|
||||
<result column="category" property="category" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, service_id, name, url, method, subsystem, category, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.Service;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface ServiceMapper extends BaseMapper<Service> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.ServiceMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.Service">
|
||||
<id column="id" property="id" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, code, name, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SmsCode;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信验证码表,过期时间和使用状态可以不用 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SmsCodeMapper extends BaseMapper<SmsCode> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SmsCodeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SmsCode">
|
||||
<id column="id" property="id" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="code" property="code" />
|
||||
<result column="type" property="type" />
|
||||
<result column="expires_time" property="expiresTime" />
|
||||
<result column="used_status" property="usedStatus" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, mobile, code, type, expires_time, used_status, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SmsScene;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信场景表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SmsSceneMapper extends BaseMapper<SmsScene> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SmsSceneMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SmsScene">
|
||||
<id column="id" property="id" />
|
||||
<result column="corp_id" property="corpId" />
|
||||
<result column="type" property="type" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="sign_id" property="signId" />
|
||||
<result column="template_id" property="templateId" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, corp_id, type, code, name, sign_id, template_id, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SmsSend;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信发送表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SmsSendMapper extends BaseMapper<SmsSend> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SmsSendMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SmsSend">
|
||||
<id column="id" property="id" />
|
||||
<result column="corp_id" property="corpId" />
|
||||
<result column="scene_id" property="sceneId" />
|
||||
<result column="template_code" property="templateCode" />
|
||||
<result column="type" property="type" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="content" property="content" />
|
||||
<result column="relation_id" property="relationId" />
|
||||
<result column="sid" property="sid" />
|
||||
<result column="send" property="send" />
|
||||
<result column="result_code" property="resultCode" />
|
||||
<result column="result_info" property="resultInfo" />
|
||||
<result column="response" property="response" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, corp_id, scene_id, template_code, type, mobile, content, relation_id, sid, send, result_code, result_info, response, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SmsSign;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信签名表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SmsSignMapper extends BaseMapper<SmsSign> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SmsSignMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SmsSign">
|
||||
<id column="id" property="id" />
|
||||
<result column="name" property="name" />
|
||||
<result column="apply_time" property="applyTime" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, name, apply_time, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SmsTemplate;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 短信模板表,用于定义阿里云短信模板 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SmsTemplateMapper extends BaseMapper<SmsTemplate> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SmsTemplateMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SmsTemplate">
|
||||
<id column="id" property="id" />
|
||||
<result column="type" property="type" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="content" property="content" />
|
||||
<result column="description" property="description" />
|
||||
<result column="apply_time" property="applyTime" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, type, code, name, content, description, apply_time, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysDictData;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 数据字典表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysDictDataMapper extends BaseMapper<SysDictData> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysDictDataMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysDictData">
|
||||
<id column="id" property="id" />
|
||||
<result column="dict_type_id" property="dictTypeId" />
|
||||
<result column="type_code" property="typeCode" />
|
||||
<result column="type_name" property="typeName" />
|
||||
<result column="data_code" property="dataCode" />
|
||||
<result column="data_name" property="dataName" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, dict_type_id, type_code, type_name, data_code, data_name, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysDictType;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 数据字典类型表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysDictTypeMapper extends BaseMapper<SysDictType> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysDictTypeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysDictType">
|
||||
<id column="id" property="id" />
|
||||
<result column="type_code" property="typeCode" />
|
||||
<result column="type_name" property="typeName" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, type_code, type_name, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysFile;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 文件表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysFileMapper extends BaseMapper<SysFile> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysFileMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysFile">
|
||||
<id column="id" property="id" />
|
||||
<result column="type_code" property="typeCode" />
|
||||
<result column="file_code" property="fileCode" />
|
||||
<result column="file_name" property="fileName" />
|
||||
<result column="file_url" property="fileUrl" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, type_code, file_code, file_name, file_url, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysFileType;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 文件类型表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysFileTypeMapper extends BaseMapper<SysFileType> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysFileTypeMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysFileType">
|
||||
<id column="id" property="id" />
|
||||
<result column="type_code" property="typeCode" />
|
||||
<result column="type_name" property="typeName" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, type_code, type_name, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysMenuMapper extends BaseMapper<SysMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysMenuMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysMenu">
|
||||
<id column="id" property="id" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="icon" property="icon" />
|
||||
<result column="href" property="href" />
|
||||
<result column="url" property="url" />
|
||||
<result column="method" property="method" />
|
||||
<result column="permission" property="permission" />
|
||||
<result column="category" property="category" />
|
||||
<result column="type" property="type" />
|
||||
<result column="level" property="level" />
|
||||
<result column="order_num" property="orderNum" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, parent_id, code, name, icon, href, url, method, permission, category, type, level, order_num, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysMenuResource;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 菜单资源关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysMenuResourceMapper extends BaseMapper<SysMenuResource> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysMenuResourceMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysMenuResource">
|
||||
<id column="id" property="id" />
|
||||
<result column="menu_id" property="menuId" />
|
||||
<result column="resource_id" property="resourceId" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, menu_id, resource_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysOrg;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统组织表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysOrgMapper extends BaseMapper<SysOrg> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysOrgMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysOrg">
|
||||
<id column="id" property="id" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="genealogy_id" property="genealogyId" />
|
||||
<result column="name" property="name" />
|
||||
<result column="contact" property="contact" />
|
||||
<result column="phone" property="phone" />
|
||||
<result column="address" property="address" />
|
||||
<result column="email" property="email" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, parent_id, genealogy_id, name, contact, phone, address, email, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysPost;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 岗位表,需根据岗位编码判断用户是否有销售、物流权限 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysPostMapper extends BaseMapper<SysPost> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysPostMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysPost">
|
||||
<id column="id" property="id" />
|
||||
<result column="parent_id" property="parentId" />
|
||||
<result column="type" property="type" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="preset" property="preset" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, parent_id, type, code, name, preset, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysRole;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysRoleMapper extends BaseMapper<SysRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysRoleMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysRole">
|
||||
<id column="id" property="id" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="type" property="type" />
|
||||
<result column="category" property="category" />
|
||||
<result column="manager_flag" property="managerFlag" />
|
||||
<result column="preset" property="preset" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, code, name, type, category, manager_flag, preset, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysRoleMenu;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 角色菜单关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysRoleMenuMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysRoleMenu">
|
||||
<id column="id" property="id" />
|
||||
<result column="role_id" property="roleId" />
|
||||
<result column="menu_id" property="menuId" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, role_id, menu_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysUser;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 系统用户表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysUserMapper extends BaseMapper<SysUser> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysUserMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysUser">
|
||||
<id column="id" property="id" />
|
||||
<result column="org_id" property="orgId" />
|
||||
<result column="account" property="account" />
|
||||
<result column="password" property="password" />
|
||||
<result column="code" property="code" />
|
||||
<result column="name" property="name" />
|
||||
<result column="sex" property="sex" />
|
||||
<result column="mobile" property="mobile" />
|
||||
<result column="phone" property="phone" />
|
||||
<result column="idcard" property="idcard" />
|
||||
<result column="birthday" property="birthday" />
|
||||
<result column="email" property="email" />
|
||||
<result column="portrait" property="portrait" />
|
||||
<result column="wechat" property="wechat" />
|
||||
<result column="qq" property="qq" />
|
||||
<result column="address" property="address" />
|
||||
<result column="nonce_str" property="nonceStr" />
|
||||
<result column="modify_password_time" property="modifyPasswordTime" />
|
||||
<result column="mobile_enabled" property="mobileEnabled" />
|
||||
<result column="enabled" property="enabled" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, org_id, account, password, code, name, sex, mobile, phone, idcard, birthday, email, portrait, wechat, qq, address, nonce_str, modify_password_time, mobile_enabled, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysUserPost;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户岗位关系表,先限定一个用只有一种岗位 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysUserPostMapper extends BaseMapper<SysUserPost> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysUserPostMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysUserPost">
|
||||
<id column="id" property="id" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="post_id" property="postId" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, post_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.SysUserRole;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户角色关系表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface SysUserRoleMapper extends BaseMapper<SysUserRole> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.SysUserRoleMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.SysUserRole">
|
||||
<id column="id" property="id" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="role_id" property="roleId" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, user_id, role_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.mapper;
|
||||
|
||||
import com.mt.wms.core.dal.entity.WechatTemplateMessage;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 微信模板消息表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface WechatTemplateMessageMapper extends BaseMapper<WechatTemplateMessage> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.mt.wms.core.dal.mapper.WechatTemplateMessageMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.mt.wms.core.dal.entity.WechatTemplateMessage">
|
||||
<id column="id" property="id" />
|
||||
<result column="account_id" property="accountId" />
|
||||
<result column="user_type" property="userType" />
|
||||
<result column="user_id" property="userId" />
|
||||
<result column="open_id" property="openId" />
|
||||
<result column="template_id" property="templateId" />
|
||||
<result column="title" property="title" />
|
||||
<result column="content" property="content" />
|
||||
<result column="url" property="url" />
|
||||
<result column="message_id" property="messageId" />
|
||||
<result column="status" property="status" />
|
||||
<result column="reserved" property="reserved" />
|
||||
<result column="remark" property="remark" />
|
||||
<result column="valid" property="valid" />
|
||||
<result column="creator" property="creator" />
|
||||
<result column="creator_name" property="creatorName" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="updater" property="updater" />
|
||||
<result column="updater_name" property="updaterName" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="version" property="version" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
id, account_id, user_type, user_id, open_id, template_id, title, content, url, message_id, status, reserved, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.LoginLog;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 登录日志表,存放历史会话信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface LoginLogServiceBiz extends IService<LoginLog> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.LoginSession;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 登录会话表,存放在线用户信息 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface LoginSessionServiceBiz extends IService<LoginSession> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.Resource;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 资源表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface ResourceServiceBiz extends IService<Resource> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.mt.wms.core.dal.service;
|
||||
|
||||
import com.mt.wms.core.dal.entity.Service;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author mt
|
||||
* @since 2020-12-21
|
||||
*/
|
||||
public interface ServiceServiceBiz extends IService<Service> {
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user