message = MessageBuilder.withPayload(mqMessage).setHeader("x-delay", fileDelayTime).build();
+ fileSource.fileOutput().send(message);
+ return fileVOResult;
+ } catch (Exception e) {
+ log.error("文件上传初始化异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(FileEnum.INIT_UPLOAD_FAIL);
+ }
+ }
+
+ @Override
+ @Transactional
+ public String uploadPart(UploadMultipartFile multipartFile, FilePartVO filePartVO) {
+ try {
+ //上传分片数据
+ String partETagString = fileStorageAdapter.uploadPart(filePartVO, new ByteArrayInputStream(multipartFile.getFileByte()));
+ //保存分片信息
+ FilePart filePart = BeanConv.toBean(filePartVO, FilePart.class);
+ filePart.setUploadResult(partETagString);
+ filePartService.save(filePart);
+ return partETagString;
+ }catch (Exception e) {
+ log.error("文件分片上传异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(FileEnum.UPLOAD_PART_FAIL);
+ }
+ }
+
+ @Override
+ @Transactional
+ public String completeMultipartUpload(FileVO fileVO) {
+ try {
+ //移除分片记录
+ Boolean flag = filePartService.deleteFilePartByUpLoadId(fileVO.getUploadId());
+ if (!flag){
+ throw new ProjectException(FileEnum.COMPLETE_PART_FAIL);
+ }
+ //修改文件记录状态
+ fileVO.setStatus(FileConstant.STATUS_SUCCEED);
+ flag = updateById(BeanConv.toBean(fileVO,File.class));
+ if (!flag){
+ throw new ProjectException(FileEnum.COMPLETE_PART_FAIL);
+ }
+ //合并结果
+ return fileStorageAdapter.completeMultipartUpload(fileVO);
+ } catch (Exception e) {
+ log.error("文件分片上传异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(FileEnum.COMPLETE_PART_FAIL);
+ }
+ }
+
+ @Override
+ @Cacheable(value = FileCacheConstant.BASIC,key = "#fileId")
+ public FileVO downLoad(Long fileId) {
+ try {
+ File file = getById(fileId);
+ InputStream inputStream = fileStorageAdapter
+ .downloadFile(file.getStoreFlag(), file.getBucketName(), file.getPathUrl());
+ byte[] bytes = IOUtils.toByteArray(inputStream);
+ String base64Image = EncodesUtil.encodeBase64(bytes);
+ FileVO fileVO = BeanConv.toBean(file, FileVO.class);
+ fileVO.setBase64Image(base64Image);
+ return fileVO;
+ } catch (Exception e) {
+ log.error("文件下载传异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(FileEnum.DOWNLOAD_FAIL);
+ }
+ }
+}
diff --git a/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/utils/FileUrlContext.java b/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/utils/FileUrlContext.java
new file mode 100644
index 0000000..0c55d89
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/utils/FileUrlContext.java
@@ -0,0 +1,60 @@
+package com.itheima.sfbx.file.utils;
+
+import com.itheima.sfbx.file.handler.aliyun.properties.OssAliyunConfigProperties;
+import com.itheima.sfbx.file.handler.qiniu.properties.QiniuProperties;
+import com.itheima.sfbx.framework.commons.constant.file.FileConstant;
+import com.itheima.sfbx.framework.commons.enums.file.FileEnum;
+import com.itheima.sfbx.framework.commons.exception.ProjectException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.util.StringUtils;
+
+import javax.annotation.PostConstruct;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ *
+ * 获得资源文件完整路径地址上下文对象
+ * 如果添加了新的对象存储资源,需要在此类中对 initMap 方法添加新的路径前缀
+ *
+ *
+ * @Description:
+ */
+@Component
+public class FileUrlContext {
+
+ @Autowired
+ private OssAliyunConfigProperties ossAliyunConfigProperties;
+
+ @Autowired
+ private QiniuProperties qiniuProperties;
+
+ private static Map fileStoreUrlHandler =new HashMap<>();
+
+ @PostConstruct
+ public void initMap() {
+ // 初始化各个对象存储的文件访问路径地址
+ String ossPrefixUrl = "https://" + ossAliyunConfigProperties.getBucketName() + "." +
+ ossAliyunConfigProperties.getEndpoint() + "/";
+ String kodoPrefixUrl = "http://" + qiniuProperties.getKodo().getEndpoint() + "/";
+
+ fileStoreUrlHandler.put(FileConstant.ALIYUN_OSS,ossPrefixUrl);
+ fileStoreUrlHandler.put(FileConstant.QINIU_KODO,kodoPrefixUrl);
+ }
+
+ /**
+ * 获得资源文件的访问地址
+ * @param storeFlag String 对象存储标识
+ * @param pathUrl String 相对路径
+ * @return String 资源文件对应的完整路径地址
+ */
+ public String getFileUrl(String storeFlag, String pathUrl) {
+ String prefix = fileStoreUrlHandler.get(storeFlag);
+ if (StringUtils.isEmpty(prefix)) {
+ throw new ProjectException(FileEnum.FILE_PREFIX_NOT_FOUND);
+ }
+ return prefix + pathUrl;
+ }
+
+}
diff --git a/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileBusinessController.java b/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileBusinessController.java
new file mode 100644
index 0000000..18382f2
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileBusinessController.java
@@ -0,0 +1,71 @@
+package com.itheima.sfbx.file.web;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.itheima.sfbx.file.service.IFileService;
+import com.itheima.sfbx.framework.commons.basic.ResponseResult;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @ClassName FileController.java
+ * @Description 附件展示维护controller
+ */
+@RestController
+@RequestMapping("file")
+@Api(tags = "附件controller")
+@Slf4j
+public class FileBusinessController {
+
+ @Autowired
+ IFileService fileService;
+
+ /***
+ * @description 附件分页列表
+ * @param fileVO 查询条件
+ * @param pageNum 页码
+ * @param pageSize 每页条数
+ * @return: Page
+ */
+ @PostMapping("page/{pageNum}/{pageSize}")
+ @ApiOperation(value = "查询附件分页",notes = "查询附件分页")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "fileVO",value = "附件查询对象",required = false,dataType = "FileVO"),
+ @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
+ @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
+ })
+ @ApiOperationSupport(includeParameters ={"fileVO.businessType","","fileVO.pathUrl",
+ "fileVO.dataState","fileVO.status"} )
+ public ResponseResult> findFileVOPage(
+ @RequestBody FileVO fileVO,
+ @PathVariable("pageNum") int pageNum,
+ @PathVariable("pageSize") int pageSize) {
+ //查询附件分页信息
+ Page fileVOPage = fileService.findFileVOPage(fileVO, pageNum, pageSize);
+ return ResponseResultBuild.successBuild(fileVOPage);
+ }
+
+ /**
+ * @Description 移除业务原图片,并批量绑定新的图片到业务上
+ * @param fileVOs 附件对象
+ * @return
+ */
+ @PutMapping(value = "replace-bind-batch-file")
+ @ApiOperation(value = "移除业务原图片,并绑定新的图片到业务上",notes = "移除业务原图片,并绑定新的图片到业务上")
+ @ApiImplicitParam(name = "fileVOs",value = "附件对象",required = true,dataType = "FileVO")
+ public ResponseResult replaceBindBatchFile(@RequestBody List fileVOs){
+ Boolean flag = fileService.replaceBindBatchFile(fileVOs);
+ return ResponseResultBuild.successBuild(flag);
+ }
+}
+
diff --git a/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileUpLoadController.java b/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileUpLoadController.java
new file mode 100644
index 0000000..2326053
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileUpLoadController.java
@@ -0,0 +1,104 @@
+package com.itheima.sfbx.file.web;
+
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import com.itheima.sfbx.file.service.IFileService;
+import com.itheima.sfbx.framework.commons.basic.ResponseResult;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+import com.itheima.sfbx.framework.commons.dto.file.FilePartVO;
+import com.itheima.sfbx.framework.commons.dto.file.UploadMultipartFile;
+import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
+import com.itheima.sfbx.framework.commons.utils.SubjectContent;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.io.IOUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+
+/**
+ * @ClassName FileUpLoadController.java
+ * @Description 文件上传接口
+ */
+@RestController
+@RequestMapping("file")
+@Api(tags = "附件controller")
+@Slf4j
+public class FileUpLoadController {
+
+ @Autowired
+ IFileService fileService;
+
+ /***
+ * @description 文件上传-简单上传-前端直接调用
+ * @param file 上传对象
+ * @return: com.itheima.travel.req.FileVO
+ */
+ @PostMapping(value = "up-load")
+ @ApiOperation(value = "文件上传-简单上传",notes = "文件上传-简单上传")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "form", name = "file", value = "文件对象", required = true, dataTypeClass = MultipartFile.class)
+ })
+ @ApiOperationSupport(includeParameters = {"fileVO.businessType","fileVO.bucketName","fileVO.storeFlag","fileVO.autoCatalog"})
+ public ResponseResult upLoad(
+ @RequestParam("file") MultipartFile file,
+ FileVO fileVO) throws IOException {
+ fileVO.setCompanyNo(SubjectContent.getCompanyNo());
+ //构建文件上传对象
+ UploadMultipartFile uploadMultipartFile = UploadMultipartFile
+ .builder()
+ .originalFilename(file.getOriginalFilename())
+ .fileByte(IOUtils.toByteArray(file.getInputStream()))
+ .build();
+ //执行文件上传
+ FileVO fileVOResult = fileService.upLoad(uploadMultipartFile, fileVO);
+ return ResponseResultBuild.successBuild(fileVOResult);
+
+ }
+
+ @PostMapping(value = "initiate-multipart-up-load")
+ @ApiOperation(value = "文件分片上传-初始化",notes = "文件分片上传-初始化")
+ @ApiImplicitParam(name = "fileVO",value = "文件对象",required = true,dataType = "FileVO")
+ public ResponseResult initiateMultipartUpload(
+ @RequestBody FileVO fileVO){
+ fileVO.setCompanyNo(SubjectContent.getCompanyNo());
+ //初始化上传Id
+ FileVO fileVOResult = fileService.initiateMultipartUpload(fileVO);
+ return ResponseResultBuild.successBuild(fileVOResult);
+ }
+
+ @PostMapping(value = "up-load-part")
+ @ApiOperation(value = "文件分片上传-上传分片",notes = "文件分片上传-上传分片")
+ @ApiImplicitParams({
+ @ApiImplicitParam(paramType = "form", name = "file", value = "文件对象", required = true, dataTypeClass = MultipartFile.class)
+ })
+ public ResponseResult uploadPart(
+ @RequestParam("file") MultipartFile file,
+ FilePartVO filePartVO)throws IOException {
+ filePartVO.setCompanyNo(SubjectContent.getCompanyNo());
+ //构建文件上次对象
+ UploadMultipartFile uploadMultipartFile = UploadMultipartFile
+ .builder()
+ .originalFilename(file.getOriginalFilename())
+ .fileByte(IOUtils.toByteArray(file.getInputStream()))
+ .build();
+ //上传分片返回partETagJson
+ String partETagJson = fileService.uploadPart(uploadMultipartFile,filePartVO);
+ return ResponseResultBuild.successBuild(partETagJson);
+ }
+
+ @PostMapping(value = "complete-multipart-up-load")
+ @ApiOperation(value = "文件分片上传-合并分片",notes = "文件分片上传-合并分片")
+ @ApiImplicitParam(name = "fileVO",value = "文件对象",required = true,dataType = "FileVO")
+ public ResponseResult completeMultipartUpload(
+ @RequestBody FileVO fileVO)throws IOException {
+ //问上传分片返回partETagJson
+ String eTagJson = fileService.completeMultipartUpload(fileVO);
+ return ResponseResultBuild.successBuild(eTagJson);
+ }
+
+}
diff --git a/day01/sfbx-file/file-web/src/main/resources/banner.txt b/day01/sfbx-file/file-web/src/main/resources/banner.txt
new file mode 100644
index 0000000..065e5dd
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/banner.txt
@@ -0,0 +1,10 @@
+ _ __ __
+ (_) /__________ ______/ /_
+ / / __/ ___/ __ `/ ___/ __/
+ / / /_/ /__/ /_/ (__ ) /_
+/_/\__/\___/\__,_/____/\__/
+ :: Spring Boot :: (v-2.7.10)
+ :: Spring Cloud :: (v-2021.0.6)
+ :: Spring Cloud Alibaba :: (v-2021.0.1.0)
+ :: sfbx Cloud :: (v-2.0-SNAPSHOT)
+ :: 献给可爱的传智人 ::
diff --git a/day01/sfbx-file/file-web/src/main/resources/bootstrap-test.yml b/day01/sfbx-file/file-web/src/main/resources/bootstrap-test.yml
new file mode 100644
index 0000000..e64aca3
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/bootstrap-test.yml
@@ -0,0 +1,54 @@
+#服务配置
+server:
+ #端口
+ port: 7075
+ #服务编码
+ tomcat:
+ uri-encoding: UTF-8
+spring:
+ config:
+ activate:
+ on-profile:
+ - test
+ main:
+ allow-circular-references: true
+ allow-bean-definition-overriding: true
+ mvc:
+ pathmatch:
+ matching-strategy: ant_path_matcher
+ #应用配置
+ application:
+ #应用名称
+ name: file-web
+ cloud:
+ nacos:
+ discovery:
+ server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心
+ group: SEATA_GROUP
+ service: ${spring.application.name}
+ username: ${NACOS_USERNAME:nacos}
+ password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+}
+ config:
+ server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心
+ group: SEATA_GROUP
+ file-extension: yml
+ shared-configs: # 共享配置
+ - data-id: shared-spring-seata.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-redisson.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-mybatis-plus.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-stream-rabbit-source-file.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ username: ${NACOS_USERNAME:nacos}
+ password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+}
+logging:
+ config: classpath:logback.xml
diff --git a/day01/sfbx-file/file-web/src/main/resources/bootstrap.yml b/day01/sfbx-file/file-web/src/main/resources/bootstrap.yml
new file mode 100644
index 0000000..c202534
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/bootstrap.yml
@@ -0,0 +1,53 @@
+#服务配置
+server:
+ #端口
+ port: 7075
+ #服务编码
+ tomcat:
+ uri-encoding: UTF-8
+spring:
+ servlet:
+ multipart:
+ enabled: true
+ max-file-size: 10MB
+ max-request-size: 20MB
+ profiles:
+ active: dev
+ main:
+ allow-circular-references: true
+ allow-bean-definition-overriding: true
+ mvc:
+ pathmatch:
+ matching-strategy: ant_path_matcher
+ #应用配置
+ application:
+ #应用名称
+ name: file-web
+ cloud:
+ nacos:
+ discovery:
+ server-addr: 192.168.12.129:8848 # nacos注册中心
+ group: SEATA_GROUP
+ service: ${spring.application.name}
+ config:
+ server-addr: 192.168.12.129:8848 # nacos配置中心地址
+ group: SEATA_GROUP
+ file-extension: yml
+ shared-configs: # 共享配置
+ - data-id: shared-spring-seata.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-redisson.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-mybatis-plus.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+ - data-id: shared-stream-rabbit-source-file.yml #配置文件名-DataId
+ group: SEATA_GROUP
+ refresh: false
+logging:
+ config: classpath:logback.xml
diff --git a/day01/sfbx-file/file-web/src/main/resources/generrator.properties b/day01/sfbx-file/file-web/src/main/resources/generrator.properties
new file mode 100644
index 0000000..db01d65
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/generrator.properties
@@ -0,0 +1,47 @@
+#\u6570\u636E\u5E93\u5730\u5740
+url=jdbc:mysql://192.168.12.129:3306/restkeeper-file?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&tinyInt1isBit=false
+#\u6570\u636E\u5E93\u8D26\u53F7
+userName=root
+#\u6570\u636E\u5E93\u5BC6\u7801
+password=pass
+#services\u7684src\u8DEF\u5F84
+serviceProjectPath=E:/itheima-project-parent/itheima-project-cloud/itheima-module-file/module-file-web
+#VO\u7684src\u8DEF\u5F84
+voProjectPath=E:/itheima-project-parent/itheima-project-cloud/itheima-component/component-vo
+#\u4F5C\u8005
+author=Admin
+#\u5305\u540D\u79F0
+parent=com.itheima
+#\u6A21\u5757\u540D\u79F0
+moduleName=project
+#\u6570\u636E\u5E93\u8868\u524D\u7F00
+tablePrefix =tab_
+#\u9700\u8981\u751F\u6210\u7684\u8868\u540D\uFF0C\u4F7F\u7528\uFF0C\u5206\u5272
+tableName= tab_file_part
+#\u9700\u8981\u751F\u6210\u9644\u4EF6\u76F8\u5173\u7684\u8868
+tablesFile=
+#pojo\u7684\u7236\u7C7B
+SuperEntityClass = com.itheima.easy.basic.BasicPojo
+#pojo\u7684\u901A\u7528\u5B57\u6BB5
+superEntityColumns = id,created_time,updated_time,sharding_id,enable_flag
+#\u751F\u6210\u89C4\u5219
+constant=true
+constant.ftl.path=/templates/constant.java
+enums=true
+enums.ftl.path=/templates/enums.java
+vo=true
+vo.ftl.path=/templates/vo.java
+entity=true
+entity.ftl.path=/templates/entity.java
+mapper=true
+mapper.ftl.path=/templates/mapper.java
+service=true
+service.ftl.path=/templates/service.java
+serviceImpl=true
+serviceImpl.ftl.path=/templates/serviceImpl.java
+face=false
+face.ftl.path=/templates/face.java
+faceImpl=false
+faceImpl.ftl.path=/templates/faceImpl.java
+controller=false
+controller.ftl.path=/templates/controller.java
diff --git a/day01/sfbx-file/file-web/src/main/resources/logback.xml b/day01/sfbx-file/file-web/src/main/resources/logback.xml
new file mode 100644
index 0000000..304fe0e
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/logback.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n
+
+
+
+
+
+
+ ${LOG_HOME}/file-web-01.log.%d{yyyy-MM-dd}.log
+
+
+ 30
+
+
+
+ %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n
+
+
+
+ 10MB
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/constant.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/constant.java.ftl
new file mode 100644
index 0000000..1dbc906
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/constant.java.ftl
@@ -0,0 +1,24 @@
+package com.itheima.easy.constant;
+
+/**
+* @Description:${table.comment!}缓存常量
+*/
+public class ${entity}CacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "${controllerMappingHyphen}:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+
+}
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/controller.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/controller.java.ftl
new file mode 100644
index 0000000..2516f14
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/controller.java.ftl
@@ -0,0 +1,128 @@
+package ${package.Controller};
+
+
+import org.springframework.web.bind.annotation.RequestMapping;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.itheima.sfbx.framework.commons.basic.ResponseResult;
+import com.itheima.sfbx.framework.commons.enums.trade.${entity}Enum;
+import com.itheima.easy.face.${entity}Face;
+import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild;
+import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+<#if restControllerStyle>
+import org.springframework.web.bind.annotation.RestController;
+<#else>
+import org.springframework.stereotype.Controller;
+#if>
+<#if superControllerClassPackage??>
+import ${superControllerClassPackage};
+#if>
+
+/**
+ * @Description:${table.comment!}前端控制器
+ */
+@Slf4j
+@Api(tags = "${table.comment!}controller")
+<#if restControllerStyle>
+@RestController
+<#else>
+@Controller
+#if>
+@RequestMapping("<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}#if>")
+<#if kotlin>
+class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}()#if>
+<#else>
+<#if superControllerClass??>
+public class ${table.controllerName} extends ${superControllerClass} {
+<#else>
+public class ${table.controllerName} {
+#if>
+
+ @Autowired
+ ${entity}Face ${entity?uncap_first}Face;
+
+ /***
+ * @description 多条件查询${table.comment!}分页列表
+ * @param ${entity?uncap_first}Vo ${table.comment!}Vo查询条件
+ * @param pageNum 页码
+ * @param pageSize 每页条数
+ * @return: Page<${entity}Vo>
+ */
+ @PostMapping("page/{pageNum}/{pageSize}")
+ @ApiOperation(value = "${table.comment!}分页",notes = "${table.comment!}分页")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo"),
+ @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"),
+ @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer")
+ })
+ public ResponseResult> find${entity}VoPage(
+ @RequestBody ${entity}Vo ${entity?uncap_first}Vo,
+ @PathVariable("pageNum") int pageNum,
+ @PathVariable("pageSize") int pageSize) {
+ Page<${entity}Vo> ${entity?uncap_first}VoPage = ${entity?uncap_first}Face.find${entity}VoPage(${entity?uncap_first}Vo, pageNum, pageSize);
+ return ResponseResultBuild.build(${entity}Enum.SUCCEED,${entity?uncap_first}VoPage);
+ }
+
+ /**
+ * @Description 保存${table.comment!}
+ * @param ${entity?uncap_first}Vo ${table.comment!}Vo对象
+ * @return ${entity}Vo
+ */
+ @PutMapping
+ @ApiOperation(value = "添加${entity}",notes = "添加${entity}")
+ @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo")
+ public ResponseResult<${entity}Vo> create${entity}(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) {
+ ${entity}Vo ${entity?uncap_first}VoResult = ${entity?uncap_first}Face.create${entity}Vo(${entity?uncap_first}Vo);
+ return ResponseResultBuild.build(${entity}Enum.SUCCEED,${entity?uncap_first}VoResult);
+ }
+
+ /**
+ * @Description 修改${table.comment!}
+ * @param ${entity?uncap_first}Vo ${table.comment!}Vo对象
+ * @return Boolean 是否修改成功
+ */
+ @PatchMapping
+ @ApiOperation(value = "修改${table.comment!}",notes = "修改${table.comment!}")
+ @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo")
+ public ResponseResult update${entity}(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) {
+ Boolean flag = ${entity?uncap_first}Face.update${entity}Vo(${entity?uncap_first}Vo);
+ return ResponseResultBuild.build(${entity}Enum.SUCCEED,flag);
+ }
+
+ /**
+ * @Description 删除${table.comment!}
+ * @param ${entity?uncap_first}Vo 刪除条件:checkedIds 不可为空
+ * @return
+ */
+ @DeleteMapping
+ @ApiOperation(value = "删除${table.comment!}",notes = "删除${table.comment!}")
+ @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo")
+ public ResponseResult delete${entity}(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) {
+ Boolean flag = ${entity?uncap_first}Face.delete${entity}Vo(${entity?uncap_first}Vo.getCheckedIds());
+ return ResponseResultBuild.build(${entity}Enum.SUCCEED,flag);
+ }
+
+ /***
+ * @description 多条件查询${table.comment!}列表
+ * @param ${entity?uncap_first}Vo ${table.comment!}Vo对象
+ * @return List<${entity}Vo>
+ */
+ @PostMapping("list")
+ @ApiOperation(value = "多条件查询${table.comment!}列表",notes = "多条件查询${table.comment!}列表")
+ @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo")
+ public ResponseResult> ${entity?uncap_first}List(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) {
+ List<${entity}Vo> ${entity?uncap_first}VoList = ${entity?uncap_first}Face.find${entity}VoList(${entity?uncap_first}Vo);
+ return ResponseResultBuild.build(${entity}Enum.SUCCEED,${entity?uncap_first}VoList);
+ }
+
+}
+#if>
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/entity.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/entity.java.ftl
new file mode 100644
index 0000000..3e63065
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/entity.java.ftl
@@ -0,0 +1,156 @@
+package ${package.Entity};
+
+<#list table.importPackages as pkg>
+import ${pkg};
+#list>
+<#if swagger2>
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+#if>
+<#if entityLombokModel>
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.EqualsAndHashCode;
+#if>
+
+/**
+ * @Description:${table.comment!}
+ */
+<#if entityLombokModel>
+@Data
+@NoArgsConstructor
+<#if superEntityClass??>
+@EqualsAndHashCode(callSuper = true)
+ <#else>
+@EqualsAndHashCode(callSuper = false)
+ #if>
+#if>
+<#if table.convert>
+@TableName("${table.name}")
+#if>
+<#if swagger2>
+@ApiModel(value="${entity}对象", description="${table.comment!}")
+#if>
+<#if superEntityClass??>
+public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}>#if> {
+<#elseif activeRecord>
+public class ${entity} extends Model<${entity}> {
+<#else>
+public class ${entity} implements Serializable {
+#if>
+
+<#if entitySerialVersionUID>
+ private static final long serialVersionUID = 1L;
+#if>
+
+ @Builder
+ public ${entity}(Long id,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,#if>#list>){
+ super(id);
+ <#list table.fields as field>
+ this.${field.propertyName}=${field.propertyName};
+ #list>
+ }
+<#-- ---------- BEGIN 字段循环遍历 ---------->
+<#list table.fields as field>
+ <#if field.keyFlag>
+ <#assign keyPropertyName="${field.propertyName}"/>
+ #if>
+
+ <#if field.comment!?length gt 0>
+ <#if swagger2>
+ @ApiModelProperty(value = "${field.comment}")
+ <#else>
+ /**
+ * ${field.comment}
+ */
+ #if>
+ #if>
+ <#if field.keyFlag>
+ <#-- 主键 -->
+ <#if field.keyIdentityFlag>
+ @TableId(value = "${field.name}", type = IdType.AUTO)
+ <#elseif idType??>
+ @TableId(value = "${field.name}", type = IdType.${idType})
+ <#elseif field.convert>
+ @TableId("${field.name}")
+ #if>
+ <#-- 普通字段 -->
+ <#elseif field.fill??>
+ <#-- ----- 存在字段填充设置 ----->
+ <#if field.convert>
+ @TableField(value = "${field.name}", fill = FieldFill.${field.fill})
+ <#else>
+ @TableField(fill = FieldFill.${field.fill})
+ #if>
+ <#elseif field.convert>
+ @TableField("${field.name}")
+ #if>
+ <#-- 乐观锁注解 -->
+ <#if (versionFieldName!"") == field.name>
+ @Version
+ #if>
+ <#-- 逻辑删除注解 -->
+ <#if (logicDeleteFieldName!"") == field.name>
+ @TableLogic
+ #if>
+ private ${field.propertyType} ${field.propertyName};
+#list>
+<#------------ END 字段循环遍历 ---------->
+
+<#if !entityLombokModel>
+ <#list table.fields as field>
+ <#if field.propertyType == "boolean">
+ <#assign getprefix="is"/>
+ <#else>
+ <#assign getprefix="get"/>
+ #if>
+ public ${field.propertyType} ${getprefix}${field.capitalName}() {
+ return ${field.propertyName};
+ }
+
+ <#if entityBuilderModel>
+ public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
+ <#else>
+ public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) {
+ #if>
+ this.${field.propertyName} = ${field.propertyName};
+ <#if entityBuilderModel>
+ return this;
+ #if>
+ }
+ #list>
+#if>
+
+<#if entityColumnConstant>
+ <#list table.fields as field>
+ public static final String ${field.name?upper_case} = "${field.name}";
+
+ #list>
+#if>
+<#if activeRecord>
+ @Override
+ protected Serializable pkVal() {
+ <#if keyPropertyName??>
+ return this.${keyPropertyName};
+ <#else>
+ return null;
+ #if>
+ }
+
+#if>
+<#if !entityLombokModel>
+ @Override
+ public String toString() {
+ return "${entity}{" +
+ <#list table.fields as field>
+ <#if field_index==0>
+ "${field.propertyName}=" + ${field.propertyName} +
+ <#else>
+ ", ${field.propertyName}=" + ${field.propertyName} +
+ #if>
+ #list>
+ "}";
+ }
+#if>
+}
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/enums.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/enums.java.ftl
new file mode 100644
index 0000000..53e4435
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/enums.java.ftl
@@ -0,0 +1,38 @@
+package com.itheima.easy.enums;
+
+import com.itheima.easy.basic.IBasicEnum;
+
+/**
+* @ClassName ${entity}Enum.java
+* @Description ${table.comment!}枚举
+*/
+
+public enum ${entity}Enum implements IBasicEnum {
+
+ SUCCEED("200","操作成功"),
+ FAIL("1000","操作失败"),
+ PAGE_FAIL("53001", "查询${table.comment!}列表失败"),
+ SAVE_FAIL("53002", "保存${table.comment!}失败"),
+ UPDATE_FAIL("53003", "修改${table.comment!}失败"),
+ DEL_FAIL("53004", "删除${table.comment!}失败"),
+ LIST_FAIL("53005", "查询${table.comment!}失败")
+ ;
+
+ private String code;
+
+ private String msg;
+
+ ${entity}Enum(String code, String msg) {
+ this.code = code;
+ this.msg = msg;
+ }
+
+ public String getCode() {
+ return code;
+ }
+
+ public String getMsg() {
+ return msg;
+ }
+
+}
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/face.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/face.java.ftl
new file mode 100644
index 0000000..b49f6a2
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/face.java.ftl
@@ -0,0 +1,53 @@
+package com.itheima.easy.face;
+
+import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import java.util.List;
+
+/**
+ * @Description:${table.comment!}Face服务类
+ */
+<#if kotlin>
+interface ${entity}Face
+<#else>
+public interface ${entity}Face {
+
+ /**
+ * @Description 多条件查询${table.comment!}分页列表
+ * @param ${entity?uncap_first}Vo 查询条件
+ * @param pageNum 页码
+ * @param pageSize 每页条数
+ * @return Page<${entity}>
+ */
+ Page<${entity}Vo> find${entity}VoPage(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize);
+
+ /**
+ * @Description 创建${table.comment!}
+ * @param ${entity?uncap_first}Vo 对象信息
+ * @return ${entity}
+ */
+ ${entity}Vo create${entity}Vo(${entity}Vo ${entity?uncap_first}Vo);
+
+ /**
+ * @Description 修改${table.comment!}
+ * @param ${entity?uncap_first}Vo 对象信息
+ * @return Boolean
+ */
+ Boolean update${entity}Vo(${entity}Vo ${entity?uncap_first}Vo);
+
+ /**
+ * @Description 删除${table.comment!}
+ * @param checkedIds 选择中对象Ids
+ * @return Boolean
+ */
+ Boolean delete${entity}Vo(String[] checkedIds);
+
+ /**
+ * @description 多条件查询${table.comment!}列表
+ * @param ${entity?uncap_first}Vo 查询条件
+ * @return: List<${entity}>
+ */
+ List<${entity}Vo> find${entity}VoList(${entity}Vo ${entity?uncap_first}Vo);
+}
+#if>
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/faceImpl.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/faceImpl.java.ftl
new file mode 100644
index 0000000..0562ef6
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/faceImpl.java.ftl
@@ -0,0 +1,188 @@
+package com.itheima.easy.face.impl;
+
+import ${package.Entity}.${entity};
+import ${package.Service}.${table.serviceName};
+import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.itheima.sfbx.framework.commons.utils.BeanConv;
+import com.itheima.easy.face.${entity}Face;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.cache.annotation.Caching;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil;
+import com.itheima.sfbx.framework.commons.exception.ProjectException;
+import com.itheima.sfbx.framework.commons.constant.trade.${entity}CacheConstant;
+import com.itheima.sfbx.framework.commons.enums.trade.${entity}Enum;
+import org.springframework.transaction.annotation.Transactional;
+<#list cfg.tablesFile as tableFiile>
+<#if tableFiile==table.name>
+import java.util.List;
+import java.util.ArrayList;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+import com.itheima.sfbx.framework.commons.utils.EmptyUtil;
+import com.itheima.sfbx.framework.commons.basic.ResponseResult;
+import com.itheima.easy.feign.FileFeign;
+#if>
+#list>
+import java.util.List;
+/**
+ * @Description:${table.comment!}Face服务实现类
+ */
+<#if kotlin>
+open class ${entity}FaceImpl : ${entity}Face {
+
+}
+<#else>
+@Slf4j
+@Component
+public class ${entity}FaceImpl implements ${entity}Face {
+
+ @Autowired
+ I${entity}Service ${entity?uncap_first}Service;
+
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ @Autowired
+ FileFeign fileFeign;
+ #if>
+ #list>
+
+ @Override
+ @Cacheable(value = ${entity}CacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#${entity?uncap_first}Vo.hashCode()")
+ public Page<${entity}Vo> find${entity}VoPage(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize) {
+ try {
+ Page<${entity}> page = ${entity?uncap_first}Service.find${entity}Page(${entity?uncap_first}Vo, pageNum, pageSize);
+ Page<${entity}Vo> pageVo =BeanConv.toPage(page,${entity}Vo.class);
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ //查询记录结果
+ List<${entity}Vo> records = pageVo.getRecords();
+ //处理图片
+ if (!EmptyUtil.isNullOrEmpty(records)){
+ records.forEach(n->{
+ ResponseResult> responseWrap = fileFeign
+ .findFileVOByBusinessId(FileVO.builder().businessId(n.getId()).build());
+ if (!EmptyUtil.isNullOrEmpty(responseWrap.getDatas())){
+ n.setFileVOs(responseWrap.getDatas());
+ }else {
+ n.setFileVOs(new ArrayList<>());
+ }
+ });
+ }
+ #if>
+ #list>
+ return pageVo;
+ }catch (Exception e){
+ log.error("${table.comment!}列表异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(${entity}Enum.PAGE_FAIL);
+ }
+ }
+
+ @Transactional
+ @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true),
+ @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true)},
+ put={@CachePut(value =${entity}CacheConstant.BASIC,key = "#result.id")})
+ @Override
+ public ${entity}Vo create${entity}Vo(${entity}Vo ${entity?uncap_first}Vo) {
+ try {
+ ${entity}Vo ${entity?uncap_first}VoResult = BeanConv.toBean(${entity?uncap_first}Service.create${entity}(${entity?uncap_first}Vo), ${entity}Vo.class);
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ //绑定附件
+ if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VoResult)&&!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getFileVOs())){
+ ${entity?uncap_first}Vo.getFileVOs().forEach(n->{n.setBusinessId(${entity?uncap_first}VoResult.getId());});
+ //绑定图片
+ ResponseResult> listResponseResult = fileFeign.bindBatchBusinessId(${entity?uncap_first}Vo.getFileVOs());
+ ${entity?uncap_first}VoResult.setFileVOs(listResponseResult.getDatas());
+ }
+ #if>
+ #list>
+ return ${entity?uncap_first}VoResult;
+ } catch (Exception e) {
+ log.error("保存${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(${entity}Enum.SAVE_FAIL);
+ }
+ }
+
+ @Transactional
+ @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true),
+ @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true),
+ @CacheEvict(value =${entity}CacheConstant.BASIC,key = "#${entity?uncap_first}Vo.id")})
+ @Override
+ public Boolean update${entity}Vo(${entity}Vo ${entity?uncap_first}Vo) {
+ try {
+ Boolean flag = ${entity?uncap_first}Service.update${entity}(${entity?uncap_first}Vo);
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ if (flag){
+ //移除业务原图片,并绑定新的图片到业务上
+ fileFeign.replaceBindBatchBusinessId(${entity?uncap_first}Vo.getFileVOs());
+ }
+ #if>
+ #list>
+ return flag;
+ } catch (Exception e) {
+ log.error("修改${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(${entity}Enum.UPDATE_FAIL);
+ }
+ }
+
+ @Transactional
+ @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true),
+ @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true)})
+ @Override
+ public Boolean delete${entity}Vo(String[] checkedIds) {
+ try {
+ Boolean flag = ${entity?uncap_first}Service.delete${entity}(checkedIds);
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ if (flag){
+ //删除图片
+ for (String checkedId : checkedIds) {
+ fileFeign.deleteFileVOByBusinessId(FileVO.builder()
+ .businessId(Long.valueOf(checkedId))
+ .build());
+ }
+ }
+ #if>
+ #list>
+ return flag;
+ } catch (Exception e) {
+ log.error("删除${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(${entity}Enum.DEL_FAIL);
+ }
+ }
+
+ @Override
+ @Cacheable(value = ${entity}CacheConstant.LIST,key ="#${entity?uncap_first}Vo.hashCode()")
+ public List<${entity}Vo> find${entity}VoList(${entity}Vo ${entity?uncap_first}Vo) {
+ try {
+ List<${entity}Vo> records = BeanConv.toBeanList(${entity?uncap_first}Service.find${entity}List(${entity?uncap_first}Vo),${entity}Vo.class);
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ //处理图片
+ if (!EmptyUtil.isNullOrEmpty(records)){
+ records.forEach(n->{
+ ResponseResult> responseWrap = fileFeign
+ .findFileVOByBusinessId(FileVO.builder().businessId(n.getId()).build());
+ if (!EmptyUtil.isNullOrEmpty(responseWrap.getDatas())){
+ n.setFileVOs(responseWrap.getDatas());
+ }else {
+ n.setFileVOs(new ArrayList<>());
+ }
+ });
+ }
+ #if>
+ #list>
+ return records;
+ } catch (Exception e) {
+ log.error("删除${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e));
+ throw new ProjectException(${entity}Enum.LIST_FAIL);
+ }
+ }
+}
+#if>
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/mapper.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/mapper.java.ftl
new file mode 100644
index 0000000..b0fbe2d
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/mapper.java.ftl
@@ -0,0 +1,15 @@
+package ${package.Mapper};
+
+import ${package.Entity}.${entity};
+import ${superMapperClassPackage};
+
+/**
+ * @Description:${table.comment!}Mapper接口
+ */
+<#if kotlin>
+interface ${table.mapperName} : ${superMapperClass}<${entity}>
+<#else>
+public interface ${table.mapperName} extends ${superMapperClass}<${entity}> {
+
+}
+#if>
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/mapper.xml.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/mapper.xml.ftl
new file mode 100644
index 0000000..d9ca71c
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/mapper.xml.ftl
@@ -0,0 +1,39 @@
+
+
+
+
+<#if enableCache>
+
+
+
+#if>
+<#if baseResultMap>
+
+
+<#list table.fields as field>
+<#if field.keyFlag><#--生成主键排在第一位-->
+
+#if>
+#list>
+<#list table.commonFields as field><#--生成公共字段 -->
+
+#list>
+<#list table.fields as field>
+<#if !field.keyFlag><#--生成普通字段 -->
+
+#if>
+#list>
+
+
+#if>
+<#if baseColumnList>
+
+
+<#list table.commonFields as field>
+ ${field.name},
+#list>
+ ${table.fieldNames}
+
+
+#if>
+
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/service.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/service.java.ftl
new file mode 100644
index 0000000..a36b0fc
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/service.java.ftl
@@ -0,0 +1,55 @@
+package ${package.Service};
+
+import ${package.Entity}.${entity};
+import ${superServiceClassPackage};
+import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+
+import java.util.List;
+
+/**
+ * @Description:${table.comment!}服务类
+ */
+<#if kotlin>
+interface ${table.serviceName} : ${superServiceClass}<${entity}>
+<#else>
+public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {
+
+ /**
+ * @Description 多条件查询${table.comment!}分页列表
+ * @param ${entity?uncap_first}Vo 查询条件
+ * @param pageNum 页码
+ * @param pageSize 每页条数
+ * @return Page<${entity}>
+ */
+ Page<${entity}> find${entity}Page(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize);
+
+ /**
+ * @Description 创建${table.comment!}
+ * @param ${entity?uncap_first}Vo 对象信息
+ * @return ${entity}
+ */
+ ${entity} create${entity}(${entity}Vo ${entity?uncap_first}Vo);
+
+ /**
+ * @Description 修改${table.comment!}
+ * @param ${entity?uncap_first}Vo 对象信息
+ * @return Boolean
+ */
+ Boolean update${entity}(${entity}Vo ${entity?uncap_first}Vo);
+
+ /**
+ * @Description 删除${table.comment!}
+ * @param checkedIds 选择中对象Ids
+ * @return Boolean
+ */
+ Boolean delete${entity}(String[] checkedIds);
+
+ /**
+ * @description 多条件查询${table.comment!}列表
+ * @param ${entity?uncap_first}Vo 查询条件
+ * @return: List<${entity}>
+ */
+ List<${entity}> find${entity}List(${entity}Vo ${entity?uncap_first}Vo);
+}
+#if>
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/serviceImpl.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/serviceImpl.java.ftl
new file mode 100644
index 0000000..95256cd
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/serviceImpl.java.ftl
@@ -0,0 +1,100 @@
+package ${package.ServiceImpl};
+
+import ${package.Entity}.${entity};
+import ${package.Mapper}.${table.mapperName};
+import ${package.Service}.${table.serviceName};
+import ${superServiceImplClassPackage};
+import org.springframework.stereotype.Service;
+import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.itheima.sfbx.framework.commons.utils.BeanConv;
+import com.itheima.sfbx.framework.commons.utils.EmptyUtil;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+/**
+ * @Description:${table.comment!}服务实现类
+ */
+@Service
+<#if kotlin>
+open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} {
+
+}
+<#else>
+public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} {
+
+ @Override
+ public Page<${entity}> find${entity}Page(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize) {
+ //构建分页对象
+ Page<${entity}> page = new Page<>(pageNum,pageSize);
+ //构建查询条件
+ QueryWrapper<${entity}> queryWrapper = new QueryWrapper<>();
+ //构建多条件查询,代码生成后自己可自行调整
+ <#list table.fields as field>
+ //${field.comment}查询
+ if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.get${field.propertyName?cap_first}())) {
+ queryWrapper.lambda().eq(${entity}::get${field.propertyName?cap_first},${entity?uncap_first}Vo.get${field.propertyName?cap_first}());
+ }
+ #list>
+ //状态查询
+ if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getEnableFlag())) {
+ queryWrapper.lambda().eq(${entity}::getEnableFlag,${entity?uncap_first}Vo.getEnableFlag());
+ }
+ //按创建时间降序
+ queryWrapper.lambda().orderByDesc(${entity}::getCreatedTime);
+ //执行分页查询
+ return page(page, queryWrapper);
+ }
+
+ @Override
+ public ${entity} create${entity}(${entity}Vo ${entity?uncap_first}Vo) {
+ //转换${entity}Vo为${entity}
+ ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}Vo, ${entity}.class);
+ boolean flag = save(${entity?uncap_first});
+ if (flag){
+ return ${entity?uncap_first};
+ }
+ return null;
+ }
+
+ @Override
+ public Boolean update${entity}(${entity}Vo ${entity?uncap_first}Vo) {
+ //转换${entity}Vo为${entity}
+ ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}Vo, ${entity}.class);
+ return updateById(${entity?uncap_first});
+ }
+
+ @Override
+ public Boolean delete${entity}(String[] checkedIds) {
+ //转换数组为集合
+ List ids = Arrays.asList(checkedIds);
+ List idsLong = new ArrayList<>();
+ ids.forEach(n->{
+ idsLong.add(Long.valueOf(n));
+ });
+ return removeByIds(idsLong);
+ }
+
+ @Override
+ public List<${entity}> find${entity}List(${entity}Vo ${entity?uncap_first}Vo) {
+ //构建查询条件
+ QueryWrapper<${entity}> queryWrapper = new QueryWrapper<>();
+ if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getId())) {
+ queryWrapper.lambda().eq(${entity}::getId,${entity?uncap_first}Vo.getId());
+ }
+ <#list table.fields as field>
+ //${field.comment}查询
+ if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.get${field.propertyName?cap_first}())) {
+ queryWrapper.lambda().eq(${entity}::get${field.propertyName?cap_first},${entity?uncap_first}Vo.get${field.propertyName?cap_first}());
+ }
+ #list>
+ //状态查询
+ if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getEnableFlag())) {
+ queryWrapper.lambda().eq(${entity}::getEnableFlag,${entity?uncap_first}Vo.getEnableFlag());
+ }
+ return list(queryWrapper);
+ }
+}
+#if>
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/shopGoodsPage.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/shopGoodsPage.ftl
new file mode 100644
index 0000000..2d9caf9
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/shopGoodsPage.ftl
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+ 店铺商品详情
+
+
+
+
+
商品信息json
+
+ ${shopGoods}
+
+<#--
-->
+<#--
-->
+<#-- 封面图片列表-->
+<#--
-->
+<#--
-->
+<#--
-->
+<#--
-->
+<#--
-->
+<#-- 商品基本信息-->
+<#--
-->
+<#--
优惠价: 原价:
-->
+<#-- -->
+<#--
标题:
-->
+
+<#--
当前规格:
-->
+<#-- -->
+<#--
所有规格:
-->
+
+<#--
服务规则列表:
-->
+
+<#--
-->
+<#--
-->
+<#--
-->
+<#-- 商品详情图片列表-->
+<#--
-->
+<#--
-->
+<#--
-->
+
+
参数列表: 未提供
+
评价列表: 异步ajax查询
+
优惠券: 异步查询
+
+
+
diff --git a/day01/sfbx-file/file-web/src/main/resources/templates/vo.java.ftl b/day01/sfbx-file/file-web/src/main/resources/templates/vo.java.ftl
new file mode 100644
index 0000000..1701251
--- /dev/null
+++ b/day01/sfbx-file/file-web/src/main/resources/templates/vo.java.ftl
@@ -0,0 +1,75 @@
+package com.itheima.easy.vo;
+
+import com.itheima.easy.basic.BasicVo;
+<#if swagger2>
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+#if>
+<#if entityLombokModel>
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+#if>
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import java.math.BigDecimal;
+import java.util.Date;
+<#list cfg.tablesFile as tableFiile>
+<#if tableFiile==table.name>
+import java.util.List;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+#if>
+#list>
+/**
+ * @Description:${table.comment!}
+ */
+<#if entityLombokModel>
+@Data
+@NoArgsConstructor
+#if>
+public class ${entity}Vo extends BasicVo {
+
+ @Builder
+ public ${entity}Vo(Long id,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,#if>#list>){
+ super(id);
+ <#list table.fields as field>
+ this.${field.propertyName}=${field.propertyName};
+ #list>
+ }
+<#-- ---------- BEGIN 字段循环遍历 ---------->
+<#list table.fields as field>
+ <#if field.keyFlag>
+ <#assign keyPropertyName="${field.propertyName}"/>
+ #if>
+
+ <#if field.comment!?length gt 0>
+ <#if swagger2>
+ @ApiModelProperty(value = "${field.comment}")
+ <#else>
+ /**
+ * ${field.comment}
+ */
+ #if>
+ #if>
+ <#if field.propertyType=='Long'>
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ #if>
+ <#if field.propertyType=='Date'>
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ #if>
+ private ${field.propertyType} ${field.propertyName};
+#list>
+<#------------ END 字段循环遍历 ---------->
+
+ @ApiModelProperty(value = "选中节点")
+ private String[] checkedIds;
+
+ <#list cfg.tablesFile as tableFiile>
+ <#if tableFiile==table.name>
+ <#if swagger2>
+ @ApiModelProperty(value = "文件Vo对象")
+ #if>
+ private List fileVOs;
+ #if>
+ #list>
+}
diff --git a/day01/sfbx-file/pom.xml b/day01/sfbx-file/pom.xml
new file mode 100644
index 0000000..71336e7
--- /dev/null
+++ b/day01/sfbx-file/pom.xml
@@ -0,0 +1,22 @@
+
+
+
+ 4.0.0
+
+ sfbx-cloud
+ com.itheima.sfbx
+ 2.0-SNAPSHOT
+
+
+ sfbx-file
+ pom
+ sfbx-file
+
+ file-interface
+ file-web
+
+
+ http://www.example.com
+
+
diff --git a/day01/sfbx-framework/framework-commons/pom.xml b/day01/sfbx-framework/framework-commons/pom.xml
new file mode 100644
index 0000000..748840f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/pom.xml
@@ -0,0 +1,89 @@
+
+
+
+ 4.0.0
+
+ sfbx-framework
+ com.itheima.sfbx
+ 2.0-SNAPSHOT
+
+
+ framework-commons
+ framework-commons
+
+ http://www.example.com
+
+
+
+
+ org.springframework.boot
+ spring-boot-autoconfigure
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ cn.hutool
+ hutool-all
+
+
+ com.google.zxing
+ core
+
+
+ org.projectlombok
+ lombok
+
+
+ ma.glasnost.orika
+ orika-core
+
+
+ com.baomidou
+ mybatis-plus-extension
+ ${mybatis-plus-boot-starter.version}
+
+
+ com.github.xiaoymin
+ knife4j-spring-boot-starter
+
+
+ org.apache.commons
+ commons-lang3
+
+
+ com.alibaba
+ fastjson
+
+
+ org.apache.commons
+ commons-pool2
+
+
+ com.google.guava
+ guava
+
+
+ commons-codec
+ commons-codec
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+ com.alibaba
+ transmittable-thread-local
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/basic/ResponseResult.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/basic/ResponseResult.java
new file mode 100644
index 0000000..fdd154f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/basic/ResponseResult.java
@@ -0,0 +1,58 @@
+package com.itheima.sfbx.framework.commons.basic;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * @Description 返回结果
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class ResponseResult implements Serializable {
+
+ @ApiModelProperty(value = "状态码")
+ private Integer code;
+
+ @ApiModelProperty(value = "状态信息")
+ private String msg;
+
+ @ApiModelProperty(value = "返回结果")
+ private T data;
+
+ @ApiModelProperty(value = "操作人Id")
+ private Long operatorId;
+
+ @ApiModelProperty(value = "操作人名称")
+ private String operatorName;
+
+ @ApiModelProperty(value = "操作人性别")
+ private String operatorSex;
+
+ @ApiModelProperty(value = "VO类")
+ private String _class;
+
+ @ApiModelProperty(value = "数据说明")
+ private String tip;
+
+ @ApiModelProperty(value = "操作时间")
+ @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+ @JsonSerialize(using = LocalDateTimeSerializer.class)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set
+ private LocalDateTime operationTime;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/CacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/CacheConstant.java
new file mode 100644
index 0000000..b6af882
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/CacheConstant.java
@@ -0,0 +1,16 @@
+package com.itheima.sfbx.framework.commons.constant.basic;
+
+/**
+ * @ClassName CacheConstant.java
+ * @Description 基础缓存父类
+ */
+public class CacheConstant {
+
+ //默认redis等待时间
+ public static final int REDIS_WAIT_TIME = 5;
+
+ //默认redis自动释放时间
+ public static final int REDIS_LEASETIME = 4;
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/SuperConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/SuperConstant.java
new file mode 100644
index 0000000..d0707b4
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/SuperConstant.java
@@ -0,0 +1,54 @@
+
+package com.itheima.sfbx.framework.commons.constant.basic;
+
+
+/**
+ * @Description 静态变量
+ */
+public class SuperConstant {
+
+ //常量:数据有效
+ public static final String DATA_STATE_0 = "0";
+
+ //常量:数据无效
+ public static final String DATA_STATE_1 = "1";
+
+ //常量:数据伪删除
+ public static final String DATA_STATE_2 = "2";
+
+ //树形根节点父Id
+ public static final String ROOT_PARENT_ID = "100000000000000";
+
+ //常量目录
+ public static final String CATALOGUE = "c";
+
+ //常量菜单
+ public static final String MENU = "m";
+
+ //常量平台
+ public static final String SYSTEM = "s";
+
+ //前端显示布局
+ public static final String COMPONENT_LAYOUT="Layout";
+
+ //登录短信验证码
+ public static final String LOGIN_CODE = "login:code:";
+
+ //地域中国ID
+ public static final Long CHINA_CODE = 0L;
+
+ //分割字符
+ public static final String COMMA = ",";
+
+ //否
+ public static final String NO = "NO";
+
+ //是
+ public static final String YES = "YES";
+
+ //男
+ public static final String MAN = "0";
+
+ //女
+ public static final String WOMAN = "1";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/category/CategoryConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/category/CategoryConstant.java
new file mode 100644
index 0000000..66aed44
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/category/CategoryConstant.java
@@ -0,0 +1,27 @@
+package com.itheima.sfbx.framework.commons.constant.category;
+
+import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
+
+/**
+ * CategoryConstant
+ *
+ * @author: wgl
+ * @describe: 分类常量
+ * @date: 2022/12/28 10:10
+ */
+public class CategoryConstant extends SuperConstant {
+
+ //常量:首页展示
+ public static final String SHOW_INDEX_STATE_0 = "0";
+
+ //常量:首页不展示
+ public static final String SHOW_INDEX_STATE_1 = "1";
+
+
+ //分类类型:0推荐分类
+ public static final String RECOMMEND_TYPE = "0";
+
+ //分类类型:1产品分类
+ public static final String PRODUCT_TYPE = "1";
+
+}
\ No newline at end of file
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/click/ClickDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/click/ClickDTO.java
new file mode 100644
index 0000000..28f8768
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/click/ClickDTO.java
@@ -0,0 +1,60 @@
+package com.itheima.sfbx.framework.commons.constant.click;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * ClickDTO
+ *
+ * @author: wgl
+ * @describe: 点击传入对象
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class ClickDTO {
+
+ @ApiModelProperty(value = "请求id")
+ private String requestId;
+
+ @ApiModelProperty(value = "域名")
+ private String host;
+
+ @ApiModelProperty(value = "ip地址")
+ private String hostAddress;
+
+ @ApiModelProperty(value = "请求路径")
+ private String requestUri;
+
+ @ApiModelProperty(value = "请求方式")
+ private String requestMethod;
+
+ @ApiModelProperty(value = "请求body")
+ private String requesBody;
+
+ @ApiModelProperty(value = "应答body")
+ private String responseBody;
+
+ @ApiModelProperty(value = "应答code")
+ private String responseCode;
+
+ @ApiModelProperty(value = "应答msg")
+ private String responseMsg;
+
+ @ApiModelProperty(value = "用户")
+ private Long userId;
+
+ @ApiModelProperty(value = "用户名称")
+ private String userName;
+
+ @ApiModelProperty(value = "业务类型")
+ private String businessType;
+
+ @ApiModelProperty(value = "设备号")
+ private String deviceNumber;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNO;
+
+ @ApiModelProperty(value = "性别")
+ private String sex;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/DataDictCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/DataDictCacheConstant.java
new file mode 100644
index 0000000..05000ec
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/DataDictCacheConstant.java
@@ -0,0 +1,29 @@
+package com.itheima.sfbx.framework.commons.constant.dict;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+ * @ClassName DataDictCacheConstant.java
+ * @Description 数字字典缓存常量
+ */
+public class DataDictCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "data_dict:";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //所有父key
+ public static final String PARENT_KEY= PREFIX+"parent_key&ttl=-1";
+
+ //所有dataKey
+ public static final String DATA_KEY= PREFIX+"data_key&ttl=-1";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+
+ public static final String QUESTION = PREFIX+"question";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/PlacesCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/PlacesCacheConstant.java
new file mode 100644
index 0000000..9f80e6c
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/PlacesCacheConstant.java
@@ -0,0 +1,20 @@
+package com.itheima.sfbx.framework.commons.constant.dict;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+ * @ClassName PlacesCacheConstant.java
+ * @Description 区域缓存常量
+ */
+public class PlacesCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "places:";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //获得所有不重复的ParentKey的集合
+ public static final String LIST= PREFIX+"list&ttl=-1";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileCacheConstant.java
new file mode 100644
index 0000000..15055eb
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileCacheConstant.java
@@ -0,0 +1,28 @@
+package com.itheima.sfbx.framework.commons.constant.file;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+ * @ClassName DataDictCacheConstant.java
+ * @Description 附件缓存常量
+ */
+public class FileCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "file:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //业务key前缀
+ public static final String BUSINESS_KEY = PREFIX+"business_key&ttl=-1";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list分页
+ public static final String LIST = PREFIX+"list";;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileConstant.java
new file mode 100644
index 0000000..7cb1c93
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileConstant.java
@@ -0,0 +1,23 @@
+package com.itheima.sfbx.framework.commons.constant.file;
+
+/**
+ * @ClassName FileConstant.java
+ * @Description 文件常量类
+ */
+public class FileConstant {
+
+ //阿里云OSS对象存储
+ public static final String ALIYUN_OSS = "ALIYUN_OSS";
+
+ //七牛KODO对象存储
+ public static final String QINIU_KODO = "QINIU_KODO";
+
+ //状态:成功
+ public static final String STATUS_SUCCEED = "SUCCEED";
+
+ //状态:发送中
+ public static final String STATUS_SENDING = "SENDING";
+
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FilePartCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FilePartCacheConstant.java
new file mode 100644
index 0000000..52d7bc2
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FilePartCacheConstant.java
@@ -0,0 +1,26 @@
+package com.itheima.sfbx.framework.commons.constant.file;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:缓存常量
+*/
+public class FilePartCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "file-part:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/insure/InsureConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/insure/InsureConstant.java
new file mode 100644
index 0000000..f320bf6
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/insure/InsureConstant.java
@@ -0,0 +1,121 @@
+package com.itheima.sfbx.framework.commons.constant.insure;
+
+import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant;
+import com.itheima.sfbx.framework.commons.exception.ProjectException;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * BUY_MODE_1onstant
+ *
+ * @author: wgl
+ * @describe: 保险常量
+ * @date: 2022/12/28 10:10
+ */
+public class InsureConstant extends SuperConstant{
+
+ //常量:首页展示
+ public static final String SHOW_INDEX_STATE_0 = "0";
+
+ //常量:首页不展示
+ public static final String SHOW_INDEX_STATE_1 = "1";
+
+ //前端约定 金牌保险传值为0
+ public static final String GOLD_INSURE_FRONT = "0";
+
+ //前端约定 安心赔保险传值为1
+ public static final String RELIEVED_INSURE_FRONT = "1";
+
+ //金牌保险(是0 否1)
+ public static final String IS_GOLD_INSURE_SERVER = "0";
+
+ //安心赔(是0 否1)
+ public static final String IS_RELIEVED_INSURE_SERVER = "0";
+
+ //是否有问题(是0 否1)
+ public static final String IS_PROBLEM_0 = "0";
+
+
+ //校验规则:0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿
+ public static final String CHECK_RULE_0 = "0";
+ public static final String CHECK_RULE_1 = "1";
+ public static final String CHECK_RULE_2 = "2";
+ public static final String CHECK_RULE_3 = "3";
+ public static final String CHECK_RULE_4 = "4";
+ public static final String CHECK_RULE_5 = "5";
+ public static final String CHECK_RULE_6 = "6";
+ public static final String CHECK_RULE_7 = "7";
+
+ /**
+ * 根据保险分类id获取 分类名称
+ * @param typeId
+ * @return
+ */
+ public static String getRuleNameById(String typeId) {
+ switch (typeId){
+ case CHECK_RULE_0:
+ return "医疗";
+ case CHECK_RULE_1:
+ return "重疾";
+ case CHECK_RULE_2:
+ return "意外";
+ case CHECK_RULE_3:
+ return "养老";
+ case CHECK_RULE_4:
+ return "储蓄";
+ case CHECK_RULE_5:
+ return "旅游";
+ case CHECK_RULE_6:
+ return "宠物";
+ case CHECK_RULE_7:
+ return "定寿";
+ default:
+ throw new ProjectException();
+ }
+ }
+
+ /**
+ * 获取所有的保险类型
+ * @return
+ */
+ public static List getAllCheckRule() {
+ return Arrays.asList(CHECK_RULE_0,CHECK_RULE_1,CHECK_RULE_2,CHECK_RULE_3,CHECK_RULE_4,CHECK_RULE_5,CHECK_RULE_6,CHECK_RULE_7);
+ }
+
+ /**
+ * 热搜榜:人种榜类型为0
+ */
+ private final static String HOT_INSURANCE_TYPE_PERSON = "0";
+
+ /**
+ * 热搜榜:险种榜类型为1
+ */
+ private final static String HOT_INSURANCE_TYPE_INSURE = "1";
+
+ /**
+ * 判断是否人种榜,险种榜
+ * @param type
+ * @return
+ */
+ public static boolean checkIsInsureType(String type) {
+ return HOT_INSURANCE_TYPE_INSURE.equals(type);
+ }
+
+
+ /**
+ * 判断是否是理财险
+ * @param checkRule
+ * @return
+ */
+ public static boolean checkIsMoneyInsurance(String checkRule) {
+ switch (checkRule){
+ case CHECK_RULE_3:
+ return true;
+ case CHECK_RULE_4:
+ return true;
+ default:
+ return false;
+ }
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/log/LogCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/log/LogCacheConstant.java
new file mode 100644
index 0000000..d6ada2c
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/log/LogCacheConstant.java
@@ -0,0 +1,20 @@
+package com.itheima.sfbx.framework.commons.constant.log;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+ * @ClassName DataDictCacheConstant.java
+ * @Description 数字字典缓存常量
+ */
+public class LogCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "log:";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/plan/InsurancePlanConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/plan/InsurancePlanConstant.java
new file mode 100644
index 0000000..2d2c083
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/plan/InsurancePlanConstant.java
@@ -0,0 +1,21 @@
+package com.itheima.sfbx.framework.commons.constant.plan;
+
+/**
+ * InsurancePlanConstant
+ *
+ * @author: wgl
+ * @describe: 保险计划常量
+ * @date: 2022/12/28 10:10
+ */
+public class InsurancePlanConstant {
+
+ //按日
+ public static final String Y_D = "y/d";
+
+ //按月
+ public static final String Y_M = "y/m";
+
+ //按年
+ public static final String Y_Y = "y/y";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/safeguard/SafeguardConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/safeguard/SafeguardConstant.java
new file mode 100644
index 0000000..b2912c3
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/safeguard/SafeguardConstant.java
@@ -0,0 +1,17 @@
+package com.itheima.sfbx.framework.commons.constant.safeguard;
+
+/**
+ * SafeguardConstant
+ *
+ * @author: wgl
+ * @describe: 保险保障项枚举类
+ * @date: 2022/12/28 10:10
+ */
+public class SafeguardConstant {
+
+ //显示位置:0 列表页
+ public final static String PAGE_LIST = "0";
+
+ //显示位置: 1 详情页
+ public final static String DETAIL_INFO = "1";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelCacheConstant.java
new file mode 100644
index 0000000..a48772d
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelCacheConstant.java
@@ -0,0 +1,27 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+/**
+ * @ClassName AuthChannelCacheConstant.java
+ * @Description
+ */
+public class AuthChannelCacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "auth-channel:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ //站点
+ public static final String WEBSITE = PREFIX+ "web_site:";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelConstant.java
new file mode 100644
index 0000000..32e2385
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelConstant.java
@@ -0,0 +1,14 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+/**
+ * @ClassName AuthChannelCacheConstant.java
+ * @Description
+ */
+public class AuthChannelConstant {
+
+ //投保渠道
+ public static final String CHANNEL_LABEL_INSURE = "INSURE";
+
+ //公钥
+ public static final String PUBLICKEY="publicKey";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyCacheConstant.java
new file mode 100644
index 0000000..57b93d5
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyCacheConstant.java
@@ -0,0 +1,29 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:岗位表缓存常量
+*/
+public class CompanyCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "company:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ //站点
+ public static final String WEBSITE = PREFIX+ "web-site:";
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyConstant.java
new file mode 100644
index 0000000..6f9ee29
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyConstant.java
@@ -0,0 +1,21 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:岗位表缓存常量
+*/
+public class CompanyConstant extends CacheConstant {
+
+ //停用
+ public static final String status_0 = "0";
+
+ //试用
+ public static final String status_1 = "1";
+
+ //正式
+ public static final String status_2 = "2";
+
+ //正式
+ public static final String CHANNEL_LABEL_WECHAT = "wechat";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CustomerCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CustomerCacheConstant.java
new file mode 100644
index 0000000..9817ca8
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CustomerCacheConstant.java
@@ -0,0 +1,34 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:用户表缓存常量
+*/
+public class CustomerCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "customer:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ //用户登录
+ public static final String LOGIN= PREFIX+"login";
+
+ //建立用户与会话唯一标识之间的关系,用于判断剔除
+ public static final String CUSTOMER_TOKEN = PREFIX+"cutomer-token:";
+
+ //建立会话唯一标识与jwtToken之间的关系,用于令牌续期
+ public static final String JWT_TOKEN = PREFIX+"jwt-token:";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptCacheConstant.java
new file mode 100644
index 0000000..eafd500
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptCacheConstant.java
@@ -0,0 +1,28 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:部门表缓存常量
+*/
+public class DeptCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "dept:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ public static final String TREE= PREFIX+"tree";
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptPostUserCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptPostUserCacheConstant.java
new file mode 100644
index 0000000..65fa7b7
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptPostUserCacheConstant.java
@@ -0,0 +1,28 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+ * @ClassName DeptPostUserCacheConstant.java
+ * @Description 部门职位人员缓存常量
+ */
+public class DeptPostUserCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "dept-post-user:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ //DeptPostUser-list
+ public static final String DEPT_POST_USER_VO= PREFIX+"vo";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthCacheConstant.java
new file mode 100644
index 0000000..9df956f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthCacheConstant.java
@@ -0,0 +1,22 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+/**
+ * @ClassName OauthCacheConstant.java
+ * @Description Oauth认证鉴权cache常量类
+ */
+public class OauthCacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "oauth:";
+
+ public static final String ACCESS_TOKEN = PREFIX+"access-token:";
+
+ public static final String REFRESH_TOKEN = PREFIX+"refresh-token:";
+
+ public static final String USER_TOKEN = PREFIX+"user-token:";
+
+ public static final String USER_TOKEN_BIND = PREFIX+"user-token-bind:";
+
+ public static final String LOGIN_CODE = "login:code:";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthConstant.java
new file mode 100644
index 0000000..af69505
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthConstant.java
@@ -0,0 +1,73 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @ClassName OauthConstant.java
+ * @Description oauth2认证常量
+ */
+public class OauthConstant {
+ //授权方式:刷新令牌
+ public static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
+
+ //CLIENTID
+ public static final String OPERATORS_PC = "operators-pc";
+ public static final String OPERATORS_MOBILE = "operators-mobile";
+ public static final String SERVICER_PC = "servicer-pc";
+ public static final String SERVICER_MOBILE = "servicer-mobile";
+
+ //登录类型
+ public static final String USER_USERNAME = "user-username";
+ public static final String USER_MOBILE = "user-mobile";
+ public static final String USER_WECHAT = "user-wechat";
+ public static final String CUSTOMER_USERNAME = "customer-username";
+ public static final String CUSTOMER_MOBILE = "customer-mobile";
+ public static final String CUSTOMER_WECHAT = "customer-wechat";
+
+ //三方登录默认创建用户时默认角色
+ public static final String DEFAULT_ROLE_USER = "DEFAULT_ROLE_USER";
+ public static final String DEFAULT_ROLE_CUSTOMER = "DEFAULT_ROLE_CUSTOMER";
+
+
+ public static final String CLIENT_DETAILS_FIELDS = "client_id, client_secret as client_secret, resource_ids, scope, "
+ + "authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, "
+ + "refresh_token_validity, additional_information, autoapprove";
+ public static final String BASE_CLIENT_DETAILS_SQL = "select " + CLIENT_DETAILS_FIELDS + " from tab_client_details";
+ public static final String FIND_CLIENT_DETAILS_SQL = BASE_CLIENT_DETAILS_SQL + " order by client_id";
+ public static final String SELECT_CLIENT_DETAILS_SQL = BASE_CLIENT_DETAILS_SQL + " where client_id = ?";
+
+ //登录参数KEY定义
+ public static final String USER_ID_KEY = "user_id";
+ public static final String REAL_NAME_KEY = "real_name";
+ public static final String LOGIN_TYPE_KEY = "login_type";
+ public static final String CLIENT_ID_KEY = "client_id";
+ public static final String GRANT_TYPE_KEY = "grant_type";
+ public static final String CLIENT_SECRET_KEY = "client_secret";
+ public static final String USER_NAME_KEY = "username";
+ public static final String SEX_KEY = "sex";
+ public static final String MOBILE_KEY = "mobile";
+ public static final String PASSWORD_KEY = "password";
+ public static final String EXPIRES_IN_KEY = "expires_in";
+ public static final String RESOURCS_KEY = "resources";
+ public static final String AUTHORITIES_KEY = "authorities";
+
+ public static final String ROLES_KEY = "roles";
+ public static final String JTI_KEY = "jti";
+ public static final String CODE_KEY = "code";
+ public static final String OPEN_ID_KEY ="open_id" ;
+ public static final String DEPT_NO_KEY = "dept_no";
+ public static final String POST_NO_KEY = "post_no";
+ public static final String DATA_SECURITY_KEY = "data_security";
+ public static final String ONLY_AUTHENTICATE_KEY = "only_authenticate";
+ public static final String COMPANY_NO_KEY = "company_no";;
+
+ //登录处理集合
+ public static Map loginBeanNames = new HashMap<>();
+ static {
+ loginBeanNames.put("username","usernameLoginAuthHandler");
+ loginBeanNames.put("mobile","mobileLoginAuthHandler");
+ loginBeanNames.put("wechat","wechatLoginAuthHandler");
+ }
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/PostCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/PostCacheConstant.java
new file mode 100644
index 0000000..8033050
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/PostCacheConstant.java
@@ -0,0 +1,26 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:岗位表缓存常量
+*/
+public class PostCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "post:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/ResourceCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/ResourceCacheConstant.java
new file mode 100644
index 0000000..19c978f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/ResourceCacheConstant.java
@@ -0,0 +1,31 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:权限表缓存常量
+*/
+public class ResourceCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "resource:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ //tree树形
+ public static final String TREE = PREFIX+"tree";
+
+ //菜单
+ public static final String MENUS= PREFIX+"menus";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/RoleCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/RoleCacheConstant.java
new file mode 100644
index 0000000..82a91b1
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/RoleCacheConstant.java
@@ -0,0 +1,26 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:角色表缓存常量
+*/
+public class RoleCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "role:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/SecurityConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/SecurityConstant.java
new file mode 100644
index 0000000..88f88a1
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/SecurityConstant.java
@@ -0,0 +1,20 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+/**
+ * @ClassName SecurityConstant.java
+ * @Description 权限常量
+ */
+public class SecurityConstant {
+
+ //用户前端token
+ public static final String USER_TOKEN = "user-token";
+
+ //本人
+ public static final String DATA_SCOPE_0 = "0";
+
+ //自定义
+ public static final String DATA_SCOPE_1 = "1";
+
+ //加密秘钥
+ public static final String APP_SECRET = "app-secret";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/UserCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/UserCacheConstant.java
new file mode 100644
index 0000000..8a26e0f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/UserCacheConstant.java
@@ -0,0 +1,37 @@
+package com.itheima.sfbx.framework.commons.constant.security;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+* @Description:用户表缓存常量
+*/
+public class UserCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "user:";
+
+ //缓存父包
+ public static final String BASIC= PREFIX+"basic";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+
+ //list下拉框
+ public static final String LIST= PREFIX+"list";
+
+ //用户登录
+ public static final String LOGIN= PREFIX+"login";
+
+ //用户数据
+ public static final String DATA_SECURITY= PREFIX+"data:security";
+
+ //建立用户与会话唯一标识之间的关系,用于判断剔除
+ public static final String USER_TOKEN = PREFIX+"user-token:";
+
+ //建立会话唯一标识与jwtToken之间的关系,用于令牌续期
+ public static final String JWT_TOKEN = PREFIX+"jwt-token:";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sick/SickConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sick/SickConstant.java
new file mode 100644
index 0000000..ad752a5
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sick/SickConstant.java
@@ -0,0 +1,13 @@
+package com.itheima.sfbx.framework.commons.constant.sick;
+
+/**
+ * SickConstant
+ *
+ * @author: wgl
+ * @describe: 疾病常量类
+ * @date: 2022/12/28 10:10
+ */
+public class SickConstant {
+
+ public final static String SICK_TYPE = "DISEASE";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsCacheConstant.java
new file mode 100644
index 0000000..52b84b2
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsCacheConstant.java
@@ -0,0 +1,56 @@
+package com.itheima.sfbx.framework.commons.constant.sms;
+
+import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant;
+
+/**
+ * @ClassName DataDictCacheConstant.java
+ * @Description 短信缓存常量
+ */
+public class SmsCacheConstant extends CacheConstant {
+
+ //缓存父包
+ public static final String PREFIX= "sms-";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //blacklist缓存父包
+ public static final String PREFIX_BLACKLIST= PREFIX+"blacklist";
+
+ //Channel缓存父包
+ public static final String PREFIX_CHANNEL= PREFIX+"channel";
+
+ //发送记录缓存父包
+ public static final String PREFIX_SEND_RECORD= PREFIX+"send_record";
+
+ //签名缓存父包
+ public static final String PREFIX_SIGN= PREFIX+"sign";
+
+ //模板缓存父包
+ public static final String PREFIX_TEMPLATE= PREFIX+"template";
+
+ //黑名单page分页
+ public static final String PAGE_BLACKLIST= PREFIX_BLACKLIST+"page";
+
+ //channel的page分页
+ public static final String PAGE_CHANNEL= PREFIX_CHANNEL+"page";
+
+ //channel的page分页
+ public static final String CHANNEL_LABEL= PREFIX_CHANNEL+"label&ttl=-1";
+
+ //sign的page分页
+ public static final String PAGE_SIGN= PREFIX_SIGN+"page";
+
+ //channel的page分页
+ public static final String PAGE_SEND_RECORD = PREFIX_SEND_RECORD+"page";
+
+ //template的page分页
+ public static final String PAGE_TEMPLATE = PREFIX_TEMPLATE+"page";
+
+ //Channel缓存list
+ public static final String CHANNEL_LIST= PREFIX+"channel_list:";
+
+ //sign缓存list
+ public static final String SIGN_LIST =PREFIX+"sign_list" ;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsConstant.java
new file mode 100644
index 0000000..f4a8fac
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsConstant.java
@@ -0,0 +1,44 @@
+package com.itheima.sfbx.framework.commons.constant.sms;
+
+/**
+ * @ClassName SmsConstant.java
+ * @Description 短信常量类
+ */
+public class SmsConstant {
+
+ //阿里云短信
+ public static final String ALIYUN_SMS = "ALIYUN_SMS";
+ //腾讯云短信
+ public static final String TENCENT_SMS = "TENCENT_SMS";
+ //百度云短信
+ public static final String BAIDU_SMS = "BAIDU_SMS";
+
+ //邮件负载均衡
+ public static final String HASH = "HASH";
+ public static final String RANDOM = "RANDOM ";
+ public static final String ROUND_ROBIN ="ROUND_ROBIN" ;
+ public static final String WEIGHT_RANDOM = "WEIGHT_RANDOM";
+ public static final String WEIGHT_ROUND_ROBIN = "WEIGHT_ROUND_ROBIN";
+
+ //发送状态:发送成功
+ public static final String STATUS_SEND_0 ="0" ;
+ //发送状态:发送失败
+ public static final String STATUS_SEND_1 ="1" ;
+ //发送状态:发送中
+ public static final String STATUS_SEND_2 ="2" ;
+
+ //受理状态:受理成功
+ public static final String STATUS_ACCEPT_0 ="0" ;
+ //受理状态:受理失败
+ public static final String STATUS_ACCEPT_1 ="1" ;
+ //受理状态:受理中
+ public static final String STATUS_ACCEPT_2 ="2" ;
+
+ //审核状态:审核成功
+ public static final String STATUS_AUDIT_0 = "0";
+ //审核状态:审核失败
+ public static final String STATUS_AUDIT_1 = "1";
+ //审核状态:审核中
+ public static final String STATUS_AUDIT_2 = "2";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/SignContractConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/SignContractConstant.java
new file mode 100644
index 0000000..a0fe8f7
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/SignContractConstant.java
@@ -0,0 +1,13 @@
+package com.itheima.sfbx.framework.commons.constant.trade;
+
+/**
+ * @ClassName SignContractVonstant.java
+ * @Description 签约合同常量类
+ */
+public class SignContractConstant {
+
+ //1. TEMP:暂存,协议未生效过;2. NORMAL:正常;3. STOP:暂停
+ public static final String SIGNSTATE_TEMP ="1";
+ public static final String SIGNSTATE_NORMAL ="2";
+ public static final String SIGNSTATE_STOP ="3";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeCacheConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeCacheConstant.java
new file mode 100644
index 0000000..39e4ae9
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeCacheConstant.java
@@ -0,0 +1,32 @@
+package com.itheima.sfbx.framework.commons.constant.trade;
+
+/**
+ * @ClassName TradeCacheConstant.java
+ * @Description 交易缓存维护
+ */
+public class TradeCacheConstant {
+
+ //默认redis等待时间
+ public static final int REDIS_WAIT_TIME = 10;
+
+ //默认redis自动释放时间
+ public static final int REDIS_LEASETIME = 4;
+
+ //安全组前缀
+ public static final String PREFIX = "trade:";
+
+ //分布式锁前缀
+ public static final String LOCK_PREFIX = PREFIX+"lock:";
+
+ //创建交易加锁
+ public static final String CREATE_PAY = LOCK_PREFIX+ "create_pay";
+
+ //创建退款加锁
+ public static final String REFUND_PAY = LOCK_PREFIX+ "refund_pay";
+
+ //创建退款加锁
+ public static final String PAY_CHANNEL_VLID = PREFIX+"pay_channel_vlid&ttl=-1";
+
+ //page分页
+ public static final String PAGE= PREFIX+"page";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeConstant.java
new file mode 100644
index 0000000..f4fd55f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeConstant.java
@@ -0,0 +1,82 @@
+package com.itheima.sfbx.framework.commons.constant.trade;
+
+/**
+ * @ClassName TardingConstant.java
+ * @Description 交易常量类
+ */
+public class TradeConstant {
+
+ //【阿里云退款返回状态】
+ //REFUND_SUCCESS:成功
+ public static final String REFUND_SUCCESS= "REFUND_SUCCESS";
+
+ //【阿里云返回付款状态】
+ //TRADE_CLOSED:未付款交易超时关闭,或支付完成后全额退款
+ public static final String ALI_TRADE_CLOSED ="TRADE_CLOSED";
+ //TRADE_SUCCESS:交易支付成功
+ public static final String ALI_TRADE_SUCCESS="TRADE_SUCCESS";
+ //TRADE_FINISHED:交易结束不可退款
+ public static final String ALI_TRADE_FINISHED ="TRADE_FINISHED";
+
+ //【支付宝状态定义】
+ public static final String ALI_SUCCESS_CODE= "10000";
+ public static final String ALI_SUCCESS_MSG= "Success";
+
+ //【微信退款返回状态】
+ //SUCCESS:退款成功
+ public static final String WECHAT_REFUND_SUCCESS ="SUCCESS";
+ //CLOSED:退款关闭
+ public static final String WECHAT_REFUND_CLOSED="CLOSED";
+ //PROCESSING:退款处理中
+ public static final String WECHAT_REFUND_PROCESSING ="PROCESSING";
+ //ABNORMAL:退款异常
+ public static final String WECHAT_REFUND_ABNORMAL ="ABNORMAL";
+
+ //【微信返回付款状态】
+ //SUCCESS:支付成功
+ public static final String WECHAT_TRADE_SUCCESS ="SUCCESS";
+ //REFUND:转入退款
+ public static final String WECHAT_TRADE_REFUND ="REFUND";
+ //NOTPAY:未支付
+ public static final String WECHAT_TRADE_NOTPAY ="NOTPAY";
+ //CLOSED:已关闭
+ public static final String WECHAT_TRADE_CLOSED ="CLOSED";
+ //REVOKED:已撤销(仅付款码支付会返回)
+ public static final String WECHAT_TRADE_REVOKED ="REVOKED";
+ //USERPAYING:用户支付中(仅付款码支付会返回)
+ public static final String WECHAT_TRADE_USERPAYING ="USERPAYING";
+ //PAYERROR:支付失败(仅付款码支付会返回)
+ public static final String WECHAT_TRADE_WAITERROR ="PAYERROR";
+
+ //【平台:交易渠道】
+ //阿里
+ public static final String TRADE_CHANNEL_ALI_PAY = "ALI_PAY";
+ //微信
+ public static final String TRADE_CHANNEL_WECHAT_PAY = "WECHAT_PAY";
+ //现金
+ public static final String TRADE_CHANNEL_CASH_PAY = "CASH_PAY";
+ //免单
+ public static final String TRADE_CHANNEL_CREDIT_PAY = "CREDIT_PAY";
+
+
+ //【平台:交易状态】
+ //WAIT:待支付(交易创建,等待买家付款)
+ public static final String TRADE_WAIT ="0";
+ //SUCCESS:支付成功
+ public static final String TRADE_SUCCESS ="1";
+ //CLOSED:已关闭(未付款交易超时关闭,或支付失败)
+ public static final String TRADE_CLOSED ="2";
+ //TO_BE_SIGNED:待签约
+ public static final String TRADE_TO_BE_SIGNED ="3";
+
+ //【平台:退款状态】
+ //失败
+ public static final String REFUND_STATUS_FAIL= "FAIL";
+ //成功
+ public static final String REFUND_STATUS_SUCCESS = "SUCCESS";
+ //请求中
+ public static final String REFUND_STATUS_SENDING= "SENDING";
+ //请求关闭
+ public static final String REFUND_STATUS_CLOSED= "CLOSED";
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyConstant.java
new file mode 100644
index 0000000..efa2763
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyConstant.java
@@ -0,0 +1,60 @@
+package com.itheima.sfbx.framework.commons.constant.warranty;
+
+/**
+ * WarrantyConstant
+ *
+ * @author: wgl
+ * @describe: 保险常量
+ * @date: 2022/12/28 10:10
+ */
+public class WarrantyConstant {
+
+ //0待付款
+ public final static String STATE_NOT_PAY = "0";
+ //1待生效
+ public final static String STATE_TO_BE_WORK = "1";
+ //2保障中
+ public final static String STATE_SAFEING= "2";
+ //3 逾期中止
+ public final static String STATE_OVERDUE_OVER = "3";
+ //4 理赔终止
+ public final static String STATE_SETTLEMENT_OVER = "4";
+ //5 复效中止
+ public final static String STATE_REINSTATE_ING_OVER = "5";
+ //6 复效终止
+ public final static String STATE_REINSTATE_OVER = "6";
+ //7 满期终止
+ public final static String STATE_EXPIRE_OVER = "7";
+ //8 拒保
+ public final static String STATE_DECLINATURE = "8";
+ //9 犹豫期退保
+ public final static String STATE_MISS_REFUND = "9";
+ //10 协议退保
+ public final static String STATE_ARGEE_REFUND = "10";
+
+ //核保状态(0发送失败 1核保中 2核保失败 3核保成功 )
+ public final static String UNDERWRITING_STATE_0="0";
+ public final static String UNDERWRITING_STATE_1="1";
+ public final static String UNDERWRITING_STATE_2="2";
+ public final static String UNDERWRITING_STATE_3="3";
+
+ //批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过)
+ public final static String APPROVE_STATE_UN_SEND="0";
+ public final static String APPROVE_STATE_SEND_ERROR="1";
+ public final static String APPROVE_STATE_APPROVEING="2";
+ public final static String APPROVE_STATE_APPROVE="3";
+ public final static String APPROVE_STATE_REFUSE="4";
+
+ public final static String APPROVE_TYPE_APPOVE="0";
+
+ public final static String APPROVE_TYPE_INSURERD="1";
+
+ /**
+ * 判断是否是被保人
+ * @param type
+ * @return
+ */
+ public static boolean isInsured(String type) {
+ return APPROVE_TYPE_INSURERD.equals(type);
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyOrderConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyOrderConstant.java
new file mode 100644
index 0000000..dd33ce8
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyOrderConstant.java
@@ -0,0 +1,19 @@
+package com.itheima.sfbx.framework.commons.constant.warranty;
+
+/**
+ * WarrantyConstant
+ *
+ * @author: wgl
+ * @describe: 保险订单常量
+ * @date: 2022/12/28 10:10
+ */
+public class WarrantyOrderConstant {
+
+ //状态(0待付款 1已付款 2逾期 3补缴 4付款失败 5付款中)
+ public final static String ORDER_STATE_0="0";
+ public final static String ORDER_STATE_1="1";
+ public final static String ORDER_STATE_2="2";
+ public final static String ORDER_STATE_3="3";
+ public final static String ORDER_STATE_4="4";
+ public final static String ORDER_STATE_5="5";
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/ProductTypeDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/ProductTypeDTO.java
new file mode 100644
index 0000000..6e672d5
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/ProductTypeDTO.java
@@ -0,0 +1,26 @@
+package com.itheima.sfbx.framework.commons.constant.worryfree;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * ProductType
+ *
+ * @author: wgl
+ * @describe: 省心配产品匹配DTO对象
+ * @date: 2022/12/28 10:10
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class ProductTypeDTO {
+
+ //分类编号
+ private String categoryNo;
+
+ //分类键
+ private String categoryKey;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/WorryFreeConstant.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/WorryFreeConstant.java
new file mode 100644
index 0000000..ab96e7f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/WorryFreeConstant.java
@@ -0,0 +1,161 @@
+package com.itheima.sfbx.framework.commons.constant.worryfree;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.*;
+
+/**
+ * WorryFreeConstant
+ *
+ * @author: wgl
+ * @describe: 省心配常量
+ * @date: 2022/12/28 10:10
+ */
+public class WorryFreeConstant {
+
+ //省心配风险redis中的key
+ public static final String WORRYFREE_PREFIX = "worryfree:";
+
+ public static final String FLOW_NAME_RISK_START = "风险分析开始";
+
+ public static final String FLOW_NAME_RISK_END = "风险分析结束";
+
+ public static final String FLOW_NAME_SAFEGUARD_ANALYSIS_START = "保障评估开始";
+ public static final String FLOW_NAME_SAFEGUARD_ANALYSIS_END = "保障评估结束";
+
+ public static final String FLOW_NAME_PRODUCT_MATCH_START = "产品匹配开始";
+
+ public static final String FLOW_NAME_PRODUCT_MATCH_ING = "产品匹配";
+ public static final String FLOW_NAME_PRODUCT_MATCH_END = "产品匹配结束";
+
+ /**
+ * 风险项医疗
+ */
+ public static final String RISK_TYPE_MEDICAL = "medical";
+
+ /**
+ * 风险项意外
+ */
+ public static final String RISK_TYPE_ACCIDENT = "accident";
+
+ /**
+ * 风险项身故
+ */
+ public static final String RISK_TYPE_DIE = "die";
+
+ /**
+ * 用户标签
+ */
+ public static final String USER_TAG = "userTag";
+
+ /**
+ * 风险项重疾
+ */
+ public static final String RISK_TYPE_SERIOUS = "serious";
+
+
+ /**
+ * 风险项类型
+ */
+ public static final String VARIABLE_KEY_SAFEGUARD = "safeguardList";
+
+ /**
+ * 医疗变量键
+ */
+ public static final String VARIABLE_KEY_MEDICAL_AMOUNT = "medicalAmount";
+
+ /**
+ * 意外变量键
+ */
+ public static final String VARIABLE_KEY_ACCIDENT_AMOUNT = "accidentAmount";
+
+ /**
+ * 身故变量键
+ */
+ public static final String VARIABLE_KEY_DIE_AMOUNT = "dieAmount";
+
+ /**
+ * 重疾变量键
+ */
+ public static final String VARIABLE_KEY_SERIOUS_AMOUNT = "seriousAmount";
+
+ /**
+ * 医疗分类编号
+ */
+ public static final String CATEGORY_NO_MEDICAL = "100001001000000";
+
+
+ /**
+ * 重疾分类编号
+ */
+ public static final String CATEGORY_NO_SERIOUS = "100001002000000";
+
+ /**
+ * 意外分类编号
+ */
+ public static final String CATEGORY_NO_ACCIDENT = "100001003000000";
+
+
+
+ /**
+ * 获取所有的风险项类型
+ * @return
+ */
+ public static List getAllRiskTypeList() {
+ List nodeNameList = Arrays.asList(RISK_TYPE_MEDICAL, RISK_TYPE_ACCIDENT, RISK_TYPE_DIE, RISK_TYPE_SERIOUS);
+ return nodeNameList;
+ }
+
+ /**
+ * 风险分析流程
+ * @return
+ */
+ public static List getRiskFlowList() {
+ List nodeNameList = Arrays.asList("风险分析流程开始", "用户数据构建", "三方数据调用", "风险分析计算中", "准入分析", "反欺诈分析", "风险导入","风险打分");
+ return nodeNameList;
+ }
+
+ /**
+ * 保障配额流程节点
+ * @return
+ */
+ public static List getSafeguardFlowList() {
+ List nodeNameList = Arrays.asList("评估保障开始", "保障项数据获取", "三方数据调用", "评估保障计算中", "个人收入项验证", "收入反欺诈分析", "评估保障结束");
+ return nodeNameList;
+ }
+
+ /**
+ * 产品匹配节点列表
+ * @return
+ */
+ public static List getProductMatchFlowList() {
+ List nodeNameList = Arrays.asList("产品匹配开始","系统保险数据获取", "保险计算", "保额计算", "保额数据获取", "保额最大努力匹配", "保险匹配");
+ return nodeNameList;
+ }
+
+ /**
+ * 产品匹配节点列表
+ * @return
+ */
+ public static List getProductTypeCategoryList() {
+ List nodeNameList = Arrays.asList(
+ ProductTypeDTO.builder().categoryNo(CATEGORY_NO_MEDICAL).categoryKey(VARIABLE_KEY_MEDICAL_AMOUNT).build(),
+ ProductTypeDTO.builder().categoryNo(CATEGORY_NO_SERIOUS).categoryKey(VARIABLE_KEY_SERIOUS_AMOUNT).build(),
+ ProductTypeDTO.builder().categoryNo(CATEGORY_NO_ACCIDENT).categoryKey(VARIABLE_KEY_ACCIDENT_AMOUNT).build()
+ );
+ return nodeNameList;
+ }
+
+ /**
+ * 获取锁key
+ * @param id
+ * @return
+ */
+ public static String getLockKey(String id) {
+ //省心配风险redis中的key
+ return WORRYFREE_PREFIX + "worryfree:key:"+id;
+ }
+}
\ No newline at end of file
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerInsuranceDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerInsuranceDTO.java
new file mode 100644
index 0000000..433d745
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerInsuranceDTO.java
@@ -0,0 +1,22 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * AnalysisCustomerInsuranceDTO
+ *
+ * @author: wgl
+ * @describe: 统计每日客户保险数量数据传输对象
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class AnalysisCustomerInsuranceDTO {
+
+ @ApiModelProperty(value = "当日总保费")
+ private Long money;
+
+ @ApiModelProperty(value = "当日保单数")
+ private Long insuranceNums;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerSexDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerSexDTO.java
new file mode 100644
index 0000000..5d50adc
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerSexDTO.java
@@ -0,0 +1,23 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+
+/**
+ * AnalysisCustomerSexDTO
+ *
+ * @author: wgl
+ * @describe: 统计分析客户性别统计
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class AnalysisCustomerSexDTO {
+
+ @ApiModelProperty(value = "保单男性数量")
+ private Integer sexManNums;
+
+ @ApiModelProperty(value = "保单女性数量")
+ private Integer sexWomanNums;
+
+}
\ No newline at end of file
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisInsuranceTypeDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisInsuranceTypeDTO.java
new file mode 100644
index 0000000..46c3c96
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisInsuranceTypeDTO.java
@@ -0,0 +1,26 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+/**
+ * AnalysisCustomerSexDTO
+ *
+ * @author: wgl
+ * @describe: 统计分析投保分类统计分析
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class AnalysisInsuranceTypeDTO {
+
+ @ApiModelProperty(value = "投保分类ID")
+ private Integer insuranceTypeId;
+
+ @ApiModelProperty(value = "投保分类名")
+ private String insuranceTypeName;
+
+ @ApiModelProperty(value = "对应分类的投保数量")
+ private Integer insuranceNums;
+
+}
\ No newline at end of file
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/InsureCategoryDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/InsureCategoryDTO.java
new file mode 100644
index 0000000..dcac298
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/InsureCategoryDTO.java
@@ -0,0 +1,46 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDate;
+import java.util.Date;
+
+/**
+ * @ClassName InsureCategoryDTO.java
+ * @Description 投保分类报表DTO
+ */
+@Data
+@NoArgsConstructor
+@ApiModel(value="InsureCategoryDTO对象", description="投保分类报表DTO")
+public class InsureCategoryDTO {
+
+ @Builder
+ public InsureCategoryDTO(String categoryName, Long doInsureNums, LocalDate reportTime) {
+ this.categoryName = categoryName;
+ this.doInsureNums = doInsureNums;
+ this.reportTime = reportTime;
+ }
+
+ @ApiModelProperty(value = "保险分类名称")
+ private String categoryName;
+
+ @ApiModelProperty(value = "投保次数")
+ private Long doInsureNums;
+
+ @ApiModelProperty(value = "统计时间")
+ @JsonDeserialize(using = LocalDateDeserializer.class)
+ @JsonSerialize(using = LocalDateSerializer.class)
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private LocalDate reportTime;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/PageDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/PageDTO.java
new file mode 100644
index 0000000..6e7b898
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/PageDTO.java
@@ -0,0 +1,41 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import lombok.Data;
+
+import java.util.Map;
+
+/**
+ * PageDTO
+ *
+ * @author: wgl
+ * @describe: 分页对象
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class PageDTO {
+
+ private Integer pageNum;
+
+ private Integer pageSize = 5000;
+
+ private Integer totalPageNum;
+
+ private Integer totalCount;
+
+ public PageDTO(Integer totalCount) {
+ this.totalCount = totalCount;
+ this.totalPageNum = (int) Math.ceil((double) totalCount / pageSize);
+ }
+
+ /**
+ * 获取分页信息
+ *
+ * @param totalData
+ * @return
+ */
+ public static PageDTO getPageInfo(Map totalData) {
+ Integer count = Double.valueOf(totalData.get("count").toString()).intValue();
+ PageDTO pageDTO = new PageDTO(count);
+ return pageDTO;
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/SaleReportDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/SaleReportDTO.java
new file mode 100644
index 0000000..9ffe75c
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/SaleReportDTO.java
@@ -0,0 +1,63 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.Date;
+
+/**
+ * @ClassName SaleReportDTO.java
+ * @Description 销售报表DTO
+ */
+@Data
+@NoArgsConstructor
+@ApiModel(value="SaleReportDTO对象", description="销售报表DTO")
+public class SaleReportDTO implements Serializable {
+
+ @Builder
+ public SaleReportDTO(BigDecimal totalAmountDay, BigDecimal avgPieceAmountDay, Long persons,
+ BigDecimal avgPersonAmountDay, Long totalWarrantyDay, LocalDate reportTime) {
+ this.totalAmountDay = totalAmountDay;
+ this.avgPieceAmountDay = avgPieceAmountDay;
+ this.avgPersonAmountDay = avgPersonAmountDay;
+ this.totalWarrantyDay = totalWarrantyDay;
+ this.persons = persons;
+ this.reportTime = reportTime;
+ }
+
+ @ApiModelProperty(value = "日投保总额度")
+ private BigDecimal totalAmountDay;
+
+ @ApiModelProperty(value = "日投保件均额度")
+ private BigDecimal avgPieceAmountDay;
+
+ @ApiModelProperty(value = "日投保人均额度")
+ private BigDecimal avgPersonAmountDay;
+
+ @ApiModelProperty(value = "日总合同数")
+ private Long totalWarrantyDay;
+
+ @ApiModelProperty(value = "投保人数")
+ private Long persons;
+
+ @ApiModelProperty(value = "统计时间")
+ @JsonDeserialize(using = LocalDateDeserializer.class)
+ @JsonSerialize(using = LocalDateSerializer.class)
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ private LocalDate reportTime;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/TimeDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/TimeDTO.java
new file mode 100644
index 0000000..151ebc3
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/TimeDTO.java
@@ -0,0 +1,58 @@
+package com.itheima.sfbx.framework.commons.dto.analysis;
+
+import lombok.Data;
+
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+import java.time.format.DateTimeFormatter;
+
+/**
+ * TimeDTO
+ *
+ * @author: wgl
+ * @describe: 日期对象类
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class TimeDTO {
+
+
+ /**
+ * 目标日期:LocalDate
+ */
+ private LocalDate targetDate;
+
+ /**
+ * 目标日期:LocalDateTime
+ */
+ private LocalDateTime targetDateTime;
+
+ /**
+ * 目标日期开始 字符串
+ */
+ private String begin;
+
+ /**
+ * 目标日期结束时间 字符串
+ */
+ private String end;
+
+ /**
+ * 目标日期开始时间
+ */
+ private LocalDateTime beginTime;
+
+ /**
+ * 目标日期结束时间
+ */
+ private LocalDateTime endTime;
+
+
+ /**
+ * 获取日志格式化
+ * @return
+ */
+ public DateTimeFormatter getTimeFormatter(){
+ return DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/BaseVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/BaseVO.java
new file mode 100644
index 0000000..19008ab
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/BaseVO.java
@@ -0,0 +1,60 @@
+package com.itheima.sfbx.framework.commons.dto.basic;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * @ClassName BaseVo.java
+ * @Description 基础请求
+ */
+@Data
+@NoArgsConstructor
+public class BaseVO implements Serializable {
+
+ @ApiModelProperty(value = "主键")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long id;
+
+ @ApiModelProperty(value = "创建时间")
+ @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+ @JsonSerialize(using = LocalDateTimeSerializer.class)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set
+ protected LocalDateTime createTime;
+
+ @ApiModelProperty(value = "修改时间")
+ @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+ @JsonSerialize(using = LocalDateTimeSerializer.class)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set
+ protected LocalDateTime updateTime;
+
+ @ApiModelProperty(value = "创建者:username")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long createBy;
+
+ @ApiModelProperty(value = "更新者:username")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long updateBy;
+
+ @ApiModelProperty(value = "是否有效")
+ protected String dataState;
+
+ @ApiModelProperty(value = "创建人名称")
+ private String creator;
+
+ public BaseVO(Long id, String dataState) {
+ this.id = id;
+ this.dataState = dataState;
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/OtherConfigVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/OtherConfigVO.java
new file mode 100644
index 0000000..f3ee3dd
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/OtherConfigVO.java
@@ -0,0 +1,33 @@
+package com.itheima.sfbx.framework.commons.dto.basic;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName OtherConfig.java
+ * @Description 扩展配置
+ */
+@Data
+@NoArgsConstructor
+@ApiModel(value="OtherConfigVO对象", description="扩展配置")
+public class OtherConfigVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public OtherConfigVO(String configKey, String configValue) {
+ this.configKey = configKey;
+ this.configValue = configValue;
+ }
+
+ @ApiModelProperty(value = "配置键")
+ private String configKey;
+
+ @ApiModelProperty(value = "配置值")
+ private String configValue;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeItemVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeItemVO.java
new file mode 100644
index 0000000..215d6e6
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeItemVO.java
@@ -0,0 +1,44 @@
+package com.itheima.sfbx.framework.commons.dto.basic;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description:树结构体
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class TreeItemVO implements Serializable {
+
+ @ApiModelProperty(value = "节点ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ public String id;
+
+ @ApiModelProperty(value = "节点父亲ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ public String parentId;
+
+ @ApiModelProperty(value = "显示内容")
+ public String label;
+
+ @ApiModelProperty(value = "是否选择")
+ public Boolean isChecked;
+
+ @ApiModelProperty(value = "显示内容")
+ public String systemCode;
+
+ @ApiModelProperty(value = "是否叶子节点")
+ public String isLeaf;
+
+ @ApiModelProperty(value = "显示内容")
+ public List children;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeVO.java
new file mode 100644
index 0000000..775796c
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeVO.java
@@ -0,0 +1,30 @@
+package com.itheima.sfbx.framework.commons.dto.basic;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @description: 树显示类
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class TreeVO implements Serializable {
+
+ @ApiModelProperty(value = "tree数据")
+ private List items;
+
+ @ApiModelProperty(value = "选择节点")
+ private List checkedIds;
+
+ @ApiModelProperty(value = "展开项")
+ private List expandedIds;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/click/ClickDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/click/ClickDTO.java
new file mode 100644
index 0000000..1e92df1
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/click/ClickDTO.java
@@ -0,0 +1,55 @@
+package com.itheima.sfbx.framework.commons.dto.click;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * ClickDTO
+ *
+ * @author: wgl
+ * @describe: 点击对象
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class ClickDTO {
+
+ @ApiModelProperty(value = "请求id")
+ private String requestId;
+
+ @ApiModelProperty(value = "域名")
+ private String host;
+
+ @ApiModelProperty(value = "ip地址")
+ private String hostAddress;
+
+ @ApiModelProperty(value = "请求路径")
+ private String requestUri;
+
+ @ApiModelProperty(value = "请求方式")
+ private String requestMethod;
+
+ @ApiModelProperty(value = "请求body")
+ private String requesBody;
+
+ @ApiModelProperty(value = "应答body")
+ private String responseBody;
+
+ @ApiModelProperty(value = "应答code")
+ private String responseCode;
+
+ @ApiModelProperty(value = "应答msg")
+ private String responseMsg;
+
+ @ApiModelProperty(value = "用户")
+ private Long userId;
+
+ @ApiModelProperty(value = "用户名称")
+ private String userName;
+
+ @ApiModelProperty(value = "设备号")
+ private String deviceNumber;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNO;
+
+}
\ No newline at end of file
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/DataDictVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/DataDictVO.java
new file mode 100644
index 0000000..90b3998
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/DataDictVO.java
@@ -0,0 +1,42 @@
+package com.itheima.sfbx.framework.commons.dto.dict;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:数据字典表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class DataDictVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public DataDictVO(Long id, String dataState, String parentKey,
+ String dataKey, String dataValue, String discription) {
+ super(id, dataState);
+ this.parentKey = parentKey;
+ this.dataKey = dataKey;
+ this.dataValue = dataValue;
+ this.discription = discription;
+ }
+
+ @ApiModelProperty(value = "父key")
+ private String parentKey;
+
+ @ApiModelProperty(value = "数据字典KEY")
+ private String dataKey;
+
+ @ApiModelProperty(value = "值")
+ private String dataValue;
+
+ @ApiModelProperty(value = "描述")
+ private String discription;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/PlacesVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/PlacesVO.java
new file mode 100644
index 0000000..85b8df4
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/PlacesVO.java
@@ -0,0 +1,36 @@
+package com.itheima.sfbx.framework.commons.dto.dict;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:地方表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class PlacesVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public PlacesVO(Long id, String dataState, Long parentId, String cityName) {
+ super(id, dataState);
+ this.parentId = parentId;
+ this.cityName = cityName;
+ }
+
+ @ApiModelProperty(value = "父ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long parentId;
+
+ @ApiModelProperty(value = "名称")
+ private String cityName;
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/external/TripartiteInsureDTO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/external/TripartiteInsureDTO.java
new file mode 100644
index 0000000..c3dfb1d
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/external/TripartiteInsureDTO.java
@@ -0,0 +1,24 @@
+package com.itheima.sfbx.framework.commons.dto.external;
+
+import lombok.Data;
+
+/**
+ * TripartiteInsureDTO
+ *
+ * @author: wgl
+ * @describe: 投保交互DTO
+ * @date: 2022/12/28 10:10
+ */
+@Data
+public class TripartiteInsureDTO {
+
+ /**
+ * 图片浏览地址
+ */
+ private String url;
+
+ /**
+ * 允许投保标志位
+ */
+ private Boolean flag;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FilePartVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FilePartVO.java
new file mode 100644
index 0000000..f8b9465
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FilePartVO.java
@@ -0,0 +1,63 @@
+package com.itheima.sfbx.framework.commons.dto.file;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class FilePartVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public FilePartVO(Long id, String dataState, String uploadId, Integer partNumber, Long partSize, String uploadResult, String md5, String bucketName, String fileName, String storeFlag, String companyNo) {
+ super(id, dataState);
+ this.uploadId = uploadId;
+ this.partNumber = partNumber;
+ this.partSize = partSize;
+ this.uploadResult = uploadResult;
+ this.md5 = md5;
+ this.bucketName = bucketName;
+ this.fileName = fileName;
+ this.storeFlag = storeFlag;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "唯一上传id")
+ private String uploadId;
+
+ @ApiModelProperty(value = "当前片数")
+ private Integer partNumber;
+
+ @ApiModelProperty(value = "分片大小")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long partSize;
+
+ @ApiModelProperty(value = "分片上传结果(json)")
+ private String uploadResult;
+
+ @ApiModelProperty(value = "md5值")
+ private String md5;
+
+ @ApiModelProperty(value = "存储空间名称")
+ private String bucketName;
+
+ @ApiModelProperty(value = "文件名")
+ private String fileName;
+
+ @ApiModelProperty(value = "存储源标识,参考FileConstant")
+ private String storeFlag;
+
+ @ApiModelProperty(value = "企业号")
+ private String companyNo;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FileVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FileVO.java
new file mode 100644
index 0000000..eb85a0a
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FileVO.java
@@ -0,0 +1,89 @@
+package com.itheima.sfbx.framework.commons.dto.file;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.constant.file.FileConstant;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Description:附件表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class FileVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public FileVO(Long id, String dataState, Long businessId, String businessType, String suffix, String fileName, String pathUrl, String storeFlag, String bucketName, String base64Image, String uploadId, Boolean autoCatalog, String md5, List partETags, String status, String companyNo) {
+ super(id, dataState);
+ this.businessId = businessId;
+ this.businessType = businessType;
+ this.suffix = suffix;
+ this.fileName = fileName;
+ this.pathUrl = pathUrl;
+ this.storeFlag = storeFlag;
+ this.bucketName = bucketName;
+ this.base64Image = base64Image;
+ this.uploadId = uploadId;
+ this.autoCatalog = autoCatalog;
+ this.md5 = md5;
+ this.partETags = partETags;
+ this.status = status;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "业务ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long businessId;
+
+ @ApiModelProperty(value = "业务类型")
+ private String businessType;
+
+ @ApiModelProperty(value = "后缀名")
+ private String suffix;
+
+ @ApiModelProperty(value = "文件名")
+ private String fileName;
+
+ @ApiModelProperty(value = "访问路径")
+ private String pathUrl;
+
+ @ApiModelProperty(value = "存储标识(不同的存储标识参考FileConstant),现支持 aliyunoss、qiniu ")
+ private String storeFlag;
+
+ @ApiModelProperty(value = "存储空间名称")
+ private String bucketName;
+
+ @ApiModelProperty(value = "base64图片")
+ private String base64Image;
+
+ @ApiModelProperty(value = "分片上传文件Id")
+ private String uploadId;
+
+ @ApiModelProperty(value = "是否自动生成文件存储目录,如果在storeFilename指定了目录,此值设置为false")
+ private Boolean autoCatalog;
+
+ @ApiModelProperty(value = "md5值")
+ private String md5;
+
+ @ApiModelProperty(value = "分片上传分片信息")
+ private List partETags;
+
+ @ApiModelProperty(value = "上传状态")
+ private String status;
+
+ @ApiModelProperty(value = "企业号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "历史上传:0 历史有此文件 1、历史无此文件")
+ private String isHistory;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/UploadMultipartFile.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/UploadMultipartFile.java
new file mode 100644
index 0000000..f3d10bc
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/UploadMultipartFile.java
@@ -0,0 +1,28 @@
+package com.itheima.sfbx.framework.commons.dto.file;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @Description:
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class UploadMultipartFile implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "文件名称")
+ public String originalFilename;
+
+ @ApiModelProperty(value = "文件数组")
+ public byte[] fileByte;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/log/LogBusinessVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/log/LogBusinessVO.java
new file mode 100644
index 0000000..4cb786b
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/log/LogBusinessVO.java
@@ -0,0 +1,105 @@
+package com.itheima.sfbx.framework.commons.dto.log;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Description:日志模块
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class LogBusinessVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public LogBusinessVO(Long id, String dataState, String requestId, String host, String hostAddress, String requestUri, String requestMethod, String requestBody, String responseBody, int responseCode, String responseMsg, Long userId, String userName, String businessType, String deviceNumber, List createdTimeQuerty, String companyNO,String sex,String lastReadUrl,String province,String city) {
+ super(id, dataState);
+ this.requestId = requestId;
+ this.host = host;
+ this.hostAddress = hostAddress;
+ this.requestUri = requestUri;
+ this.requestMethod = requestMethod;
+ this.requestBody = requestBody;
+ this.responseBody = responseBody;
+ this.responseCode = responseCode;
+ this.responseMsg = responseMsg;
+ this.userId = userId;
+ this.userName = userName;
+ this.businessType = businessType;
+ this.deviceNumber = deviceNumber;
+ this.createdTimeQuerty = createdTimeQuerty;
+ this.companyNO = companyNO;
+ this.sex = sex;
+ this.lastReadUrl = lastReadUrl;
+ this.province = province;
+ this.city = city;
+ }
+
+ @ApiModelProperty(value = "请求id")
+ private String requestId;
+
+ @ApiModelProperty(value = "域名")
+ private String host;
+
+ @ApiModelProperty(value = "ip地址")
+ private String hostAddress;
+
+ @ApiModelProperty(value = "请求路径")
+ private String requestUri;
+
+ @ApiModelProperty(value = "请求方式")
+ private String requestMethod;
+
+ @ApiModelProperty(value = "请求body")
+ private String requestBody;
+
+ @ApiModelProperty(value = "应答body")
+ private String responseBody;
+
+ @ApiModelProperty(value = "应答code")
+ private int responseCode;
+
+ @ApiModelProperty(value = "应答msg")
+ private String responseMsg;
+
+ @ApiModelProperty(value = "用户")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long userId;
+
+ @ApiModelProperty(value = "用户名称")
+ private String userName;
+
+ @ApiModelProperty(value = "业务类型")
+ private String businessType;
+
+ @ApiModelProperty(value = "设备号")
+ private String deviceNumber;
+
+ @ApiModelProperty(value = "时间查询")
+ private List createdTimeQuerty;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNO;
+
+ @ApiModelProperty(value = "性别")
+ private String sex;
+
+ @ApiModelProperty(value = "上次浏览页面")
+ private String lastReadUrl;
+
+ @ApiModelProperty(value = "省份")
+ private String province;
+
+ @ApiModelProperty(value = "城市")
+ private String city;
+
+}
\ No newline at end of file
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/CategoryReportVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/CategoryReportVO.java
new file mode 100644
index 0000000..746aa85
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/CategoryReportVO.java
@@ -0,0 +1,79 @@
+package com.itheima.sfbx.framework.commons.dto.report;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Description:保险分类
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value="CategoryReportVO对象", description="保险分类报表对象")
+public class CategoryReportVO extends BaseVO {
+
+
+ @Builder
+ public CategoryReportVO(Long id, String dataState, String parentCategoryNo, String categoryNo, String categoryName, String icon, String leafNode, String showIndex, String categoryType, Integer sortNo, String remake, String checkRule, String[] checkedIds, String[] checkedCategoryNos, List nodeFloors) {
+ super(id, dataState);
+ this.parentCategoryNo = parentCategoryNo;
+ this.categoryNo = categoryNo;
+ this.categoryName = categoryName;
+ this.icon = icon;
+ this.leafNode = leafNode;
+ this.showIndex = showIndex;
+ this.categoryType = categoryType;
+ this.sortNo = sortNo;
+ this.remake = remake;
+ this.checkRule = checkRule;
+ this.checkedIds = checkedIds;
+ this.checkedCategoryNos = checkedCategoryNos;
+ this.nodeFloors = nodeFloors;
+ }
+
+ @ApiModelProperty(value = "父分类编号")
+ private String parentCategoryNo;
+
+ @ApiModelProperty(value = "分类编号")
+ private String categoryNo;
+
+ @ApiModelProperty(value = "分类名称")
+ private String categoryName;
+
+ @ApiModelProperty(value = "图标")
+ private String icon;
+
+ @ApiModelProperty(value = "是否叶子节点(0是 否1)")
+ private String leafNode;
+
+ @ApiModelProperty(value = "是否显示在首页(0是 否1)")
+ private String showIndex;
+
+ @ApiModelProperty(value = "分类类型:0推荐分类 1产品分类 ")
+ private String categoryType;
+
+ @ApiModelProperty(value = "排序")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "分类补充说明")
+ private String remake;
+
+ @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿")
+ private String checkRule;
+
+ @ApiModelProperty(value = "批量操作:主键ID")
+ private String[] checkedIds;
+
+ @ApiModelProperty(value = "TREE结构:选中分类编号")
+ private String[] checkedCategoryNos;
+
+ @ApiModelProperty(value = "节点层级:最多5层")
+ private List nodeFloors;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/InsuranceReportVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/InsuranceReportVO.java
new file mode 100644
index 0000000..5ca4414
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/InsuranceReportVO.java
@@ -0,0 +1,181 @@
+package com.itheima.sfbx.framework.commons.dto.report;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+import com.itheima.sfbx.framework.commons.dto.security.CompanyVO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * @Description:保险产品
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "InsuranceReportVO对象", description = "保险产品报表VO")
+public class InsuranceReportVO extends BaseVO {
+
+ @Builder
+ public InsuranceReportVO(Long id, String dataState, String publishNumber, Long categoryNo,String categoryName, Long recommendCategoryNo, String insuranceName, String goldSelection, String carefree, String showIndex, String labelsJson, String remakeJson, Long timeStart, String timeStartUnit, Long timeEnd, String timeEndUnit, String relation, Integer sortNo, String multiple, Long continuousInsuranceAge, String checkRule, String companyNo, String insuranceState, Integer grace, String graceUnit, Integer revival, String revivalUnit, String comment, String remake, Integer hesitation, Integer waits, List fileVOs, String[] checkedIds, BigDecimal operatingRate, BigDecimal individualAgentRate, BigDecimal platformAgentRate, CompanyVO companyVO, List conditionVals) {
+ super(id, dataState);
+ this.publishNumber = publishNumber;
+ this.categoryNo = categoryNo;
+ this.categoryName = categoryName;
+ this.recommendCategoryNo = recommendCategoryNo;
+ this.insuranceName = insuranceName;
+ this.goldSelection = goldSelection;
+ this.carefree = carefree;
+ this.showIndex = showIndex;
+ this.labelsJson = labelsJson;
+ this.remakeJson = remakeJson;
+ this.timeStart = timeStart;
+ this.timeStartUnit = timeStartUnit;
+ this.timeEnd = timeEnd;
+ this.timeEndUnit = timeEndUnit;
+ this.relation = relation;
+ this.sortNo = sortNo;
+ this.multiple = multiple;
+ this.continuousInsuranceAge = continuousInsuranceAge;
+ this.checkRule = checkRule;
+ this.companyNo = companyNo;
+ this.insuranceState = insuranceState;
+ this.grace = grace;
+ this.graceUnit = graceUnit;
+ this.revival = revival;
+ this.revivalUnit = revivalUnit;
+ this.comment = comment;
+ this.remake = remake;
+ this.hesitation = hesitation;
+ this.waits = waits;
+ this.fileVOs = fileVOs;
+ this.checkedIds = checkedIds;
+ this.operatingRate = operatingRate;
+ this.individualAgentRate = individualAgentRate;
+ this.platformAgentRate = platformAgentRate;
+ this.companyVO = companyVO;
+ this.conditionVals = conditionVals;
+ }
+
+ @ApiModelProperty(value = "银保监备案号")
+ private String publishNumber;
+
+ @ApiModelProperty(value = "分类编号")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long categoryNo;
+
+ @ApiModelProperty(value = "分类名称")
+ private String categoryName;
+
+ @ApiModelProperty(value = "推荐分类")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long recommendCategoryNo;
+
+ @ApiModelProperty(value = "保险名称")
+ private String insuranceName;
+
+ @ApiModelProperty(value = "金选:0是 1否")
+ private String goldSelection;
+
+ @ApiModelProperty(value = "安心赔:0是 1否")
+ private String carefree;
+
+ @ApiModelProperty(value = "首页热点显示(是0 否1)")
+ private String showIndex;
+
+ @ApiModelProperty(value = "保险标签格式:[{key:200万医疗金,val:指定私立意义}]")
+ private String labelsJson;
+
+ @ApiModelProperty(value = "补充说明格式[{key:失去保障,val:断保将失去相应保障,不能理赔}]")
+ private String remakeJson;
+
+ @ApiModelProperty(value = "可购买起始点")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long timeStart;
+
+ @ApiModelProperty(value = "可购买起始点单位:天、年")
+ private String timeStartUnit;
+
+ @ApiModelProperty(value = "可购买结束点")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long timeEnd;
+
+ @ApiModelProperty(value = "可购买结束点单位:天、年")
+ private String timeEndUnit;
+
+ @ApiModelProperty(value = "可投保关系:self,children:spouse,parents")
+ private String relation;
+
+ @ApiModelProperty(value = "排序")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "团个险(0团 1个)")
+ private String multiple;
+
+ @ApiModelProperty(value = "连续投保年龄")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long continuousInsuranceAge;
+
+ @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿")
+ private String checkRule;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "保险状态(上架0 下架1)")
+ private String insuranceState;
+
+ @ApiModelProperty(value = "保单宽限")
+ private Integer grace;
+
+ @ApiModelProperty(value = "宽限单位")
+ private String graceUnit;
+
+ @ApiModelProperty(value = "保单复效")
+ private Integer revival;
+
+ @ApiModelProperty(value = "复效单位")
+ private String revivalUnit;
+
+ @ApiModelProperty(value = "产品点评")
+ private String comment;
+
+ @ApiModelProperty(value = "产品描述")
+ private String remake;
+
+ @ApiModelProperty(value = "犹豫期")
+ private Integer hesitation;
+
+ @ApiModelProperty(value = "等待期")
+ private Integer waits;
+
+ @ApiModelProperty(value = "文件VO对象")
+ private List fileVOs;
+
+ @ApiModelProperty(value = "批量操作:主键ID")
+ private String[] checkedIds;
+
+ @ApiModelProperty(value = "运营费率")
+ private BigDecimal operatingRate;
+
+ @ApiModelProperty(value = "个人代理费率")
+ private BigDecimal individualAgentRate;
+
+ @ApiModelProperty(value = "平台代理费率")
+ private BigDecimal platformAgentRate;
+
+ @ApiModelProperty(value = "公司信息")
+ private CompanyVO companyVO;
+
+ @ApiModelProperty(value = "查询:保险筛选项值")
+ private List conditionVals;
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/AuthChannelVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/AuthChannelVO.java
new file mode 100644
index 0000000..e78c617
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/AuthChannelVO.java
@@ -0,0 +1,68 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @ClassName Channel.java
+ * @Description TODO
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value="AuthChannel对象", description="三方渠道")
+public class AuthChannelVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public AuthChannelVO(String domain,Long id, String dataState, String channelName, String channelLabel, String appId, String appSecret, String otherConfig, String companyNo, String notifyUrl) {
+ super(id, dataState);
+ this.channelName = channelName;
+ this.channelLabel = channelLabel;
+ this.appId = appId;
+ this.appSecret = appSecret;
+ this.otherConfig = otherConfig;
+ this.companyNo = companyNo;
+ this.notifyUrl = notifyUrl;
+ this.domain = domain;
+ }
+
+ @ApiModelProperty(value = "通道名称")
+ private String channelName;
+
+ @ApiModelProperty(value = "通道唯一标记")
+ private String channelLabel;
+
+ @ApiModelProperty(value = "商户appid")
+ private String appId;
+
+ @ApiModelProperty(value = "企业三方app秘钥")
+ private String appSecret;
+
+ @ApiModelProperty(value = "其他配置")
+ private String otherConfig;
+
+ @ApiModelProperty(value = "请求域名")
+ private String domain;
+
+ @ApiModelProperty(value = "商户编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "回调地址")
+ private String notifyUrl;
+
+ @ApiModelProperty(value = "其他配置")
+ private List otherConfigVOs;
+
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CompanyVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CompanyVO.java
new file mode 100644
index 0000000..e993a4c
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CompanyVO.java
@@ -0,0 +1,109 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
+import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Description:企业账号管理
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value="Company对象", description="企业账号管理")
+public class CompanyVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public CompanyVO(Long id, String dataState, String companyNo, String companName, String registeredNo, String province, String area, String city, String address, String status, LocalDateTime expireTime, String webSite, String appSite, String email, String tel, String leaderMobile, String leaderName, List authChannelVOs,Long[] checkIds) {
+ super(id, dataState);
+ this.companyNo = companyNo;
+ this.companName = companName;
+ this.registeredNo = registeredNo;
+ this.province = province;
+ this.area = area;
+ this.city = city;
+ this.address = address;
+ this.status = status;
+ this.expireTime = expireTime;
+ this.webSite = webSite;
+ this.appSite = appSite;
+ this.email = email;
+ this.tel = tel;
+ this.leaderMobile = leaderMobile;
+ this.leaderName = leaderName;
+ this.authChannelVOs = authChannelVOs;
+ this.checkIds = checkIds;
+ }
+
+ @ApiModelProperty(value = "商户编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "企业名称")
+ private String companName;
+
+ @ApiModelProperty(value = "统一社会信用代码")
+ private String registeredNo;
+
+ @ApiModelProperty(value = "地址(省)")
+ private String province;
+
+ @ApiModelProperty(value = "地址(区)")
+ private String area;
+
+ @ApiModelProperty(value = "地址(市)")
+ private String city;
+
+ @ApiModelProperty(value = "详细地址")
+ private String address;
+
+ @ApiModelProperty(value = "状态(停用:0,试用:1,,正式:2)")
+ private String status;
+
+ @ApiModelProperty(value = "到期时间 (试用下是默认七天后到期,状态改成停用)")
+ @JsonDeserialize(using = LocalDateTimeDeserializer.class)
+ @JsonSerialize(using = LocalDateTimeSerializer.class)
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set
+ private LocalDateTime expireTime;
+
+ @ApiModelProperty(value = "商户门店web站点")
+ private String webSite;
+
+ @ApiModelProperty(value = "商户app站点")
+ private String appSite;
+
+ @ApiModelProperty(value = "联系邮箱")
+ private String email;
+
+ @ApiModelProperty(value = "电话")
+ private String tel;
+
+ @ApiModelProperty(value = "负责人手机")
+ private String leaderMobile;
+
+ @ApiModelProperty(value = "负责人姓名")
+ private String leaderName;
+
+ @ApiModelProperty(value = "三方授权渠道")
+ private List authChannelVOs;
+
+ @ApiModelProperty(value = "批量操作id集合")
+ private Long[] checkIds;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CustomerVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CustomerVO.java
new file mode 100644
index 0000000..4d9e8ba
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CustomerVO.java
@@ -0,0 +1,85 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Description:客户表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class CustomerVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public CustomerVO(Long id, String dataState, String username, String password, String nickName, String email,
+ String clientId, String realName, String mobile, String sex, String remark,String companyNo,
+ String[] checkedIds, String openId, String userToken, DataSecurityVO dataSecurityVO) {
+ super(id, dataState);
+ this.companyNo = companyNo;
+ this.username = username;
+ this.password = password;
+ this.nickName = nickName;
+ this.email = email;
+ this.clientId = clientId;
+ this.realName = realName;
+ this.mobile = mobile;
+ this.sex = sex;
+ this.remark = remark;
+ this.openId = openId;
+ this.userToken = userToken;
+ this.dataSecurityVO = dataSecurityVO;
+ }
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "客户账号")
+ private String username;
+
+ @ApiModelProperty(value = "密码")
+ private String password;
+
+ @ApiModelProperty(value = "客户昵称")
+ private String nickName;
+
+ @ApiModelProperty(value = "客户邮箱")
+ private String email;
+
+ @ApiModelProperty(value = "客户端")
+ private String clientId;
+
+ @ApiModelProperty(value = "真实姓名")
+ private String realName;
+
+ @ApiModelProperty(value = "手机号码")
+ private String mobile;
+
+ @ApiModelProperty(value = "客户性别(0男 1女 2未知)")
+ private String sex;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "三方openId")
+ private String openId;
+
+ @ApiModelProperty(value = "客户令牌")
+ private String userToken;
+
+ @ApiModelProperty(value = "客户数据权限")
+ private DataSecurityVO dataSecurityVO;
+
+ @ApiModelProperty(value = "文件VO对象")
+ private List fileVOs;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DataSecurityVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DataSecurityVO.java
new file mode 100644
index 0000000..92063ff
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DataSecurityVO.java
@@ -0,0 +1,34 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @ClassName DataSecurity.java
+ * @Description TODO
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode
+public class DataSecurityVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "仅本人数据权限")
+ private Boolean youselfData;
+
+ @ApiModelProperty(value = "数据权限对应部门编号集合")
+ private List deptNos;
+
+ @Builder
+ public DataSecurityVO(Boolean youselfData, List deptNos) {
+ this.youselfData = youselfData;
+ this.deptNos = deptNos;
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptPostUserVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptPostUserVO.java
new file mode 100644
index 0000000..147297f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptPostUserVO.java
@@ -0,0 +1,43 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:部门岗位用户关联表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class DeptPostUserVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public DeptPostUserVO(Long id, String dataState, Long userId, String deptNo, String postNo,String companyNo) {
+ super(id, dataState);
+ this.userId = userId;
+ this.deptNo = deptNo;
+ this.postNo = postNo;
+ this.companyNo=companyNo;
+ }
+
+ @ApiModelProperty(value = "用户ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long userId;
+
+ @ApiModelProperty(value = "部门编号")
+ private String deptNo;
+
+ @ApiModelProperty(value = "岗位编码")
+ private String postNo;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptVO.java
new file mode 100644
index 0000000..a77f56f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptVO.java
@@ -0,0 +1,60 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:部门表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class DeptVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public DeptVO(Long id, String dataState, String parentDeptNo, String deptNo, String deptName, Integer sortNo, Long leaderId, String[] checkedDeptNos, Long roleId, String companyNo) {
+ super(id, dataState);
+ this.parentDeptNo = parentDeptNo;
+ this.deptNo = deptNo;
+ this.deptName = deptName;
+ this.sortNo = sortNo;
+ this.leaderId = leaderId;
+ this.checkedDeptNos = checkedDeptNos;
+ this.roleId = roleId;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "父部门编号")
+ private String parentDeptNo;
+
+ @ApiModelProperty(value = "部门编号")
+ private String deptNo;
+
+ @ApiModelProperty(value = "部门名称")
+ private String deptName;
+
+ @ApiModelProperty(value = "排序")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "负责人Id")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long leaderId;
+
+ @ApiModelProperty(value = "TREE结构:选中部门No")
+ private String[] checkedDeptNos;
+
+ @ApiModelProperty(value = "角色查询部门:部门对应角色id")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long roleId;
+
+ @ApiModelProperty(value = "部门No")
+ private String companyNo;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuMetaVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuMetaVO.java
new file mode 100644
index 0000000..be2acff
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuMetaVO.java
@@ -0,0 +1,31 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description:菜单meta属性
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class MenuMetaVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @ApiModelProperty(value = "标题")
+ private String title;
+
+ @ApiModelProperty(value = "图标")
+ private String icon;
+
+ @ApiModelProperty(value = "角色")
+ private List roles;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuVO.java
new file mode 100644
index 0000000..d4f09cc
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuVO.java
@@ -0,0 +1,45 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @description: 动态菜单VO对象
+ */
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@Builder
+public class MenuVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ // 设定路由的名字,一定要填写不然使用时会出现各种问题
+ @ApiModelProperty(value = "路由名字")
+ private String name;
+
+ @ApiModelProperty(value = "请求路径")
+ private String path;
+
+ @ApiModelProperty(value = "高亮子菜单")
+ private String redirect;
+
+ @ApiModelProperty(value = "模块跳转目标")
+ private String component;
+
+ // 当设置 true 的时候该路由不会在侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1
+ @ApiModelProperty(value = "是否显示")
+ private Boolean hidden;
+
+ @ApiModelProperty(value = "子菜单")
+ private List children;
+
+ @ApiModelProperty(value = "meta属性")
+ private MenuMetaVO meta;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/PostVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/PostVO.java
new file mode 100644
index 0000000..0c657cd
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/PostVO.java
@@ -0,0 +1,53 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:岗位表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class PostVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public PostVO(Long id, String dataState, String deptNo, String postNo, String postName, Integer sortNo, String remark, String companyNo, DeptVO deptVO) {
+ super(id, dataState);
+ this.deptNo = deptNo;
+ this.postNo = postNo;
+ this.postName = postName;
+ this.sortNo = sortNo;
+ this.remark = remark;
+ this.companyNo = companyNo;
+ this.deptVO = deptVO;
+ }
+
+ @ApiModelProperty(value = "部门编号")
+ private String deptNo;
+
+ @ApiModelProperty(value = "岗位编码:父部门编号+001【3位】")
+ private String postNo;
+
+ @ApiModelProperty(value = "岗位名称")
+ private String postName;
+
+ @ApiModelProperty(value = "显示顺序")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "职位对应部门")
+ private DeptVO deptVO;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/QueryDataSecurityVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/QueryDataSecurityVO.java
new file mode 100644
index 0000000..cd0d034
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/QueryDataSecurityVO.java
@@ -0,0 +1,27 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @ClassName QueryDataSecurityVo.java
+ * @Description 查询数据权限对象
+ */
+@Data
+@NoArgsConstructor
+public class QueryDataSecurityVO implements Serializable {
+
+ public List roleVOs;
+
+ public Long userId;
+
+ @Builder
+ public QueryDataSecurityVO(List roleVOs, Long userId) {
+ this.roleVOs = roleVOs;
+ this.userId = userId;
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/ResourceVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/ResourceVO.java
new file mode 100644
index 0000000..bee4704
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/ResourceVO.java
@@ -0,0 +1,73 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:权限表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class ResourceVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public ResourceVO(Long id, String dataState, String resourceNo, String parentResourceNo, String resourceName,
+ String resourceType, String requestPath, String label, Integer sortNo, String icon,
+ String remark, String[] checkedResourceNos, Long roleId) {
+ super(id, dataState);
+ this.resourceNo = resourceNo;
+ this.parentResourceNo = parentResourceNo;
+ this.resourceName = resourceName;
+ this.resourceType = resourceType;
+ this.requestPath = requestPath;
+ this.label = label;
+ this.sortNo = sortNo;
+ this.icon = icon;
+ this.remark = remark;
+ this.checkedResourceNos = checkedResourceNos;
+ this.roleId = roleId;
+ }
+
+ @ApiModelProperty(value = "资源编号")
+ private String resourceNo;
+
+ @ApiModelProperty(value = "父资源编号")
+ private String parentResourceNo;
+
+ @ApiModelProperty(value = "资源名称")
+ private String resourceName;
+
+ @ApiModelProperty(value = "资源类型:s平台 c目录 m菜单 r按钮")
+ private String resourceType;
+
+ @ApiModelProperty(value = "请求地址")
+ private String requestPath;
+
+ @ApiModelProperty(value = "权限标识")
+ private String label;
+
+ @ApiModelProperty(value = "排序")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "图标")
+ private String icon;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "TREE结构:选中资源编号")
+ private String[] checkedResourceNos;
+
+ @ApiModelProperty(value = "角色查询资源:资源对应角色id")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long roleId;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/RoleVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/RoleVO.java
new file mode 100644
index 0000000..bbf1f94
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/RoleVO.java
@@ -0,0 +1,63 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:角色表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class RoleVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public RoleVO(Long id, String dataState, String roleName, String label, Integer sortNo, String remark, String[] checkedResourceNos, String[] checkedDeptNos, Long userId, String dataScope, String companyNo) {
+ super(id, dataState);
+ this.roleName = roleName;
+ this.label = label;
+ this.sortNo = sortNo;
+ this.remark = remark;
+ this.checkedResourceNos = checkedResourceNos;
+ this.checkedDeptNos = checkedDeptNos;
+ this.userId = userId;
+ this.dataScope = dataScope;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "角色名称")
+ private String roleName;
+
+ @ApiModelProperty(value = "角色标识")
+ private String label;
+
+ @ApiModelProperty(value = "排序")
+ private Integer sortNo;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "TREE结构:选中资源No")
+ private String[] checkedResourceNos;
+
+ @ApiModelProperty(value = "TREE结构:选中部门No")
+ private String[] checkedDeptNos;
+
+ @ApiModelProperty(value = "人员查询部门:当前人员Id")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long userId;
+
+ @ApiModelProperty(value = "数据范围(0本人 1自定义)")
+ private String dataScope;
+
+ @ApiModelProperty(value = "企业No")
+ private String companyNo;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UserVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UserVO.java
new file mode 100644
index 0000000..2bb7684
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UserVO.java
@@ -0,0 +1,117 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.validation.Create;
+import com.itheima.sfbx.framework.commons.validation.Update;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import javax.validation.constraints.Max;
+import javax.validation.constraints.NotNull;
+import java.util.Set;
+
+/**
+ * @Description:用户表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class UserVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public UserVO(Long id, String dataState, String companyNo, String username, String password, String nickName, String email, String clientId, String realName, String mobile, String sex, String remark, String openId, Set roleVOIds, Set deptPostUserVOs, Set roleLabels, Set resourceRequestPaths, String userToken, DataSecurityVO dataSecurityVO, String deptNo, String postNo, Long roleId, Boolean onlyAuthenticate) {
+ super(id, dataState);
+ this.companyNo = companyNo;
+ this.username = username;
+ this.password = password;
+ this.nickName = nickName;
+ this.email = email;
+ this.clientId = clientId;
+ this.realName = realName;
+ this.mobile = mobile;
+ this.sex = sex;
+ this.remark = remark;
+ this.openId = openId;
+ this.roleVOIds = roleVOIds;
+ this.deptPostUserVOs = deptPostUserVOs;
+ this.roleLabels = roleLabels;
+ this.resourceRequestPaths = resourceRequestPaths;
+ this.userToken = userToken;
+ this.dataSecurityVO = dataSecurityVO;
+ this.deptNo = deptNo;
+ this.postNo = postNo;
+ this.roleId = roleId;
+ this.onlyAuthenticate = onlyAuthenticate;
+ }
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "用户账号")
+ private String username;
+
+ @ApiModelProperty(value = "密码")
+ private String password;
+
+ @ApiModelProperty(value = "用户昵称")
+ private String nickName;
+
+ @ApiModelProperty(value = "用户邮箱")
+ private String email;
+
+ @ApiModelProperty(value = "客户端")
+ private String clientId;
+
+ @ApiModelProperty(value = "真实姓名")
+ private String realName;
+
+ @ApiModelProperty(value = "手机号码")
+ private String mobile;
+
+ @ApiModelProperty(value = "用户性别(0男 1女 2未知)")
+ private String sex;
+
+ @ApiModelProperty(value = "备注")
+ private String remark;
+
+ @ApiModelProperty(value = "三方openId")
+ private String openId;
+
+ @ApiModelProperty(value = "查询用户:用户角色主键集合")
+ private Set roleVOIds;
+
+ @ApiModelProperty(value = "查询用户:所属部门职位")
+ private Set deptPostUserVOs;
+
+ @ApiModelProperty(value = "构建令牌:用户角色标识")
+ private Set roleLabels;
+
+ @ApiModelProperty(value = "构建令牌:用户权限路径")
+ private Set resourceRequestPaths;
+
+ @ApiModelProperty(value = "用户令牌")
+ private String userToken;
+
+ @ApiModelProperty(value = "数据权限")
+ private DataSecurityVO dataSecurityVO;
+
+ @ApiModelProperty(value = "部门编号【查询关联】")
+ private String deptNo;
+
+ @ApiModelProperty(value = "职位编号【查询关联】")
+ private String postNo;
+
+ @ApiModelProperty(value = "角色主键【查询关联】")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long roleId;
+
+ @ApiModelProperty(value = "只做请求认证,客户只需请求认证,员工除请求认证,还需访问授权")
+ private Boolean onlyAuthenticate ;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UsernameVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UsernameVO.java
new file mode 100644
index 0000000..45caee8
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UsernameVO.java
@@ -0,0 +1,50 @@
+package com.itheima.sfbx.framework.commons.dto.security;
+
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName LoginVo.java
+ * @Description 登录名称处理对象
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode
+public class UsernameVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public UsernameVO(String username, String clientId, String loginType, String loginBeanName,String companyNo) {
+ this.username = username;
+ this.clientId = clientId;
+ this.loginType = loginType;
+ this.loginBeanName = loginBeanName;
+ this.companyNo = companyNo;
+ }
+
+ //登录名称
+ private String username;
+
+ //客户端
+ private String clientId;
+
+ //登录类型
+ private String loginType;
+
+ //登录处理类bean名称
+ private String loginBeanName;
+
+ //企业编号
+ private String companyNo;
+
+ /**
+ * 用户姓名
+ */
+ private String realName;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/ProofVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/ProofVO.java
new file mode 100644
index 0000000..feab12d
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/ProofVO.java
@@ -0,0 +1,35 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName Proof.java
+ * @Description 证明文件对象
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode
+public class ProofVO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public ProofVO(String proofImage, String proofType) {
+ this.proofImage = proofImage;
+ this.proofType = proofType;
+ }
+
+ @ApiModelProperty(value = "签名对应的资质证明图片需先进行 base64编码格式转换")
+ private String proofImage;
+
+ @ApiModelProperty(value = "签名证明文件类型")
+ private String proofType;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SendMessageVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SendMessageVO.java
new file mode 100644
index 0000000..b3ff40f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SendMessageVO.java
@@ -0,0 +1,46 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.LinkedHashMap;
+import java.util.Set;
+
+/**
+ * @ClassName SendMessageVO.java
+ * @Description 短信发送Vo
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode
+public class SendMessageVO implements Serializable {
+
+ @ApiModelProperty(value = "模板编号")
+ String templateNo;
+
+ @ApiModelProperty(value = "签名编号")
+ String sginNo;
+
+ @ApiModelProperty(value = "均衡算法")
+ String loadBalancerType;
+
+ @ApiModelProperty(value = "手机号码组")
+ Set mobiles;
+
+ @ApiModelProperty(value = "模板参数")
+ LinkedHashMap templateParam;
+
+ @Builder
+ public SendMessageVO(String templateNo, String sginNo, String loadBalancerType, Set mobiles, LinkedHashMap templateParam) {
+ this.templateNo = templateNo;
+ this.sginNo = sginNo;
+ this.loadBalancerType = loadBalancerType;
+ this.mobiles = mobiles;
+ this.templateParam = templateParam;
+ }
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsBlacklistVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsBlacklistVO.java
new file mode 100644
index 0000000..934313b
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsBlacklistVO.java
@@ -0,0 +1,32 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:黑名单表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class SmsBlacklistVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public SmsBlacklistVO(Long id, String dataState, String mobile,String companyNo) {
+ super(id, dataState);
+ this.mobile = mobile;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "手机号码")
+ private String mobile;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsChannelVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsChannelVO.java
new file mode 100644
index 0000000..a96f13e
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsChannelVO.java
@@ -0,0 +1,76 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Description 短信渠道
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class SmsChannelVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public SmsChannelVO(Long id, String dataState, String channelName, String channelLabel, String channelType, String domain, String accessKeyId, String accessKeySecret, String otherConfig, String level, String remark, String[] checkedIds, String companyNo, List otherConfigs) {
+ super(id, dataState);
+ this.channelName = channelName;
+ this.channelLabel = channelLabel;
+ this.channelType = channelType;
+ this.domain = domain;
+ this.accessKeyId = accessKeyId;
+ this.accessKeySecret = accessKeySecret;
+ this.otherConfig = otherConfig;
+ this.level = level;
+ this.remark = remark;
+ this.checkedIds = checkedIds;
+ this.companyNo = companyNo;
+ this.otherConfigs = otherConfigs;
+ }
+
+ @ApiModelProperty(value = "通道名称")
+ private String channelName;
+
+ @ApiModelProperty(value = "通道唯一标记")
+ private String channelLabel;
+
+ @ApiModelProperty(value = "通道类型,1:文字,2:语音,3:推送")
+ private String channelType;
+
+ @ApiModelProperty(value = "域名")
+ private String domain;
+
+ @ApiModelProperty(value = "秘钥id")
+ private String accessKeyId;
+
+ @ApiModelProperty(value = "秘钥值")
+ private String accessKeySecret;
+
+ @ApiModelProperty(value = "其他配置")
+ private String otherConfig;
+
+ @ApiModelProperty(value = "优先级")
+ private String level;
+
+ @ApiModelProperty(value = "短信申请说明")
+ private String remark;
+
+ @ApiModelProperty(value = "选中节点")
+ private String[] checkedIds;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+ @ApiModelProperty(value = "扩展配置",dataType = "OtherConfigVO")
+ private List otherConfigs;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSendRecordVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSendRecordVO.java
new file mode 100644
index 0000000..effef17
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSendRecordVO.java
@@ -0,0 +1,95 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+/**
+ * @Description:发送记录表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class SmsSendRecordVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public SmsSendRecordVO(Long id, String dataState, String channelName, String channelLabel, Long templateId, String templateNo, String templateCode, String templateType, String signCode, String signName, String mobile, String sendContent, String sendStatus, String sendMsg, String acceptStatus, String acceptMsg, String serialNo, String templateParams, String companyNo) {
+ super(id, dataState);
+ this.channelName = channelName;
+ this.channelLabel = channelLabel;
+ this.templateId = templateId;
+ this.templateNo = templateNo;
+ this.templateCode = templateCode;
+ this.templateType = templateType;
+ this.signCode = signCode;
+ this.signName = signName;
+ this.mobile = mobile;
+ this.sendContent = sendContent;
+ this.sendStatus = sendStatus;
+ this.sendMsg = sendMsg;
+ this.acceptStatus = acceptStatus;
+ this.acceptMsg = acceptMsg;
+ this.serialNo = serialNo;
+ this.templateParams = templateParams;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "通道名称")
+ private String channelName;
+
+ @ApiModelProperty(value = "通道唯一标识")
+ private String channelLabel;
+
+ @ApiModelProperty(value = "模板表主键ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long templateId;
+
+ @ApiModelProperty(value = "应用模板编号:多通道编号相同则认为是一个模板多个通道公用")
+ private String templateNo;
+
+ @ApiModelProperty(value = "三方应用模板code")
+ private String templateCode;
+
+ @ApiModelProperty(value = "短信类型: 0、通知 1、营销")
+ private String templateType;
+
+ @ApiModelProperty(value = "三方签名code:发送短信可能用到")
+ private String signCode;
+
+ @ApiModelProperty(value = "签名名称")
+ private String signName;
+
+ @ApiModelProperty(value = "手机号码")
+ private String mobile;
+
+ @ApiModelProperty(value = "发生内容")
+ private String sendContent;
+
+ @ApiModelProperty(value = "发送状态")
+ private String sendStatus;
+
+ @ApiModelProperty(value = "发送返回信息")
+ private String sendMsg;
+
+ @ApiModelProperty(value = "是否受理成功")
+ private String acceptStatus;
+
+ @ApiModelProperty(value = "受理返回信息")
+ private String acceptMsg;
+
+ @ApiModelProperty(value = "发送流水")
+ private String serialNo;
+
+ @ApiModelProperty(value = "模板参数")
+ private String templateParams;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSignVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSignVO.java
new file mode 100644
index 0000000..dbd309f
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSignVO.java
@@ -0,0 +1,102 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.file.FileVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.LinkedList;
+
+/**
+ * @Description:
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class SmsSignVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public SmsSignVO(Long id, String dataState, String channelLabel, String signName, String signCode, String signType,
+ String documentType, String international, String signPurpose, String proofImage,
+ String proofType, String remark, String acceptStatus, String acceptMsg, String auditStatus,
+ String auditMsg, String signNo, LinkedList proofVos, LinkedList fileVOs,String companyNo) {
+ super(id, dataState);
+ this.channelLabel = channelLabel;
+ this.signName = signName;
+ this.signCode = signCode;
+ this.signType = signType;
+ this.documentType = documentType;
+ this.international = international;
+ this.signPurpose = signPurpose;
+ this.proofImage = proofImage;
+ this.proofType = proofType;
+ this.remark = remark;
+ this.acceptStatus = acceptStatus;
+ this.acceptMsg = acceptMsg;
+ this.auditStatus = auditStatus;
+ this.auditMsg = auditMsg;
+ this.signNo = signNo;
+ this.proofVos = proofVos;
+ this.fileVOs = fileVOs;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "通道唯一标识")
+ private String channelLabel;
+
+ @ApiModelProperty(value = "签名名称")
+ private String signName;
+
+ @ApiModelProperty(value = "三方签名code:发送短信需要用到")
+ private String signCode;
+
+ @ApiModelProperty(value = "签名类型")
+ private String signType;
+
+ @ApiModelProperty(value = "证明类型")
+ private String documentType;
+
+ @ApiModelProperty(value = "是否国际/港澳台短信")
+ private String international;
+
+ @ApiModelProperty(value = "签名用途: 0:自用。 1:他用。")
+ private String signPurpose;
+
+ @ApiModelProperty(value = "签名对应的资质证明图片需先进行 base64 编码格式转换")
+ private String proofImage;
+
+ @ApiModelProperty(value = "签名证明文件类型")
+ private String proofType;
+
+ @ApiModelProperty(value = "短信申请说明")
+ private String remark;
+
+ @ApiModelProperty(value = "是否受理成功")
+ private String acceptStatus;
+
+ @ApiModelProperty(value = "受理返回信息")
+ private String acceptMsg;
+
+ @ApiModelProperty(value = "审核状态")
+ private String auditStatus;
+
+ @ApiModelProperty(value = "审核信息")
+ private String auditMsg;
+
+ @ApiModelProperty(value = "应用签名编号:签名编号相同则认为是一个签名多个通道公用")
+ private String signNo;
+
+ @ApiModelProperty(value = "证明文件组",dataType = "ProofVo")
+ private LinkedList proofVos;
+
+ @ApiModelProperty(value = "附件信息",dataType = "AffixVo")
+ private LinkedList fileVOs;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsTemplateVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsTemplateVO.java
new file mode 100644
index 0000000..cda5d8d
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsTemplateVO.java
@@ -0,0 +1,90 @@
+package com.itheima.sfbx.framework.commons.dto.sms;
+
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * @Description:模板表
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class SmsTemplateVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public SmsTemplateVO(Long id, String dataState, String channelLabel, String templateName, String smsType,
+ String templateNo, String templateCode, String content, String otherConfig,
+ String international, String remark, String acceptStatus, String acceptMsg,
+ String auditStatus, String auditMsg, List otherConfigs,String companyNo) {
+ super(id, dataState);
+ this.channelLabel = channelLabel;
+ this.templateName = templateName;
+ this.smsType = smsType;
+ this.templateNo = templateNo;
+ this.templateCode = templateCode;
+ this.content = content;
+ this.otherConfig = otherConfig;
+ this.international = international;
+ this.remark = remark;
+ this.acceptStatus = acceptStatus;
+ this.acceptMsg = acceptMsg;
+ this.auditStatus = auditStatus;
+ this.auditMsg = auditMsg;
+ this.otherConfigs = otherConfigs;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "通道唯一标识")
+ private String channelLabel;
+
+ @ApiModelProperty(value = "魔板名称")
+ private String templateName;
+
+ @ApiModelProperty(value = "短信类型")
+ private String smsType;
+
+ @ApiModelProperty(value = "应用模板编号:多通道编号相同则认为是一个模板多个通道公用")
+ private String templateNo;
+
+ @ApiModelProperty(value = "三方应用模板code")
+ private String templateCode;
+
+ @ApiModelProperty(value = "模板内容")
+ private String content;
+
+ @ApiModelProperty(value = "变量配置")
+ private String otherConfig;
+
+ @ApiModelProperty(value = "是否国际/港澳台短信")
+ private String international;
+
+ @ApiModelProperty(value = "短信申请说明")
+ private String remark;
+
+ @ApiModelProperty(value = "是否受理成功")
+ private String acceptStatus;
+
+ @ApiModelProperty(value = "受理返回信息")
+ private String acceptMsg;
+
+ @ApiModelProperty(value = "审核状态")
+ private String auditStatus;
+
+ @ApiModelProperty(value = "审核信息")
+ private String auditMsg;
+
+ @ApiModelProperty(value = "变量配置",dataType = "OtherConfigVO")
+ private List otherConfigs;
+
+ @ApiModelProperty(value = "企业编号")
+ private String companyNo;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/AliPeriodicVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/AliPeriodicVO.java
new file mode 100644
index 0000000..cab9d79
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/AliPeriodicVO.java
@@ -0,0 +1,71 @@
+package com.itheima.sfbx.framework.commons.dto.trade;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * @ClassName AliAppPeriodic.java
+ * @Description 阿里APP周期扣款参数对象
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode
+public class AliPeriodicVO implements Serializable {
+
+ @Builder
+ public AliPeriodicVO(String agreementNo,String contractNo, String externalAgreementNo, String signScene, String signNotifyUrl, String rulePeriodType, String rulePeriod, String ruleExecuteTime, String ruleTotalAmount, String ruleSingleAmount, String ruleTotalPayments, String accessChannel) {
+ this.contractNo = contractNo;
+ this.externalAgreementNo = externalAgreementNo;
+ this.agreementNo = agreementNo;
+ this.signScene = signScene;
+ this.signNotifyUrl = signNotifyUrl;
+ this.rulePeriodType = rulePeriodType;
+ this.rulePeriod = rulePeriod;
+ this.ruleExecuteTime = ruleExecuteTime;
+ this.ruleTotalAmount = ruleTotalAmount;
+ this.ruleSingleAmount = ruleSingleAmount;
+ this.ruleTotalPayments = ruleTotalPayments;
+ this.accessChannel = accessChannel;
+ }
+
+ @ApiModelProperty(value = "签约扣款:合同号")
+ private String contractNo;
+
+ @ApiModelProperty(value = "签约扣款:商户签约号")
+ private String externalAgreementNo;
+
+ @ApiModelProperty(value = "支付宝签约号:关联支付")
+ private String agreementNo;
+
+ @ApiModelProperty(value = "签约扣款:扣款场景")
+ private String signScene;
+
+ @ApiModelProperty(value = "签约扣款:签约成功异步通知地址")
+ private String signNotifyUrl;
+
+ @ApiModelProperty(value = "签约扣款:周期类型")
+ private String rulePeriodType;
+
+ @ApiModelProperty(value = "签约扣款:周期数")
+ private String rulePeriod;
+
+ @ApiModelProperty(value = "签约扣款:下次扣款的时间")
+ private String ruleExecuteTime;
+
+ @ApiModelProperty(value = "签约扣款:扣款总金额")
+ private String ruleTotalAmount;
+
+ @ApiModelProperty(value = "签约扣款:单次扣款最大金额")
+ private String ruleSingleAmount;
+
+ @ApiModelProperty(value = "签约扣款:总扣款次数")
+ private String ruleTotalPayments;
+
+ @ApiModelProperty(value = "签约扣款:通道")
+ private String accessChannel;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/PayChannelVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/PayChannelVO.java
new file mode 100644
index 0000000..145cd4b
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/PayChannelVO.java
@@ -0,0 +1,79 @@
+package com.itheima.sfbx.framework.commons.dto.trade;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Objects;
+
+/**
+ * @ClassName PayChannelVO.java
+ * @Description 支付通道
+ */
+@Data
+@NoArgsConstructor
+public class PayChannelVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public PayChannelVO(Long id, String dataState, String channelName, String channelLabel, String domain, String appId, String publicKey, String merchantPrivateKey, String otherConfig, String encryptKey, String remark, List otherConfigs, String companyNo, String notifyUrl) {
+ super(id, dataState);
+ this.channelName = channelName;
+ this.channelLabel = channelLabel;
+ this.domain = domain;
+ this.appId = appId;
+ this.publicKey = publicKey;
+ this.merchantPrivateKey = merchantPrivateKey;
+ this.otherConfig = otherConfig;
+ this.encryptKey = encryptKey;
+ this.remark = remark;
+ this.otherConfigs = otherConfigs;
+ this.companyNo = companyNo;
+ this.notifyUrl = notifyUrl;
+ }
+
+ @ApiModelProperty(value = "通道名称")
+ private String channelName;
+
+ @ApiModelProperty(value = "通道唯一标记")
+ private String channelLabel;
+
+ @ApiModelProperty(value = "域名")
+ private String domain;
+
+ @ApiModelProperty(value = "商户appid")
+ private String appId;
+
+ @ApiModelProperty(value = "公钥")
+ private String publicKey;
+
+ @ApiModelProperty(value = "商户私钥")
+ private String merchantPrivateKey;
+
+ @ApiModelProperty(value = "其他配置")
+ private String otherConfig;
+
+ @ApiModelProperty(value = "AES混淆密钥")
+ private String encryptKey;
+
+ @ApiModelProperty(value = "说明")
+ private String remark;
+
+ @ApiModelProperty(value = "扩展配置",dataType = "OtherConfigVO")
+ private List otherConfigs;
+
+
+ @ApiModelProperty(value = "商户ID【系统内部识别使用】")
+ private String companyNo;
+
+ @ApiModelProperty(value = "回调地址")
+ private String notifyUrl;
+
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/RefundRecordVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/RefundRecordVO.java
new file mode 100644
index 0000000..270fb3c
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/RefundRecordVO.java
@@ -0,0 +1,70 @@
+package com.itheima.sfbx.framework.commons.dto.trade;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Objects;
+
+/**
+ * @Description:
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class RefundRecordVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public RefundRecordVO(Long id, String dataState, Long tradeOrderNo, Long productOrderNo, String refundNo, String tradeChannel, String refundStatus, String refundCode, String refundMsg, String memo, BigDecimal refundAmount, String companyNo) {
+ super(id, dataState);
+ this.tradeOrderNo = tradeOrderNo;
+ this.productOrderNo = productOrderNo;
+ this.refundNo = refundNo;
+ this.tradeChannel = tradeChannel;
+ this.refundStatus = refundStatus;
+ this.refundCode = refundCode;
+ this.refundMsg = refundMsg;
+ this.memo = memo;
+ this.refundAmount = refundAmount;
+ this.companyNo = companyNo;
+ }
+
+ @ApiModelProperty(value = "交易系统订单号【对于三方来说:商户订单】")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long tradeOrderNo;
+
+ @ApiModelProperty(value = "业务系统订单号")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long productOrderNo;
+
+ @ApiModelProperty(value = "本次退款订单号")
+ private String refundNo;
+
+ @ApiModelProperty(value = "退款渠道【支付宝、微信、现金】")
+ private String tradeChannel;
+
+ @ApiModelProperty(value = "退款状态【成功:SUCCESS,进行中:SENDING】")
+ private String refundStatus;
+
+ @ApiModelProperty(value = "返回编码")
+ private String refundCode;
+
+ @ApiModelProperty(value = "返回信息")
+ private String refundMsg;
+
+ @ApiModelProperty(value = "备注【订单门店,桌台信息】")
+ private String memo;
+
+ @ApiModelProperty(value = "本次退款金额")
+ private BigDecimal refundAmount;
+
+ @ApiModelProperty(value = "商户号")
+ private String companyNo;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/SignContractVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/SignContractVO.java
new file mode 100644
index 0000000..81375de
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/SignContractVO.java
@@ -0,0 +1,72 @@
+package com.itheima.sfbx.framework.commons.dto.trade;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+
+/**
+ * @ClassName SignContract.java
+ * @Description 签约合同
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value="SignContract对象", description="签约合同")
+public class SignContractVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public SignContractVO(String agreementNo, Long id, String dataState, String contractNo, String externalAgreementNo, String signState, String tradeChannel, String rulePeriodType, Long rulePeriod, BigDecimal ruleTotalAmount, BigDecimal ruleSingleAmount, Long ruleTotalPayments) {
+ super(id, dataState);
+ this.contractNo = contractNo;
+ this.externalAgreementNo = externalAgreementNo;
+ this.signState = signState;
+ this.tradeChannel = tradeChannel;
+ this.rulePeriodType = rulePeriodType;
+ this.rulePeriod = rulePeriod;
+ this.ruleTotalAmount = ruleTotalAmount;
+ this.ruleSingleAmount = ruleSingleAmount;
+ this.ruleTotalPayments = ruleTotalPayments;
+ this.agreementNo = agreementNo;
+ }
+
+ @ApiModelProperty(value = "合同编号:关联业务")
+ private String contractNo;
+
+ @ApiModelProperty(value = "商户签约号")
+ private String externalAgreementNo;
+
+ @ApiModelProperty(value = "支付宝签约号:关联支付")
+ private String agreementNo;
+
+ @ApiModelProperty(value = "签约状态:1. TEMP:暂存,协议未生效过;2. NORMAL:正常;3. STOP:暂停")
+ private String signState;
+
+ @ApiModelProperty(value = "支付渠道【支付宝、微信】")
+ private String tradeChannel;
+
+ @ApiModelProperty(value = "周期类型")
+ private String rulePeriodType;
+
+ @ApiModelProperty(value = "周期数")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long rulePeriod;
+
+ @ApiModelProperty(value = "总金额")
+ private BigDecimal ruleTotalAmount;
+
+ @ApiModelProperty(value = "总金额")
+ private BigDecimal ruleSingleAmount;
+
+ @ApiModelProperty(value = "扣款总次数")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long ruleTotalPayments;
+}
diff --git a/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/TradeVO.java b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/TradeVO.java
new file mode 100644
index 0000000..7e7ac57
--- /dev/null
+++ b/day01/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/TradeVO.java
@@ -0,0 +1,168 @@
+package com.itheima.sfbx.framework.commons.dto.trade;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.itheima.sfbx.framework.commons.dto.basic.BaseVO;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Builder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @ClassName TradeVO.java
+ * @Description 交易结果
+ */
+@Data
+@NoArgsConstructor
+@EqualsAndHashCode(callSuper = true)
+public class TradeVO extends BaseVO {
+
+ private static final long serialVersionUID = 1L;
+
+ @Builder
+ public TradeVO(Long id,String notifyUrl, String dataState, String openId, Long productOrderNo, Long tradeOrderNo, String tradeChannel,
+ String tradeState, String payeeName, Long payeeId, String payerName, Long payerId, BigDecimal tradeAmount,
+ BigDecimal refund, String isRefund, String resultCode, String resultMsg, String resultJson, String placeOrderCode,
+ String placeOrderMsg, String placeOrderJson, String memo, String qrCodeImageBase64, String outRequestNo,
+ BigDecimal operTionRefund, String authCode, String quitUrl, String returnUrl, String billType, Date billDate,
+ String billDownloadUrl, String companyNo) {
+ super(id, dataState);
+ this.openId = openId;
+ this.productOrderNo = productOrderNo;
+ this.tradeOrderNo = tradeOrderNo;
+ this.tradeChannel = tradeChannel;
+ this.tradeState = tradeState;
+ this.payeeName = payeeName;
+ this.payeeId = payeeId;
+ this.payerName = payerName;
+ this.payerId = payerId;
+ this.tradeAmount = tradeAmount;
+ this.refund = refund;
+ this.isRefund = isRefund;
+ this.resultCode = resultCode;
+ this.resultMsg = resultMsg;
+ this.resultJson = resultJson;
+ this.placeOrderCode = placeOrderCode;
+ this.placeOrderMsg = placeOrderMsg;
+ this.placeOrderJson = placeOrderJson;
+ this.memo = memo;
+ this.qrCodeImageBase64 = qrCodeImageBase64;
+ this.outRequestNo = outRequestNo;
+ this.operTionRefund = operTionRefund;
+ this.authCode = authCode;
+ this.quitUrl = quitUrl;
+ this.returnUrl = returnUrl;
+ this.notifyUrl=notifyUrl;
+ this.billType = billType;
+ this.billDate = billDate;
+ this.billDownloadUrl = billDownloadUrl;
+ this.companyNo = companyNo;
+
+ }
+
+ @ApiModelProperty(value = "openId标识")
+ private String openId;
+
+ @ApiModelProperty(value = "业务系统订单号")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long productOrderNo;
+
+ @ApiModelProperty(value = "交易系统订单号【对于三方来说:商户订单】")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long tradeOrderNo;
+
+ @ApiModelProperty(value = "支付渠道【支付宝、微信】")
+ private String tradeChannel;
+
+ @ApiModelProperty(value = "交易单状态0待付款 1已支付 2已关闭)")
+ private String tradeState;
+
+ @ApiModelProperty(value = "收款人姓名")
+ private String payeeName;
+
+ @ApiModelProperty(value = "收款人账户ID")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long payeeId;
+
+ @ApiModelProperty(value = "付款人姓名")
+ private String payerName;
+
+ @ApiModelProperty(value = "付款人Id")
+ @JsonFormat(shape = JsonFormat.Shape.STRING)
+ private Long payerId;
+
+ @ApiModelProperty(value = "交易金额")
+ private BigDecimal tradeAmount;
+
+ @ApiModelProperty(value = "退款总金额")
+ private BigDecimal refund;
+
+ @ApiModelProperty(value = "是否有退款:0,1")
+ private String isRefund;
+
+ @ApiModelProperty(value = "第三方交易返回编码【最终确认交易结果】")
+ private String resultCode;
+
+ @ApiModelProperty(value = "第三方交易返回提示消息【最终确认交易信息】")
+ private String resultMsg;
+
+ @ApiModelProperty(value = "第三方交易返回信息json【分析交易最终信息】")
+ private String resultJson;
+
+ @ApiModelProperty(value = "统一下单返回编码")
+ private String placeOrderCode;
+
+ @ApiModelProperty(value = "统一下单返回信息")
+ private String placeOrderMsg;
+
+ @ApiModelProperty(value = "统一下单返回信息json【用于生产二维码、Android ios唤醒支付等】")
+ private String placeOrderJson;
+
+ @ApiModelProperty(value = "备注【订单门店,桌台信息】")
+ private String memo;
+
+ @ApiModelProperty(value = "二维码base64")
+ private String qrCodeImageBase64;
+
+ @ApiModelProperty(value = "退款请求号")
+ private String outRequestNo;
+
+ @ApiModelProperty(value = "本次退款金额")
+ private BigDecimal operTionRefund;
+
+ @ApiModelProperty(value = "支付授权码")
+ private String authCode;
+
+ @ApiModelProperty(value = "支付宝:HTTP/HTTPS开头字符串")
+ private String quitUrl;
+
+ @ApiModelProperty(value = "支付宝:用户付款中途退出返回商户网站的地址")
+ private String returnUrl;
+
+ @ApiModelProperty(value = "支付宝:异步通知地址")
+ private String notifyUrl;
+
+ @ApiModelProperty(value = "账单类型,商户通过接口或商户经开放平台授权后其所属服务商通过接口可以获取以下账单类型")
+ private String billType;
+
+ @ApiModelProperty(value = "账单时间:日账单格式为yyyy-MM-dd,最早可下载2016年1月1日开始的日账单。不支持下载当日账单,只能下载前一日24点前的账单数据(T+1)")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//get
+ protected Date billDate;
+
+ @ApiModelProperty(value = "账单地址")
+ private String billDownloadUrl;
+
+ @ApiModelProperty(value = "商户ID【系统内部识别使用】")
+ private String companyNo;
+
+ @ApiModelProperty(value = "退款记录")
+ private List