Compare commits

...

No commits in common. "7e6dc5bed319285a35946f0aadaf2b7f196be30a" and "0849441a359a9f28b1143c4c32163f6488bc0a7b" have entirely different histories.

381 changed files with 28364 additions and 2 deletions

41
.gitignore vendored Normal file
View File

@ -0,0 +1,41 @@
# ---> Java
# Compiled class file
*.class
.idea/
*.iml
# Log file
*.log
# BlueJ files
*.ctxt
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
# ---> Maven
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

0
1.设计文档/readme.md Normal file
View File

0
2.需求文档/readme.md Normal file
View File

0
3.测试文档/readme.md Normal file
View File

0
4.发布版本/readme.md Normal file
View File

0
5.数据库/readme.md Normal file
View File

39
6.program/.drone.yml Normal file
View File

@ -0,0 +1,39 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: docker:dind
volumes:
- name: dockersock
path: /var/run/docker.sock
- name: dockerconfig
path: /root/.docker
commands:
- docker build -t harbor.picaiba.com/wms/wms-cloud-api ./ && docker push harbor.picaiba.com/wms/wms-cloud-api
# - name: deploy
# image: docker:dind
# volumes:
# - name: dockersock
# path: /var/run/docker.sock
# commands:
# - docker service update mes_mes --force
# depends_on:
# - build
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
- name: dockerconfig
host:
path: /root/.docker
trigger:
branch:
- develop
event:
- push

0
6.program/Dockerfile Normal file
View File

3
6.program/README.md Normal file
View File

@ -0,0 +1,3 @@
# wms
仓库系统

431
6.program/pom.xml Normal file
View File

