commit 10e056aa4476699ab06686e1b8598e260e18c718
Author: thomas
Date: Thu Jul 8 18:02:26 2021 +0800
init project
diff --git a/1.设计文档/readme.md b/1.设计文档/readme.md
new file mode 100644
index 0000000..e69de29
diff --git a/2.需求文档/readme.md b/2.需求文档/readme.md
new file mode 100644
index 0000000..e69de29
diff --git a/3.测试文档/readme.md b/3.测试文档/readme.md
new file mode 100644
index 0000000..e69de29
diff --git a/4.发布版本/readme.md b/4.发布版本/readme.md
new file mode 100644
index 0000000..e69de29
diff --git a/5.数据库/readme.md b/5.数据库/readme.md
new file mode 100644
index 0000000..e69de29
diff --git a/6.program/.drone.yml b/6.program/.drone.yml
new file mode 100644
index 0000000..b565000
--- /dev/null
+++ b/6.program/.drone.yml
@@ -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
\ No newline at end of file
diff --git a/6.program/.gitignore b/6.program/.gitignore
new file mode 100644
index 0000000..0bcb3b9
--- /dev/null
+++ b/6.program/.gitignore
@@ -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
+
diff --git a/6.program/Dockerfile b/6.program/Dockerfile
new file mode 100644
index 0000000..e69de29
diff --git a/6.program/README.md b/6.program/README.md
new file mode 100644
index 0000000..2f1c825
--- /dev/null
+++ b/6.program/README.md
@@ -0,0 +1,3 @@
+# wms
+
+仓库系统
\ No newline at end of file
diff --git a/6.program/pom.xml b/6.program/pom.xml
new file mode 100644
index 0000000..7fbdf1c
--- /dev/null
+++ b/6.program/pom.xml
@@ -0,0 +1,431 @@
+
+
+
+ 4.0.0
+
+ wms-gateway
+ wms-core
+ wms-common
+ wms-passport
+ wms-upms
+ wms-empty
+
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.0.4.RELEASE
+
+
+ com.mt
+ wms
+ pom
+ 1.0
+
+ wms
+ wms
+ https://wms.picaiba.com
+
+
+
+ dev
+
+ true
+
+
+ dev
+ 8080
+ wms
+ wms
+
+ 127.0.0.1
+ 5672
+ guest
+ guest
+
+ redis.picaiba.com:6380
+ redis.picaiba.com
+ 6380
+
+ 5
+
+ jdbc:p6spy:mysql://mysql.picaiba.com:30306/wms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
+
+ wms
+ 1qaz@WS
+
+ smtp.mxhichina.com
+
+ 465
+ noreply@mt.com
+ noreply
+
+ wms
+ true
+
+ /work/uploadFile/
+ http://127.0.0.1:8080
+ http://127.0.0.1:8080
+
+ aliyun
+ Dysmsapi
+ dysmsapi.aliyuncs.com
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+
+
+
+ test
+
+ false
+
+
+ test
+
+ 9090
+
+ wms
+ wms
+
+ 127.0.0.1
+ 5672
+ wms
+ wms
+
+ redis.picaiba.com:6380
+ redis.picaiba.com
+ 6380
+
+ 10
+
+ jdbc:p6spy:mysql://mysql.picaiba.com:30306/wms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
+
+ wms
+ 1qaz@WS
+
+ smtp.mxhichina.com
+
+ 465
+ noreply@mt.com
+ noreply
+
+ wms
+ false
+
+ /home/api/uploadFile/
+ https://wms.mt.com
+ https://api.wms-test.mt.com
+
+ aliyun
+ Dysmsapi
+ dysmsapi.aliyuncs.com
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+
+
+
+ prod
+
+ false
+
+
+ prod
+ 8090
+ wms
+ wms
+
+ 127.0.0.1
+ 5672
+ wms
+ wms
+
+ 127.0.0.1:6379
+ 127.0.0.1
+ 6379
+ 2018
+ 10
+
+ jdbc:p6spy:mysql://localhost:3306/wms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false
+
+ root
+ root
+
+ smtp.mxhichina.com
+
+ 465
+ noreply@mt.com
+ noreply
+
+ wms
+ false
+
+ /home/api/uploadFile/
+ https://wms.mt.com
+ https://api.wms.mt.com
+
+ aliyun
+ Dysmsapi
+ dysmsapi.aliyuncs.com
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+ 202020202020
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ 1.8
+ dev
+ 2.0.4.RELEASE
+ Finchley.RELEASE
+ 2.0.2
+
+ 1.5.7
+ 1.5.7
+
+
+ 2.9.2
+
+ 3.7.0
+ 3.11.0
+
+ 3.4.1
+ 3.9.0
+ 2.0.3
+
+ 1.2.75
+
+ 4.0.9
+ 1.1.0
+ 3.1.109
+
+ 4.1.21
+
+ 4.0.0
+
+ 2.0.1
+
+ 2.0
+
+ 5.11
+
+ 3.11.2
+
+ 6.9.0
+
+ 1.5.0
+
+ 0.4.13
+
+
+
+
+
+ org.springframework.cloud
+ spring-cloud-dependencies
+ ${spring-cloud.version}
+ pom
+ import
+
+
+ io.spring.platform
+ platform-bom
+ Cairo-SR2
+ pom
+ import
+
+
+ de.codecentric
+ spring-boot-admin-dependencies
+ ${spring-boot-admin.version}
+ pom
+ import
+
+
+ io.springfox
+ springfox-swagger2
+ ${springfox-swagger2.version}
+
+
+ io.springfox
+ springfox-swagger-ui
+ ${springfox-swagger2.version}
+
+
+ com.mt
+ wms-common
+ ${project.version}
+
+
+ com.mt
+ wms-core
+ ${project.version}
+
+
+ com.mt
+ wms-gateway
+ ${project.version}
+
+
+ com.mt
+ wms-passport
+ ${project.version}
+
+
+ com.mt
+ wms-upms
+ ${project.version}
+
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ ${mybatis-plus.version}
+
+
+ com.baomidou
+ mybatis-plus-generator
+ ${mybatis-plus.version}
+
+
+ org.apache.velocity
+ velocity-engine-core
+ 2.0
+
+
+ p6spy
+ p6spy
+ ${p6spy.version}
+
+
+
+
+ com.alibaba
+ fastjson
+ ${fastjson.version}
+
+
+
+
+
+
+
+ org.apache.poi
+ poi
+ ${cn.afterturn.version}
+
+
+ org.apache.poi
+ poi-ooxml
+ ${cn.afterturn.version}
+
+
+ net.sf.jasperreports
+ jasperreports
+ ${jasperreports.version}
+
+
+ net.sf.jasperreports
+ jasperreports-fonts
+ ${jasperreports.version}
+
+
+
+
+ com.imadcn.framework
+ idworker
+ ${idworker.version}
+
+
+
+
+
+ net.coobird
+ thumbnailator
+ ${thumbnailator.version}
+
+
+
+
+
+
+
+
+ src/main/resources
+ true
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+ build-info
+
+
+
+
+
+ maven-compiler-plugin
+
+ ${java.version}
+
+ ${project.build.sourceEncoding}
+ true
+
+
+
+ maven-surefire-plugin
+
+ true
+
+
+
+
+
+
+
+
+ spring-milestones
+ Spring Milestones
+ https://repo.spring.io/libs-milestone
+
+
+ aliyun
+ aliyun
+ http://maven.aliyun.com/nexus/content/groups/public/
+
+
+
diff --git a/6.program/wms-common/pom.xml b/6.program/wms-common/pom.xml
new file mode 100644
index 0000000..3025294
--- /dev/null
+++ b/6.program/wms-common/pom.xml
@@ -0,0 +1,34 @@
+
+
+
+ wms
+ com.mt
+ 1.0
+
+ 4.0.0
+
+ wms-common
+
+
+ com.mt
+ wms-core
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ ${aliyun-java-sdk-core.version}
+
+
+ com.aliyun
+ aliyun-java-sdk-dysmsapi
+ ${aliyun-java-sdk-dysmsapi.version}
+
+
+ net.coobird
+ thumbnailator
+
+
+
+
\ No newline at end of file
diff --git a/6.program/wms-common/src/main/java/com/mt/wms/common/controller/AttachmentController.java b/6.program/wms-common/src/main/java/com/mt/wms/common/controller/AttachmentController.java
new file mode 100644
index 0000000..0ebd827
--- /dev/null
+++ b/6.program/wms-common/src/main/java/com/mt/wms/common/controller/AttachmentController.java
@@ -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> uploadFile(@ApiParam(value = "文件类型", required = true) @NotEmpty(message = "文件类型编码不得为空") @RequestParam String typeCode) {
+ return attachmentService.uploadFile(typeCode);
+ }
+
+ @PostMapping("uploadFileBase64")
+ @ApiOperation(value = "文件上传(base64字符串方式)", notes = "文件上传")
+ public R uploadFileBase64(@Validated @RequestBody UploadFileBase64Param param) {
+ return attachmentService.uploadFileBase64(param);
+ }
+
+ @PostMapping("uploadFileFormData")
+ @ApiOperation(value = "文件上传(form表单形式)", notes = "文件上传")
+ public R> 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
+ *
+ * @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);
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/LoginLog.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/LoginLog.java
new file mode 100644
index 0000000..002bf86
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/LoginLog.java
@@ -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;
+
+/**
+ *
+ * 登录日志表,存放历史会话信息
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_login_log")
+public class LoginLog extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 会话ID
+ */
+ @TableField("session_id")
+ private String sessionId;
+
+ /**
+ * 账号ID
+ */
+ @TableField("account_id")
+ private Long accountId;
+
+ /**
+ * 用户ID
+ */
+ @TableField("user_id")
+ private Long userId;
+
+ /**
+ * 公司ID
+ */
+ @TableField("corp_id")
+ private Long corpId;
+
+ /**
+ * 医院ID
+ */
+ @TableField("hospital_id")
+ private Long hospitalId;
+
+ /**
+ * 组织ID
+ */
+ @TableField("org_id")
+ private Long orgId;
+
+ /**
+ * 账号
+ */
+ @TableField("account")
+ private String account;
+
+ /**
+ * 手机号
+ */
+ @TableField("mobile")
+ private String mobile;
+
+ /**
+ * 用户名称
+ */
+ @TableField("user_name")
+ private String userName;
+
+ /**
+ * 公司名称
+ */
+ @TableField("corp_name")
+ private String corpName;
+
+ /**
+ * 医院名称
+ */
+ @TableField("hospital_name")
+ private String hospitalName;
+
+ /**
+ * 组织名称,存放平台组织或者医院科室或者公司门店
+ */
+ @TableField("org_name")
+ private String orgName;
+
+ /**
+ * 用户类型:1、平台用户,2、公司用户,3、医院用户,4、患者
+ */
+ @TableField("user_type")
+ private Integer userType;
+
+ /**
+ * 应用类型:1、pc,2、app,3、wechat,4、miniapp
+ */
+ @TableField("app_type")
+ private Integer appType;
+
+ /**
+ * 应用编码:暂未使用
+ */
+ @TableField("app_code")
+ private Integer appCode;
+
+ /**
+ * 登录类型:1、自主登录,2、漫游登录
+ */
+ @TableField("login_type")
+ private Integer loginType;
+
+ /**
+ * 退出类型:1、自主退出,2、管理退出,3,超时退出
+ */
+ @TableField("logout_type")
+ private Integer logoutType;
+
+ /**
+ * 登录时间
+ */
+ @TableField("login_time")
+ private LocalDateTime loginTime;
+
+ /**
+ * 退出时间
+ */
+ @TableField("logout_time")
+ private LocalDateTime logoutTime;
+
+ /**
+ * 设备类型
+ */
+ @TableField("device_class")
+ private String deviceClass;
+
+ /**
+ * 设备名称
+ */
+ @TableField("device_name")
+ private String deviceName;
+
+ /**
+ * 设备品牌
+ */
+ @TableField("device_brand")
+ private String deviceBrand;
+
+ /**
+ * 操作系统
+ */
+ @TableField("os")
+ private String os;
+
+ /**
+ * 浏览器
+ */
+ @TableField("browser")
+ private String browser;
+
+ /**
+ * 国家
+ */
+ @TableField("country")
+ private String country;
+
+ /**
+ * 省份
+ */
+ @TableField("province")
+ private String province;
+
+ /**
+ * 地市
+ */
+ @TableField("city")
+ private String city;
+
+ /**
+ * 区县
+ */
+ @TableField("county")
+ private String county;
+
+ /**
+ * 地址
+ */
+ @TableField("address")
+ private String address;
+
+ /**
+ * 精度
+ */
+ @TableField("lng")
+ private String lng;
+
+ /**
+ * 纬度
+ */
+ @TableField("lat")
+ private String lat;
+
+ /**
+ * 网络服务提供商
+ */
+ @TableField("isp")
+ private String isp;
+
+ /**
+ * IP地址
+ */
+ @TableField("ip")
+ private String ip;
+
+ /**
+ * 用户代理,存放用户登录时客户端信息
+ */
+ @TableField("user_agent")
+ private String userAgent;
+
+ /**
+ * 退出地址
+ */
+ @TableField("logout_address")
+ private String logoutAddress;
+
+ /**
+ * 退出IP地址
+ */
+ @TableField("logout_ip")
+ private String logoutIp;
+
+ /**
+ * 退出用户代理,存放用户退出时客户端信息
+ */
+ @TableField("logout_user_agent")
+ private String logoutUserAgent;
+
+ /**
+ * 异常状态:0、正常,1、省份异常,2、地市异常,3、区县异常
+ */
+ @TableField("abnormal_status")
+ private Integer abnormalStatus;
+
+ /**
+ * ip转地址状态:0、未获取,1、登录地址获取成功,2、退出地址获取成功,-1、登录地址获取失败,-2、退出地址获取失败
+ */
+ @TableField("ip_to_address_status")
+ private Integer ipToAddressStatus;
+
+ /**
+ * ip转地址次数,最多转换3次,三次失败修改状态为失败(-1、-2)
+ */
+ @TableField("ip_to_address_count")
+ private Integer ipToAddressCount;
+
+ /**
+ * ip转地址时间
+ */
+ @TableField("ip_to_address_time")
+ private LocalDateTime ipToAddressTime;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+ /**
+ * 删除标志,是否有效:1 可用 0不可用
+ */
+ @TableField("valid")
+ @TableLogic
+ private Integer valid;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String SESSION_ID = "session_id";
+
+ public static final String ACCOUNT_ID = "account_id";
+
+ public static final String USER_ID = "user_id";
+
+ public static final String CORP_ID = "corp_id";
+
+ public static final String HOSPITAL_ID = "hospital_id";
+
+ public static final String ORG_ID = "org_id";
+
+ public static final String ACCOUNT = "account";
+
+ public static final String MOBILE = "mobile";
+
+ public static final String USER_NAME = "user_name";
+
+ public static final String CORP_NAME = "corp_name";
+
+ public static final String HOSPITAL_NAME = "hospital_name";
+
+ public static final String ORG_NAME = "org_name";
+
+ public static final String USER_TYPE = "user_type";
+
+ public static final String APP_TYPE = "app_type";
+
+ public static final String APP_CODE = "app_code";
+
+ public static final String LOGIN_TYPE = "login_type";
+
+ public static final String LOGOUT_TYPE = "logout_type";
+
+ public static final String LOGIN_TIME = "login_time";
+
+ public static final String LOGOUT_TIME = "logout_time";
+
+ public static final String DEVICE_CLASS = "device_class";
+
+ public static final String DEVICE_NAME = "device_name";
+
+ public static final String DEVICE_BRAND = "device_brand";
+
+ public static final String OS = "os";
+
+ public static final String BROWSER = "browser";
+
+ public static final String COUNTRY = "country";
+
+ public static final String PROVINCE = "province";
+
+ public static final String CITY = "city";
+
+ public static final String COUNTY = "county";
+
+ public static final String ADDRESS = "address";
+
+ public static final String LNG = "lng";
+
+ public static final String LAT = "lat";
+
+ public static final String ISP = "isp";
+
+ public static final String IP = "ip";
+
+ public static final String USER_AGENT = "user_agent";
+
+ public static final String LOGOUT_ADDRESS = "logout_address";
+
+ public static final String LOGOUT_IP = "logout_ip";
+
+ public static final String LOGOUT_USER_AGENT = "logout_user_agent";
+
+ public static final String ABNORMAL_STATUS = "abnormal_status";
+
+ public static final String IP_TO_ADDRESS_STATUS = "ip_to_address_status";
+
+ public static final String IP_TO_ADDRESS_COUNT = "ip_to_address_count";
+
+ public static final String IP_TO_ADDRESS_TIME = "ip_to_address_time";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/LoginSession.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/LoginSession.java
new file mode 100644
index 0000000..d508918
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/LoginSession.java
@@ -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;
+
+/**
+ *
+ * 登录会话表,存放在线用户信息
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_login_session")
+public class LoginSession extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 会话ID
+ */
+ @TableField("session_id")
+ private String sessionId;
+
+ /**
+ * 账号ID
+ */
+ @TableField("account_id")
+ private Long accountId;
+
+ /**
+ * 用户ID
+ */
+ @TableField("user_id")
+ private Long userId;
+
+ /**
+ * 公司ID
+ */
+ @TableField("corp_id")
+ private Long corpId;
+
+ /**
+ * 医院ID
+ */
+ @TableField("hospital_id")
+ private Long hospitalId;
+
+ /**
+ * 组织ID
+ */
+ @TableField("org_id")
+ private Long orgId;
+
+ /**
+ * 账号
+ */
+ @TableField("account")
+ private String account;
+
+ /**
+ * 手机号
+ */
+ @TableField("mobile")
+ private String mobile;
+
+ /**
+ * 用户名称
+ */
+ @TableField("user_name")
+ private String userName;
+
+ /**
+ * 公司名称
+ */
+ @TableField("corp_name")
+ private String corpName;
+
+ /**
+ * 医院名称
+ */
+ @TableField("hospital_name")
+ private String hospitalName;
+
+ /**
+ * 组织名称,存放平台组织或者医院科室或者公司门店
+ */
+ @TableField("org_name")
+ private String orgName;
+
+ /**
+ * 用户类型:1、平台用户,2、公司用户,3、医院用户,4、患者
+ */
+ @TableField("user_type")
+ private Integer userType;
+
+ /**
+ * 应用类型:1、pc,2、app,3、wechat,4、miniapp
+ */
+ @TableField("app_type")
+ private Integer appType;
+
+ /**
+ * 应用编码:暂未使用
+ */
+ @TableField("app_code")
+ private Integer appCode;
+
+ /**
+ * 登录类型:1、自主登录,2、漫游登录
+ */
+ @TableField("login_type")
+ private Integer loginType;
+
+ /**
+ * 登录时间
+ */
+ @TableField("login_time")
+ private LocalDateTime loginTime;
+
+ /**
+ * 设备类型
+ */
+ @TableField("device_class")
+ private String deviceClass;
+
+ /**
+ * 设备名称
+ */
+ @TableField("device_name")
+ private String deviceName;
+
+ /**
+ * 设备品牌
+ */
+ @TableField("device_brand")
+ private String deviceBrand;
+
+ /**
+ * 操作系统
+ */
+ @TableField("os")
+ private String os;
+
+ /**
+ * 浏览器
+ */
+ @TableField("browser")
+ private String browser;
+
+ /**
+ * 国家
+ */
+ @TableField("country")
+ private String country;
+
+ /**
+ * 省份
+ */
+ @TableField("province")
+ private String province;
+
+ /**
+ * 地市
+ */
+ @TableField("city")
+ private String city;
+
+ /**
+ * 区县
+ */
+ @TableField("county")
+ private String county;
+
+ /**
+ * 地址
+ */
+ @TableField("address")
+ private String address;
+
+ /**
+ * 精度
+ */
+ @TableField("lng")
+ private String lng;
+
+ /**
+ * 纬度
+ */
+ @TableField("lat")
+ private String lat;
+
+ /**
+ * 网络服务提供商
+ */
+ @TableField("isp")
+ private String isp;
+
+ /**
+ * IP地址
+ */
+ @TableField("ip")
+ private String ip;
+
+ /**
+ * 用户代理,存放用户登录时客户端信息
+ */
+ @TableField("user_agent")
+ private String userAgent;
+
+ /**
+ * ip转地址状态:0、未获取,1、登录地址获取成功,2、退出地址获取成功,-1、登录地址获取失败,-2、退出地址获取失败
+ */
+ @TableField("ip_to_address_status")
+ private Integer ipToAddressStatus;
+
+ /**
+ * ip转地址次数,最多转换3次,三次失败修改状态为失败(-1、-2)
+ */
+ @TableField("ip_to_address_count")
+ private Integer ipToAddressCount;
+
+ /**
+ * ip转地址时间
+ */
+ @TableField("ip_to_address_time")
+ private LocalDateTime ipToAddressTime;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String SESSION_ID = "session_id";
+
+ public static final String ACCOUNT_ID = "account_id";
+
+ public static final String USER_ID = "user_id";
+
+ public static final String CORP_ID = "corp_id";
+
+ public static final String HOSPITAL_ID = "hospital_id";
+
+ public static final String ORG_ID = "org_id";
+
+ public static final String ACCOUNT = "account";
+
+ public static final String MOBILE = "mobile";
+
+ public static final String USER_NAME = "user_name";
+
+ public static final String CORP_NAME = "corp_name";
+
+ public static final String HOSPITAL_NAME = "hospital_name";
+
+ public static final String ORG_NAME = "org_name";
+
+ public static final String USER_TYPE = "user_type";
+
+ public static final String APP_TYPE = "app_type";
+
+ public static final String APP_CODE = "app_code";
+
+ public static final String LOGIN_TYPE = "login_type";
+
+ public static final String LOGIN_TIME = "login_time";
+
+ public static final String DEVICE_CLASS = "device_class";
+
+ public static final String DEVICE_NAME = "device_name";
+
+ public static final String DEVICE_BRAND = "device_brand";
+
+ public static final String OS = "os";
+
+ public static final String BROWSER = "browser";
+
+ public static final String COUNTRY = "country";
+
+ public static final String PROVINCE = "province";
+
+ public static final String CITY = "city";
+
+ public static final String COUNTY = "county";
+
+ public static final String ADDRESS = "address";
+
+ public static final String LNG = "lng";
+
+ public static final String LAT = "lat";
+
+ public static final String ISP = "isp";
+
+ public static final String IP = "ip";
+
+ public static final String USER_AGENT = "user_agent";
+
+ public static final String IP_TO_ADDRESS_STATUS = "ip_to_address_status";
+
+ public static final String IP_TO_ADDRESS_COUNT = "ip_to_address_count";
+
+ public static final String IP_TO_ADDRESS_TIME = "ip_to_address_time";
+
+ public static final String REMARK = "remark";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/Resource.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/Resource.java
new file mode 100644
index 0000000..f551ab2
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/Resource.java
@@ -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;
+
+/**
+ *
+ * 资源表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_resource")
+public class Resource extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 服务ID
+ */
+ @TableField("service_id")
+ private Long serviceId;
+
+ /**
+ * 名称
+ */
+ @TableField("name")
+ private String name;
+
+ /**
+ * 请求地址,可以用于前端ajax调用,后端用于做权限控制
+ */
+ @TableField("url")
+ private String url;
+
+ /**
+ * 请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
+ */
+ @TableField("method")
+ private String method;
+
+ /**
+ * 子系统:0、common,1、platform,2、partner,3、hospital,4、patient 用于限定维护菜单资源关系,公共资源允许所有菜单关联,其他资源只允许对应的菜单关联,如:平台菜单只允许关联到公共资源和平台资源
+ */
+ @TableField("subsystem")
+ private Integer subsystem;
+
+ /**
+ * 分类:0、common,1、pc,2、app,3、wechat,4、miniapp
+ */
+ @TableField("category")
+ private Integer category;
+
+ /**
+ * 启用状态:0 、停用,1、启用
+ */
+ @TableField("enabled")
+ private Integer enabled;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+ /**
+ * 删除标志,是否有效:1 可用 0不可用
+ */
+ @TableField("valid")
+ @TableLogic
+ private Integer valid;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String SERVICE_ID = "service_id";
+
+ public static final String NAME = "name";
+
+ public static final String URL = "url";
+
+ public static final String METHOD = "method";
+
+ public static final String SUBSYSTEM = "subsystem";
+
+ public static final String CATEGORY = "category";
+
+ public static final String ENABLED = "enabled";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/Service.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/Service.java
new file mode 100644
index 0000000..cc578c3
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/Service.java
@@ -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;
+
+/**
+ *
+ * 服务表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_service")
+public class Service extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsCode.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsCode.java
new file mode 100644
index 0000000..b683bf8
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsCode.java
@@ -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;
+
+/**
+ *
+ * 短信验证码表,过期时间和使用状态可以不用
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sms_code")
+public class SmsCode extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsScene.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsScene.java
new file mode 100644
index 0000000..c0625eb
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsScene.java
@@ -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;
+
+/**
+ *
+ * 短信场景表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sms_scene")
+public class SmsScene extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 公司ID,0为公用,默认使用0对应的短信场景
+ */
+ @TableField("corp_id")
+ private Long corpId;
+
+ /**
+ * 场景类型 0、其他/未分类 1、注册 2、找回密码 3、动态密码 4、订单 5、支付 6、报告单 9、系统通知
+ */
+ @TableField("type")
+ private Integer type;
+
+ /**
+ * 场景编码,业务系统根据该编码区分不同的业务场景
+ */
+ @TableField("code")
+ private String code;
+
+ /**
+ * 场景名称
+ */
+ @TableField("name")
+ private String name;
+
+ /**
+ * 短信签名ID
+ */
+ @TableField("sign_id")
+ private Long signId;
+
+ /**
+ * 短信模板ID
+ */
+ @TableField("template_id")
+ private Long templateId;
+
+ /**
+ * 启用状态:0 、停用,1、启用
+ */
+ @TableField("enabled")
+ private Integer enabled;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+ /**
+ * 删除标志,是否有效:1 可用 0不可用
+ */
+ @TableField("valid")
+ @TableLogic
+ private Integer valid;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String CORP_ID = "corp_id";
+
+ public static final String TYPE = "type";
+
+ public static final String CODE = "code";
+
+ public static final String NAME = "name";
+
+ public static final String SIGN_ID = "sign_id";
+
+ public static final String TEMPLATE_ID = "template_id";
+
+ public static final String ENABLED = "enabled";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsSend.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsSend.java
new file mode 100644
index 0000000..9ed747c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsSend.java
@@ -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;
+
+/**
+ *
+ * 短信发送表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sms_send")
+public class SmsSend extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 公司ID,0为公用,默认使用0对应的短信场景
+ */
+ @TableField("corp_id")
+ private Long corpId;
+
+ /**
+ * 短信场景ID
+ */
+ @TableField("scene_id")
+ private Long sceneId;
+
+ /**
+ * 模板编号,第三方模板编码,如阿里云短信模板code
+ */
+ @TableField("template_code")
+ private String templateCode;
+
+ /**
+ * 短信类型 0、其他/未分类 1、注册 2、找回密码 3、动态密码 4、订单 5、支付 6、报告单 9、系统通知
+ */
+ @TableField("type")
+ private Integer type;
+
+ /**
+ * 手机号码,多个号码用户英文逗号(,)分隔
+ */
+ @TableField("mobile")
+ private String mobile;
+
+ /**
+ * 短信内容
+ */
+ @TableField("content")
+ private String content;
+
+ /**
+ * 关联ID,如:用户ID、订单ID等
+ */
+ @TableField("relation_id")
+ private String relationId;
+
+ /**
+ * 短信接口测ID
+ */
+ @TableField("sid")
+ private String sid;
+
+ /**
+ * 发送条数
+ */
+ @TableField("send")
+ private Integer send;
+
+ /**
+ * 短信接口结果码
+ */
+ @TableField("result_code")
+ private String resultCode;
+
+ /**
+ * 短信接口结果说明
+ */
+ @TableField("result_info")
+ private String resultInfo;
+
+ /**
+ * 短信接口响应消息,完整的响应包
+ */
+ @TableField("response")
+ private String response;
+
+ /**
+ * 删除标志,是否有效:1 可用 0不可用
+ */
+ @TableField("valid")
+ @TableLogic
+ private Integer valid;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String CORP_ID = "corp_id";
+
+ public static final String SCENE_ID = "scene_id";
+
+ public static final String TEMPLATE_CODE = "template_code";
+
+ public static final String TYPE = "type";
+
+ public static final String MOBILE = "mobile";
+
+ public static final String CONTENT = "content";
+
+ public static final String RELATION_ID = "relation_id";
+
+ public static final String SID = "sid";
+
+ public static final String SEND = "send";
+
+ public static final String RESULT_CODE = "result_code";
+
+ public static final String RESULT_INFO = "result_info";
+
+ public static final String RESPONSE = "response";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsSign.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsSign.java
new file mode 100644
index 0000000..c0aa4a0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsSign.java
@@ -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;
+
+/**
+ *
+ * 短信签名表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sms_sign")
+public class SmsSign extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsTemplate.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsTemplate.java
new file mode 100644
index 0000000..c42c099
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SmsTemplate.java
@@ -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;
+
+/**
+ *
+ * 短信模板表,用于定义阿里云短信模板
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sms_template")
+public class SmsTemplate extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysDictData.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysDictData.java
new file mode 100644
index 0000000..f5c3e65
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysDictData.java
@@ -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;
+
+/**
+ *
+ * 数据字典表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_dict_data")
+public class SysDictData extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysDictType.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysDictType.java
new file mode 100644
index 0000000..d85738d
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysDictType.java
@@ -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;
+
+/**
+ *
+ * 数据字典类型表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_dict_type")
+public class SysDictType extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysFile.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysFile.java
new file mode 100644
index 0000000..4301c08
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysFile.java
@@ -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;
+
+/**
+ *
+ * 文件表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_file")
+public class SysFile extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysFileType.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysFileType.java
new file mode 100644
index 0000000..1ea743d
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysFileType.java
@@ -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;
+
+/**
+ *
+ * 文件类型表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_file_type")
+public class SysFileType extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysMenu.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysMenu.java
new file mode 100644
index 0000000..eaa1fd4
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysMenu.java
@@ -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;
+
+/**
+ *
+ * 菜单表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_menu")
+public class SysMenu extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 父菜单ID
+ */
+ @TableField("parent_id")
+ private Long parentId;
+
+ /**
+ * 菜单编码
+ */
+ @TableField("code")
+ private String code;
+
+ /**
+ * 菜单名称
+ */
+ @TableField("name")
+ private String name;
+
+ /**
+ * 菜单图标
+ */
+ @TableField("icon")
+ private String icon;
+
+ /**
+ * 链接地址,可以是页面地址,也可以是函数事件
+ */
+ @TableField("href")
+ private String href;
+
+ /**
+ * 请求地址,可以用于前端ajax调用,后端用于做权限控制
+ */
+ @TableField("url")
+ private String url;
+
+ /**
+ * 请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
+ */
+ @TableField("method")
+ private String method;
+
+ /**
+ * 权限,可以有多个,用逗号分隔,可用于第三方权限框架扩展
+ */
+ @TableField("permission")
+ private String permission;
+
+ /**
+ * 分类:1、pc,2、app,3、wechat,4、miniapp
+ */
+ @TableField("category")
+ private Integer category;
+
+ /**
+ * 类型:1、module,2、menu,3、button
+ */
+ @TableField("type")
+ private Integer type;
+
+ /**
+ * 层级,从1开始
+ */
+ @TableField("level")
+ private Integer level;
+
+ /**
+ * 显示顺序
+ */
+ @TableField("order_num")
+ private Integer orderNum;
+
+ /**
+ * 启用状态:0 、停用,1、启用
+ */
+ @TableField("enabled")
+ private Integer enabled;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+ /**
+ * 删除标志,是否有效:1 可用 0不可用
+ */
+ @TableField("valid")
+ @TableLogic
+ private Integer valid;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String PARENT_ID = "parent_id";
+
+ public static final String CODE = "code";
+
+ public static final String NAME = "name";
+
+ public static final String ICON = "icon";
+
+ public static final String HREF = "href";
+
+ public static final String URL = "url";
+
+ public static final String METHOD = "method";
+
+ public static final String PERMISSION = "permission";
+
+ public static final String CATEGORY = "category";
+
+ public static final String TYPE = "type";
+
+ public static final String LEVEL = "level";
+
+ public static final String ORDER_NUM = "order_num";
+
+ public static final String ENABLED = "enabled";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysMenuResource.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysMenuResource.java
new file mode 100644
index 0000000..58c9958
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysMenuResource.java
@@ -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;
+
+/**
+ *
+ * 菜单资源关系表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_menu_resource")
+public class SysMenuResource extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysOrg.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysOrg.java
new file mode 100644
index 0000000..bfb38b7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysOrg.java
@@ -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;
+
+/**
+ *
+ * 系统组织表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_org")
+public class SysOrg extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysPost.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysPost.java
new file mode 100644
index 0000000..811d7c7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysPost.java
@@ -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;
+
+/**
+ *
+ * 岗位表,需根据岗位编码判断用户是否有销售、物流权限
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_post")
+public class SysPost extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysRole.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysRole.java
new file mode 100644
index 0000000..d5f337f
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysRole.java
@@ -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;
+
+/**
+ *
+ * 角色表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_role")
+public class SysRole extends Model {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键,自增
+ */
+ @TableId(value = "id", type = IdType.AUTO)
+ private Long id;
+
+ /**
+ * 角色编码
+ */
+ @TableField("code")
+ private String code;
+
+ /**
+ * 角色名称
+ */
+ @TableField("name")
+ private String name;
+
+ /**
+ * 类型:1、平台,2、药店,3、医院
+ */
+ @TableField("type")
+ private Integer type;
+
+ /**
+ * 分类:1、pc,2、app,3、wechat,4、miniapp
+ */
+ @TableField("category")
+ private Integer category;
+
+ /**
+ * 管理角色标志:1 管理角色0 非管理角色,管理角色不允许修改角色菜单关系
+ */
+ @TableField("manager_flag")
+ private Integer managerFlag;
+
+ /**
+ * 预设角色标志:1 预设 0 非预设
+ */
+ @TableField("preset")
+ private Integer preset;
+
+ /**
+ * 启用状态:0 、停用,1、启用
+ */
+ @TableField("enabled")
+ private Integer enabled;
+
+ /**
+ * 备注
+ */
+ @TableField("remark")
+ private String remark;
+
+ /**
+ * 删除标志,是否有效:1 可用 0不可用
+ */
+ @TableField("valid")
+ @TableLogic
+ private Integer valid;
+
+ /**
+ * 创建人
+ */
+ @TableField("creator")
+ private Long creator;
+
+ /**
+ * 创建人姓名
+ */
+ @TableField("creator_name")
+ private String creatorName;
+
+ /**
+ * 创建时间
+ */
+ @TableField("create_time")
+ private LocalDateTime createTime;
+
+ /**
+ * 更新人
+ */
+ @TableField("updater")
+ private Long updater;
+
+ /**
+ * 更新人姓名
+ */
+ @TableField("updater_name")
+ private String updaterName;
+
+ /**
+ * 更新时间
+ */
+ @TableField("update_time")
+ private LocalDateTime updateTime;
+
+ /**
+ * 版本号
+ */
+ @TableField("version")
+ @Version
+ private Integer version;
+
+
+ public static final String ID = "id";
+
+ public static final String CODE = "code";
+
+ public static final String NAME = "name";
+
+ public static final String TYPE = "type";
+
+ public static final String CATEGORY = "category";
+
+ public static final String MANAGER_FLAG = "manager_flag";
+
+ public static final String PRESET = "preset";
+
+ public static final String ENABLED = "enabled";
+
+ public static final String REMARK = "remark";
+
+ public static final String VALID = "valid";
+
+ public static final String CREATOR = "creator";
+
+ public static final String CREATOR_NAME = "creator_name";
+
+ public static final String CREATE_TIME = "create_time";
+
+ public static final String UPDATER = "updater";
+
+ public static final String UPDATER_NAME = "updater_name";
+
+ public static final String UPDATE_TIME = "update_time";
+
+ public static final String VERSION = "version";
+
+ @Override
+ protected Serializable pkVal() {
+ return this.id;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysRoleMenu.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysRoleMenu.java
new file mode 100644
index 0000000..a6016bd
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysRoleMenu.java
@@ -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;
+
+/**
+ *
+ * 角色菜单关系表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_role_menu")
+public class SysRoleMenu extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUser.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUser.java
new file mode 100644
index 0000000..890bf07
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUser.java
@@ -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;
+
+/**
+ *
+ * 系统用户表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_user")
+public class SysUser extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUserPost.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUserPost.java
new file mode 100644
index 0000000..d2ed655
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUserPost.java
@@ -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;
+
+/**
+ *
+ * 用户岗位关系表,先限定一个用只有一种岗位
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_user_post")
+public class SysUserPost extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUserRole.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUserRole.java
new file mode 100644
index 0000000..1ae9af0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/SysUserRole.java
@@ -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;
+
+/**
+ *
+ * 用户角色关系表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_sys_user_role")
+public class SysUserRole extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/WechatTemplateMessage.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/WechatTemplateMessage.java
new file mode 100644
index 0000000..f4a93d9
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/entity/WechatTemplateMessage.java
@@ -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;
+
+/**
+ *
+ * 微信模板消息表
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@TableName("t_wechat_template_message")
+public class WechatTemplateMessage extends Model {
+
+ 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;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginLogMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginLogMapper.java
new file mode 100644
index 0000000..edaf912
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginLogMapper.java
@@ -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;
+
+/**
+ *
+ * 登录日志表,存放历史会话信息 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface LoginLogMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginLogMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginLogMapper.xml
new file mode 100644
index 0000000..f70871a
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginLogMapper.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginSessionMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginSessionMapper.java
new file mode 100644
index 0000000..a19ce0f
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginSessionMapper.java
@@ -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;
+
+/**
+ *
+ * 登录会话表,存放在线用户信息 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface LoginSessionMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginSessionMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginSessionMapper.xml
new file mode 100644
index 0000000..ed08df7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/LoginSessionMapper.xml
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ResourceMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ResourceMapper.java
new file mode 100644
index 0000000..7a32162
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ResourceMapper.java
@@ -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;
+
+/**
+ *
+ * 资源表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface ResourceMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ResourceMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ResourceMapper.xml
new file mode 100644
index 0000000..189b39a
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ResourceMapper.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, service_id, name, url, method, subsystem, category, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ServiceMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ServiceMapper.java
new file mode 100644
index 0000000..09b0111
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ServiceMapper.java
@@ -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;
+
+/**
+ *
+ * 服务表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface ServiceMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ServiceMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ServiceMapper.xml
new file mode 100644
index 0000000..f3ce46e
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/ServiceMapper.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, code, name, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsCodeMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsCodeMapper.java
new file mode 100644
index 0000000..2acf173
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsCodeMapper.java
@@ -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;
+
+/**
+ *
+ * 短信验证码表,过期时间和使用状态可以不用 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsCodeMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsCodeMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsCodeMapper.xml
new file mode 100644
index 0000000..fed434d
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsCodeMapper.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, mobile, code, type, expires_time, used_status, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSceneMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSceneMapper.java
new file mode 100644
index 0000000..e739a60
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSceneMapper.java
@@ -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;
+
+/**
+ *
+ * 短信场景表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsSceneMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSceneMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSceneMapper.xml
new file mode 100644
index 0000000..7e00cb4
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSceneMapper.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, corp_id, type, code, name, sign_id, template_id, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSendMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSendMapper.java
new file mode 100644
index 0000000..bd29027
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSendMapper.java
@@ -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;
+
+/**
+ *
+ * 短信发送表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsSendMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSendMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSendMapper.xml
new file mode 100644
index 0000000..7774e26
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSendMapper.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSignMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSignMapper.java
new file mode 100644
index 0000000..0292e09
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSignMapper.java
@@ -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;
+
+/**
+ *
+ * 短信签名表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsSignMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSignMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSignMapper.xml
new file mode 100644
index 0000000..b6c00a0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsSignMapper.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, name, apply_time, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsTemplateMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsTemplateMapper.java
new file mode 100644
index 0000000..3ecd200
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsTemplateMapper.java
@@ -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;
+
+/**
+ *
+ * 短信模板表,用于定义阿里云短信模板 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsTemplateMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsTemplateMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsTemplateMapper.xml
new file mode 100644
index 0000000..fcc4c08
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SmsTemplateMapper.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, type, code, name, content, description, apply_time, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictDataMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictDataMapper.java
new file mode 100644
index 0000000..1ae3982
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictDataMapper.java
@@ -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;
+
+/**
+ *
+ * 数据字典表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysDictDataMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictDataMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictDataMapper.xml
new file mode 100644
index 0000000..4b69cb3
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictDataMapper.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 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
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictTypeMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictTypeMapper.java
new file mode 100644
index 0000000..ff3690b
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictTypeMapper.java
@@ -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;
+
+/**
+ *
+ * 数据字典类型表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysDictTypeMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictTypeMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictTypeMapper.xml
new file mode 100644
index 0000000..95165af
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysDictTypeMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, type_code, type_name, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileMapper.java
new file mode 100644
index 0000000..b3ad5aa
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileMapper.java
@@ -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;
+
+/**
+ *
+ * 文件表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysFileMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileMapper.xml
new file mode 100644
index 0000000..562dbf0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileMapper.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, type_code, file_code, file_name, file_url, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileTypeMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileTypeMapper.java
new file mode 100644
index 0000000..f3726ac
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileTypeMapper.java
@@ -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;
+
+/**
+ *
+ * 文件类型表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysFileTypeMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileTypeMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileTypeMapper.xml
new file mode 100644
index 0000000..56fe3bb
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysFileTypeMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, type_code, type_name, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuMapper.java
new file mode 100644
index 0000000..d8b5491
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuMapper.java
@@ -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;
+
+/**
+ *
+ * 菜单表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysMenuMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuMapper.xml
new file mode 100644
index 0000000..ccefd9c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuMapper.xml
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, parent_id, code, name, icon, href, url, method, permission, category, type, level, order_num, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuResourceMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuResourceMapper.java
new file mode 100644
index 0000000..cd1afce
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuResourceMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysMenuResource;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 菜单资源关系表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysMenuResourceMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuResourceMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuResourceMapper.xml
new file mode 100644
index 0000000..a9ed0ea
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysMenuResourceMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, menu_id, resource_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysOrgMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysOrgMapper.java
new file mode 100644
index 0000000..a44d651
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysOrgMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysOrg;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 系统组织表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysOrgMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysOrgMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysOrgMapper.xml
new file mode 100644
index 0000000..d5511eb
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysOrgMapper.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, parent_id, genealogy_id, name, contact, phone, address, email, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysPostMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysPostMapper.java
new file mode 100644
index 0000000..2bcd18e
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysPostMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysPost;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 岗位表,需根据岗位编码判断用户是否有销售、物流权限 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysPostMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysPostMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysPostMapper.xml
new file mode 100644
index 0000000..e603987
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysPostMapper.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, parent_id, type, code, name, preset, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMapper.java
new file mode 100644
index 0000000..cbc0095
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 角色表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysRoleMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMapper.xml
new file mode 100644
index 0000000..e16288e
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMapper.xml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, code, name, type, category, manager_flag, preset, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMenuMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMenuMapper.java
new file mode 100644
index 0000000..90835dd
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMenuMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysRoleMenu;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 角色菜单关系表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysRoleMenuMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMenuMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMenuMapper.xml
new file mode 100644
index 0000000..44e8c08
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysRoleMenuMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, role_id, menu_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserMapper.java
new file mode 100644
index 0000000..329b8a0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysUser;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 系统用户表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysUserMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserMapper.xml
new file mode 100644
index 0000000..a62195b
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserMapper.xml
@@ -0,0 +1,43 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, org_id, account, password, code, name, sex, mobile, phone, idcard, birthday, email, portrait, wechat, qq, address, nonce_str, modify_password_time, mobile_enabled, enabled, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserPostMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserPostMapper.java
new file mode 100644
index 0000000..b143207
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserPostMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysUserPost;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 用户岗位关系表,先限定一个用只有一种岗位 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysUserPostMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserPostMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserPostMapper.xml
new file mode 100644
index 0000000..76056b1
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserPostMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, user_id, post_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserRoleMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserRoleMapper.java
new file mode 100644
index 0000000..6450764
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserRoleMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.SysUserRole;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 用户角色关系表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysUserRoleMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserRoleMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserRoleMapper.xml
new file mode 100644
index 0000000..30e5e82
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/SysUserRoleMapper.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, user_id, role_id, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/WechatTemplateMessageMapper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/WechatTemplateMessageMapper.java
new file mode 100644
index 0000000..f2bd6c7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/WechatTemplateMessageMapper.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.mapper;
+
+import com.mt.wms.core.dal.entity.WechatTemplateMessage;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ *
+ * 微信模板消息表 Mapper 接口
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface WechatTemplateMessageMapper extends BaseMapper {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/WechatTemplateMessageMapper.xml b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/WechatTemplateMessageMapper.xml
new file mode 100644
index 0000000..758dc27
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/mapper/WechatTemplateMessageMapper.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ id, account_id, user_type, user_id, open_id, template_id, title, content, url, message_id, status, reserved, remark, valid, creator, creator_name, create_time, updater, updater_name, update_time, version
+
+
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/LoginLogServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/LoginLogServiceBiz.java
new file mode 100644
index 0000000..e2e9812
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/LoginLogServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.LoginLog;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 登录日志表,存放历史会话信息 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface LoginLogServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/LoginSessionServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/LoginSessionServiceBiz.java
new file mode 100644
index 0000000..9768a57
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/LoginSessionServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.LoginSession;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 登录会话表,存放在线用户信息 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface LoginSessionServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ResourceServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ResourceServiceBiz.java
new file mode 100644
index 0000000..4fbee01
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ResourceServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.Resource;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 资源表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface ResourceServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ServiceServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ServiceServiceBiz.java
new file mode 100644
index 0000000..e04bc69
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/ServiceServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.Service;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 服务表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface ServiceServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsCodeServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsCodeServiceBiz.java
new file mode 100644
index 0000000..b3e06d7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsCodeServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SmsCode;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 短信验证码表,过期时间和使用状态可以不用 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsCodeServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSceneServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSceneServiceBiz.java
new file mode 100644
index 0000000..aebfaaa
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSceneServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SmsScene;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 短信场景表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsSceneServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSendServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSendServiceBiz.java
new file mode 100644
index 0000000..1fc4b37
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSendServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SmsSend;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 短信发送表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsSendServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSignServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSignServiceBiz.java
new file mode 100644
index 0000000..3876586
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsSignServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SmsSign;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 短信签名表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsSignServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsTemplateServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsTemplateServiceBiz.java
new file mode 100644
index 0000000..7004f6e
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SmsTemplateServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SmsTemplate;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 短信模板表,用于定义阿里云短信模板 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SmsTemplateServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysDictDataServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysDictDataServiceBiz.java
new file mode 100644
index 0000000..2a9e788
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysDictDataServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysDictData;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 数据字典表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysDictDataServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysDictTypeServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysDictTypeServiceBiz.java
new file mode 100644
index 0000000..1d6fc21
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysDictTypeServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysDictType;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 数据字典类型表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysDictTypeServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysFileServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysFileServiceBiz.java
new file mode 100644
index 0000000..52860f8
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysFileServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysFile;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 文件表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysFileServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysFileTypeServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysFileTypeServiceBiz.java
new file mode 100644
index 0000000..fb78bc6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysFileTypeServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysFileType;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 文件类型表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysFileTypeServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysMenuResourceServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysMenuResourceServiceBiz.java
new file mode 100644
index 0000000..83ba761
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysMenuResourceServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysMenuResource;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 菜单资源关系表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysMenuResourceServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysMenuServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysMenuServiceBiz.java
new file mode 100644
index 0000000..6ec0ec2
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysMenuServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysMenu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 菜单表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysMenuServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysOrgServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysOrgServiceBiz.java
new file mode 100644
index 0000000..cb5f9d6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysOrgServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysOrg;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 系统组织表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysOrgServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysPostServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysPostServiceBiz.java
new file mode 100644
index 0000000..87be355
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysPostServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysPost;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 岗位表,需根据岗位编码判断用户是否有销售、物流权限 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysPostServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysRoleMenuServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysRoleMenuServiceBiz.java
new file mode 100644
index 0000000..9ec8742
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysRoleMenuServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysRoleMenu;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 角色菜单关系表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysRoleMenuServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysRoleServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysRoleServiceBiz.java
new file mode 100644
index 0000000..7196c01
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysRoleServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysRole;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 角色表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysRoleServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserPostServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserPostServiceBiz.java
new file mode 100644
index 0000000..dc5ea35
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserPostServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysUserPost;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 用户岗位关系表,先限定一个用只有一种岗位 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysUserPostServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserRoleServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserRoleServiceBiz.java
new file mode 100644
index 0000000..61556a3
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserRoleServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysUserRole;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 用户角色关系表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysUserRoleServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserServiceBiz.java
new file mode 100644
index 0000000..c8ac62a
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/SysUserServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.SysUser;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 系统用户表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface SysUserServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/WechatTemplateMessageServiceBiz.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/WechatTemplateMessageServiceBiz.java
new file mode 100644
index 0000000..dda71ed
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/WechatTemplateMessageServiceBiz.java
@@ -0,0 +1,16 @@
+package com.mt.wms.core.dal.service;
+
+import com.mt.wms.core.dal.entity.WechatTemplateMessage;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *
+ * 微信模板消息表 服务类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+public interface WechatTemplateMessageServiceBiz extends IService {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/LoginLogServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/LoginLogServiceBizImpl.java
new file mode 100644
index 0000000..0a259a5
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/LoginLogServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.LoginLog;
+import com.mt.wms.core.dal.mapper.LoginLogMapper;
+import com.mt.wms.core.dal.service.LoginLogServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 登录日志表,存放历史会话信息 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class LoginLogServiceBizImpl extends ServiceImpl implements LoginLogServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/LoginSessionServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/LoginSessionServiceBizImpl.java
new file mode 100644
index 0000000..67f7af6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/LoginSessionServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.LoginSession;
+import com.mt.wms.core.dal.mapper.LoginSessionMapper;
+import com.mt.wms.core.dal.service.LoginSessionServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 登录会话表,存放在线用户信息 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class LoginSessionServiceBizImpl extends ServiceImpl implements LoginSessionServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ResourceServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ResourceServiceBizImpl.java
new file mode 100644
index 0000000..716cb53
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ResourceServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.Resource;
+import com.mt.wms.core.dal.mapper.ResourceMapper;
+import com.mt.wms.core.dal.service.ResourceServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 资源表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class ResourceServiceBizImpl extends ServiceImpl implements ResourceServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ServiceServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ServiceServiceBizImpl.java
new file mode 100644
index 0000000..bd26d62
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/ServiceServiceBizImpl.java
@@ -0,0 +1,19 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.Service;
+import com.mt.wms.core.dal.mapper.ServiceMapper;
+import com.mt.wms.core.dal.service.ServiceServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+
+/**
+ *
+ * 服务表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@org.springframework.stereotype.Service
+public class ServiceServiceBizImpl extends ServiceImpl implements ServiceServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsCodeServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsCodeServiceBizImpl.java
new file mode 100644
index 0000000..3211315
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsCodeServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SmsCode;
+import com.mt.wms.core.dal.mapper.SmsCodeMapper;
+import com.mt.wms.core.dal.service.SmsCodeServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 短信验证码表,过期时间和使用状态可以不用 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SmsCodeServiceBizImpl extends ServiceImpl implements SmsCodeServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSceneServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSceneServiceBizImpl.java
new file mode 100644
index 0000000..b6e7ac0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSceneServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SmsScene;
+import com.mt.wms.core.dal.mapper.SmsSceneMapper;
+import com.mt.wms.core.dal.service.SmsSceneServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 短信场景表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SmsSceneServiceBizImpl extends ServiceImpl implements SmsSceneServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSendServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSendServiceBizImpl.java
new file mode 100644
index 0000000..9621855
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSendServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SmsSend;
+import com.mt.wms.core.dal.mapper.SmsSendMapper;
+import com.mt.wms.core.dal.service.SmsSendServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 短信发送表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SmsSendServiceBizImpl extends ServiceImpl implements SmsSendServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSignServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSignServiceBizImpl.java
new file mode 100644
index 0000000..601c9db
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsSignServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SmsSign;
+import com.mt.wms.core.dal.mapper.SmsSignMapper;
+import com.mt.wms.core.dal.service.SmsSignServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 短信签名表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SmsSignServiceBizImpl extends ServiceImpl implements SmsSignServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsTemplateServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsTemplateServiceBizImpl.java
new file mode 100644
index 0000000..f1b0a59
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SmsTemplateServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SmsTemplate;
+import com.mt.wms.core.dal.mapper.SmsTemplateMapper;
+import com.mt.wms.core.dal.service.SmsTemplateServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 短信模板表,用于定义阿里云短信模板 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SmsTemplateServiceBizImpl extends ServiceImpl implements SmsTemplateServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysDictDataServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysDictDataServiceBizImpl.java
new file mode 100644
index 0000000..6333bd7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysDictDataServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysDictData;
+import com.mt.wms.core.dal.mapper.SysDictDataMapper;
+import com.mt.wms.core.dal.service.SysDictDataServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 数据字典表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysDictDataServiceBizImpl extends ServiceImpl implements SysDictDataServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysDictTypeServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysDictTypeServiceBizImpl.java
new file mode 100644
index 0000000..747f1a8
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysDictTypeServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysDictType;
+import com.mt.wms.core.dal.mapper.SysDictTypeMapper;
+import com.mt.wms.core.dal.service.SysDictTypeServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 数据字典类型表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysDictTypeServiceBizImpl extends ServiceImpl implements SysDictTypeServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysFileServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysFileServiceBizImpl.java
new file mode 100644
index 0000000..16905e0
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysFileServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysFile;
+import com.mt.wms.core.dal.mapper.SysFileMapper;
+import com.mt.wms.core.dal.service.SysFileServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 文件表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysFileServiceBizImpl extends ServiceImpl implements SysFileServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysFileTypeServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysFileTypeServiceBizImpl.java
new file mode 100644
index 0000000..85eded3
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysFileTypeServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysFileType;
+import com.mt.wms.core.dal.mapper.SysFileTypeMapper;
+import com.mt.wms.core.dal.service.SysFileTypeServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 文件类型表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysFileTypeServiceBizImpl extends ServiceImpl implements SysFileTypeServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysMenuResourceServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysMenuResourceServiceBizImpl.java
new file mode 100644
index 0000000..639f85d
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysMenuResourceServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysMenuResource;
+import com.mt.wms.core.dal.mapper.SysMenuResourceMapper;
+import com.mt.wms.core.dal.service.SysMenuResourceServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 菜单资源关系表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysMenuResourceServiceBizImpl extends ServiceImpl implements SysMenuResourceServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysMenuServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysMenuServiceBizImpl.java
new file mode 100644
index 0000000..6acf5a5
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysMenuServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysMenu;
+import com.mt.wms.core.dal.mapper.SysMenuMapper;
+import com.mt.wms.core.dal.service.SysMenuServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 菜单表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysMenuServiceBizImpl extends ServiceImpl implements SysMenuServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysOrgServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysOrgServiceBizImpl.java
new file mode 100644
index 0000000..2fb0150
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysOrgServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysOrg;
+import com.mt.wms.core.dal.mapper.SysOrgMapper;
+import com.mt.wms.core.dal.service.SysOrgServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 系统组织表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysOrgServiceBizImpl extends ServiceImpl implements SysOrgServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysPostServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysPostServiceBizImpl.java
new file mode 100644
index 0000000..d35f58c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysPostServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysPost;
+import com.mt.wms.core.dal.mapper.SysPostMapper;
+import com.mt.wms.core.dal.service.SysPostServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 岗位表,需根据岗位编码判断用户是否有销售、物流权限 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysPostServiceBizImpl extends ServiceImpl implements SysPostServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysRoleMenuServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysRoleMenuServiceBizImpl.java
new file mode 100644
index 0000000..7ea5110
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysRoleMenuServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysRoleMenu;
+import com.mt.wms.core.dal.mapper.SysRoleMenuMapper;
+import com.mt.wms.core.dal.service.SysRoleMenuServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 角色菜单关系表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysRoleMenuServiceBizImpl extends ServiceImpl implements SysRoleMenuServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysRoleServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysRoleServiceBizImpl.java
new file mode 100644
index 0000000..98343a6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysRoleServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysRole;
+import com.mt.wms.core.dal.mapper.SysRoleMapper;
+import com.mt.wms.core.dal.service.SysRoleServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 角色表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysRoleServiceBizImpl extends ServiceImpl implements SysRoleServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserPostServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserPostServiceBizImpl.java
new file mode 100644
index 0000000..a9933d1
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserPostServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysUserPost;
+import com.mt.wms.core.dal.mapper.SysUserPostMapper;
+import com.mt.wms.core.dal.service.SysUserPostServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 用户岗位关系表,先限定一个用只有一种岗位 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysUserPostServiceBizImpl extends ServiceImpl implements SysUserPostServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserRoleServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserRoleServiceBizImpl.java
new file mode 100644
index 0000000..4ad0902
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserRoleServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysUserRole;
+import com.mt.wms.core.dal.mapper.SysUserRoleMapper;
+import com.mt.wms.core.dal.service.SysUserRoleServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 用户角色关系表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysUserRoleServiceBizImpl extends ServiceImpl implements SysUserRoleServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserServiceBizImpl.java
new file mode 100644
index 0000000..05c9789
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/SysUserServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.SysUser;
+import com.mt.wms.core.dal.mapper.SysUserMapper;
+import com.mt.wms.core.dal.service.SysUserServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 系统用户表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class SysUserServiceBizImpl extends ServiceImpl implements SysUserServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/WechatTemplateMessageServiceBizImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/WechatTemplateMessageServiceBizImpl.java
new file mode 100644
index 0000000..29395a1
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dal/service/impl/WechatTemplateMessageServiceBizImpl.java
@@ -0,0 +1,20 @@
+package com.mt.wms.core.dal.service.impl;
+
+import com.mt.wms.core.dal.entity.WechatTemplateMessage;
+import com.mt.wms.core.dal.mapper.WechatTemplateMessageMapper;
+import com.mt.wms.core.dal.service.WechatTemplateMessageServiceBiz;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ *
+ * 微信模板消息表 服务实现类
+ *
+ *
+ * @author mt
+ * @since 2020-12-21
+ */
+@Service
+public class WechatTemplateMessageServiceBizImpl extends ServiceImpl implements WechatTemplateMessageServiceBiz {
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dto/ApiLogDto.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/ApiLogDto.java
new file mode 100644
index 0000000..677bc78
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/ApiLogDto.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.dto;
+
+
+import com.mt.wms.core.base.BaseDto;
+import lombok.Builder;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * api调用日志传输对象
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@Data
+@Builder
+public class ApiLogDto extends BaseDto {
+ private String sessionId;
+ private Long passportUserId;
+ private Long userId;
+ private String userName;
+ private int userType;
+
+ private String ip;
+ /**
+ * 用户代理
+ */
+ private String userAgent;
+ /**
+ * 请求地址
+ */
+ private String url;
+ /**
+ * 操作方式
+ */
+ private String method;
+
+ /**
+ * 操作提交的数据
+ */
+ private String params;
+
+ /**
+ * 异常信息
+ */
+ private String exception;
+
+ /**
+ * 请求时间
+ */
+ private Date time;
+
+ /**
+ * 执行时长
+ */
+ private long duration;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dto/LoginLogDto.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/LoginLogDto.java
new file mode 100644
index 0000000..94d467c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/LoginLogDto.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.dto;
+
+import com.mt.wms.core.base.BaseDto;
+import lombok.Builder;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import java.util.Date;
+
+/**
+ * 登录日志传输对象
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@Data
+@Accessors(chain = true)
+@Builder
+public class LoginLogDto extends BaseDto {
+ public static final int ACTION_LOGIN = 1;
+ public static final int ACTION_LOGOUT = 2;
+ public static final int LOGIN_TYPE_SELF = 1;
+ public static final int LOGIN_TYPE_ROAM = 2;
+ public static final int LOGOUT_TYPE_SELF = 1;
+ public static final int LOGOUT_TYPE_MANAGE = 2;
+ public static final int LOGOUT_TYPE_EXPIRED = 3;
+ private String parentSessionId;
+ private String parentUserName;
+ private String sessionId;
+ private Long passportUserId;
+ private Long userId;
+ private Long accountId;
+ private Long orgId;
+ private String account;
+ private String mobile;
+ private String userName;
+ private int userType;
+ private int appType;
+ private int appCode;
+
+ private String ip;
+
+ /**
+ * 用户代理
+ */
+ private String userAgent;
+ private Date loginTime;
+ private Date logoutTime;
+ private int result;
+ /**
+ * 登录类型:1、自主登录,2、漫游登录
+ */
+ private int loginType;
+ /**
+ * 退出类型:1、自主退出,2、管理退出,3,超时退出
+ */
+ private int logoutType;
+ /**
+ * 操作动作:1、登录,2、退出
+ */
+ private int action;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dto/LoginUser.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/LoginUser.java
new file mode 100644
index 0000000..60f8ba6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/LoginUser.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.dto;
+
+import com.mt.wms.core.base.BaseDto;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@EqualsAndHashCode(callSuper = false)
+@Builder
+@Data
+@Accessors(chain = true)
+public class LoginUser extends BaseDto {
+ public static final String HTTP_HEADER_NAME = "loginUser";
+ public static final int USER_TYPE_PLATFORM = 1;
+ public static final int USER_TYPE_PARTNER = 2;
+ public static final int USER_TYPE_HOSPITAL = 3;
+ public static final int USER_TYPE_PATIENT = 4;
+ /**
+ * 会话ID
+ */
+ private String sessionId;
+ private Long passportUserId;
+ private Long userId;
+ private Long partnerId;
+ private Long hospitalId;
+ private Long orgId;
+ private String mobile;
+ private String userName;
+ /**
+ * 用户类型
+ */
+ private int userType;
+ /**
+ * 应用类型
+ */
+ private int appType;
+ /**
+ * 应用代码
+ */
+ private int appCode;
+ /**
+ * 登录类型:1、自主登录,2、漫游登录
+ */
+ private int loginType;
+ /**
+ * 微信appId
+ */
+ private String wechatAppId;
+ /**
+ * 微信openId
+ */
+ private String openId;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/dto/Permission.java b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/Permission.java
new file mode 100644
index 0000000..ccd61a7
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/dto/Permission.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.dto;
+
+import com.mt.wms.core.base.BaseDto;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 权限类
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@Builder
+@Data
+@EqualsAndHashCode(callSuper = false)
+@ApiModel(value = "权限类", description = "用于统一用户服务对接口鉴权")
+public class Permission extends BaseDto {
+ /**
+ * 请求地址,可以用于前端ajax调用,后端用于做权限控制
+ */
+ @ApiModelProperty(value = "url", required = true, example = "/platform-upms/resource/add")
+ private String url;
+
+ /**
+ * 请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
+ */
+ @ApiModelProperty(value = "请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE", required = true, example = "post")
+ private String method;
+
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/AppTypeEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/AppTypeEnum.java
new file mode 100644
index 0000000..2492251
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/AppTypeEnum.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 应用类型枚举:1、pc,2、app,3、wechat,4、miniapp
+ *
+ * @author jiff
+ * @date 2018/11/13
+ * @since 1.0
+ */
+public enum AppTypeEnum implements IEnum {
+ /**
+ * pc
+ */
+ PC(1, "pc"),
+ /**
+ * app
+ */
+ APP(2, "app"),
+ /**
+ * wechat公众号
+ */
+ WECHAT(3, "wechat"),
+ /**
+ * miniapp小程序
+ */
+ MINIAPP(4, "miniapp");
+
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ AppTypeEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ AppTypeEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/CaptchaEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/CaptchaEnum.java
new file mode 100644
index 0000000..91b56ba
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/CaptchaEnum.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ *
+ * 是、否有效枚举
+ *
+ *
+ * @author FanYi
+ * @date 2018/11/8
+ * @since 1.0
+ */
+public enum CaptchaEnum implements IEnum {
+
+ QT(0, "其他"),
+
+ PATIENT_ZC(1, "患者注册"),
+
+ PATIENT_XG(2, "患者修改密码");
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ CaptchaEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ CaptchaEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/HttpMethodEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/HttpMethodEnum.java
new file mode 100644
index 0000000..74ef07f
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/HttpMethodEnum.java
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 请求类型:GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE
+ *
+ * @author jiff
+ * @date 2018/11/22
+ * @since 1.0
+ */
+public enum HttpMethodEnum implements IEnum {
+ /**
+ * get
+ */
+ GET("get", "get"),
+ /**
+ * head
+ */
+ HEAD("head", "head"),
+ /**
+ * post
+ */
+ POST("post", "post"),
+ /**
+ * patch
+ */
+ PATCH("patch", "patch"),
+ /**
+ * delete
+ */
+ DELETE("delete", "delete"),
+ /**
+ * options
+ */
+ OPTIONS("options", "options"),
+ /**
+ * trace
+ */
+ TRACE("trace", "trace");
+
+
+ private final String value;
+ private final String label;
+ private final String remark;
+
+ HttpMethodEnum(final String value, final String label) {
+ this(value, label, null);
+ }
+
+ HttpMethodEnum(final String value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/MenuCategoryEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/MenuCategoryEnum.java
new file mode 100644
index 0000000..d225ae6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/MenuCategoryEnum.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 菜单分类枚举:1、pc,2、app,3、wechat,4、miniapp
+ *
角色分类共用该枚举类型
+ *
+ * @author jiff
+ * @date 2018/11/22
+ * @since 1.0
+ */
+public enum MenuCategoryEnum implements IEnum {
+ /**
+ * pc
+ */
+ PC(1, "pc"),
+ /**
+ * app
+ */
+ APP(2, "app"),
+ /**
+ * 微信公众号
+ */
+ WECHAT(3, "微信公众号"),
+ /**
+ * 微信小程序
+ */
+ MINIAPP(4, "微信小程序");
+
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ MenuCategoryEnum(final Integer value, final String label) {
+ this(value, label, null);
+ }
+
+ MenuCategoryEnum(final Integer value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/MenuTypeEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/MenuTypeEnum.java
new file mode 100644
index 0000000..ecaec09
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/MenuTypeEnum.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 菜单类型枚举:1、module,2、menu,3、button
+ *
+ * @author jiff
+ * @date 2018/11/22
+ * @since 1.0
+ */
+public enum MenuTypeEnum implements IEnum {
+ /**
+ * 模块
+ */
+ MODULE(1, "模块"),
+ /**
+ * 菜单
+ */
+ MENU(2, "菜单"),
+ /**
+ * 按钮
+ */
+ BUTTON(3, "按钮");
+
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ MenuTypeEnum(final Integer value, final String label) {
+ this(value, label, null);
+ }
+
+ MenuTypeEnum(final Integer value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/OrderStatusEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/OrderStatusEnum.java
new file mode 100644
index 0000000..50530d3
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/OrderStatusEnum.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 订单状态枚举
+ */
+public enum OrderStatusEnum implements IEnum {
+ ORDER_INIT(0, "订单初始化"),
+
+ ORDER_NOPAY(1, "未支付"),
+
+ ORDER_PAYED(2, "已支付"),
+
+ ORDER_CHECKING(3, "检验中"),
+
+ ORDER_SUCCESS(4, "已完成"),
+
+ ORDER_CANCEL(-1, "已取消");
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+
+ OrderStatusEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ OrderStatusEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/ResourceCategoryEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/ResourceCategoryEnum.java
new file mode 100644
index 0000000..d2d5d0d
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/ResourceCategoryEnum.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 资源分类:0、common,1、pc,2、app,3、wechat,4、miniapp
+ *
+ * @author jiff
+ * @date 2018/11/22
+ * @since 1.0
+ */
+public enum ResourceCategoryEnum implements IEnum {
+ /**
+ * 公用
+ */
+ COMMON(0, "公用"),
+ /**
+ * pc
+ */
+ PC(1, "pc"),
+ /**
+ * app
+ */
+ APP(2, "app"),
+ /**
+ * 微信公众号
+ */
+ WECHAT(3, "微信公众号"),
+ /**
+ * 微信小程序
+ */
+ MINIAPP(4, "微信小程序");
+
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ ResourceCategoryEnum(final Integer value, final String label) {
+ this(value, label, null);
+ }
+
+ ResourceCategoryEnum(final Integer value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SceneCodeEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SceneCodeEnum.java
new file mode 100644
index 0000000..9f6a89b
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SceneCodeEnum.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ *
+ * 场景编码枚举
+ *
+ *
+ * @author FanYi
+ * @date 2018/11/8
+ * @since 1.0
+ */
+public enum SceneCodeEnum implements IEnum {
+ /**
+ * 验证码短信
+ */
+ CAPTCHA("CAPTCHA", "验证码短信");
+
+ private final String value;
+ private final String label;
+ private final String remark;
+
+ SceneCodeEnum(final String value, final String label) {
+ this(value, label, null);
+ }
+
+ SceneCodeEnum(final String value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SexEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SexEnum.java
new file mode 100644
index 0000000..ae3d1cf
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SexEnum.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 性别:1、男,2、女
+ *
+ * @author jiff
+ * @date 2018/11/7
+ * @since 1.0
+ */
+public enum SexEnum implements IEnum {
+
+ /**
+ * 男
+ */
+ MALE(1, "男"),
+ /**
+ * 女
+ */
+ FEMALE(2, "女");
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ SexEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ SexEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SmsSendTypeEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SmsSendTypeEnum.java
new file mode 100644
index 0000000..16395d1
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SmsSendTypeEnum.java
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ *
+ * 短信发送类型枚举
+ *
+ *
+ * @author FanYi
+ * @date 2018/11/8
+ * @since 1.0
+ */
+public enum SmsSendTypeEnum implements IEnum {
+
+ QT(0, "其他"),
+
+ ZC(1, "注册"),
+
+ ZHMM(2, "找回密码"),
+
+ DTMM(3, "动态密码"),
+
+ XTTZ(9, "系统通知");
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ SmsSendTypeEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ SmsSendTypeEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SubsystemEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SubsystemEnum.java
new file mode 100644
index 0000000..38acc94
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/SubsystemEnum.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 子系统:0、common,1、system,2、patient
+ * 用于限定维护菜单资源关系,公共资源允许所有菜单关联,其他资源只允许对应的菜单关联,如:平台菜单只允许关联到公共资源和平台资源
+ *
+ * @author jiff
+ * @date 2018/11/22
+ * @since 1.0
+ */
+public enum SubsystemEnum implements IEnum {
+ /**
+ * 公用
+ */
+ COMMON(0, "公用"),
+ /**
+ * 平台
+ */
+ PLATFORM(1, "平台");
+
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ SubsystemEnum(final Integer value, final String label) {
+ this(value, label, null);
+ }
+
+ SubsystemEnum(final Integer value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/UserTypeEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/UserTypeEnum.java
new file mode 100644
index 0000000..fbba7d4
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/UserTypeEnum.java
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ * 用户类型枚举
+ *
+ * @author jiff
+ * @date 2018/11/13
+ * @since 1.0
+ */
+public enum UserTypeEnum implements IEnum {
+ /**
+ * 系统用户
+ */
+ PLATFORM(1, "平台用户"),
+
+ ;
+
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ UserTypeEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ UserTypeEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/enums/WhetherEnum.java b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/WhetherEnum.java
new file mode 100644
index 0000000..3140dce
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/enums/WhetherEnum.java
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.enums;
+
+import com.mt.wms.core.base.IEnum;
+
+/**
+ *
+ * 是、否有效枚举
+ *
+ *
+ * @author FanYi
+ * @date 2018/11/8
+ * @since 1.0
+ */
+public enum WhetherEnum implements IEnum {
+
+ NO(0, "否"),
+
+ YES(1, "是");
+
+ private final Integer value;
+ private final String label;
+ private final String remark;
+
+ WhetherEnum(final int value, final String label) {
+ this(value, label, null);
+ }
+
+ WhetherEnum(final int value, final String label, final String remark) {
+ this.value = value;
+ this.label = label;
+ this.remark = remark;
+ }
+
+ /**
+ * @return 数据值
+ */
+ @Override
+ public Integer getValue() {
+ return value;
+ }
+
+ /**
+ * @return 标签名
+ */
+ @Override
+ public String getLabel() {
+ return label;
+ }
+
+ /**
+ * @return 备注
+ */
+ @Override
+ public String getRemark() {
+ return remark;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/errorcode/ApiErrorCode.java b/6.program/wms-core/src/main/java/com/mt/wms/core/errorcode/ApiErrorCode.java
new file mode 100644
index 0000000..099c49c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/errorcode/ApiErrorCode.java
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.errorcode;
+
+
+import com.mt.wms.core.base.IErrorCode;
+
+/**
+ * REST API 错误码
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+public enum ApiErrorCode implements IErrorCode {
+
+ /**
+ * 成功
+ */
+ SUCCESSFUL(CODE_SUCCESSFUL, "成功"),
+ /**
+ * 失败
+ */
+ FAILED(CODE_FAILED, "失败"),
+ /**
+ * 无效的请求参数
+ */
+ INVALID_PARAMETER(CODE_INVALID_PARAMETER, "无效的请求参数"),
+ /**
+ * 数据未授权
+ */
+ FORBIDDEN_DATA(CODE_FORBIDDEN_DATA, "数据未授权"),
+ /**
+ * 用户已存在
+ */
+ USER_EXISTENT(CODE_USER_EXISTENT, "用户已存在"),
+ /**
+ * 用户不存在
+ */
+ USER_NON_EXISTENT(CODE_USER_NON_EXISTENT, "用户不存在"),
+ /**
+ * 用户已停用
+ */
+ USER_DISABLED(CODE_FAILED, "用户已停用"),
+ /**
+ * 用户不存在或密码错误
+ */
+ USER_NON_EXISTENT_OR_INVALID_PASSWORD(CODE_FAILED, "用户不存在或密码错误"),
+ /**
+ * 密码错误
+ */
+ INVALID_PASSWORD(CODE_FAILED, "密码错误"),
+
+ /**
+ * 电话号码不能为空
+ */
+ MOBILE_IS_EMPTY(CODE_FAILED, "手机号码不能为空"),
+
+ /**
+ * 用户未登录
+ */
+ UNAUTHORIZED(CODE_UNAUTHORIZED, "用户未登录"),
+ /**
+ * 用户未授权
+ */
+ FORBIDDEN(CODE_FORBIDDEN, "用户未授权");
+
+ private final int code;
+ private final String msg;
+
+ ApiErrorCode(final int code, final String msg) {
+ this.code = code;
+ this.msg = msg;
+ }
+
+ public static ApiErrorCode fromCode(int code) {
+ ApiErrorCode[] apiErrorCodes = ApiErrorCode.values();
+ for (ApiErrorCode apiErrorCode : apiErrorCodes) {
+ if (apiErrorCode.getCode() == code) {
+ return apiErrorCode;
+ }
+ }
+ return SUCCESSFUL;
+ }
+
+ @Override
+ public int getCode() {
+ return code;
+ }
+
+ @Override
+ public String getMsg() {
+ return msg;
+ }
+
+ @Override
+ public String toString() {
+ return String.format(" ErrorCode:{code=%s, msg=%s} ", code, msg);
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/exception/ApiException.java b/6.program/wms-core/src/main/java/com/mt/wms/core/exception/ApiException.java
new file mode 100644
index 0000000..bc96cb1
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/exception/ApiException.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.exception;
+
+
+import com.mt.wms.core.base.IErrorCode;
+
+/**
+ * API异常
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+public class ApiException extends RuntimeException {
+
+ /**
+ * 错误码
+ */
+ private IErrorCode errorCode;
+
+ public ApiException(IErrorCode errorCode) {
+ super(errorCode.getMsg());
+ this.errorCode = errorCode;
+ }
+
+ public ApiException(String message) {
+ super(message);
+ }
+
+ public ApiException(Throwable cause) {
+ super(cause);
+ }
+
+ public ApiException(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+ public IErrorCode getErrorCode() {
+ return errorCode;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/handler/GlobalExceptionHandler.java b/6.program/wms-core/src/main/java/com/mt/wms/core/handler/GlobalExceptionHandler.java
new file mode 100644
index 0000000..a48db2a
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/handler/GlobalExceptionHandler.java
@@ -0,0 +1,278 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.handler;
+
+import com.mt.wms.core.errorcode.ApiErrorCode;
+import com.mt.wms.core.base.IErrorCode;
+import com.mt.wms.core.exception.ApiException;
+import com.mt.wms.core.vo.R;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.ibatis.exceptions.PersistenceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+import org.springframework.dao.DataAccessException;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.converter.HttpMessageConversionException;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.BindException;
+import org.springframework.validation.BindingResult;
+import org.springframework.web.HttpMediaTypeNotSupportedException;
+import org.springframework.web.HttpRequestMethodNotSupportedException;
+import org.springframework.web.bind.MethodArgumentNotValidException;
+import org.springframework.web.bind.annotation.ExceptionHandler;
+import org.springframework.web.bind.annotation.ResponseStatus;
+import org.springframework.web.bind.annotation.RestControllerAdvice;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.ConstraintViolationException;
+import javax.validation.ElementKind;
+import javax.validation.Path;
+import java.util.*;
+
+/**
+ * 全局异常拦截器
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@RestControllerAdvice
+@Slf4j
+public class GlobalExceptionHandler {
+
+ @Autowired
+ private MessageSource messageSource;
+
+ /**
+ *
+ * 自定义 REST 业务异常
+ *
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ */
+ @ExceptionHandler(value = ApiException.class)
+ public R apiException(ApiException e) {
+ IErrorCode errorCode = e.getErrorCode();
+ if (null != errorCode) {
+ log.debug("Rest request failed, {}", errorCode.toString());
+ return R.failed(errorCode);
+ }
+ log.debug("Rest request failed, {}", e.getMessage());
+ return R.failed(e.getMessage());
+ }
+
+ /**
+ * 无注解model参数校验异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ */
+ @ExceptionHandler(value = BindException.class)
+ public R bindException(BindException e) {
+ return bindingResult(e.getBindingResult());
+ }
+
+ /**
+ * {@link org.springframework.web.bind.annotation.RequestBody}参数校验异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ */
+ @ExceptionHandler(value = MethodArgumentNotValidException.class)
+ public R methodArgumentNotValidException(MethodArgumentNotValidException e) {
+ return bindingResult(e.getBindingResult());
+ }
+
+ /**
+ * @param bindingResult 绑定结果
+ * @return 错误消息
+ */
+ private R bindingResult(BindingResult bindingResult) {
+ if (null != bindingResult && bindingResult.hasErrors()) {
+ List errorMsgs = new ArrayList<>();
+ List jsonList = new ArrayList<>();
+ bindingResult.getFieldErrors().forEach(fieldError -> {
+ String message = fieldError.getDefaultMessage();
+ //数据绑定错误
+ if (fieldError.isBindingFailure()) {
+ String[] codes = fieldError.getCodes();
+ if (codes != null && codes.length > 0) {
+ message = messageSource.getMessage(codes[0], new Object[]{fieldError.getField()},
+ "参数[{0}]解析错误", LocaleContextHolder.getLocale());
+ }
+ }
+ Map jsonObject = new HashMap<>(3);
+ jsonObject.put("name", fieldError.getField());
+ jsonObject.put("msg", message);
+ jsonObject.put("invalidValue", fieldError.getRejectedValue());
+ jsonList.add(jsonObject);
+ errorMsgs.add(message);
+ });
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, StringUtils.collectionToCommaDelimitedString(errorMsgs), jsonList);
+ }
+ return R.failed(ApiErrorCode.INVALID_PARAMETER);
+ }
+
+ /**
+ * {@link org.springframework.web.bind.annotation.RequestParam}参数校验异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ */
+ @ExceptionHandler(value = ConstraintViolationException.class)
+ public R constraintViolationException(ConstraintViolationException e) {
+ Set> violations = e.getConstraintViolations();
+ log.debug("violation message is {}", violations.toString());
+ List violationMessages = new ArrayList<>();
+ List jsonList = new ArrayList<>();
+ for (ConstraintViolation> violation : violations) {
+ StringBuilder name = new StringBuilder();
+ violation.getPropertyPath().forEach((Path.Node node) -> {
+ if (node.getKind() == ElementKind.PARAMETER) {
+ name.append(node.getName());
+ return;
+ }
+ });
+ violationMessages.add(violation.getMessage());
+ Map jsonObject = new HashMap<>(3);
+ jsonObject.put("name", name.toString());
+ jsonObject.put("msg", violation.getMessage());
+ jsonObject.put("invalidValue", violation.getInvalidValue());
+ jsonList.add(jsonObject);
+ }
+ if (violationMessages.size() > 0) {
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, StringUtils.collectionToCommaDelimitedString(violationMessages), jsonList);
+ }
+ return R.failed(ApiErrorCode.INVALID_PARAMETER);
+ }
+
+ /**
+ * http请求方法异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ * @see org.springframework.http.HttpMethod
+ */
+ @ExceptionHandler(HttpRequestMethodNotSupportedException.class)
+ @ResponseStatus(HttpStatus.METHOD_NOT_ALLOWED)
+ public R httpRequestMethodNotSupportedException(HttpRequestMethodNotSupportedException e) {
+ List jsonList = new ArrayList<>();
+ Map jsonObject = new HashMap<>(3);
+ jsonObject.put("name", "Request Method");
+ jsonObject.put("msg", e.getMessage());
+ jsonObject.put("invalidValue", e.getMethod());
+ jsonList.add(jsonObject);
+ String message = messageSource.getMessage("globalExceptionHandler.httpRequestMethodNotSupportedException",
+ new Object[]{StringUtils.arrayToCommaDelimitedString(e.getSupportedMethods())},
+ "接口只允许[{0}]请求方法", LocaleContextHolder.getLocale());
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, message, jsonList);
+ }
+
+ /**
+ * http媒体类型异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ * @see org.springframework.http.MediaType
+ */
+ @ExceptionHandler(HttpMediaTypeNotSupportedException.class)
+ @ResponseStatus(HttpStatus.UNSUPPORTED_MEDIA_TYPE)
+ public R httpMediaTypeNotSupportedException(HttpMediaTypeNotSupportedException e) {
+ List jsonList = new ArrayList<>();
+ Map jsonObject = new HashMap<>(3);
+ jsonObject.put("name", "Content-Type");
+ jsonObject.put("msg", e.getMessage());
+ jsonObject.put("invalidValue", e.getContentType());
+ jsonList.add(jsonObject);
+ String message = messageSource.getMessage("globalExceptionHandler.httpMediaTypeNotSupportedException",
+ new Object[]{StringUtils.collectionToCommaDelimitedString(e.getSupportedMediaTypes())},
+ "接口只允许[{0}]媒体类型", LocaleContextHolder.getLocale());
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, message, jsonList);
+ }
+
+ /**
+ * http请求消息转换异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ * @see org.springframework.http.converter.HttpMessageConverter
+ */
+ @ExceptionHandler(HttpMessageConversionException.class)
+ @ResponseStatus(HttpStatus.BAD_REQUEST)
+ public R httpMessageConversionException(HttpMessageConversionException e) {
+ List jsonList = new ArrayList<>();
+ Map jsonObject = new HashMap<>(2);
+ jsonObject.put("name", "body");
+ jsonObject.put("msg", e.getMessage());
+ jsonList.add(jsonObject);
+ String message = messageSource.getMessage("globalExceptionHandler.httpMessageConversionException",
+ null,
+ "接口请求消息转换失败", LocaleContextHolder.getLocale());
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, message, jsonList);
+ }
+
+ /**
+ * 数据库操作异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ * @see DataAccessException
+ */
+ @ExceptionHandler({DataAccessException.class})
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ public R dataAccessException(DataAccessException e) {
+ log.error("数据库操作异常StackTrace:", e);
+ List jsonList = new ArrayList<>();
+ Map jsonObject = new HashMap<>(2);
+ jsonObject.put("name", "database");
+ jsonObject.put("msg", e.getMessage());
+ jsonList.add(jsonObject);
+ String message = messageSource.getMessage("globalExceptionHandler.dataAccessException",
+ null,
+ "数据库操作失败", LocaleContextHolder.getLocale());
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, message, jsonList);
+ }
+
+ /**
+ * 数据库操作异常
+ *
+ * @param e 异常类型
+ * @return 错误消息
+ * @see PersistenceException
+ */
+ @ExceptionHandler({PersistenceException.class})
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ public R persistenceException(PersistenceException e) {
+ log.error("数据库操作异常StackTrace:", e);
+ List jsonList = new ArrayList<>();
+ Map jsonObject = new HashMap<>(2);
+ jsonObject.put("name", "database");
+ jsonObject.put("msg", e.getMessage());
+ jsonList.add(jsonObject);
+ String message = messageSource.getMessage("globalExceptionHandler.dataAccessException",
+ null,
+ "Mybatis数据库操作失败", LocaleContextHolder.getLocale());
+ return R.r(IErrorCode.CODE_INVALID_PARAMETER, message, jsonList);
+ }
+
+ /**
+ * 全局异常
+ *
+ * @param e 异常
+ * @return 错误消息
+ */
+ @ExceptionHandler(Exception.class)
+ @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
+ public R exception(Exception e) {
+ /*
+ 系统内部异常,打印异常栈
+ */
+ log.error("系统内部异常StackTrace:", e);
+ return R.failed(ApiErrorCode.FAILED);
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/message/DingTalkMessage.java b/6.program/wms-core/src/main/java/com/mt/wms/core/message/DingTalkMessage.java
new file mode 100644
index 0000000..72743ac
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/message/DingTalkMessage.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.message;
+
+import lombok.Data;
+import lombok.ToString;
+
+import java.io.Serializable;
+
+/**
+ * 钉钉消息模板
+ *
+ *
+ *
+ * {
+ * "msgtype": "text",
+ * "text": {
+ * "content": "我就是我, @13505711314 是不一样的烟火"
+ * },
+ * "at": {
+ * "atMobiles": [
+ * "13505711314"
+ * ],
+ * "isAtAll": false
+ * }
+ * }
+ *
+ *
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@Data
+@ToString
+public class DingTalkMessage implements Serializable {
+ private String msgtype;
+ private TextBean text;
+
+ @Data
+ public static class TextBean {
+ /**
+ * content : 服务: lis-center-gateway 状态:UP
+ */
+ private String content;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/message/SmsMessage.java b/6.program/wms-core/src/main/java/com/mt/wms/core/message/SmsMessage.java
new file mode 100644
index 0000000..aacbdd6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/message/SmsMessage.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.message;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 短信消息模板
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@Data
+public class SmsMessage implements Serializable {
+ /**
+ * 手机号
+ */
+ private String mobile;
+ /**
+ * 组装后的模板内容JSON字符串
+ */
+ private String context;
+ /**
+ * 短信通道
+ */
+ private String channel;
+ /**
+ * 短信类型(验证码或者通知短信)
+ */
+ private String type;
+ /**
+ * 短信签名
+ */
+ private String signName;
+ /**
+ * 短信模板
+ */
+ private String template;
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/BasePageParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/BasePageParam.java
new file mode 100644
index 0000000..39e43dd
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/BasePageParam.java
@@ -0,0 +1,34 @@
+package com.mt.wms.core.params;
+
+import com.mt.wms.core.base.BaseParam;
+import com.mt.wms.core.validator.groups.PageGroup;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.hibernate.validator.constraints.Range;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * 分页入参基础类
+ *
+ * @author Mr.ZhangShi
+ * @date 2018/11/6 11:03
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class BasePageParam extends BaseParam {
+ @ApiModelProperty(value = "当前页", required = true, example = "1")
+ @NotNull(message = "页码不能为空", groups = PageGroup.class)
+ @Range(min = 1, message = "页码必须大于等于1")
+ private Integer current;
+
+ @ApiModelProperty(value = "每页显示条数", required = true, example = "10")
+ @NotNull(message = "每页显示条数不能为空", groups = PageGroup.class)
+ @Range(min = 1, max = 1000, message = "每页显示条数范围需在1-1000之间")
+ private Integer size;
+
+ @ApiModelProperty(value = "启用状态", notes = "0 、停用,1、启用", example = "1")
+ @Range(min = 0, max = 1, message = "启用状态只能为0或1")
+ private Integer enabled;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/DictValueParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/DictValueParam.java
new file mode 100644
index 0000000..5b18492
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/DictValueParam.java
@@ -0,0 +1,27 @@
+package com.mt.wms.core.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 javax.validation.constraints.NotBlank;
+
+/**
+ *
+ *
+ *
+ *
+ * @author FanYi
+ * @date 2020/7/6
+ * @since 1.0
+ */
+@ApiModel("查询字典列表入参")
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class DictValueParam extends BaseParam {
+ @ApiModelProperty(value = "字典类型")
+ @NotBlank(message = "字典类型不能为空")
+ private String typeCode;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/EnabledParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/EnabledParam.java
new file mode 100644
index 0000000..9fc5218
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/EnabledParam.java
@@ -0,0 +1,32 @@
+package com.mt.wms.core.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 org.hibernate.validator.constraints.Range;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ *
+ *
+ *
+ *
+ * @author FanYi
+ * @date 2020/7/7
+ * @since 1.0
+ */
+@ApiModel("启用or禁用入参对象")
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class EnabledParam extends BaseParam {
+ @ApiModelProperty("业务主键ID")
+ @NotNull(message = "id不能为空!")
+ private Long id;
+
+ @ApiModelProperty(value = "启用状态", notes = "0 、停用,1、启用", example = "1")
+ @Range(min = 0, max = 1, message = "启用状态只能为0或1")
+ private Integer enabled;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdListParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdListParam.java
new file mode 100644
index 0000000..b1140d3
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdListParam.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.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;
+import javax.validation.constraints.Size;
+import java.util.List;
+
+
+/**
+ * 主键列表请求参数对象
+ *
+ * @author jiff
+ * @date 2018/11/9
+ * @since 1.0
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel("主键列表参数对象")
+public class IdListParam extends BaseParam {
+ @ApiModelProperty(value = "主键列表", required = true, example = "[1]", notes = "根据实际接口传递不同对象的主键列表")
+ @NotNull(message = "主键列表不能为空")
+ @Size(message = "主键列表不能为空", min = 1)
+ private List ids;
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdPageParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdPageParam.java
new file mode 100644
index 0000000..4978427
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdPageParam.java
@@ -0,0 +1,24 @@
+package com.mt.wms.core.params;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ *
+ *
+ *
+ * @author Mr.ZhangShi
+ * @version 1.0
+ * @date 2020/8/4
+ */
+@Data
+@ApiModel("根据id查询分页入参")
+public class IdPageParam extends BasePageParam {
+
+ @NotNull(message = "主键不能为空")
+ @ApiModelProperty(value = "主键", required = true, example = "1", notes = "根据实际接口传递不同对象的主键")
+ private Long id;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdParam.java
new file mode 100644
index 0000000..06e381e
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/IdParam.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.params;
+
+import com.mt.wms.core.base.BaseParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import javax.validation.constraints.NotNull;
+
+
+/**
+ * 主键请求参数对象
+ *
+ * @author jiff
+ * @date 2018/11/9
+ * @since 1.0
+ */
+@EqualsAndHashCode(callSuper = false)
+@Data
+@Builder
+@ApiModel("主键参数对象")
+public class IdParam extends BaseParam {
+ @NotNull(message = "主键不能为空")
+ @ApiModelProperty(value = "主键", required = true, example = "1", notes = "根据实际接口传递不同对象的主键")
+ private Long id;
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/JsapiSignatureParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/JsapiSignatureParam.java
new file mode 100644
index 0000000..70ee3c4
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/JsapiSignatureParam.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2020.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.params;
+
+import com.mt.wms.core.base.BaseParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotBlank;
+
+/**
+ *
+ * Jsapi授权入参对象
+ *
+ *
+ * @author FanYi
+ * @date 2018-11-30
+ * @since 1.0
+ */
+@ApiModel(description = "Jsapi授权入参对象")
+@Data
+@Accessors(chain = true)
+public class JsapiSignatureParam extends BaseParam {
+ @ApiModelProperty(value = "公众号的唯一标识")
+ @NotBlank(message = "appId不能为空")
+ private String appId;
+ /**
+ * 前端调用不需要填写该参数,后端服务间调用需要填写
+ */
+ @ApiModelProperty(value = "公众号的appSecret", hidden = true)
+ @NotBlank(message = "secret不能为空")
+ private String secret;
+
+ @ApiModelProperty(value = "前端页面url")
+ @NotBlank(message = "前端页面url不能为空")
+ private String url;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/MobileParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/MobileParam.java
new file mode 100644
index 0000000..8c5ae32
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/MobileParam.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2018.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.params;
+
+import com.mt.wms.core.base.BaseParam;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Pattern;
+
+
+/**
+ * 手机号码请求参数对象
+ *
+ * @author jiff
+ * @date 2018/11/1
+ * @since 1.0
+ */
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@Data
+@Builder
+@ApiModel("手机号码对象")
+public class MobileParam extends BaseParam {
+ @ApiModelProperty(value = "手机号码", required = true, example = "17621022121")
+ @NotBlank(message = "手机号码不能为空")
+ @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号码格式不正确")
+ private String mobile;
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/SendMessageParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/SendMessageParam.java
new file mode 100644
index 0000000..a10181d
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/SendMessageParam.java
@@ -0,0 +1,39 @@
+package com.mt.wms.core.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.NotBlank;
+
+/**
+ *
+ *
+ *
+ *
+ * @author FanYi
+ * @date 2020/4/27
+ * @since 1.0
+ */
+@ApiModel("发送短信所需参数")
+@EqualsAndHashCode(callSuper = true)
+@Data
+@Accessors(chain = true)
+public class SendMessageParam extends BaseParam {
+ @ApiModelProperty("医院ID,若不传则使用默认模板")
+ private Long corpId;
+
+ @ApiModelProperty("场景编码,业务系统根据该编码区分不同的业务场景")
+ @NotBlank(message = "场景编码必填!")
+ private String smsSceneCode;
+
+ @ApiModelProperty("短信接收号码,支持以英文逗号分隔的形式进行批量调用,批量上限为1000个手机号码")
+ @NotBlank(message = "短信接收号码必填!")
+ private String phoneNumbers;
+
+ @ApiModelProperty("短信模板参数值,多个按顺序,隔开,只填入参数即可会自动完成填充")
+ private String templateParam;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/params/SmsCaptchaParam.java b/6.program/wms-core/src/main/java/com/mt/wms/core/params/SmsCaptchaParam.java
new file mode 100644
index 0000000..b3293f5
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/params/SmsCaptchaParam.java
@@ -0,0 +1,33 @@
+package com.mt.wms.core.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 javax.validation.constraints.NotBlank;
+import javax.validation.constraints.Pattern;
+
+/**
+ *
+ *
+ *
+ *
+ * @author FanYi
+ * @date 2020/7/13
+ * @since 1.0
+ */
+@ApiModel("查询验证码是否有效入参")
+@EqualsAndHashCode(callSuper = true)
+@Data
+public class SmsCaptchaParam extends BaseParam {
+ @ApiModelProperty(value = "手机号码", required = true, example = "17621022121")
+ @NotBlank(message = "手机号码必填!")
+ @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号码格式不正确")
+ private String mobile;
+
+ @ApiModelProperty(value = "验证码", required = true)
+ @NotBlank(message = "验证码必填!")
+ private String code;
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/runner/MesApplicationRunner.java b/6.program/wms-core/src/main/java/com/mt/wms/core/runner/MesApplicationRunner.java
new file mode 100644
index 0000000..7cadbd6
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/runner/MesApplicationRunner.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2019.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.runner;
+
+import org.springframework.beans.factory.DisposableBean;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.ApplicationArguments;
+import org.springframework.boot.ApplicationRunner;
+import org.springframework.context.ApplicationContext;
+
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @author jiff
+ * @date 2019-08-27
+ * @since 1.0
+ */
+public class MesApplicationRunner implements ApplicationRunner, DisposableBean {
+ private final ApplicationContext applicationContext;
+
+ private List initializers;
+
+ @Autowired
+ public MesApplicationRunner(ApplicationContext applicationContext) {
+ this.applicationContext = applicationContext;
+ }
+
+ @Override
+ public void run(ApplicationArguments args) throws Exception {
+ Map runnerMap = applicationContext.getBeansOfType(MesInitializer.class);
+ initializers = runnerMap.values().stream().sorted(Comparator.comparing(MesInitializer::order))
+ .collect(Collectors.toList());
+
+ for (MesInitializer mesInitializer : initializers) {
+ mesInitializer.init();
+ }
+ }
+
+ @Override
+ public void destroy() throws Exception {
+ for (MesInitializer mesInitializer : initializers) {
+ mesInitializer.destroy();
+ }
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/runner/MesInitializer.java b/6.program/wms-core/src/main/java/com/mt/wms/core/runner/MesInitializer.java
new file mode 100644
index 0000000..0133d4c
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/runner/MesInitializer.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2019.
+ * http://www.ulabcare.com
+ */
+package com.mt.wms.core.runner;
+
+import java.io.Serializable;
+
+/**
+ * springboot启动之后会调用实现该接口的类的init方法,类必须注册为一个spring的bean
+ *
+ * @author jiff
+ * @date 2019-08-27
+ * @since 1.0
+ */
+public interface MesInitializer extends Serializable {
+
+ /**
+ * init
+ *
+ * @throws Exception
+ */
+ default void init() throws Exception {
+ }
+
+ /**
+ * destroy
+ *
+ * @throws Exception
+ */
+ default void destroy() throws Exception {
+ }
+
+ /**
+ * order,执行顺序,数值小的先执行
+ *
+ * @return int
+ */
+ default int order() {
+ return 0;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/service/RedisService.java b/6.program/wms-core/src/main/java/com/mt/wms/core/service/RedisService.java
new file mode 100644
index 0000000..3a5e0a2
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/service/RedisService.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2020.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.service;
+
+/**
+ * @author jiff
+ * @date 2019-07-20
+ * @since 1.0
+ */
+public interface RedisService {
+ /**
+ * @param key
+ * @param value
+ */
+ void set(String key, String value);
+
+ /**
+ * @param key
+ * @param value
+ * @param expired 过期时间,单位秒
+ */
+ void set(String key, String value, long expired);
+
+ /**
+ * @param key
+ * @param value 不能为null,使用json方式存储
+ */
+ void set(String key, Object value);
+
+ /**
+ * @param key
+ * @param value 不能为null,使用json方式存储
+ * @param expired 过期时间,单位秒
+ */
+ void set(String key, Object value, long expired);
+
+ /**
+ * @param key
+ * @return
+ */
+ String get(String key);
+
+ T get(String key, Class clazz);
+
+ boolean containsKeyPattern(String keyPattern);
+
+ boolean hasKey(String key);
+
+ boolean del(String key);
+
+ long getExpire(String key);
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/service/impl/RedisServiceImpl.java b/6.program/wms-core/src/main/java/com/mt/wms/core/service/impl/RedisServiceImpl.java
new file mode 100644
index 0000000..f684f4b
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/service/impl/RedisServiceImpl.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2020.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.service.impl;
+
+import com.alibaba.fastjson.JSON;
+import com.mt.wms.core.service.RedisService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.core.ValueOperations;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+import org.springframework.util.StringUtils;
+
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * @author jiff
+ * @date 2019-07-20
+ * @since 1.0
+ */
+@Service
+public class RedisServiceImpl implements RedisService {
+ public static final int EXPIRED_TIME = 54000;
+
+ private RedisTemplate redisTemplate;
+
+ private String namespace;
+
+ public RedisTemplate getRedisTemplate() {
+ return this.redisTemplate;
+ }
+
+ @Autowired(required = false)
+ public void setRedisTemplate(RedisTemplate redisTemplate) {
+ RedisSerializer stringSerializer = new StringRedisSerializer();
+ //设置序列化Key的实例化对象
+ redisTemplate.setKeySerializer(stringSerializer);
+ //设置序列化Value的实例化对象
+ redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
+ redisTemplate.setHashKeySerializer(stringSerializer);
+ redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer());
+ redisTemplate.setStringSerializer(stringSerializer);
+ redisTemplate.afterPropertiesSet();
+ this.redisTemplate = redisTemplate;
+ }
+
+ public String getNamespace() {
+ return this.namespace;
+ }
+
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+
+ private String queryKey(String key) {
+ if (StringUtils.isEmpty(key)) {
+ throw new IllegalArgumentException("Redis key is null!");
+ }
+ return key;
+ }
+
+ @Override
+ public void set(String key, String value) {
+ key = queryKey(key);
+ ValueOperations ops = redisTemplate.opsForValue();
+ ops.set(key, value);
+ }
+
+ @Override
+ public void set(String key, String value, long expired) {
+ key = queryKey(key);
+ ValueOperations ops = redisTemplate.opsForValue();
+ ops.set(key, value, expired, TimeUnit.SECONDS);
+ }
+
+ @Override
+ public void set(String key, Object value) {
+ if (value == null) {
+ throw new IllegalArgumentException("Object is null!");
+ }
+ key = queryKey(key);
+ ValueOperations ops = redisTemplate.opsForValue();
+ ops.set(key, JSON.toJSONString(value));
+ }
+
+ @Override
+ public void set(String key, Object value, long expired) {
+ if (value == null) {
+ throw new IllegalArgumentException("Object is null!");
+ }
+ key = queryKey(key);
+ ValueOperations ops = redisTemplate.opsForValue();
+ ops.set(key, JSON.toJSONString(value), expired, TimeUnit.SECONDS);
+ }
+
+ @Override
+ public T get(String key, Class clazz) {
+ return JSON.parseObject(get(key), clazz);
+ }
+
+ @Override
+ public String get(String key) {
+ return (String) redisTemplate.opsForValue().get(queryKey(key));
+ }
+
+ @Override
+ public boolean containsKeyPattern(String key) {
+ key = queryKey(key);
+ Set keys = redisTemplate.keys(key + "*");
+ return !CollectionUtils.isEmpty(keys);
+ }
+
+ @Override
+ public boolean hasKey(String key) {
+ key = queryKey(key);
+ return redisTemplate.hasKey(key).booleanValue();
+ }
+
+ @Override
+ public long getExpire(String key) {
+ key = queryKey(key);
+ return redisTemplate.getExpire(key).longValue();
+ }
+
+ @Override
+ public boolean del(String key) {
+ key = queryKey(key);
+ return redisTemplate.delete(key);
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/AES.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/AES.java
new file mode 100644
index 0000000..8ab8de2
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/AES.java
@@ -0,0 +1,82 @@
+package com.mt.wms.core.utils;
+
+import java.security.AlgorithmParameters;
+import java.security.InvalidAlgorithmParameterException;
+import java.security.InvalidKeyException;
+import java.security.Key;
+import java.security.NoSuchAlgorithmException;
+import java.security.NoSuchProviderException;
+import java.security.Security;
+
+import javax.crypto.BadPaddingException;
+import javax.crypto.Cipher;
+import javax.crypto.IllegalBlockSizeException;
+import javax.crypto.NoSuchPaddingException;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+
+/**
+ *
+ *
+ *
+ * @author Mr.ZhangShi
+ * @version 1.0
+ * @date 2020/10/9
+ */
+public class AES {
+
+ public static boolean initialized = false;
+
+ /**
+ * AES解密
+ *
+ * @param content
+ * 密文
+ * @return
+ * @throws InvalidAlgorithmParameterException
+ * @throws NoSuchProviderException
+ */
+ public byte[] decrypt(byte[] content, byte[] keyByte, byte[] ivByte) throws InvalidAlgorithmParameterException {
+ initialize();
+ try {
+ Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
+ Key sKeySpec = new SecretKeySpec(keyByte, "AES");
+ // 初始化
+ cipher.init(Cipher.DECRYPT_MODE, sKeySpec, generateIV(ivByte));
+ byte[] result = cipher.doFinal(content);
+ return result;
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ } catch (NoSuchPaddingException e) {
+ e.printStackTrace();
+ } catch (InvalidKeyException e) {
+ e.printStackTrace();
+ } catch (IllegalBlockSizeException e) {
+ e.printStackTrace();
+ } catch (BadPaddingException e) {
+ e.printStackTrace();
+ } catch (NoSuchProviderException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ } catch (Exception e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public static void initialize() {
+ if (initialized)
+ return;
+ Security.addProvider(new BouncyCastleProvider());
+ initialized = true;
+ }
+
+ // 生成iv
+ public static AlgorithmParameters generateIV(byte[] iv) throws Exception {
+ AlgorithmParameters params = AlgorithmParameters.getInstance("AES");
+ params.init(new IvParameterSpec(iv));
+ return params;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/BarcodeUtil.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/BarcodeUtil.java
new file mode 100644
index 0000000..dfc5b60
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/BarcodeUtil.java
@@ -0,0 +1,87 @@
+package com.mt.wms.core.utils;
+
+
+import org.apache.commons.lang.StringUtils;
+import org.krysalis.barcode4j.impl.code39.Code39Bean;
+import org.krysalis.barcode4j.output.bitmap.BitmapCanvasProvider;
+import org.krysalis.barcode4j.tools.UnitConv;
+
+import java.awt.image.BufferedImage;
+import java.io.*;
+
+/**
+ * 条形码生成工具类
+ */
+public class BarcodeUtil {
+
+ /**
+ * 生成文件
+ *
+ * @param msg 条形码
+ * @param path 生成文件位置
+ * @return
+ */
+ public static File generateFile(String msg, String uploadPath, String path) {
+ File file = new File(uploadPath);
+ if (!file.exists()) {
+ // 目录不存在则创建
+ file.mkdirs();
+ }
+
+ try {
+ generate(msg, new FileOutputStream(new File(path)));
+ } catch (FileNotFoundException e) {
+ throw new RuntimeException(e);
+ }
+ return file;
+ }
+
+ /**
+ * 生成字节
+ *
+ * @param msg 条形码
+ * @return
+ */
+ public static byte[] generate(String msg) {
+ ByteArrayOutputStream ous = new ByteArrayOutputStream();
+ generate(msg, ous);
+ return ous.toByteArray();
+ }
+
+ /**
+ * 生成到流
+ *
+ * @param msg 条形码
+ * @param ous 生成的流
+ */
+ public static void generate(String msg, OutputStream ous) {
+ if (StringUtils.isEmpty(msg) || ous == null) {
+ return;
+ }
+ Code39Bean bean = new Code39Bean();
+ // 精细度
+ final int dpi = 150;
+ // module宽度
+ final double moduleWidth = UnitConv.in2mm(1.0f / dpi);
+ // 配置对象
+ bean.setModuleWidth(moduleWidth);
+ bean.setWideFactor(3);
+ bean.doQuietZone(false);
+
+ String format = "image/png";
+ try {
+
+ // 输出到流
+ BitmapCanvasProvider canvas = new BitmapCanvasProvider(ous, format, dpi,
+ BufferedImage.TYPE_BYTE_BINARY, false, 0);
+ // 生成条形码
+ bean.generateBarcode(canvas, msg);
+
+ // 结束绘制
+ canvas.finish();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
+
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/BeanUtils.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/BeanUtils.java
new file mode 100644
index 0000000..6a9d9b5
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/BeanUtils.java
@@ -0,0 +1,67 @@
+package com.mt.wms.core.utils;
+
+import com.alibaba.fastjson.JSON;
+import com.mt.wms.core.exception.ApiException;
+import org.springframework.util.CollectionUtils;
+
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.List;
+
+import static java.util.stream.Collectors.toList;
+
+/**
+ * Bean 工具类
+ */
+public class BeanUtils {
+ /**
+ * 使用{@link org.springframework.beans.BeanUtils#copyProperties(Object, Object, String...)}拷贝
+ *
+ * @param list 源对象列表
+ * @param targetClass 目标对象类型
+ * @param ignoreProperties 忽略字段
+ * @param 源对象
+ * @param 目标对象
+ * @return 目标对象列表
+ */
+ public static List copyList(List list, Class targetClass, String... ignoreProperties) {
+ if (CollectionUtils.isEmpty(list)) {
+ return new ArrayList<>();
+ }
+ return list.stream().map((t) -> {
+ try {
+ R r;
+ //如果包含builder方法则为使用lombok.Builder注解的类,该注解只在编译期间有效,编译后的class中无法获取该注解
+ try {
+ Method builder = targetClass.getDeclaredMethod("builder");
+ Object invoke = builder.invoke(null, null);
+ r = (R) invoke.getClass().getDeclaredMethod("build").invoke(invoke);
+ } catch (NoSuchMethodException e) {
+ r = targetClass.newInstance();
+ }
+ org.springframework.beans.BeanUtils.copyProperties(t, r, ignoreProperties);
+ return r;
+ } catch (Exception e) {
+ e.printStackTrace();
+ throw new ApiException("对象拷贝异常");
+ }
+ }).collect(toList());
+ }
+
+ /**
+ * 使用{@link JSON#parseArray(String, Class)}拷贝
+ *
+ * @param list 源对象列表
+ * @param targetClass 目标对象类型
+ * @param 源对象
+ * @param 目标对象
+ * @return 目标对象列表
+ */
+ public static List copyListWithJson(List list, Class targetClass) {
+ if (CollectionUtils.isEmpty(list)) {
+ return new ArrayList<>();
+ }
+ return JSON.parseArray(JSON.toJSONString(list), targetClass);
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ByteAndHex.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ByteAndHex.java
new file mode 100644
index 0000000..1c1f162
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ByteAndHex.java
@@ -0,0 +1,64 @@
+package com.mt.wms.core.utils;
+
+/**
+ * @Author wangzheng
+ * @Date 2019-11-30
+ * @since 1.1
+ */
+public class ByteAndHex {
+ /**
+ * 字节数组转16进制
+ *
+ * @param bytes 需要转换的byte数组
+ * @return 转换后的Hex字符串
+ */
+ public static String bytesToHex(byte[] bytes) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 0; i < bytes.length; i++) {
+ String hex = Integer.toHexString(bytes[i] & 0xFF);
+ if (hex.length() < 2) {
+ sb.append(0);
+ }
+ sb.append(hex);
+ }
+ return sb.toString();
+ }
+
+ /**
+ * hex字符串转byte数组
+ *
+ * @param inHex 待转换的Hex字符串
+ * @return 转换后的byte数组结果
+ */
+ public static byte[] hexToBytes(String inHex) {
+ int hexlen = inHex.length();
+ byte[] result;
+ if (hexlen % 2 == 1) {
+ //奇数
+ hexlen++;
+ result = new byte[(hexlen / 2)];
+ inHex = "0" + inHex;
+ } else {
+ //偶数
+ result = new byte[(hexlen / 2)];
+ }
+ int j = 0;
+ for (int i = 0; i < hexlen; i += 2) {
+ result[j] = hexToByte(inHex.substring(i, i + 2));
+ j++;
+ }
+ return result;
+ }
+
+
+ /**
+ * Hex字符串转byte
+ *
+ * @param inHex 待转换的Hex字符串
+ * @return 转换后的byte
+ */
+ public static byte hexToByte(String inHex) {
+ return (byte) Integer.parseInt(inHex, 16);
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java
new file mode 100644
index 0000000..521cdab
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/CodeGeneratorHelper.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2019.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.utils;
+
+/**
+ *
+ * 编号生成帮助类
+ * 以2+8+6形式生成(2位编号类型前缀+8位年月日+6位自增序列号 )
+ * 2位编号类型前缀定义如下⤵
+ * 1x:患者相关编号以 '1' 开头,(病例号:10 )
+ * 2x:订单相关编号以 '2' 开头,如订单编号=20
+ * 3x: 支付相关编号以 '3' 开头,如系统内部支付订单号=30
+ * (未完待续...)
+ *
+ *
+ * @author FanYi
+ * @date 2019-01-03
+ * @since 1.0
+ */
+public class CodeGeneratorHelper {
+
+ /**
+ * 订单编号
+ */
+ public static final String ORDER_CODE = "ORDER_CODE";
+
+
+ /**
+ * 生成订单编号
+ *
+ * @return 订单编号
+ */
+ public static String getOrderCode() {
+ return IDGenerator.gen("20", "yyyyMMdd", 6, ORDER_CODE);
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/DateUtil.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/DateUtil.java
new file mode 100644
index 0000000..ff21471
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/DateUtil.java
@@ -0,0 +1,1213 @@
+package com.mt.wms.core.utils;
+
+import com.mt.wms.core.base.IErrorCode;
+import org.apache.commons.collections.map.HashedMap;
+import org.apache.commons.lang3.StringUtils;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.ZoneId;
+import java.util.*;
+
+/**
+ * Title:跟时间有关的便利方法 DateUtil.java
+ */
+public class DateUtil {
+ /**
+ * 一秒中的等价毫秒数
+ */
+ public static final long SECOND = 1000;
+ /**
+ * 一分钟的等价毫秒数
+ */
+ public static final long MINUTE = 60 * SECOND;
+ /**
+ * 一小时的等价毫秒数
+ */
+ public static final long HOUR = 60 * MINUTE;
+ /**
+ * 一天的等价毫秒数
+ */
+ public static final long DAY = 24 * HOUR;
+ /**
+ * 半小时的等价毫秒数
+ */
+ public static final long HALF_HOUR = HOUR / 2;
+
+ /**
+ * 格式化日期(yyyyMM)
+ */
+ public static final String MONTH_DATEPATTERN = "yyyyMM";
+
+ /**
+ * 格式化日期(yyyyMMdd)
+ */
+ public static final String SHORT_DATEPATTERN = "yyyyMMdd";
+ /**
+ * 格式化日期(yyyy-MM-dd hh:mm:ss)
+ */
+ public static final String DEFAULT_DATEPATTERN = "yyyy-MM-dd hh:mm:ss";
+ /**
+ * 格式化日期(yyyy-MM-dd HH:mm:ss)
+ */
+ public static final String DEFAULT_DATESFM = "yyyy-MM-dd HH:mm:ss";
+ /**
+ * 格式化日期(yyyy-MM-dd HH:mm)
+ */
+ public static final String DEFAULT_MINUS = "yyyy-MM-dd HH:mm";
+ /**
+ * 格式化日期(yyyy-MM-dd)
+ */
+ public static final String SAMPLE_DATEPATTERN = "yyyy-MM-dd";
+
+ public static final String YEAR_DATEPATTERN = "yyyy";
+ /**
+ * 格式化日期(yyyyMMdd)
+ */
+ public static final String SHORT_DATE_PATTERN = "yyyyMMdd";
+ /**
+ * 格式化日期(yyyy年MM月dd日)
+ */
+ public static final String SHORT_CHAR_DATE_PATTERN = "yyyy年MM月dd日";
+ /**
+ * 格式化日期(HHmmss)
+ */
+ public static final String StR_PATTERN_HHMMSS = "HHmmss";
+ /**
+ * 格式化时间(HH:mm:ss)
+ */
+ public static final String StR_PATTERN_HHMMSS1 = "HH:mm:ss";
+ public static final String StR_ISO8601 = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+ /**
+ * 格式:yyyyMMdd,8位
+ */
+ public static final String PATTERN_NUM_DATE = "yyyyMMdd";
+ /**
+ * 格式:yyyyMMddHHmmss,14位
+ */
+ public static final String PATTERN_NUM_SEC = "yyyyMMddHHmmss";
+ /**
+ * 格式:yyyyMMddHHmmssSSS,17位
+ */
+ public static final String PATTERN_NUM_MS = "yyyyMMddHHmmssSSS";
+
+ public static final String PATTERN_NUM_MS_ELSE = "yyyy/MM/dd HH:mm:ss";
+ /**
+ * 格式化日期(yyyyMMddHHmmss)
+ */
+ public static String STR_PATTERN = "yyyyMMddHHmmss";
+
+ public DateUtil() {
+ }
+
+ public static String defaultFormat(Date date) {
+ return new SimpleDateFormat(SAMPLE_DATEPATTERN).format(date);
+ }
+
+ /**
+ * 获取今天凌晨的0分0秒这个时间
+ */
+ public static Date getDayBegin() {
+
+ Calendar c = Calendar.getInstance();
+ c.set(Calendar.HOUR_OF_DAY, 0);
+ c.set(Calendar.MINUTE, 0);
+ c.set(Calendar.SECOND, 0);
+ c.set(Calendar.MILLISECOND, 0);
+ return c.getTime();
+ }
+
+ public static boolean isTowTimeAvailable(LocalDateTime time1,LocalDateTime time2){
+ if(time1 == null || time2 == null){
+ return false;
+ }
+ if(time1.compareTo(time2)>0 ){
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * 获取昨天凌晨的0分0秒这个时间
+ */
+ public static Date getYesterdayDayBegin() {
+
+ Calendar c = Calendar.getInstance();
+ c.add(Calendar.DAY_OF_MONTH, -1);
+ c.set(Calendar.HOUR_OF_DAY, 0);
+ c.set(Calendar.MINUTE, 0);
+ c.set(Calendar.SECOND, 0);
+ return c.getTime();
+ }
+
+ /**
+ * 获取指定日期凌晨的0分0秒这个时间
+ *
+ * @param date
+ * @return
+ */
+ public static Date getBegin(Date date) {
+ String dateStr = DateUtil.shortDateString(date, SHORT_DATE_PATTERN);
+ Date dayBegin = DateUtil.shortStringToDate(dateStr, SHORT_DATE_PATTERN);
+ return dayBegin;
+ }
+
+ /**
+ * 判断是否是周末。是则返回true,否则返回false
+ */
+ public static boolean isWeekEnd() {
+ Calendar cal = Calendar.getInstance();
+ if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * 判断是否是星期一,是则返回true,否则返回false
+ */
+ public static boolean isWeekStart() {
+ Calendar cal = Calendar.getInstance();
+ if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * 判断是否是一号,是则返回true,否则返回false
+ */
+ public static boolean isMonthStart() {
+ Calendar cal = Calendar.getInstance();
+ if (cal.get(Calendar.DAY_OF_MONTH) == 1) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * 判断是否是月末,是则返回true,否则返回false
+ */
+ public static boolean isMonthEnd() {
+ Calendar cal = Calendar.getInstance();
+ cal.add(Calendar.DAY_OF_MONTH, 1);
+ if (cal.get(Calendar.DAY_OF_MONTH) == 1) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @return 返回明天凌晨0点0分0秒
+ */
+ public static Date getNextDay() {
+ return getNextHour(0);
+ }
+
+ /**
+ * @return 返回指定时间(x点整)最靠近的时间, 如果今天已经过了那个时间, 则返回明天的那个时间
+ * 否则返回今天的那个整点时间
+ */
+ public static Date getNextHour(int hour) {
+ return getNextTime(hour, 0);
+ }
+
+ /**
+ * @param hour 几点
+ * @param min 几分
+ * @return 获得指定时间(x点y分)最靠近的时间, 如果今天已经过了那个时间, 则返回明天的那个时间
+ * 否则返回今天的那个时间
+ */
+ public static Date getNextTime(int hour, int min) {
+ Calendar calendar = Calendar.getInstance();
+ if (calendar.get(Calendar.HOUR_OF_DAY) > hour) {
+ calendar.add(Calendar.DATE, 1);
+ } else if (calendar.get(Calendar.HOUR_OF_DAY) == hour &&
+ calendar.get(Calendar.MINUTE) >= min) {
+ calendar.add(Calendar.DATE, 1);
+ }
+
+ calendar.set(Calendar.HOUR_OF_DAY, hour);
+ calendar.set(Calendar.MINUTE, min);
+ calendar.set(Calendar.SECOND, 0);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取指定的日期
+ *
+ * @param year 年
+ * @param month 月
+ * @param day 日
+ * @param hour 小时
+ * @param min 分
+ * @return
+ */
+ public static Date getTime(int year, int month, int day, int hour, int min) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.YEAR, year);
+ calendar.set(Calendar.MONTH, month - 1);
+ calendar.set(Calendar.DATE, day);
+ calendar.set(Calendar.HOUR_OF_DAY, hour);
+ calendar.set(Calendar.MINUTE, min);
+ calendar.set(Calendar.SECOND, 0);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取月初的时间
+ *
+ * @return
+ */
+ public static Date getMonthBenin() {
+ Calendar calendar = Calendar.getInstance();
+ calendar.set(Calendar.DATE, 1);
+ calendar.set(Calendar.HOUR_OF_DAY, 0);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取当前月份+month月初时间,时间为 00:00:00
+ *
+ * @return
+ */
+ public static Date getNextMonthBeginTime(int month) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.add(Calendar.MONTH, month);
+ calendar.set(Calendar.DAY_OF_MONTH, 0);
+ calendar.set(Calendar.HOUR, 12);
+ calendar.set(Calendar.MINUTE, 0);
+ calendar.set(Calendar.SECOND, 0);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取相继几天的时间
+ *
+ * @param before
+ * @return
+ */
+ public static Date getDayBefore(int before) {
+ return getDayBefore(null, before);
+ }
+
+ public static Date getDayBefore(Date date, int before) {
+ Calendar calendar = Calendar.getInstance();
+ if (date != null) {
+ calendar.setTime(date);
+ }
+
+ calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - before);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取date之前或之后number天的日期
+ *
+ * @param date
+ * @param number 正数 当前日期之后 负数:当前日期之前
+ * @return
+ */
+ public static Date getAfterOrBeforeDay(Date date, int number) {
+ Calendar calendar = Calendar.getInstance();
+ if (date != null) {
+ calendar.setTime(date);
+ }
+ calendar.add(Calendar.DAY_OF_MONTH, number);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取当前日期之前或之后number天的日期
+ *
+ * @param date
+ * @param number 正数 当前日期之后 负数:当前日期之前
+ * @return
+ */
+ public static Date getAfterOrBeforeDay(int number) {
+ return getAfterOrBeforeDay(new Date(), number);
+ }
+
+ public static String shortDateString(Date date) {
+ if (date == null) {
+ return "";
+ }
+ SimpleDateFormat sdf = new SimpleDateFormat(SAMPLE_DATEPATTERN);
+ return sdf.format(date);
+ }
+
+ /**
+ * 按照格式返回日期字符串
+ *
+ * @param date
+ * @param format (如:yyyyMMdd )
+ * @return
+ */
+ public static String shortDateString(Date date, String format) {
+ if (date == null) {
+ return "";
+ }
+ SimpleDateFormat sdf = new SimpleDateFormat(format);
+ return sdf.format(date);
+ }
+
+ /**
+ * 根据时间字串和格式化标准进行格式化
+ *
+ * @param dateStr {String} 时间字串
+ * @param format {String} 格式化标准 【exam:'yyyy-MM-dd hh:mm:ss'】
+ * @return {java.util.Date}
+ */
+ public static Date shortStringToDate(String dateStr, String format) {
+ Date date = null;
+
+ if (null == dateStr) {
+ date = new Date();
+ } else {
+ try {
+ SimpleDateFormat sdf = new SimpleDateFormat(format);
+ date = sdf.parse(dateStr);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ }
+ }
+ return date;
+ }
+
+ public static Date shortStringToDate(String dateStr) {
+ return shortStringToDate(dateStr, SAMPLE_DATEPATTERN);
+ }
+
+ public static Date shortStringToDateFormat(String dateStr, String format) {
+ return shortStringToDate(dateStr, format);
+ }
+
+ /**
+ * 将不同类型的日期格式转成yyyy-MM-dd格式字符串
+ *
+ * @param date
+ * @param format (如:yyyyMMdd )
+ * @return
+ */
+ public static String shortDateString(String date, String format) {
+ if (date == null) {
+ return "";
+ }
+// SimpleDateFormat sdf = new SimpleDateFormat(format);
+ return shortDateString(shortStringToDate(date, format));
+ }
+
+ /**
+ * 计算2个日期的间隔的秒数
+ *
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static long elapsedSecond(Date d1, Date d2) {
+ long d = Math.abs(d1.getTime() - d2.getTime());
+ return d / 1000;
+ }
+
+ /**
+ * 计算2个日期间隔的分钟数
+ *
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static long elapsedMinute(Date d1, Date d2) {
+ return elapsedSecond(d1, d2) / 60;
+ }
+
+ /**
+ * 计算2个日期间隔的小时数
+ *
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static long elapsedhour(Date d1, Date d2) {
+ return elapsedMinute(d1, d2) / 60;
+ }
+
+ public static long elapsedMonth(Date d1, Date d2) {
+ return elapsedDay(d1, d2) / 30;
+ }
+
+ /**
+ * 计算2个日期间隔的天数
+ *
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static int elapsedDay(Date d1, Date d2) {
+ return (int) elapsedhour(d1, d2) / 24;
+ }
+
+ /**
+ * 计算2个日期间隔的年数
+ *
+ * @param d1
+ * @param d2
+ * @return
+ */
+ public static Double elapsedYear(Date d1, Date d2) {
+ return new Double(elapsedDay(d1, d2) / 365.0);
+ }
+
+ /**
+ * 获取当前月-number的日期
+ *
+ * @param number
+ * @return
+ */
+ public static Date getDateBeforeOfMonth(int number) {
+ Calendar now = Calendar.getInstance();
+ now.setTime(new Date());
+ now.set(Calendar.MONTH, now.get(Calendar.MONTH) - number);
+ return now.getTime();
+ }
+
+ public static String simpleFormat(Date date) {
+ return new SimpleDateFormat(SHORT_DATE_PATTERN).format(date);
+ }
+
+ /**
+ * 获取当前月-number的日期
+ *
+ * @param number
+ * @return
+ */
+ public static Date getDateBeforeOfMonth(Date date, int number) {
+ Calendar now = Calendar.getInstance();
+ now.setTime(date);
+ now.set(Calendar.MONTH, now.get(Calendar.MONTH) - number);
+ return now.getTime();
+ }
+
+ /**
+ * 获取当前月+number的日期
+ *
+ * @param month
+ * @return
+ */
+ public static Date getDateAfterOfMonth(int month) {
+ Calendar now = Calendar.getInstance();
+ now.setTime(new Date());
+ now.set(Calendar.MONTH, now.get(Calendar.MONTH) + month);
+ return now.getTime();
+ }
+
+ /**
+ * 获取月+number的日期
+ *
+ * @param month
+ * @return
+ */
+ public static Date getDateAfterOfMonth(Date date, int month) {
+ Calendar now = Calendar.getInstance();
+ now.setTime(date);
+ now.set(Calendar.MONTH, now.get(Calendar.MONTH) + month);
+ return now.getTime();
+ }
+
+ /**
+ * 获取当前年+number的日期
+ *
+ * @param year
+ * @return
+ */
+ public static Date getDateAfterOfYear(int year) {
+ Calendar now = Calendar.getInstance();
+ now.setTime(new Date());
+ now.set(Calendar.YEAR, now.get(Calendar.YEAR) + year);
+ return now.getTime();
+ }
+
+ /**
+ * 获取年+number的日期
+ *
+ * @param year
+ * @return
+ */
+ public static Date getDateAfterOfYear(Date date, int year) {
+ Calendar now = Calendar.getInstance();
+ now.setTime(date);
+ now.set(Calendar.YEAR, now.get(Calendar.YEAR) + year);
+ return now.getTime();
+ }
+
+ /**
+ * 获得2个日期之间的时间间隔
+ *
+ * @param da1(起始日期 格式:yyyy yyyyMM yyyyMMdd)
+ * @param da2(截止日期)
+ * @return
+ */
+ public static String getTimeBetweenDates(String da1, String da2) {
+ String str = "";
+ if (StringUtils.isEmpty(da1) || StringUtils.isEmpty(da2) || !StringUtils.isNumeric(da1) || !StringUtils.isNumeric(da2) || "19000101".equals(da1)) {
+ return "--";
+ }
+ Date now = new Date();
+ int years = 0;
+ int months = 0;
+ if (da1.length() == 4 || da2.length() == 4) {
+ String dateStr1 = da1.substring(0, 4);
+ String dateStr2 = da2.substring(0, 4);
+ years = Integer.valueOf(dateStr2) - Integer.valueOf(dateStr1);
+ str = years + "年";
+ } else if (da1.length() == 6 || da2.length() == 6) {
+ String yearStr1 = da1.substring(0, 4);
+ String yearStr2 = da2.substring(0, 4);
+ years = Integer.valueOf(yearStr2) - Integer.valueOf(yearStr1);
+ String monthStr1 = da1.substring(4, 6);
+ String monthStr2 = da2.substring(4, 6);
+ months = Integer.valueOf(monthStr2) - Integer.valueOf(monthStr1);
+ if (months < 0) {
+ years = years - 1;
+ months = months + 12;
+ }
+ if (years > 0) {
+ str = years + "年";
+ }
+ if (months > 0) {
+ str = str + months + "月";
+ }
+ } else {
+ str = getTimeBetweenDates(shortStringToDate(da1, "yyyyMMdd"), shortStringToDate(da2, "yyyyMMdd"));
+ }
+ return str;
+ }
+ //LocalDateTime -> Date
+ public static Date asDate(LocalDateTime localDateTime) {
+ return Date.from(localDateTime.atZone(ZoneId.systemDefault()).toInstant());
+ }
+
+ /**
+ * 验证两个时间段是否存在交集
+ * leftStart 选中开始时间
+ * leftEnd 选中结束时间
+ *
+ * rightStart 待比较开始时间
+ * rightEnd 待比较结束时间
+ *
+ * return true (存在交集)
+ * return false (不存在交集)
+ *
+ * */
+ public static boolean timeCoincides(LocalDateTime leftStart,LocalDateTime leftEnd,LocalDateTime rightStart,LocalDateTime rightEnd){
+
+ /* 开始时间 */
+ Date leftStartDate = asDate(leftStart);
+ /* 结束时间 */
+ Date leftEndDate = asDate(leftEnd);
+ /*比较的时间段*/
+ Date rightStartDate = asDate(rightStart);
+ Date rightEndDate = asDate(rightEnd);
+ /*判断*/
+ if (((leftStartDate.getTime() >= rightStartDate.getTime())
+ && leftStartDate.getTime() < rightEndDate.getTime())
+ || ((leftStartDate.getTime() > rightStartDate.getTime())
+ && leftStartDate.getTime() <= rightEndDate.getTime())
+ || ((rightStartDate.getTime() >= leftStartDate.getTime())
+ && rightStartDate.getTime() < leftEndDate.getTime())
+ || ((rightStartDate.getTime() > leftStartDate.getTime())
+ && rightStartDate.getTime() <= leftEndDate.getTime())) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * 获得2个日期之间的时间间隔(如:1年124天)
+ *
+ * @param da1
+ * @param da2
+ * @return
+ */
+ public static String getTimeBetweenDates(Date da1, Date da2) {
+ String str = "";
+ if (da1 == null || da2 == null || "19000101".equals(da1)) {
+ return "--";
+ }
+ if (da1.getTime() > da2.getTime()) {
+ return getTimeBetweenDates(da2, da1);
+ } else {
+ int year1 = da1.getYear();
+ int year2 = da2.getYear();
+ if (year1 == year2) {
+ int days = elapsedDay(da1, da2);
+ str = days + "天";
+ } else {
+ int years = year2 - year1 - 1;
+ Date date1 = new Date();
+ date1.setYear(da1.getYear());
+ date1.setMonth(11);
+ date1.setDate(31);
+ int days1 = elapsedDay(da1, date1);
+ Date date2 = new Date();
+ date2.setYear(da2.getYear());
+ date2.setMonth(0);
+ date2.setDate(1);
+ int days2 = elapsedDay(date2, da2) + 1;
+ int days = days1 + days2;
+ if (days >= 365) {
+ days = days - 365;
+ years++;
+ }
+ if (years > 0) {
+ str = years + "年";
+ }
+ if (days > 0) {
+ str = str + days + "天";
+ }
+
+ }
+
+ }
+ return str;
+ }
+
+ /**
+ * 获取前几个季度的日期
+ *
+ * @return
+ */
+ public static List getQuarter(int length, int number) {
+ List list = new ArrayList();
+ String[] dateStr = {"0331", "0630", "0930", "1231"};
+ Calendar cal = Calendar.getInstance();
+ int year = cal.get(Calendar.YEAR);
+ int quarter = cal.get(Calendar.MONTH) / 3 + 1;
+ quarter = quarter - number;
+ //jack change 2012.1.4
+ while (quarter <= 0) {
+ quarter = quarter + 4;
+ year = year - 1;
+ }
+
+ for (int i = 0; i < length; i++) {
+ if (quarter == 1) {
+ quarter = 4;
+ year -= 1;
+ } else {
+ quarter -= 1;
+ }
+ list.add(year + dateStr[quarter - 1]);
+ }
+ return list;
+ }
+
+ /**
+ * 取上季度末日期
+ *
+ * @param quarterDay
+ * @return
+ */
+ public static String getLastQuarterDay(String quarterDay) {
+ if ("0331".equals(quarterDay.substring(4))) {
+ int year = Integer.valueOf(quarterDay.substring(0, 4)).intValue();
+ return String.valueOf(year - 1) + "1231";
+ } else if ("0630".equals(quarterDay.substring(4))) {
+ return quarterDay.substring(0, 4) + "0331";
+ } else if ("0930".equals(quarterDay.substring(4))) {
+ return quarterDay.substring(0, 4) + "0630";
+ } else if ("1231".equals(quarterDay.substring(4))) {
+ return quarterDay.substring(0, 4) + "0930";
+ }
+ return null;
+ }
+
+
+ /**
+ * 计算年龄
+ *
+ * @param birthday 生日日期
+ * @return {int}
+ */
+ public static int getAge(Date birthday) {
+ Calendar cal = Calendar.getInstance();
+ String date = getDateTimeByPattern(SHORT_DATE_PATTERN);
+ Date currentDate = strToDate(date);
+ if (currentDate.before(birthday)) {
+ throw new IllegalArgumentException(
+ "出生日期大于当前时间!");
+ }
+ int yearNow = cal.get(Calendar.YEAR);
+ int monthNow = cal.get(Calendar.MONTH) + 1;
+ int dayOfMonthNow = cal.get(Calendar.DAY_OF_MONTH);
+ cal.setTime(birthday);
+ int yearBirth = cal.get(Calendar.YEAR);
+ int monthBirth = cal.get(Calendar.MONTH) + 1;
+ int dayOfMonthBirth = cal.get(Calendar.DAY_OF_MONTH);
+ int age = yearNow - yearBirth;
+ if (monthNow <= monthBirth) {
+ if (monthNow == monthBirth) {
+ if (dayOfMonthNow < dayOfMonthBirth) {
+ age--;
+ }
+ } else {
+ age--;
+ }
+ }
+ return age;
+ }
+
+ /**
+ * @param datePattern
+ * @return
+ */
+ public static String formatNowDate(String datePattern) {
+ if (datePattern == null) {
+ datePattern = "yyyy-MM-dd";
+ }
+ SimpleDateFormat df = new SimpleDateFormat(datePattern);
+ return df.format(new Date());
+ }
+
+ public static String thisYearStart() {
+ Calendar cal = Calendar.getInstance();
+ String date = cal.get(Calendar.YEAR) + "0101";
+ return date;
+ }
+
+
+ /**
+ * 得到日期的前或者后几小时
+ *
+ * @param iHour 如果要获得前几小时日期,该参数为负数;
+ * 如果要获得后几小时日期,该参数为正数
+ * @return Date 返回参数curDate
定义日期的前或者后几小时
+ * @see Calendar#add(int, int)
+ */
+ public static Date getDateBeforeOrAfterHours(Date curDate, int iHour) {
+ Calendar cal = Calendar.getInstance();
+ if (curDate != null) {
+ cal.setTime(curDate);
+ }
+ cal.add(Calendar.HOUR_OF_DAY, iHour);
+ return cal.getTime();
+ }
+
+ public static List financeQuaterList(String year) {
+ List list = new ArrayList();
+ list.add(year + "0331");
+ list.add(year + "0630");
+ list.add(year + "0930");
+ list.add(year + "1231");
+ return list;
+ }
+
+ //获得周五的日期
+ public static Date getFriday(Date date) {
+ Calendar c = Calendar.getInstance();
+ c.setTime(date);
+ c.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
+ return c.getTime();
+ }
+
+ /**
+ * 时间转换
+ *
+ * @param d
+ * @param fmt
+ * @return
+ */
+ public static Date parseDate(String d, String fmt) {
+ SimpleDateFormat sdf = new SimpleDateFormat(fmt);
+ try {
+ return sdf.parse(d);
+ } catch (ParseException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static Date addDay(Date date, int day) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(date);
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.get(Calendar.DAY_OF_MONTH) + day);
+ return calendar.getTime();
+ }
+
+ /**
+ * 获取相继几天的时间
+ *
+ * @param before
+ * @return
+ */
+ public static Date getDayBofore(int before) {
+ return getDayBofore(null, before);
+ }
+
+ public static Date getDayBofore(Date date, int before) {
+ Calendar calendar = Calendar.getInstance();
+ if (date != null) {
+ calendar.setTime(date);
+ }
+
+ calendar.set(Calendar.DATE, calendar.get(Calendar.DATE) - before);
+ return calendar.getTime();
+ }
+
+ /**
+ * 得到日期的前或者后几分钟
+ *
+ * @param min 如果要获得前几分钟时间,该参数为负数;
+ * 如果要获得后几分钟时间,该参数为正数
+ * @return Date 返回参数curDate
定义日期的前或者后几分钟
+ * @see Calendar#add(int, int)
+ */
+ public static Date getDateBeforeOrAfterMinute(Date curDate, int min) {
+ Calendar cal = Calendar.getInstance();
+ if (curDate != null) {
+ cal.setTime(curDate);
+ }
+ cal.add(Calendar.MINUTE, min);
+ return cal.getTime();
+ }
+
+ /**
+ * 得到日期的前或者后几秒钟
+ *
+ * @param second 如果要获得前几秒钟时间,该参数为负数;
+ * 如果要获得后几秒钟时间,该参数为正数
+ * @return Date 返回参数curDate
定义日期的前或者后几秒钟
+ * @see Calendar#add(int, int)
+ */
+ public static Date getDateBeforeOrAfterSecond(Date curDate, int second) {
+ Calendar cal = Calendar.getInstance();
+ if (curDate != null) {
+ cal.setTime(curDate);
+ }
+ cal.add(Calendar.SECOND, second);
+ return cal.getTime();
+ }
+
+ /**
+ * 得到当前的的年
+ *
+ * @return 当前的年
+ */
+ public static int getCurrentYear() {
+ Calendar calendar = Calendar.getInstance();
+ return calendar.get(Calendar.YEAR);
+ }
+
+ /**
+ * 根据日期得到当前季度数
+ *
+ * @param date format yyyyMMdd
+ * @return 1:一季度;2:二季度;3:三季度;4:四季度 ;0:无
+ */
+ public static int getSeasonNum(String date) {
+ String month = date.substring(4, 6);
+ if ("01".equals(month) || "02".equals(month) || "03".equals(month)) {
+ return 1;
+ } else if ("04".equals(month) || "05".equals(month) || "06".equals(month)) {
+ return 2;
+ } else if ("07".equals(month) || "08".equals(month) || "09".equals(month)) {
+ return 3;
+ } else if ("10".equals(month) || "11".equals(month) || "12".equals(month)) {
+ return 4;
+ }
+ return 0;
+ }
+
+ /**
+ * 取得某个年份某个季度的季末日期
+ *
+ * @param year 年份
+ * @param season 季度数
+ * @return 季末日期,如果无,返回null
+ */
+ public static String getSeasonEndDate(int year, int season) {
+ if (season == 1) {
+ return year + "0331";
+ } else if (season == 2) {
+ return year + "0630";
+ } else if (season == 3) {
+ return year + "0930";
+ } else if (season == 4) {
+ return year + "1231";
+ }
+
+ return null;
+ }
+
+ /**
+ * 根据日期取得当前季度季末日期
+ *
+ * @param date format: yyyyMMdd
+ * @return String 若无,返回null
+ */
+ public static String getCurSeasonEndDate(String date) {
+ String year = date.substring(0, 4);
+ String month = date.substring(4, 6);
+ if ("01".equals(month) || "02".equals(month) || "03".equals(month)) {
+ return year + "0331";
+ } else if ("04".equals(month) || "05".equals(month) || "06".equals(month)) {
+ return year + "0630";
+ } else if ("07".equals(month) || "08".equals(month) || "09".equals(month)) {
+ return year + "0930";
+ } else if ("10".equals(month) || "11".equals(month) || "12".equals(month)) {
+ return year + "1231";
+ }
+ return null;
+ }
+
+ /**
+ * Return an ISO 8601 combined date and time string for specified date/time
+ *
+ * @param date Date
+ * @return String with format "yyyy-MM-dd'T'HH:mm:ss'Z'"
+ */
+ public static String getISO8601StringFromDate(Date date) {
+ DateFormat dateFormat = new SimpleDateFormat(StR_ISO8601, Locale.US);
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dateFormat.format(date);
+ }
+
+
+ public static String dateToString(Date date) {
+ DateFormat dateFormat = new SimpleDateFormat(DEFAULT_MINUS, Locale.US);
+ dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dateFormat.format(date);
+ }
+
+ /**
+ * 获取当前时间,精确到秒
+ * 时间格式为yyyyMMddHHmmss
+ *
+ * @return String
+ * 精确到秒的当前时间
+ */
+ public static String getCurrentDateTime() {
+ return getDateTimeByPattern(PATTERN_NUM_SEC);
+ }
+
+ public static String getCurrentDateTimeElse() {
+ return getDateTimeByPattern(DEFAULT_DATESFM);
+ }
+
+ public static String getDateTimeElse() {
+ return getDateTimeByPattern(SHORT_DATEPATTERN);
+ }
+
+ public static void main(String[] args) {
+ System.out.println(getDateTimeElse());
+ }
+ public static String getCurrentDateTimeNow() {
+ return getDateTimeByPattern(SAMPLE_DATEPATTERN);
+ }
+
+ public static String getCurrentDate() {
+ return getDateTimeByPattern(SHORT_DATE_PATTERN);
+ }
+
+ public static String getCurrentMonth() {
+ return getDateTimeByPattern(MONTH_DATEPATTERN);
+ }
+
+ public static String getCurrentYearElse() {
+ return getDateTimeByPattern(YEAR_DATEPATTERN);
+ }
+
+ /**
+ * 获取当前时间,精确到毫秒
+ * 时间格式为yyyyMMddHHmmssSSS
+ *
+ * @return String
+ * 精确到毫秒的当前时间
+ */
+ public static String getCurrentDateTimeMs() {
+ return getDateTimeByPattern(PATTERN_NUM_MS);
+ }
+
+ /**
+ * 依据传入的时间格式获取当前时间
+ * 比如传入的是yyyyMMdd,则获取的是精确到天的当前时间
+ * 比如传入的是yyyyMMddHHmmss,则获取的是精确到秒的当前时间
+ *
+ * @param pattern 时间格式字符串
+ * @return String
+ * 符合要求的时间
+ */
+ public static String getDateTimeByPattern(String pattern) {
+ SimpleDateFormat sdf = new SimpleDateFormat(pattern);
+ return sdf.format(new Date());
+ }
+
+ /*
+ * 获取当前时间的前一天
+ */
+ public static Date getBeforeDate(Date date) {
+ Date dNow = new Date(); //当前时间
+ Date dBefore = new Date();
+ Calendar calendar = Calendar.getInstance(); //得到日历
+ calendar.setTime(dNow);//把当前时间赋给日历
+ calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天
+ dBefore = calendar.getTime(); //得到前一天的时间
+ return dBefore;
+ }
+
+ public static String getDate(Date date) {
+ return new SimpleDateFormat(SHORT_DATE_PATTERN).format(date);
+ }
+
+ /**
+ * 把yyyymmdd的字符串转化为yyyy-mm-dd格式的日期
+ *
+ * @param str
+ * @return
+ */
+ public static Date strToDate(String str) {
+ if (null == str || "".equals(str) || str.length() < 1) {
+ return new Date();
+ }
+ StringBuffer sb = new StringBuffer();
+ String y = str.substring(0, 4);
+ String m = str.substring(4, 6);
+ String d = str.substring(6, 8);
+ sb.append(y).append("-").append(m).append("-").append(d);
+ return shortStringToDate(sb.toString());
+ }
+
+ /**
+ * TODO 获取当月的第一天或最后一天
+ *
+ * @param a=0,b=1 当月第一天
+ * @param a=1,b=0 当月最后一天
+ * @return
+ * @author lsy
+ * 2017年2月28日 上午10:49:31
+ */
+ public static String monthFirstOrLast(int a, int b) {
+ Calendar cale = Calendar.getInstance();
+ cale.add(Calendar.MONTH, a);
+ cale.set(Calendar.DAY_OF_MONTH, b);
+ return shortDateString(cale.getTime());
+ }
+
+
+ // 计算天数
+ public static int dateBetween(Date early, Date late) {
+ Calendar calst = Calendar.getInstance();
+ Calendar caled = Calendar.getInstance();
+ calst.setTime(early);
+ caled.setTime(late);
+ // 设置时间为0时
+ calst.set(Calendar.HOUR_OF_DAY, 0);
+ calst.set(Calendar.MINUTE, 0);
+ calst.set(Calendar.SECOND, 0);
+ caled.set(Calendar.HOUR_OF_DAY, 0);
+ caled.set(Calendar.MINUTE, 0);
+ caled.set(Calendar.SECOND, 0);
+ // 得到两个日期相差的天数
+ int days = ((int) (caled.getTime().getTime() / 1000) - (int) (calst.getTime().getTime() / 1000)) / 3600 / 24;
+ return days;
+ }
+
+ public static int daysBetween(String smdate, String bdate) throws Exception {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(sdf.parse(smdate));
+ long time1 = cal.getTimeInMillis();
+ cal.setTime(sdf.parse(bdate));
+ long time2 = cal.getTimeInMillis();
+ long between_days = (time2 - time1) / (1000 * 3600 * 24);
+
+ return Integer.parseInt(String.valueOf(between_days));
+ }
+
+ /**
+ * 判断两个时间段是否存在公共部门
+ *
+ * @param bto
+ * @param oto
+ * @param sto
+ * @param edo
+ * @return
+ */
+ public static Map getAlphalDate(String bto, String oto, String sto, String edo) throws Exception {
+ Map map = new HashedMap();
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ // 标准时间
+ Date bt = sdf.parse(bto);
+ Date ot = sdf.parse(oto);
+ // 目标时间
+ Date st = sdf.parse(sto);
+ Date ed = sdf.parse(edo);
+ long btlong = Math.min(bt.getTime(), ot.getTime());// 开始时间
+ long otlong = Math.max(bt.getTime(), ot.getTime());// 结束时间
+ long stlong = Math.min(st.getTime(), ed.getTime());// 开始时间
+ long edlong = Math.max(st.getTime(), ed.getTime());// 结束时间
+ // 具体算法如下
+ // 首先看是否有包含关系
+ if ((stlong >= btlong && stlong <= otlong) || (edlong >= btlong && edlong <= otlong)) {
+ // 一定有重叠部分
+ long sblong = stlong >= btlong ? stlong : btlong;
+ long eblong = otlong >= edlong ? edlong : otlong;
+ map.put("success", "true");
+ map.put("startTime", sdf.format(sblong));
+ map.put("endTime", sdf.format(eblong));
+ } else {
+ map.put("success", "false");
+ }
+ return map;
+ }
+
+ /**
+ * 获取月末时间
+ *
+ * @param time
+ * @return
+ * @throws Exception
+ */
+ public static String getMaxMonthDate(String time) throws Exception {
+ SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar calendar = Calendar.getInstance();
+ calendar.setTime(dateFormat.parse(time));
+ calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+ return dateFormat.format(calendar.getTime());
+ }
+
+ /**
+ * 获取某年第一天日期
+ *
+ * @param year 年份
+ * @return Date
+ */
+ public static Date getYearFirst(int year) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.clear();
+ calendar.set(Calendar.YEAR, year);
+ Date currYearFirst = calendar.getTime();
+ return currYearFirst;
+ }
+
+ /**
+ * 获取某年最后一天日期
+ *
+ * @param year 年份
+ * @return Date
+ */
+ public static Date getYearLast(int year) {
+ Calendar calendar = Calendar.getInstance();
+ calendar.clear();
+ calendar.set(Calendar.YEAR, year);
+ calendar.roll(Calendar.DAY_OF_YEAR, -1);
+ Date currYearLast = calendar.getTime();
+
+ return currYearLast;
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ExcelExportUtil.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ExcelExportUtil.java
new file mode 100644
index 0000000..2d4591b
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ExcelExportUtil.java
@@ -0,0 +1,164 @@
+package com.mt.wms.core.utils;
+
+import cn.afterturn.easypoi.excel.ExcelImportUtil;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import com.mt.wms.core.exception.ApiException;
+import org.apache.poi.ss.usermodel.Workbook;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ *
+ * Excel导出工具类
+ *
+ *
+ * @author Mr.ZhangShi
+ * @date 2019/3/7
+ * @since 1.0
+ */
+public class ExcelExportUtil {
+
+ private static String[] IEBrowserSignals = {"MSIE", "Trident", "Edge"};
+
+ /**
+ * 判断是否是IE浏览器
+ *
+ * @param request
+ * @return
+ */
+ public static boolean isMSBrowser(HttpServletRequest request) {
+ String userAgent = request.getHeader("User-Agent");
+ for (String signal : IEBrowserSignals) {
+ if (userAgent.contains(signal)) return true;
+ }
+ return false;
+ }
+
+
+ /**
+ * 03版本Excel导出
+ *
+ * @param title
+ * @param sheet
+ * @param pojoClass
+ * @param datas
+ * @param response
+ */
+ public static void exportHssfExcel(String title, String sheet, Class> pojoClass, Collection> datas, HttpServletRequest request, HttpServletResponse response) {
+ Workbook workbook = cn.afterturn.easypoi.excel.ExcelExportUtil.exportExcel(new ExportParams(title, sheet, ExcelType.HSSF), pojoClass, datas);
+ try {
+ response.setContentType("APPLICATION/OCTET-STREAM");
+ response.setHeader("Content-disposition", "attachment;filename=" + getNormalCodeFileName("数据导出结果.xls", request));
+ write(workbook, response.getOutputStream());
+ } catch (IOException var4) {
+ var4.printStackTrace();
+ }
+ }
+
+ /**
+ * 07版本Excel导出
+ *
+ * @param title
+ * @param sheet
+ * @param pojoClass
+ * @param datas
+ * @param response
+ */
+ public static void exportXssfExcel(String title, String sheet, Class> pojoClass, Collection> datas, HttpServletRequest request, HttpServletResponse response) {
+ Workbook workbook = cn.afterturn.easypoi.excel.ExcelExportUtil.exportExcel(new ExportParams(title, sheet, ExcelType.XSSF), pojoClass, datas);
+ try {
+ response.setContentType("APPLICATION/OCTET-STREAM");
+ response.setHeader("Content-disposition", "attachment;filename=" + getNormalCodeFileName("数据导出结果.xlsx", request));
+ write(workbook, response.getOutputStream());
+ } catch (IOException var4) {
+ var4.printStackTrace();
+ }
+ }
+
+ /**
+ * @Description: 导出没有表名的excel
+ * @Param: [title, sheet, pojoClass, datas, request, response]
+ * @return: void
+ * @Author: tqq
+ * @Date: 2019/9/23 15:31
+ */
+ public static void exportXssfExcelNotT(String title, String sheet, Class> pojoClass, Collection> datas, HttpServletRequest request, HttpServletResponse response) {
+ ExportParams exportParams = new ExportParams();
+ exportParams.setCreateHeadRows(true);
+ // exportParams.setTitle(title);
+ exportParams.setSheetName(sheet);
+ exportParams.setType(ExcelType.XSSF);
+ Workbook workbook = cn.afterturn.easypoi.excel.ExcelExportUtil.exportExcel(exportParams, pojoClass, datas);
+ try {
+ response.setContentType("APPLICATION/OCTET-STREAM");
+ response.setHeader("Content-disposition", "attachment;filename=" + getNormalCodeFileName("数据导出结果.xlsx", request));
+ write(workbook, response.getOutputStream());
+ } catch (IOException var4) {
+ var4.printStackTrace();
+ }
+ }
+
+ public static String getNormalCodeFileName(String fileName, HttpServletRequest request) {
+ try {
+ if (isMSBrowser(request)) {
+
+ fileName = URLEncoder.encode(fileName, StandardCharsets.UTF_8.name());
+ } else {
+ fileName = new String(fileName.getBytes(StandardCharsets.UTF_8), StandardCharsets.ISO_8859_1);
+ }
+ } catch (UnsupportedEncodingException e) {
+ throw new ApiException(e);
+ }
+ return fileName;
+ }
+
+
+ public static List importExcel(String filePath, Integer titleRows, Integer headerRows, Class pojoClass) {
+ if (StringUtils.isBlank(filePath)) {
+ return null;
+ }
+ try {
+ ImportParams params = new ImportParams();
+ params.setTitleRows(titleRows);
+ params.setHeadRows(headerRows);
+ List list = null;
+ list = ExcelImportUtil.importExcel(new File(filePath), pojoClass, params);
+ return list;
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return null;
+ }
+
+ public static void write(Workbook wb, OutputStream out) {
+ try {
+ if (null != out) {
+ wb.write(out);
+ out.flush();
+ }
+ } catch (IOException var11) {
+ var11.printStackTrace();
+ } finally {
+ if (null != out) {
+ try {
+ out.close();
+ } catch (IOException var10) {
+ var10.printStackTrace();
+ }
+ }
+
+ }
+
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ExcelImportUtil.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ExcelImportUtil.java
new file mode 100644
index 0000000..bce384a
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/ExcelImportUtil.java
@@ -0,0 +1,139 @@
+package com.mt.wms.core.utils;
+
+import cn.afterturn.easypoi.excel.entity.ImportParams;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.File;
+import java.io.InputStream;
+import java.util.List;
+import java.util.NoSuchElementException;
+
+/**
+ *
+ * excel导入工具类
+ *
+ *
+ * @author Mr.ZhangShi
+ * @version 1.0
+ * @date 2019/10/17
+ */
+public class ExcelImportUtil {
+
+ /**
+ * excel默认文件导入
+ * @param file 文件
+ * @param pojoClass 导出实体的class
+ * @param
+ * @return
+ */
+ public static List importExcel(File file, Class pojoClass) {
+ return importExcel(file, pojoClass, 0, 1, 0, 0, 1, false, false, null);
+ }
+
+ /**
+ * excel默认流导入
+ * @param inputstream 流
+ * @param pojoClass 导出实体的class
+ * @param
+ * @return
+ * @throws Exception
+ */
+ public static List importExcel(InputStream inputstream, Class pojoClass) throws Exception {
+ return importExcel(inputstream, pojoClass, 0, 1, 0, 0, 1, false, false, null);
+ }
+
+ /**
+ * excel文件导入
+ * @param file 文件
+ * @param pojoClass 导出实体的class
+ * @param titleRows 表格标题行数,默认0
+ * @param headRows 表头行数,默认1
+ * @param startRows 字段真正值和列标题之间的距离 默认0
+ * @param startSheetIndex 开始读取的sheet位置,默认为0
+ * @param sheetNum 上传表格需要读取的sheet 数量,默认为1
+ * @param needSave 是否需要保存上传的Excel
+ * @param needVerify 是否需要校验上传的Excel
+ * @param saveUrl 保存上传的Excel目录
+ * @param
+ * @return
+ */
+ public static List importExcel(File file, Class pojoClass, int titleRows, int headRows, int startRows, int startSheetIndex, int sheetNum, boolean needSave, boolean needVerify,
+ String saveUrl) {
+ ImportParams params = new ImportParams();
+ params.setTitleRows(titleRows);
+ params.setHeadRows(headRows);
+ params.setStartRows(startRows);
+ params.setStartSheetIndex(startSheetIndex);
+ params.setSheetNum(sheetNum);
+ params.setNeedSave(needSave);
+ params.setNeedVerify(needVerify);
+ params.setSaveUrl(saveUrl);
+ return cn.afterturn.easypoi.excel.ExcelImportUtil.importExcel(file, pojoClass, params);
+ }
+
+ /**
+ * excel文件导入
+ * @param file 文件
+ * @param titleRows 表格标题行数,默认0
+ * @param headerRows 表头行数,默认1
+ * @param startSheetNum 开始读取的sheet位置,默认为0,,第一sheet是从0开始的
+ * @param sheetNum 上传表格需要读取的sheet 数量,默认为1
+ * @param pojoClass 导出实体的class
+ * @param
+ * @return
+ */
+ public static List importExcel(MultipartFile file,
+ Integer titleRows,
+ Integer headerRows,
+ Integer startSheetNum,
+ Integer sheetNum,
+ Class pojoClass) {
+ if (file == null) {
+ return null;
+ }
+ ImportParams params = new ImportParams();
+ params.setTitleRows(titleRows);
+ params.setHeadRows(headerRows);
+ params.setStartSheetIndex(startSheetNum);
+ params.setSheetNum(sheetNum);
+ params.setKeyIndex(null);
+ List list = null;
+ try {
+ list = cn.afterturn.easypoi.excel.ExcelImportUtil.importExcel(file.getInputStream(), pojoClass, params);
+ } catch (NoSuchElementException e) {
+ throw new RuntimeException("excel文件不能为空");
+ } catch (Exception e) {
+ throw new RuntimeException(e.getMessage());
+ }
+ return list;
+ }
+
+ /**
+ * excel流导入
+ * @param inputstream 流
+ * @param pojoClass 导出实体的class
+ * @param titleRows 表格标题行数,默认0
+ * @param headRows 表头行数,默认1
+ * @param startRows 字段真正值和列标题之间的距离 默认0
+ * @param startSheetIndex 开始读取的sheet位置,默认为0
+ * @param sheetNum 上传表格需要读取的sheet 数量,默认为1
+ * @param needSave 是否需要保存上传的Excel
+ * @param needVerify 是否需要校验上传的Excel
+ * @param saveUrl 保存上传的Excel目录
+ * @param
+ * @return
+ */
+ public static List importExcel(InputStream inputstream, Class pojoClass, int titleRows, int headRows, int startRows, int startSheetIndex, int sheetNum, boolean needSave, boolean needVerify,
+ String saveUrl) throws Exception{
+ ImportParams params = new ImportParams();
+ params.setTitleRows(titleRows);
+ params.setHeadRows(headRows);
+ params.setStartRows(startRows);
+ params.setStartSheetIndex(startSheetIndex);
+ params.setSheetNum(sheetNum);
+ params.setNeedSave(needSave);
+ params.setNeedVerify(needVerify);
+ params.setSaveUrl(saveUrl);
+ return cn.afterturn.easypoi.excel.ExcelImportUtil.importExcel(inputstream, pojoClass, params);
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/FileUtil.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/FileUtil.java
new file mode 100644
index 0000000..286bb29
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/FileUtil.java
@@ -0,0 +1,206 @@
+package com.mt.wms.core.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.*;
+
+/**
+ * Created by cnpc on 2016/12/9.
+ * e-mail:jrn1012@petrochina.com.cn qq:475572229
+ */
+public class FileUtil {
+
+ private static Logger logger = LoggerFactory.getLogger(FileUtil.class);
+
+ /**
+ * 删除文件夹里面的所有文件
+ *
+ * @param path 文件夹路径 如 c:/fqf
+ */
+ public static void delAllFile(String path) {
+ File file = new File(path);
+ if (!file.exists()) {
+ return;
+ }
+ if (!file.isDirectory()) {
+ return;
+ }
+ String[] tempList = file.list();
+ File temp = null;
+ for (int i = 0; i < tempList.length; i++) {
+ if (path.endsWith(File.separator)) {
+ temp = new File(path + tempList[i]);
+ } else {
+ temp = new File(path + File.separator + tempList[i]);
+ }
+ if (temp.isFile()) {
+ temp.delete();
+ }
+ if (temp.isDirectory()) {
+ // 先删除文件夹里面的文件
+ delAllFile(path + "/" + tempList[i]);
+ // 再删除空文件夹
+ delFolder(path + "/" + tempList[i]);
+ }
+ }
+ }
+
+ /**
+ * 删除文件夹
+ *
+ * @param folderPath 文件夹路径及名称 如c:/fqf
+ */
+ public static void delFolder(String folderPath) {
+ try {
+ // 删除完里面所有内容
+ delAllFile(folderPath);
+ String filePath = folderPath;
+ filePath = filePath.toString();
+ File myFilePath = new File(filePath);
+ // 删除空文件夹
+ myFilePath.delete();
+
+ } catch (Exception e) {
+ e.printStackTrace();
+
+ }
+ }
+
+ /**
+ * 复制单个文件
+ *
+ * @param oldPath 源文件路径
+ * @param newPath 复制后路径
+ * @return 文件大小
+ */
+ public static int copyFile(String oldPath, String newPath) {
+ try {
+ int bytesum = 0;
+ int byteread = 0;
+ File oldfile = new File(oldPath);
+ if (oldfile.exists()) {
+ //读入原文件
+ InputStream inStream = new FileInputStream(oldPath);
+ FileOutputStream fs = new FileOutputStream(newPath);
+ byte[] buffer = new byte[1444];
+ int length;
+ while ((byteread = inStream.read(buffer)) != -1) {
+ //字节数 文件大小
+ bytesum += byteread;
+ System.out.println(bytesum);
+ fs.write(buffer, 0, byteread);
+ }
+ inStream.close();
+ fs.close();
+ }
+ return bytesum;
+ } catch (Exception e) {
+ System.out.println("复制单个文件操作出错");
+ e.printStackTrace();
+ return 0;
+ }
+ }
+
+ /**
+ * 复制文件流到新的文件
+ *
+ * @param inStream 文件流
+ * @param file 新文件
+ * @return 是否复制成功
+ */
+ public static boolean copyInputStreamToFile(final InputStream inStream, File file) throws IOException {
+ int bytesum = 0;
+ int byteread = 0;
+ byte[] buffer = new byte[1024];
+ FileOutputStream fs = new FileOutputStream(file);
+ while ((byteread = inStream.read(buffer)) != -1) {
+ //字节数 文件大小
+ bytesum += byteread;
+ fs.write(buffer, 0, byteread);
+ }
+ inStream.close();
+ fs.close();
+ return true;
+ }
+
+ /**
+ * 删除指定路径下的文件
+ *
+ * @param filePathAndName 文件路径
+ */
+ public static void delFile(String filePathAndName) {
+ try {
+ String filePath = filePathAndName;
+ filePath = filePath.toString();
+ File myDelFile = new File(filePath);
+ if (myDelFile.exists()) {
+ myDelFile.delete();
+ }
+
+ } catch (Exception e) {
+ logger.error("删除文件操作出错");
+ e.printStackTrace();
+ }
+
+ }
+
+ /**
+ * 文件重命名
+ *
+ * @param path 文件目录
+ * @param oldname 原来的文件名
+ * @param newname 新文件名
+ */
+ public static void renameFile(String path, String oldname, String newname) {
+ if (!oldname.equals(newname)) {
+ //新的文件名和以前文件名不同时,才有必要进行重命名
+ File oldfile = new File(path + "/" + oldname);
+ File newfile = new File(path + "/" + newname);
+ if (!oldfile.exists()) {
+ //重命名文件不存在
+ return;
+ }
+ //若在该目录下已经有一个文件和新文件名相同,则不允许重命名
+ if (newfile.exists()) {
+ logger.info(newname + "已经存在!");
+ } else {
+ oldfile.renameTo(newfile);
+ }
+ } else {
+ logger.info("新文件名和旧文件名相同...");
+ }
+ }
+
+ /**
+ * Java文件操作 获取文件扩展名
+ *
+ * @param filename
+ * @return String
+ */
+ public static String getExtensionName(String filename) {
+ if ((filename != null) && (filename.length() > 0)) {
+ int dot = filename.lastIndexOf('.');
+ if ((dot > -1) && (dot < (filename.length() - 1))) {
+ return filename.substring(dot + 1);
+ }
+ }
+ return filename;
+ }
+
+ /**
+ * Java文件操作 获取不带扩展名的文件名
+ *
+ * @param filename
+ * @return String
+ */
+ public static String getFileNameNoEx(String filename) {
+ if ((filename != null) && (filename.length() > 0)) {
+ int dot = filename.lastIndexOf('.');
+ if ((dot > -1) && (dot < (filename.length()))) {
+ return filename.substring(0, dot);
+ }
+ }
+ return filename;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java
new file mode 100644
index 0000000..917f248
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/HttpClient.java
@@ -0,0 +1,130 @@
+/**
+ * Copyright (C) 2016-2017 Hangzhou Elabcare Co. Ltd.
+ * All right reserved.
+ *
+ * @author: Simon.lee
+ * date: 2017-09-26 14:43
+ */
+package com.mt.wms.core.utils;
+
+import okhttp3.*;
+import org.apache.commons.lang3.StringEscapeUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.http.HttpEntity;
+import org.apache.http.client.methods.CloseableHttpResponse;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.conn.ssl.NoopHostnameVerifier;
+import org.apache.http.entity.StringEntity;
+import org.apache.http.impl.client.CloseableHttpClient;
+import org.apache.http.impl.client.HttpClientBuilder;
+import org.apache.http.impl.client.HttpClients;
+import org.apache.http.ssl.SSLContexts;
+import org.apache.http.ssl.TrustStrategy;
+import org.apache.http.util.EntityUtils;
+
+import javax.net.ssl.SSLContext;
+import java.io.IOException;
+import java.nio.charset.Charset;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+
+/**
+ * 使用 OKhttp 请求 Api 数据
+ */
+public class HttpClient {
+
+ private static final MediaType JSON = MediaType.parse("application/json;charset=utf-8");
+
+ public static String httpGet(String url) throws IOException {
+ OkHttpClient httpClient = new OkHttpClient();
+ Request request = new Request.Builder()
+ .url(url)
+ .build();
+ Response response = httpClient.newCall(request).execute();
+ // 返回的是string 类型,json的mapper可以直接处理
+ return response.body().string();
+ }
+
+ public static String httpPost(String url, String json) throws IOException {
+ OkHttpClient httpClient = new OkHttpClient();
+ RequestBody requestBody = RequestBody.create(JSON, json);
+ Request request = new Request.Builder()
+ .url(url)
+ .post(requestBody)
+ .build();
+ Response response = httpClient.newCall(request).execute();
+ return response.body().string();
+ }
+
+ public static String httpPost(String postUrl, String soapXml, String token) throws Exception {
+ String retStr = "";
+ // 创建HttpClientBuilder
+ HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
+ // HttpClient
+ CloseableHttpClient closeableHttpClient = httpClientBuilder.build();
+ HttpPost httpPost = new HttpPost(postUrl);
+ httpPost.setHeader("Content-type", "application/json; charset=utf-8");
+ if (StringUtils.isNotEmpty(token)) {
+ httpPost.setHeader("X-Authorization", "Bearer " + token);
+ httpPost.setHeader("x-requested-with", "XMLHttpRequest");
+ }
+ StringEntity data = new StringEntity(soapXml,
+ Charset.forName("UTF-8"));
+ httpPost.setEntity(data);
+ CloseableHttpResponse response = closeableHttpClient
+ .execute(httpPost);
+ HttpEntity httpEntity = response.getEntity();
+ if (httpEntity != null) {
+ // 打印响应内容
+ retStr = EntityUtils.toString(httpEntity, "UTF-8");
+ }
+ // 释放资源
+ closeableHttpClient.close();
+ return StringEscapeUtils.unescapeHtml4(retStr);
+ }
+
+ public static String httpExpressPost(String postUrl, String soapXml, String token) throws Exception {
+ String retStr = "";
+ // 创建HttpClientBuilder
+ HttpClientBuilder httpClientBuilder = HttpClientBuilder.create();
+ // HttpClient
+ CloseableHttpClient closeableHttpClient = getIgnoeSSLClient();
+ HttpPost httpPost = new HttpPost(postUrl);
+ httpPost.setHeader("Content-type", "application/json; charset=utf-8");
+ httpPost.setHeader("token", token);
+ StringEntity data = new StringEntity(soapXml,
+ Charset.forName("UTF-8"));
+ httpPost.setEntity(data);
+ CloseableHttpResponse response = closeableHttpClient
+ .execute(httpPost);
+ HttpEntity httpEntity = response.getEntity();
+ if (httpEntity != null) {
+ // 打印响应内容
+ retStr = EntityUtils.toString(httpEntity, "UTF-8");
+ }
+ // 释放资源
+ closeableHttpClient.close();
+ return StringEscapeUtils.unescapeHtml4(retStr);
+ }
+
+ /**
+ * 获取忽略证书验证的client
+ *
+ * @return
+ * @throws Exception
+ */
+
+ public static CloseableHttpClient getIgnoeSSLClient() throws Exception {
+ SSLContext sslContext = SSLContexts.custom().loadTrustMaterial(null, new TrustStrategy() {
+ @Override
+ public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
+ return true;
+ }
+ }).build();
+
+ //创建httpClient
+ CloseableHttpClient client = HttpClients.custom().setSSLContext(sslContext).
+ setSSLHostnameVerifier(new NoopHostnameVerifier()).build();
+ return client;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/IDGenerator.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/IDGenerator.java
new file mode 100644
index 0000000..8855792
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/IDGenerator.java
@@ -0,0 +1,213 @@
+package com.mt.wms.core.utils;
+
+import org.apache.commons.lang3.RandomStringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+import org.springframework.data.redis.serializer.RedisSerializer;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+import java.text.DecimalFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * id生成器,使用redis自增接口实现
+ * TODO 待完善
+ *
+ * @author jiff
+ * @date 2018-12-1
+ * @since 1.0
+ */
+@Component
+public class IDGenerator {
+ private RedisTemplate redisTemplate;
+ private static IDGenerator idGenerator;
+
+ /**
+ * 4位年格式
+ */
+ public static final String PATTERN_YYYY = "yyyy";
+ /**
+ * 6位年月格式
+ */
+ public static final String PATTERN_YYYYMM = "yyyyMM";
+ /**
+ * 8位年月日格式
+ */
+ public static final String PATTERN_YYYYMMDD = "yyyyMMdd";
+ /**
+ * 10位年月日时格式
+ */
+ public static final String PATTERN_YYYYMMDDHH = "yyyyMMddHH";
+ /**
+ * 12位年月日时分格式
+ */
+ public static final String PATTERN_YYYYMMDDHHMM = "yyyyMMddHHmm";
+
+
+ /**
+ * 最大序列号长度
+ */
+ private static final int MAX_SEQUENCE_LENGTH = 20;
+ /**
+ * 最大随机数长度
+ */
+ private static final int MAX_RANDOM_LENGTH = 10;
+ /**
+ * 序列命名空间
+ */
+ private static final String KEY_PREFIX_SEQUENCE = "SEQUENCE_";
+ private static final Map commonDateFormats = new HashMap<>();
+ private static final List sequenceFormats = new ArrayList<>();
+
+ static {
+ commonDateFormats.put(PATTERN_YYYY, new SimpleDateFormat(PATTERN_YYYY));
+ commonDateFormats.put(PATTERN_YYYYMM, new SimpleDateFormat(
+ PATTERN_YYYYMM));
+ commonDateFormats.put(PATTERN_YYYYMMDD, new SimpleDateFormat(
+ PATTERN_YYYYMMDD));
+ commonDateFormats.put(PATTERN_YYYYMMDDHH, new SimpleDateFormat(
+ PATTERN_YYYYMMDDHH));
+ commonDateFormats.put(PATTERN_YYYYMMDDHHMM, new SimpleDateFormat(
+ PATTERN_YYYYMMDDHHMM));
+ StringBuilder sequencePattern = new StringBuilder(MAX_SEQUENCE_LENGTH);
+ for (int i = 0; i < MAX_SEQUENCE_LENGTH; i++) {
+ sequencePattern.append("0");
+ sequenceFormats.add(new DecimalFormat(sequencePattern.toString()));
+ }
+ }
+
+ @Autowired(required = false)
+ public void setRedisTemplate(RedisTemplate redisTemplate) {
+ RedisSerializer stringSerializer = new StringRedisSerializer();
+ //设置序列化Key的实例化对象
+ redisTemplate.setKeySerializer(stringSerializer);
+ //设置序列化Value的实例化对象
+ redisTemplate.setValueSerializer(new GenericJackson2JsonRedisSerializer());
+ redisTemplate.setHashKeySerializer(stringSerializer);
+ redisTemplate.setHashValueSerializer(new GenericJackson2JsonRedisSerializer());
+ redisTemplate.setStringSerializer(stringSerializer);
+ redisTemplate.afterPropertiesSet();
+ this.redisTemplate = redisTemplate;
+ }
+
+ @PostConstruct
+ private void init() {
+ idGenerator = this;
+ idGenerator.redisTemplate = this.redisTemplate;
+ }
+
+ /**
+ * 生成主键
+ *
+ * @param sequenceName 序列名
+ * @return 主键
+ */
+ public static long gen(String sequenceName) {
+ return idGenerator.redisTemplate.opsForValue().increment(
+ KEY_PREFIX_SEQUENCE + sequenceName, 1);
+ }
+
+ /**
+ * 生成主键
+ *
+ * @param prefix 前缀,为空或null时则不使用前缀
+ * @param pattern 时间戳格式,为空或null时不使用时间戳,已定义5种格式:{@link #PATTERN_YYYY}、{@link #PATTERN_YYYYMM}、{@link #PATTERN_YYYYMMDD}、{@link #PATTERN_YYYYMMDDHH}、{@link #PATTERN_YYYYMMDDHHMM}、
+ * @param sequenceLength 序列长度,大于0时有效,否则使用序列原始值,最多{@value #MAX_SEQUENCE_LENGTH}位,超过{@value #MAX_SEQUENCE_LENGTH}默认为{@value #MAX_SEQUENCE_LENGTH}位
+ * @param sequenceName 序列名,为空或null时则不生成序列值
+ * @return prefix+timestamp+sequence
+ */
+ public static String gen(String prefix, String pattern, int sequenceLength,
+ String sequenceName) {
+ return gen(prefix, pattern, sequenceLength, sequenceName, 0);
+ }
+
+ /**
+ * 生成主键
+ *
+ * @param prefix 前缀,为空或null时则不使用前缀
+ * @param pattern 时间戳格式,为空或null时不使用时间戳,已定义5种格式:{@link #PATTERN_YYYY}、{@link #PATTERN_YYYYMM}、{@link #PATTERN_YYYYMMDD}、{@link #PATTERN_YYYYMMDDHH}、{@link #PATTERN_YYYYMMDDHHMM}、
+ * @param sequenceLength 序列长度,大于0时有效,否则使用序列原始值,最多{@value #MAX_SEQUENCE_LENGTH}位,超过{@value #MAX_SEQUENCE_LENGTH}默认为{@value #MAX_SEQUENCE_LENGTH}位
+ * @param sequenceName 序列名,为空或null时则不生成序列值
+ * @param randomLength 随机数长度,大于0时有效,最多{@value #MAX_RANDOM_LENGTH}位,超过{@value #MAX_RANDOM_LENGTH}默认为{@value #MAX_RANDOM_LENGTH}位
+ * @return prefix+timestamp+sequence+random
+ */
+ public static String gen(String prefix, String pattern, int sequenceLength,
+ String sequenceName, int randomLength) {
+ StringBuilder ids = new StringBuilder();
+ if (!isEmpty(prefix)) {
+ ids.append(prefix);
+ }
+ String timestamp = null;
+ if (!isEmpty(pattern)) {
+ timestamp = getFormattedDate(pattern);
+ }
+ if (timestamp != null) {
+ ids.append(timestamp);
+ }
+ if (!isEmpty(sequenceName)) {
+ long sequence = gen(sequenceName);
+ if (sequenceLength > 0) {
+ if (sequenceLength > MAX_SEQUENCE_LENGTH) {
+ sequenceLength = MAX_SEQUENCE_LENGTH;
+ }
+ String formatSequence = sequenceFormats.get(sequenceLength - 1)
+ .format(sequence);
+ if (formatSequence.length() > sequenceLength) {
+ formatSequence = formatSequence.substring(formatSequence
+ .length() - sequenceLength);
+ }
+ ids.append(formatSequence);
+ } else {
+ ids.append(sequence);
+ }
+ }
+ //随机数长度大于0时添加随机数
+ if (randomLength > 0) {
+ String random = RandomStringUtils.randomNumeric(randomLength);
+ ids.append(random);
+ }
+ return ids.toString();
+ }
+
+ private static String getFormattedDate(String pattern) {
+ SimpleDateFormat sdf = commonDateFormats.get(pattern);
+ if (sdf == null) {
+ try {
+ sdf = new SimpleDateFormat(pattern);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ if (sdf == null) {
+ return null;
+ }
+ java.util.Date now = new java.util.Date();
+ return sdf.format(now);
+ }
+
+ private static boolean isEmpty(String str) {
+ if (str == null || str.trim().isEmpty()) {
+ return true;
+ }
+ return false;
+ }
+
+ public static void main(String[] args) {
+ for (int i = 0; i < 100; i++) {
+ System.out.println(RandomStringUtils.randomNumeric(1));
+ System.out.println(RandomStringUtils.randomNumeric(2));
+ System.out.println(RandomStringUtils.randomNumeric(4));
+ }
+ System.out.println(new DecimalFormat("00").format(103));
+ System.out.println(new DecimalFormat("000").format(13));
+
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/IPAddressParseUtil.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/IPAddressParseUtil.java
new file mode 100644
index 0000000..313523f
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/IPAddressParseUtil.java
@@ -0,0 +1,209 @@
+package com.mt.wms.core.utils;
+
+import cn.hutool.http.HttpUtil;
+import com.alibaba.fastjson.JSONException;
+import com.alibaba.fastjson.JSONObject;
+import lombok.Data;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.*;
+import java.net.URL;
+import java.nio.charset.Charset;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ *
+ * ip地址解析工具类
+ *
+ *
+ * @author Mr.ZhangShi
+ * @date 2019/1/22
+ * @since 1.0
+ */
+public class IPAddressParseUtil {
+
+ /**
+ * 百度地图AK
+ */
+ private final static String BAIDU_DI_TU_AK = "nbnrq7DlVZTXffRVPEUeKpiqzqelCkjB";
+
+ /**
+ * 获取真实ip地址
+ *
+ * @param request
+ * @return
+ */
+ public static String getIpAddr(HttpServletRequest request) {
+ String ip = request.getHeader("x-forwarded-for");
+ if (!checkIP(ip)) {
+ ip = request.getHeader("Proxy-Client-IP");
+ }
+ if (!checkIP(ip)) {
+ ip = request.getHeader("WL-Proxy-Client-IP");
+ }
+ if (!checkIP(ip)) {
+ ip = request.getHeader("X-Real-IP");
+ }
+ if (!checkIP(ip)) {
+ ip = request.getHeader("HTTP_CLIENT_IP");
+ }
+ if (!checkIP(ip)) {
+ ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+ }
+ if (!checkIP(ip)) {
+ ip = request.getRemoteAddr();
+ }
+ return ip;
+ }
+
+ private static boolean checkIP(String ip) {
+ if (ip == null || ip.length() == 0 || "unkown".equalsIgnoreCase(ip)
+ || ip.split(".").length != 4) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * 根据request获取地理位置信息
+ *
+ * @param request
+ * @return 返回地址信息对象
+ * @throws JSONException
+ * @throws IOException
+ */
+ public static Address getAddress(HttpServletRequest request) throws JSONException, IOException {
+ return getAddress(HttpUtil.getClientIP(request));
+ }
+
+ public static String getProvince(String IP) throws JSONException, IOException {
+ //这里调用百度的ip定位api服务 详见 http://api.map.baidu.com/lbsapi/cloud/ip-location-api.htm
+ JSONObject json = readJsonFromUrl("http://api.map.baidu.com/location/ip?ak=" + BAIDU_DI_TU_AK + "&ip=" + IP);
+ String status = json.get("status").toString();
+ if (!"0".equals(status)) {
+ return null;
+ }
+ return ((JSONObject) ((JSONObject) json.get("content")).get("address_detail")).get("province").toString();
+ }
+
+ /**
+ * 根据ip地址获取地理位置信息
+ *
+ * @param ip
+ * @return 返回地址信息对象
+ * @throws JSONException
+ * @throws IOException
+ */
+ public static Address getAddress(String ip) throws JSONException, IOException {
+ JSONObject json = readJsonFromUrl("http://ip.taobao.com/service/getIpInfo.php?ip=" + ip);
+
+ /* 获取到的json对象:
+ * {
+ * "code":0,
+ * "data":{
+ * "ip":"36.27.93.185","country":"中国","area":"","region":"浙江","city":"杭州","county":"XX","isp":"电信","country_id":"CN","area_id":"","region_id":"330000","city_id":"330100","county_id":"xx","isp_id":"100017"
+ * }
+ * }
+ */
+ if (json == null) {
+ return null;
+ }
+ // code
+ String status = json.get("code").toString();
+ if (!"0".equals(status)) {
+ return null;
+ }
+ // 获取json对象里的data对象
+ return json.getObject("data", Address.class);
+ }
+
+ /**
+ * 地址id校验
+ *
+ * @param addressId
+ * @return
+ */
+ public static boolean addressIdVerify(String addressId) {
+ if (StringUtils.isEmpty(addressId)) {
+ return false;
+ }
+ String regex = "\\d{6}";
+ Pattern pattern = Pattern.compile(regex);
+ Matcher matcher = pattern.matcher(addressId);
+ return matcher.find();
+ }
+
+ private static String readAll(Reader rd) throws IOException {
+ StringBuilder sb = new StringBuilder();
+ int cp;
+ while ((cp = rd.read()) != -1) {
+ sb.append((char) cp);
+ }
+ return sb.toString();
+ }
+
+ public static JSONObject readJsonFromUrl(String url) throws IOException, JSONException {
+ InputStream is = null;
+ try {
+ is = new URL(url).openStream();
+ BufferedReader rd = new BufferedReader(new InputStreamReader(is, Charset.forName("UTF-8")));
+ String jsonText = readAll(rd);
+ JSONObject json = JSONObject.parseObject(jsonText);
+ return json;
+ } finally {
+ //关闭输入流
+ if (is != null) {
+ is.close();
+ }
+ }
+ }
+
+ @Data
+ public static class Address {
+
+ /**
+ * 真实ip
+ */
+ private String ip;
+
+ /**
+ * 国家
+ */
+ private String country;
+
+ /**
+ * 区域
+ */
+ private String area;
+
+ /**
+ * 地区、省
+ */
+ private String region;
+
+ /**
+ * 地市
+ */
+ private String city;
+
+ /**
+ * 县
+ */
+ private String county;
+
+ private String isp;
+
+ private String country_id;
+
+ private String area_id;
+
+ private String region_id;
+
+ private String city_id;
+
+ private String county_id;
+
+ private String isp_id;
+ }
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/LocalDateTimeUtils.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/LocalDateTimeUtils.java
new file mode 100644
index 0000000..e4c33fd
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/LocalDateTimeUtils.java
@@ -0,0 +1,232 @@
+package com.mt.wms.core.utils;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.Period;
+import java.time.ZoneId;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
+import java.time.temporal.TemporalUnit;
+import java.util.Date;
+
+/**
+ * Java8中的时间类
+ **/
+public class LocalDateTimeUtils {
+
+ /**
+ * Date 转 LocalDateTime
+ *
+ * @param date date对象
+ * @return
+ */
+ public static LocalDateTime convertDateToLDT(Date date) {
+ return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
+ }
+
+ /**
+ * LocalDateTime 转 Date
+ *
+ * @param time LocalDateTime对象
+ * @return
+ */
+ public static Date convertLDTToDate(LocalDateTime time) {
+ return Date.from(time.atZone(ZoneId.systemDefault()).toInstant());
+ }
+
+ /**
+ * 获取指定日期的毫秒
+ *
+ * @param time LocalDateTime对象
+ * @return
+ */
+ public static Long getMilliByTime(LocalDateTime time) {
+ return time.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
+ }
+
+ /**
+ * 获取指定日期的秒
+ *
+ * @param time LocalDateTime对象
+ * @return
+ */
+ public static Long getSecondsByTime(LocalDateTime time) {
+ return time.atZone(ZoneId.systemDefault()).toInstant().getEpochSecond();
+ }
+
+ /**
+ * LocalDateTime 转 String
+ *
+ * @param time LocalDateTime对象
+ * @param pattern 时间格式 例:yyyy-MM-dd
+ * @return
+ */
+ public static String formatTime(LocalDateTime time, String pattern) {
+ return time.format(DateTimeFormatter.ofPattern(pattern));
+ }
+
+ /**
+ * String 转 LocalDateTime
+ *
+ * @param pattern 时间格式 例:yyyy-MM-dd
+ * @param timeString 时间
+ * @return
+ */
+ public static LocalDateTime StringToLocalDateTime(String pattern, String timeString) {
+ return LocalDateTime.parse(timeString, DateTimeFormatter.ofPattern(pattern));
+ }
+
+ /**
+ * 获取当前时间的指定格式
+ *
+ * @param pattern 时间格式 例:yyyy-MM-dd
+ * @return
+ */
+ public static String formatNow(String pattern) {
+ return formatTime(LocalDateTime.now(), pattern);
+ }
+
+ /**
+ * 日期加上一个数,根据field不同加不同值,field为ChronoUnit.*
+ *
+ * @param time LocalDateTime对象
+ * @param number 时间个数
+ * @param field 时间单位(年、月、日)
+ * @return
+ */
+ public static LocalDateTime plus(LocalDateTime time, long number, TemporalUnit field) {
+ return time.plus(number, field);
+ }
+
+ /**
+ * 日期减去一个数,根据field不同减不同值,field参数为ChronoUnit.*
+ *
+ * @param time LocalDateTime对象
+ * @param number 时间个数
+ * @param field 时间单位(年、月、日)
+ * @return
+ */
+ public static LocalDateTime minu(LocalDateTime time, long number, TemporalUnit field) {
+ return time.minus(number, field);
+ }
+
+ /**
+ * 获取两个日期的差 field参数为ChronoUnit.*
+ *
+ * @param startTime
+ * @param endTime
+ * @param field 单位(年月日时分秒)
+ * @return
+ */
+ public static long betweenTwoTime(LocalDateTime startTime, LocalDateTime endTime, ChronoUnit field) {
+ Period period = Period.between(LocalDate.from(startTime), LocalDate.from(endTime));
+ if (field == ChronoUnit.YEARS) {
+ return period.getYears();
+ }
+ if (field == ChronoUnit.MONTHS) {
+ return period.getYears() * 12 + period.getMonths();
+ }
+ return field.between(startTime, endTime);
+ }
+
+ /**
+ * 获取一天的开始时间
+ *
+ * @param time LocalDateTime对象
+ * @return
+ */
+ public static LocalDateTime getDayStart(LocalDateTime time) {
+ return time.withHour(0)
+ .withMinute(0)
+ .withSecond(0)
+ .withNano(0);
+ }
+
+ /**
+ * 获取一天的结束时间
+ *
+ * @param time
+ * @return
+ */
+ public static LocalDateTime getDayEnd(LocalDateTime time) {
+ return time.withHour(23)
+ .withMinute(59)
+ .withSecond(59)
+ .withNano(999999999);
+ }
+
+ /**
+ * 与当前时间进行比较
+ * @param time str时间
+ * @param pattern 日期格式
+ * @return time >= now() ? true :false
+ */
+ public static boolean strTimeCompareNow(String time, String pattern){
+ return time.compareTo(LocalDateTime.now().format(DateTimeFormatter.ofPattern(pattern))) >= 0;
+ }
+
+ /**
+ * string LocalDate类型进行增减(只支持年月日)
+ * @param strLocalDate 时间
+ * @param number 时间数
+ * @param field 增减时间单位
+ * @return
+ */
+ public static String strLocalDatePlusMinus(String strLocalDate, long number, ChronoUnit field){
+ LocalDate localDate = LocalDate.parse(strLocalDate, DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+ LocalDate alterLocalDate;
+ if (number > 0) {
+ alterLocalDate = localDate.plus(number, field);
+ } else {
+ alterLocalDate = localDate.minus(number, field);
+ }
+ return alterLocalDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+ }
+
+ /**
+ * 获取两个LocalDate时间差
+ * @param startDate
+ * @param endDate
+ * @param field
+ * @return
+ */
+ public static long betweenTwoTime(LocalDate startDate, LocalDate endDate, ChronoUnit field) {
+ Period period = Period.between(startDate, endDate);
+ if (field == ChronoUnit.YEARS) {
+ return period.getYears();
+ }
+ if (field == ChronoUnit.MONTHS) {
+ return period.getYears() * 12 + period.getMonths();
+ }
+ return field.between(startDate, endDate);
+ }
+
+
+ /**
+ * 测试
+ *
+ * @param args
+ */
+ public static void main(String[] args) {
+ LocalDateTime start = LocalDateTime.of(1993, 10, 13, 11, 11);
+ LocalDateTime end = LocalDateTime.of(1994, 11, 13, 13, 13);
+ //根据ChronoUnit.* 返回相应的时间差值
+ System.out.println("年:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.YEARS));
+ System.out.println("月:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.MONTHS));
+ System.out.println("日:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.DAYS));
+ System.out.println("半日:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.HALF_DAYS));
+ System.out.println("小时:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.HOURS));
+ System.out.println("分钟:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.MINUTES));
+ System.out.println("秒:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.SECONDS));
+ System.out.println("毫秒:" + LocalDateTimeUtils.betweenTwoTime(start, end, ChronoUnit.MILLIS));
+
+ //增加二十分钟
+ System.out.println(LocalDateTimeUtils.plus(LocalDateTime.now(), 20, ChronoUnit.MINUTES));
+ //增加两年
+ System.out.println(LocalDateTimeUtils.formatTime(LocalDateTimeUtils.plus(LocalDateTime.now(), 2, ChronoUnit.YEARS), "yyyy年MM月dd日 HH:mm"));
+
+ System.out.println(LocalDateTimeUtils.getDayStart(LocalDateTime.now()));
+ System.out.println(LocalDateTimeUtils.getDayEnd(LocalDateTime.now()));
+ }
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/LockHelper.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/LockHelper.java
new file mode 100644
index 0000000..209e274
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/LockHelper.java
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2019.
+ * http://www.ulabcare.com
+ */
+
+package com.mt.wms.core.utils;
+
+import com.mt.wms.core.constants.RedisConstant;
+import org.redisson.api.RLock;
+import org.redisson.api.RedissonClient;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import javax.annotation.PostConstruct;
+
+/**
+ * 分布式锁帮助类
+ * 详细文档请查看分布式锁和同步器
+ *
+ *
+ * // 加锁以后10秒钟自动解锁
+ * // 无需调用unlock方法手动解锁
+ * lock.lock(10, TimeUnit.SECONDS);
+ *
+ * // 尝试加锁,最多等待100秒,上锁以后10秒自动解锁
+ * boolean res = lock.tryLock(100, 10, TimeUnit.SECONDS);
+ * if (res) {
+ * try {
+ * ...
+ * } finally {
+ * lock.unlock();
+ * }
+ * }
+ *
+ *
+ *
+ * @author jiff
+ * @date 2019-08-25
+ * @since 1.0
+ */
+@Component
+public class LockHelper {
+ /**
+ * 订单锁前缀:{@value}
+ */
+ private static final String ORDER_LOCK = RedisConstant.LOCK_PREFIX + "order:";
+ private static final String FUND_LOCK = RedisConstant.LOCK_PREFIX + "fund:";
+ private static final String SCHEDULER_LOCK = RedisConstant.LOCK_PREFIX + "scheduler:";
+ /**
+ * ip转地址任务调度锁:{@value}
+ */
+ private static final String IP_TO_ADDRESS_SCHEDULER_LOCK = SCHEDULER_LOCK + "ip_to_address";
+ /**
+ * uu跑腿定时提交订单任务锁
+ */
+ private static final String UUPT_SUBMIT_ORDER_SCHEDULER_LOCK = SCHEDULER_LOCK + "uupt_submit_order";
+
+ private RedissonClient redissonClient;
+ private static LockHelper lockHelper;
+
+ @Autowired(required = false)
+ public void setRedissonClient(RedissonClient redissonClient) {
+ this.redissonClient = redissonClient;
+ }
+
+ @PostConstruct
+ private void init() {
+ lockHelper = this;
+ lockHelper.redissonClient = this.redissonClient;
+ }
+
+ /**
+ * 获取联锁
+ *
+ * @param locks 同时加锁的集合
+ * @return
+ */
+ public static RLock getMultiLock(RLock... locks) {
+ return lockHelper.redissonClient.getMultiLock(locks);
+ }
+
+ /**
+ * 获取红锁
+ *
+ * @param locks 同时加锁的集合
+ * @return
+ */
+ public static RLock getRedLock(RLock... locks) {
+ return lockHelper.redissonClient.getRedLock(locks);
+ }
+
+ /**
+ * 获取订单锁
+ *
+ * @param id 订单id
+ * @return
+ */
+ public static RLock getOrderLock(Long id) {
+ return lockHelper.redissonClient.getLock(ORDER_LOCK + id);
+ }
+
+ /**
+ * 获取资金账户锁
+ *
+ * @param id 账户id
+ * @return
+ */
+ public static RLock getFundLock(Long id) {
+ return lockHelper.redissonClient.getLock(FUND_LOCK + id);
+ }
+
+ /**
+ * 获取ip转地址任务调度锁
+ *
+ * @return
+ */
+ public static RLock getIpToAddressSchedulerLock() {
+ return lockHelper.redissonClient.getLock(IP_TO_ADDRESS_SCHEDULER_LOCK);
+ }
+
+ /**
+ * uu跑腿定时提交订单任务锁
+ * @return
+ */
+ public static RLock getUuptSubmitOrderSchedulerLock(){
+ return lockHelper.redissonClient.getLock(UUPT_SUBMIT_ORDER_SCHEDULER_LOCK);
+ }
+
+
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/MD5Util.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/MD5Util.java
new file mode 100644
index 0000000..b8aaa57
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/MD5Util.java
@@ -0,0 +1,84 @@
+package com.mt.wms.core.utils;
+
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+
+/**
+ * MD5加密
+ *
+ * @author yangyang.jiang
+ * @create 2018-11-06 22:04
+ **/
+public class MD5Util {
+ /**
+ * md5加密
+ *
+ * @param str
+ * @return
+ */
+ public static String md5(String str) {
+ try {
+ MessageDigest md = MessageDigest.getInstance("MD5");
+ md.update(str.getBytes());
+ byte[] byteDigest = md.digest();
+ int i;
+ StringBuffer buf = new StringBuffer("");
+ for (int offset = 0; offset < byteDigest.length; offset++) {
+ i = byteDigest[offset];
+ if (i < 0) {
+ i += 256;
+ }
+ if (i < 16) {
+ buf.append("0");
+ }
+ buf.append(Integer.toHexString(i));
+ }
+ // 32位加密
+ return buf.toString();
+ // 16位的加密
+ // return buf.toString().substring(8, 24);
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ return null;
+ }
+ }
+
+ public static void main(String[] args) {
+ System.out.println(MD5Util.md5("123456"));
+ }
+
+ private static String byteArrayToHexString(byte b[]) {
+ StringBuffer resultSb = new StringBuffer();
+ for (int i = 0; i < b.length; i++) {
+ resultSb.append(byteToHexString(b[i]));
+ }
+ return resultSb.toString();
+ }
+
+ private static String byteToHexString(byte b) {
+ int n = b;
+ if (n < 0) {
+ n += 256;
+ }
+ int d1 = n / 16;
+ int d2 = n % 16;
+ return hexDigits[d1] + hexDigits[d2];
+ }
+
+ public static String MD5Encode(String origin, String charsetname) {
+ String resultString = null;
+ try {
+ resultString = new String(origin);
+ MessageDigest md = MessageDigest.getInstance("MD5");
+ if (charsetname == null || "".equals(charsetname)) {
+ resultString = byteArrayToHexString(md.digest(resultString.getBytes()));
+ } else {
+ resultString = byteArrayToHexString(md.digest(resultString.getBytes(charsetname)));
+ }
+ } catch (Exception exception) {
+ }
+ return resultString;
+ }
+
+ private static final String hexDigits[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"};
+}
diff --git a/6.program/wms-core/src/main/java/com/mt/wms/core/utils/PDF2Img.java b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/PDF2Img.java
new file mode 100644
index 0000000..c20cd65
--- /dev/null
+++ b/6.program/wms-core/src/main/java/com/mt/wms/core/utils/PDF2Img.java
@@ -0,0 +1,76 @@
+package com.mt.wms.core.utils;
+
+import org.apache.pdfbox.pdmodel.PDDocument;
+import org.apache.pdfbox.rendering.ImageType;
+import org.apache.pdfbox.rendering.PDFRenderer;
+import org.apache.pdfbox.tools.imageio.ImageIOUtil;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * pdf转图片
+ */
+public class PDF2Img {
+ /**
+ * pdf转图片
+ *
+ * @param file 要转换的pdf文件
+ * @return 转换之后的BufferedImage集合(图片个数取决于pdf页码个数)
+ */
+ public static List