@ -0,0 +1,431 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<modules>
<module>wms-gateway</module>
<module>wms-core</module>
<module>wms-common</module>
<module>wms-passport</module>
<module>wms-upms</module>
<module>wms-empty</module>
</modules>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.4.RELEASE</version>
</parent>
<groupId>com.mt</groupId>
<artifactId>wms</artifactId>
<packaging>pom</packaging>
<version>1.0</version>
<name>wms</name>
<description>wms</description>
<url>https://wms.picaiba.com</url>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profileActive>dev</profileActive>
<gateway.server.port>8080</gateway.server.port>
<spring.security.user.name>wms</spring.security.user.name>
<spring.security.user.password>wms</spring.security.user.password>
<!-- rabbitmq -->
<spring.rabbitmq.host>127.0.0.1</spring.rabbitmq.host>
<spring.rabbitmq.port>5672</spring.rabbitmq.port>
<spring.rabbitmq.username>guest</spring.rabbitmq.username>
<spring.rabbitmq.password>guest</spring.rabbitmq.password>
<!-- redis -->
<spring.redis.cluster.nodes>redis.picaiba.com:6380</spring.redis.cluster.nodes>
<spring.redis.host>redis.picaiba.com</spring.redis.host>
<spring.redis.port>6380</spring.redis.port>
<spring.redis.password><![CDATA["@WSXcde3"]]></spring.redis.password>
<spring.redis.database>5</spring.redis.database>
<!-- database -->
<spring.datasource.url>jdbc:p6spy:mysql://mysql.picaiba.com:30306/wms?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false
</spring.datasource.url>
<spring.datasource.username>wms</spring.datasource.username>
<spring.datasource.password>1qaz@WS</spring.datasource.password>
<!-- email -->
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
<!-- #25 ssl 465 -->
<spring.mail.port>465</spring.mail.port>
<spring.mail.username>noreply@mt.com</spring.mail.username>
<spring.mail.password>noreply</spring.mail.password>
<!-- devtools -->
<spring.devtools.remote.secret>wms</spring.devtools.remote.secret>
<spring.devtools.remote.livereload.enabled>true</spring.devtools.remote.livereload.enabled>
<!-- 公共相关配置-->
<wms.common.uploadPath>/work/uploadFile/</wms.common.uploadPath>
<wms.common.webHost>http://127.0.0.1:8080</wms.common.webHost>
<wms.common.apiHost>http://127.0.0.1:8080</wms.common.apiHost>
<!-- 短信相关配置-->
<wms.sms.channel>aliyun</wms.sms.channel>
<wms.aliyun.sms.product>Dysmsapi</wms.aliyun.sms.product>
<wms.aliyun.sms.domain>dysmsapi.aliyuncs.com</wms.aliyun.sms.domain>
<wms.aliyun.sms.accessKeyId>202020202020</wms.aliyun.sms.accessKeyId>
<wms.aliyun.sms.accessKeySecret>202020202020</wms.aliyun.sms.accessKeySecret>
<wms.tencentcloud.secretId>202020202020</wms.tencentcloud.secretId>
<wms.tencentcloud.secretKey>202020202020</wms.tencentcloud.secretKey>
<wms.tencentcloud.sms.appId>202020202020</wms.tencentcloud.sms.appId>
<wms.tencentcloud.sms.appKey>202020202020</wms.tencentcloud.sms.appKey>
</properties>
</profile>
<profile>
<id>test</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<profileActive>test</profileActive>
<gateway.server.port>9090</gateway.server.port>
<spring.security.user.name>wms</spring.security.user.name>
<spring.security.user.password>wms</spring.security.user.password>
<!-- rabbitmq -->
<spring.rabbitmq.host>127.0.0.1</spring.rabbitmq.host>
<spring.rabbitmq.port>5672</spring.rabbitmq.port>
<spring.rabbitmq.username>wms</spring.rabbitmq.username>
<spring.rabbitmq.password>wms</spring.rabbitmq.password>
<!-- redis -->
<spring.redis.cluster.nodes>redis.picaiba.com:6380</spring.redis.cluster.nodes>
<spring.redis.host>redis.picaiba.com</spring.redis.host>
<spring.redis.port>6380</spring.redis.port>
<spring.redis.password><![CDATA["@WSXcde3"]]></spring.redis.password>
<spring.redis.database>10</spring.redis.database>
<!-- database -->
<spring.datasource.url>jdbc:p6spy:mysql://mysql.picaiba.com:30306/wms?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false
</spring.datasource.url>
<spring.datasource.username>wms</spring.datasource.username>
<spring.datasource.password>1qaz@WS</spring.datasource.password>
<!-- email -->
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
<!-- #25 ssl 465 -->
<spring.mail.port>465</spring.mail.port>
<spring.mail.username>noreply@mt.com</spring.mail.username>
<spring.mail.password>noreply</spring.mail.password>
<!-- devtools -->
<spring.devtools.remote.secret>wms</spring.devtools.remote.secret>
<spring.devtools.remote.livereload.enabled>false</spring.devtools.remote.livereload.enabled>
<!-- 公共相关配置-->
<wms.common.uploadPath>/home/api/uploadFile/</wms.common.uploadPath>
<wms.common.webHost>https://wms.mt.com</wms.common.webHost>
<wms.common.apiHost>https://api.wms-test.mt.com</wms.common.apiHost>
<!-- 短信相关配置-->
<wms.sms.channel>aliyun</wms.sms.channel>
<wms.aliyun.sms.product>Dysmsapi</wms.aliyun.sms.product>
<wms.aliyun.sms.domain>dysmsapi.aliyuncs.com</wms.aliyun.sms.domain>
<wms.aliyun.sms.accessKeyId>202020202020</wms.aliyun.sms.accessKeyId>
<wms.aliyun.sms.accessKeySecret>202020202020</wms.aliyun.sms.accessKeySecret>
<wms.tencentcloud.secretId>202020202020</wms.tencentcloud.secretId>
<wms.tencentcloud.secretKey>202020202020</wms.tencentcloud.secretKey>
<wms.tencentcloud.sms.appId>202020202020</wms.tencentcloud.sms.appId>
<wms.tencentcloud.sms.appKey>202020202020</wms.tencentcloud.sms.appKey>
</properties>
</profile>
<profile>
<id>prod</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<profileActive>prod</profileActive>
<gateway.server.port>8090</gateway.server.port>
<spring.security.user.name>wms</spring.security.user.name>
<spring.security.user.password>wms</spring.security.user.password>
<!-- rabbitmq -->
<spring.rabbitmq.host>127.0.0.1</spring.rabbitmq.host>
<spring.rabbitmq.port>5672</spring.rabbitmq.port>
<spring.rabbitmq.username>wms</spring.rabbitmq.username>
<spring.rabbitmq.password>wms</spring.rabbitmq.password>
<!-- redis -->
<spring.redis.cluster.nodes>127.0.0.1:6379</spring.redis.cluster.nodes>
<spring.redis.host>127.0.0.1</spring.redis.host>
<spring.redis.port>6379</spring.redis.port>
<spring.redis.password>2018</spring.redis.password>
<spring.redis.database>10</spring.redis.database>
<!-- database -->
<spring.datasource.url>jdbc:p6spy:mysql://localhost:3306/wms?characterEncoding=utf8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false
</spring.datasource.url>
<spring.datasource.username>root</spring.datasource.username>
<spring.datasource.password>root</spring.datasource.password>
<!-- email -->
<spring.mail.host>smtp.mxhichina.com</spring.mail.host>
<!-- #25 ssl 465 -->
<spring.mail.port>465</spring.mail.port>
<spring.mail.username>noreply@mt.com</spring.mail.username>
<spring.mail.password>noreply</spring.mail.password>
<!-- devtools -->
<spring.devtools.remote.secret>wms</spring.devtools.remote.secret>
<spring.devtools.remote.livereload.enabled>false</spring.devtools.remote.livereload.enabled>
<!-- 公共相关配置-->
<wms.common.uploadPath>/home/api/uploadFile/</wms.common.uploadPath>
<wms.common.webHost>https://wms.mt.com</wms.common.webHost>
<wms.common.apiHost>https://api.wms.mt.com</wms.common.apiHost>
<!-- 短信相关配置-->
<wms.sms.channel>aliyun</wms.sms.channel>
<wms.aliyun.sms.product>Dysmsapi</wms.aliyun.sms.product>
<wms.aliyun.sms.domain>dysmsapi.aliyuncs.com</wms.aliyun.sms.domain>
<wms.aliyun.sms.accessKeyId>202020202020</wms.aliyun.sms.accessKeyId>
<wms.aliyun.sms.accessKeySecret>202020202020</wms.aliyun.sms.accessKeySecret>
<wms.tencentcloud.secretId>202020202020</wms.tencentcloud.secretId>
<wms.tencentcloud.secretKey>202020202020</wms.tencentcloud.secretKey>
<wms.tencentcloud.sms.appId>202020202020</wms.tencentcloud.sms.appId>
<wms.tencentcloud.sms.appKey>202020202020</wms.tencentcloud.sms.appKey>
</properties>
</profile>
</profiles>
<dependencies>
<!--配置文件处理器-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!--测试依赖-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<!--公共依赖-->
<properties>
<java.version>1.8</java.version>
<spring.profiles>dev</spring.profiles>
<spring-boot.version>2.0.4.RELEASE</spring-boot.version>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<spring-boot-admin.version>2.0.2</spring-boot-admin.version>
<!-- de.codecentric -->
<spring-boot-admin-server-ui-hystrix.version>1.5.7</spring-boot-admin-server-ui-hystrix.version>
<spring-boot-admin-server-ui-turbine.version>1.5.7</spring-boot-admin-server-ui-turbine.version>
<!-- swagger接口工具类 -->
<springfox-swagger2.version>2.9.2</springfox-swagger2.version>
<!-- wechat工具类 -->
<binarywang-weixin.version>3.7.0</binarywang-weixin.version>
<okhttp3.version>3.11.0</okhttp3.version>
<!-- SpringBoot集成mybatis框架 -->
<mybatis-plus.version>3.4.1</mybatis-plus.version>
<p6spy.version>3.9.0</p6spy.version>
<sharding-jdbc-core-spring-boot-starter.version>2.0.3</sharding-jdbc-core-spring-boot-starter.version>
<!-- fastjson -->
<fastjson.version>1.2.75</fastjson.version>
<!-- 阿里大鱼短信 -->
<aliyun-java-sdk-core.version>4.0.9</aliyun-java-sdk-core.version>
<aliyun-java-sdk-dysmsapi.version>1.1.0</aliyun-java-sdk-dysmsapi.version>
<tencentcloud-sdk-java.version>3.1.109</tencentcloud-sdk-java.version>
<!-- hutool工具类 -->
<hutool.version>4.1.21</hutool.version>
<!-- excel工具类 -->
<cn.afterturn.version>4.0.0</cn.afterturn.version>
<!-- pdf工具类 -->
<pdfbox.version>2.0.1</pdfbox.version>
<!-- 条形码转换工具类 -->
<barcode4j.version>2.0</barcode4j.version>
<!-- userAgent -->
<useragent.version>5.11</useragent.version>
<!-- redisson -->
<redisson.version>3.11.2</redisson.version>
<!-- jasperreports -->
<jasperreports.version>6.9.0</jasperreports.version>
<!-- idworker -->
<idworker.version>1.5.0</idworker.version>
<!-- thumbnailator -->
<thumbnailator.version>0.4.13</thumbnailator.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>Cairo-SR2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-dependencies</artifactId>
<version>${spring-boot-admin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${springfox-swagger2.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-gateway</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-passport</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-upms</artifactId>
<version>${project.version}</version>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
<version>${mybatis-plus.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
<version>${p6spy.version}</version>
</dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.aspose.words</groupId>-->
<!-- <artifactId>aspose-words</artifactId>-->
<!-- <version>18.5</version>-->
<!-- </dependency>-->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${cn.afterturn.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${cn.afterturn.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>${jasperreports.version}</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports-fonts</artifactId>
<version>${jasperreports.version}</version>
</dependency>
<!-- id生成器 -->
<!-- https://mvnrepository.com/artifact/com.imadcn.framework/idworker -->
<dependency>
<groupId>com.imadcn.framework</groupId>
<artifactId>idworker</artifactId>
<version>${idworker.version}</version>
</dependency>
<!-- 图片处理工具:压缩、缩放、旋转、加水印等 -->
<!-- https://mvnrepository.com/artifact/net.coobird/thumbnailator -->
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
<version>${thumbnailator.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>${java.version}</target>
<source>${java.version}</source>
<encoding>${project.build.sourceEncoding}</encoding>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- 使用aliyun镜像 -->
<repositories>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone</url>
</repository>
<repository>
<id>aliyun</id>
<name>aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
</project>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>wms</artifactId>
<groupId>com.mt</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-common</artifactId>
<dependencies>
<dependency>
<groupId>com.mt</groupId>
<artifactId>wms-core</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>${aliyun-java-sdk-core.version}</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
<version>${aliyun-java-sdk-dysmsapi.version}</version>
</dependency>
<dependency>
<groupId>net.coobird</groupId>
<artifactId>thumbnailator</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,62 @@
package com.mt.wms.common.controller;
import com.mt.wms.common.params.DownloadFileParam;
import com.mt.wms.common.params.UploadFileBase64Param;
import com.mt.wms.common.service.AttachmentService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author jiff
* @date 2021/01/12
* @since 1.0
*/
@RestController
@RequestMapping(CommonConstant.API_MODULE_COMMON + "attachment")
@Slf4j
@Api(value = "附件管理", tags = "附件管理", hidden = false)
public class AttachmentController extends BaseController {
@Autowired
private AttachmentService attachmentService;
@PostMapping(value = "uploadFile")
@ApiOperation(value = "上传文件", notes = "上传文件")
public R<List<SysFileVo>> uploadFile(@ApiParam(value = "文件类型", required = true) @NotEmpty(message = "文件类型编码不得为空") @RequestParam String typeCode) {
return attachmentService.uploadFile(typeCode);
}
@PostMapping("uploadFileBase64")
@ApiOperation(value = "文件上传(base64字符串方式)", notes = "文件上传")
public R<SysFileVo> uploadFileBase64(@Validated @RequestBody UploadFileBase64Param param) {
return attachmentService.uploadFileBase64(param);
}
@PostMapping("uploadFileFormData")
@ApiOperation(value = "文件上传(form表单形式)", notes = "文件上传")
public R<List<SysFileVo>> uploadFileFormData(@ApiParam(value = "文件类型", required = true) @NotEmpty(message = "文件类型编码不得为空") @RequestParam String typeCode, @ApiParam(value = "文件附件", required = true) @NotNull(message = "文件附件不能为空") @RequestParam("files") MultipartFile[] files) {
return attachmentService.uploadFileFormData(typeCode, files);
}
@GetMapping(value = "downloadFile")
@ApiOperation(value = "下载文件", notes = "下载文件")
public R<Object> downloadFile(@Validated DownloadFileParam param) {
return attachmentService.downloadFile(param);
}
}

View File

@ -0,0 +1,49 @@
package com.mt.wms.common.controller;
import com.mt.wms.common.service.CommonService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.base.BaseController;
import com.mt.wms.core.constants.CommonConstant;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Api(value = "公共模块", tags = "公共模块")
@RestController
@RequestMapping(CommonConstant.API_MODULE_COMMON)
@Slf4j
@RequiredArgsConstructor
public class CommonController extends BaseController {
private final CommonService commonService;
@PostMapping(value = "downloadFile")
@ApiOperation(value = "获取附件下载地址", notes = "获取附件下载地址")
public R<SysFileVo> downloadFile(@Validated @RequestBody IdParam idParam) {
return successful(commonService.downloadFile(idParam.getId()));
}
@GetMapping(value = "downLoadFileUrl")
@ApiOperation(value = "文件的预览", notes = "文件的预览")
public R<Object> downloadFile(@Validated IdParam idParam, HttpServletResponse response) {
return commonService.downLoadFileUrl(idParam, response);
}
}

View File

@ -0,0 +1,17 @@
package com.mt.wms.common.mapper;
import org.springframework.stereotype.Repository;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Repository
public interface CommonMapper {
}

View File

@ -0,0 +1,46 @@
/*
* Copyright (c) 2020.
* http://www.ulabcare.com
*/
package com.mt.wms.common.params;
import com.mt.wms.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
/**
* 下载文件对象入参
*
* @author jiff
* @date 2021/01/12
* @since 1.0
**/
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
@ApiModel(value = "下载文件信息对象", description = "下载文件信息对象")
public class DownloadFileParam extends BaseParam {
@ApiModelProperty(value = "附件ID", example = "1")
@NotNull(message = "附件ID不能为空")
private Long attachmentId;
@ApiModelProperty(value = "下载方式: 0、预览1、下载", example = "0")
@NotNull(message = "下载方式不能为空")
private String type;
@ApiModelProperty(value = "下载文件自定义文件名", example = "报销发票")
private String fileName;
@ApiModelProperty(value = "压缩尺寸取值范围0.00--1.00),图片文件有效", example = "1")
private float scale = 1f;
@ApiModelProperty(value = "压缩质量取值范围0.00--1.00),图片文件有效", example = "1")
private float outputQuality = 1f;
}

View File

@ -0,0 +1,38 @@
package com.mt.wms.common.params;
import com.mt.wms.core.base.BaseParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotEmpty;
/**
* <p>
* 文件上传base64字符串方式
* </p>
*
* @author jiff
* @date 2021/01/12
* @since 1.0
**/
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
@ApiModel("文件上传base64字符串方式")
public class UploadFileBase64Param extends BaseParam {
@ApiModelProperty("文件类型编码")
@NotEmpty(message = "文件类型编码不能为空")
private String typeCode;
@ApiModelProperty("文件名")
@NotEmpty(message = "文件名不能为空")
private String fileName;
@ApiModelProperty("base64字符串")
@NotEmpty(message = "文件base64字符串不能为空")
private String fileBase64Str;
}

View File

@ -0,0 +1,56 @@
package com.mt.wms.common.service;
import com.mt.wms.common.params.DownloadFileParam;
import com.mt.wms.common.params.UploadFileBase64Param;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import org.springframework.web.multipart.MultipartFile;
import java.util.List;
/**
* @author jiff
* @date 2021/01/12
* @since 1.0
*/
public interface AttachmentService {
/**
* 文件上传(支持多文件上传)
*
* @param typeCode
* @return
*/
R<List<SysFileVo>> uploadFile(String typeCode);
/**
* 文件上传
*
* @param uploadFileBase64Param 上传文件对象
* @return
*/
R<SysFileVo> uploadFileBase64(UploadFileBase64Param uploadFileBase64Param);
/**
* 文件上传(form表单形式)
*
* @param typeCode
* @param files
* @return
*/
R<List<SysFileVo>> uploadFileFormData(String typeCode, MultipartFile[] files);
/**
* 文件下载下载方式: 0预览1下载
*
* @param downloadFileParam
* @return
*/
R<Object> downloadFile(DownloadFileParam downloadFileParam);
}

View File

@ -0,0 +1,38 @@
package com.mt.wms.common.service;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.vo.R;
import javax.servlet.http.HttpServletResponse;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
public interface CommonService {
/**
* 获取附件下载地址
*
* @param fileId 附件ID
* @return 附件下载地址
*/
SysFileVo downloadFile(Long fileId);
/**
* 附件预览
*
* @param idParam 附件ID
* @return 附件下载地址
*/
R<Object> downLoadFileUrl(IdParam idParam, HttpServletResponse response);
}

View File

@ -0,0 +1,231 @@
package com.mt.wms.common.service.impl;
import com.mt.wms.common.params.DownloadFileParam;
import com.mt.wms.common.params.UploadFileBase64Param;
import com.mt.wms.common.service.AttachmentService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.config.CommonConfig;
import com.mt.wms.core.dal.entity.SysFile;
import com.mt.wms.core.dal.service.SysFileServiceBiz;
import com.mt.wms.core.utils.*;
import com.mt.wms.core.vo.R;
import lombok.extern.log4j.Log4j2;
import net.coobird.thumbnailator.Thumbnails;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* @author jiff
* @date 2021/1/12
* @since 1.0
*/
@Log4j2
@Service
public class AttachmentServiceImpl extends BaseService implements AttachmentService {
@Autowired
private SysFileServiceBiz sysFileServiceBiz;
@Autowired
private CommonConfig commonConfig;
/**
* 文件上传(支持多文件上传)
*
* @param typeCode
* @return
*/
@Override
public R<List<SysFileVo>> uploadFile(String typeCode) {
//获取上传文件路径
String uploadPath = commonConfig.getUploadPath() + typeCode + "/";
log.debug("文件的上传路径:" + uploadPath);
File file = new File(uploadPath);
//判断文件是否存在不存在则创建
if (!file.exists()) {
file.mkdirs();
}
List<SysFile> fileList = new ArrayList<>();
//多文件上传
CommonsMultipartResolver crm = new CommonsMultipartResolver(getHttpServletRequest().getSession().getServletContext());
if (crm.isMultipart(getHttpServletRequest())) {
MultipartHttpServletRequest mRequest = (MultipartHttpServletRequest) (getHttpServletRequest());
Iterator<String> files = mRequest.getFileNames();
log.debug("多文件" + files.toString());
while (files.hasNext()) {
MultipartFile mFile = mRequest.getFile(files.next());
log.debug("文件" + mFile.toString());
// 文件名
String fileName = mFile.getOriginalFilename();
//新文件名
String newFileName = DateUtil.getCurrentDateTime() + RandomCodeGenerator.numericCode(4);
// 文件扩展名
String fileExtensionName = FileUtil.getExtensionName(fileName);
//上传文件的真实路径
String filePath = uploadPath + newFileName + "." + fileExtensionName;
File localPath = new File(filePath);
try {
mFile.transferTo(localPath);
//保存文件信息
SysFile sysFile = new SysFile();
sysFile.setTypeCode(typeCode);
sysFile.setFileUrl(filePath);
sysFile.setFileName(newFileName);
if (getLoginUser() != null) {
setCommonField(sysFile);
} else {
sysFile.setCreateTime(LocalDateTime.now());
sysFile.setCreator(1L);
sysFile.setCreatorName("system");
}
fileList.add(sysFile);
} catch (Exception e) {
e.printStackTrace();
log.error("文件上传失败:" + e.getMessage());
return R.failed("文件上传失败");
}
}
}
sysFileServiceBiz.saveBatch(fileList);
return R.ok(BeanUtils.copyList(fileList, SysFileVo.class));
}
/**
* 文件上传
*
* @param uploadFileBase64Param 上传文件对象
* @return
*/
@Override
public R<SysFileVo> uploadFileBase64(UploadFileBase64Param uploadFileBase64Param) {
return null;
}
/**
* 文件上传(form表单形式)
*
* @param typeCode
* @param files
* @return
*/
@Override
public R<List<SysFileVo>> uploadFileFormData(String typeCode, MultipartFile[] files) {
//获取上传文件路径
String uploadPath = commonConfig.getUploadPath() + typeCode + "/";
log.debug("文件的上传路径:" + uploadPath);
File file = new File(uploadPath);
//判断文件是否存在不存在则创建
if (!file.exists()) {
file.mkdirs();
}
List<SysFile> fileList = new ArrayList<>();
for (MultipartFile multipartFile : files) {
log.debug("上传文件" + multipartFile.toString());
// 文件名
String fileName = multipartFile.getOriginalFilename();
//新文件名
String newFileName = DateUtil.getCurrentDateTime() + RandomCodeGenerator.numericCode(4);
// 文件扩展名
String fileExtensionName = FileUtil.getExtensionName(fileName);
//上传文件的真实路径
String filePath = uploadPath + newFileName + "." + fileExtensionName;
File localPath = new File(filePath);
try {
multipartFile.transferTo(localPath);
//保存文件信息
SysFile sysFile = new SysFile();
sysFile.setTypeCode(typeCode);
sysFile.setFileUrl(filePath);
sysFile.setFileName(newFileName);
if (getLoginUser() != null) {
setCommonField(sysFile);
} else {
sysFile.setCreateTime(LocalDateTime.now());
sysFile.setCreator(1L);
sysFile.setCreatorName("system");
}
fileList.add(sysFile);
} catch (Exception e) {
e.printStackTrace();
log.error("文件上传失败:" + e.getMessage());
return R.failed("文件上传失败");
}
}
sysFileServiceBiz.saveBatch(fileList);
return R.ok(BeanUtils.copyList(fileList, SysFileVo.class));
}
/**
* 文件下载下载方式: 0预览1下载
*
* @param downloadFileParam
* @return
*/
@Override
public R<Object> downloadFile(DownloadFileParam downloadFileParam) {
//根据id获取附件信息
SysFile sysFile = sysFileServiceBiz.getById(downloadFileParam.getAttachmentId());
if (sysFile == null) {
return R.failed("文件不存在");
}
HttpServletResponse response = getHttpServletResponse();
// 文件路径
String path = sysFile.getFileUrl();
File file = new File(path);
String fileName = file.getName();
// 文件扩展名
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
try {
//判断下载方式是下载本地还是预览文件
if (downloadFileParam.getType().equals("1")) {
response.setContentType("application/octet-stream");
response.setHeader("Content-Disposition", "attachment; filename=" + new String((StringUtils.isEmpty(downloadFileParam.getFileName()) ? sysFile.getFileName() + "." + suffix : downloadFileParam.getFileName() + "." + suffix).getBytes(Charset.forName("GBK")), StandardCharsets.ISO_8859_1));
} else {
URL u = new URL("file:///" + path);
String contentType = u.openConnection().getContentType();
response.setContentType(contentType);
response.setHeader("Content-Disposition", "inline; filename=" + new String((StringUtils.isEmpty(downloadFileParam.getFileName()) ? sysFile.getFileName() + "." + suffix : downloadFileParam.getFileName() + "." + suffix).getBytes(Charset.forName("GBK")), StandardCharsets.ISO_8859_1));
}
//判断是否是图片格式
ServletOutputStream outputStream = response.getOutputStream();
if ("PNGpngJPGjpg".contains(suffix)) {
Thumbnails.of(file)
.scale(downloadFileParam.getScale())
.outputQuality(downloadFileParam.getOutputQuality())
.toOutputStream(outputStream);
} else {
FileInputStream inputStream = new FileInputStream(file);
byte[] buffer = new byte[1024];
int i = -1;
while ((i = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, i);
}
inputStream.close();
}
outputStream.flush();
outputStream.close();
} catch (Exception e) {
e.printStackTrace();
log.error("下载文件失败:{}", e.getMessage());
return R.failed("下载文件失败");
}
return null;
}
}

View File

@ -0,0 +1,101 @@
package com.mt.wms.common.service.impl;
import com.mt.wms.common.mapper.CommonMapper;
import com.mt.wms.common.service.CommonService;
import com.mt.wms.common.vo.SysFileVo;
import com.mt.wms.core.config.AliyunSmsConfig;
import com.mt.wms.core.config.CommonConfig;
import com.mt.wms.core.config.TencentCloudConfig;
import com.mt.wms.core.config.TencentCloudSmsConfig;
import com.mt.wms.core.params.IdParam;
import com.mt.wms.core.base.BaseService;
import com.mt.wms.core.vo.R;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/6
* @since 1.0
*/
@Service
@Slf4j
@RequiredArgsConstructor
public class CommonServiceImpl extends BaseService implements CommonService {
private final CommonMapper mCommonMapper;
private final CommonConfig mCommonConfig;
private final AliyunSmsConfig mAliyunSmsConfig;
private final TencentCloudSmsConfig tencentCloudSmsConfig;
private final TencentCloudConfig tencentCloudConfig;
private final CommonConfig commonConfig;
/**
* 获取附件下载地址
*
* @param fileId 附件ID
* @return 附件下载地址
*/
@Override
public SysFileVo downloadFile(Long fileId) {
return new SysFileVo().setFileId(null).setFileName(null).setFileUrl(mCommonConfig.getApiHost() + "/common/" + "/home".replace(mCommonConfig.getUploadPath(), ""));
}
@Override
public R<Object> downLoadFileUrl(IdParam idParam, HttpServletResponse response) {
// 文件扩展名
String path = null;
File picFile = new File(path);
String fileName = picFile.getName();
try {
// 文件扩展名
String suffix = fileName.substring(fileName.lastIndexOf(".") + 1);
URL u = new URL("file:///" + path);
String contentType = null;
contentType = u.openConnection().getContentType();
response.setContentType(contentType);
response.setHeader("Content-Disposition", "inline;filename=" + new String(("dw." + suffix).getBytes("GBK"), "ISO8859_1"));
ServletOutputStream outputStream = response.getOutputStream();
FileInputStream inputStream = new FileInputStream(picFile);
byte[] buffer = new byte[1024];
int i = -1;
while ((i = inputStream.read(buffer)) != -1) {
outputStream.write(buffer, 0, i);
}
outputStream.flush();
outputStream.close();
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
e.printStackTrace();
log.error("文件预览失败:" + e.getMessage());
return R.failed("文件预览失败");
}
return null;
}
}

View File

@ -0,0 +1,35 @@
package com.mt.wms.common.vo;
import com.mt.wms.core.base.BaseVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
/**
* <p>
*
* </P>
*
* @author FanYi
* @date 2020/7/8
* @since 1.0
*/
@ApiModel("文件对象")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@Data
public class SysFileVo extends BaseVo {
@ApiModelProperty("文件ID")
private Long fileId;
@ApiModelProperty("文件名称")
private String fileName;
@ApiModelProperty("类型 1图片 2PDF")
private Integer fileType;
@ApiModelProperty("下载路径")
private String fileUrl;
}

View File

@ -0,0 +1,6 @@
<?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.common.mapper.CommonMapper">
</mapper>

219
6.program/wms-core/pom.xml Normal file
View File

@ -0,0 +1,219 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>wms</artifactId>
<groupId>com.mt</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>wms-core</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>${okhttp3.version}</version>
</dependency>
<!-- Mysql驱动包 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- mybatis-plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-generator</artifactId>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-engine-core</artifactId>
</dependency>
<dependency>
<groupId>p6spy</groupId>
<artifactId>p6spy</artifactId>
</dependency>
<!--Lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
</dependency>
<!-- commons-lang3 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<!--io常用工具类 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>
<!--文件上传工具类 -->
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<!-- pdf工具类 -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itextpdf</artifactId>
<version>5.5.13</version>
</dependency>
<!-- pdf字体类 -->
<dependency>
<groupId>com.itextpdf</groupId>
<artifactId>itext-asian</artifactId>
<version>5.2.0</version>
</dependency>
<!-- pdf转图片 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<!-- pdf转图片工具类 -->
<dependency>
<groupId>org.apache.pdfbox</groupId>
<artifactId>pdfbox-tools</artifactId>
<version>${pdfbox.version}</version>
</dependency>
<!-- 条形码转换工具 -->
<dependency>
<groupId>net.sf.barcode4j</groupId>
<artifactId>barcode4j-light</artifactId>
<version>${barcode4j.version}</version>
</dependency>
<!-- springfox-swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<scope>compile</scope>
</dependency>
<!-- dom4j -->
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</dependency>
<!-- hutool第三方工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>${hutool.version}</version>
</dependency>
<!-- wechat -->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>${binarywang-weixin.version}</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-pay</artifactId>
<version>${binarywang-weixin.version}</version>
</dependency>
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-miniapp</artifactId>
<version>${binarywang-weixin.version}</version>
</dependency>
<!-- junit -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Excel工具包 -->
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>${cn.afterturn.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${cn.afterturn.version}</version>
<exclusions>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- redisson用于分布式锁 -->
<dependency>
<groupId>org.redisson</groupId>
<artifactId>redisson</artifactId>
<version>${redisson.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
</dependency>
<dependency>
<groupId>com.tencentcloudapi</groupId>
<artifactId>tencentcloud-sdk-java</artifactId>
<version>${tencentcloud-sdk-java.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -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 {
}

View File

@ -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;
}
}
}

View 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);
}
}
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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 {
}

View File

@ -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;
}
}

View File

@ -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 {
}

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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();
}
}

View File

@ -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()
//failFasttrue 快速失败返回模式false 普通模式
.failFast(false)
// .addProperty("hibernate.validator.fail_fast", "true")
.buildValidatorFactory();
Validator validator = validatorFactory.getValidator();
return validator;
}
}

View File

@ -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;
}
}

View File

@ -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/";
}

View File

@ -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";
}

View File

@ -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_nameuser_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);
}
}

View File

@ -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;
/**
* 应用类型1pc2app3wechat4miniapp
*/
@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;
}
}

View File

@ -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;
/**
* 应用类型1pc2app3wechat4miniapp
*/
@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;
}
}

View File

@ -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;
/**
* 子系统:0common1platform2partner3hospital4patient 用于限定维护菜单资源关系公共资源允许所有菜单关联其他资源只允许对应的菜单关联平台菜单只允许关联到公共资源和平台资源
*/
@TableField("subsystem")
private Integer subsystem;
/**
* 分类:0common1pc2app3wechat4miniapp
*/
@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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
/**
* 公司ID0为公用默认使用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;
}
}

View File

@ -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;
/**
* 公司ID0为公用默认使用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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
/**
* 分类:1pc2app3wechat4miniapp
*/
@TableField("category")
private Integer category;
/**
* 类型:1module2menu3button
*/
@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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
/**
* 分类:1pc2app3wechat4miniapp
*/
@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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

View File

@ -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>

View File

@ -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> {
}

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