Browse Source

初始化

linxk 1 month ago
commit
3991eb66e5
100 changed files with 13596 additions and 0 deletions
  1. 30 0
      .gitignore
  2. 45 0
      README.md
  3. 78 0
      cif-api/pom.xml
  4. 228 0
      cif-api/src/main/java/com/medipath/cif/dto/AccountDTO.java
  5. 185 0
      cif-api/src/main/java/com/medipath/cif/dto/AccountFlowDTO.java
  6. 186 0
      cif-api/src/main/java/com/medipath/cif/dto/AccountFreezdDTO.java
  7. 290 0
      cif-api/src/main/java/com/medipath/cif/dto/BannerDTO.java
  8. 186 0
      cif-api/src/main/java/com/medipath/cif/dto/DayCutDTO.java
  9. 249 0
      cif-api/src/main/java/com/medipath/cif/dto/FlowDTO.java
  10. 291 0
      cif-api/src/main/java/com/medipath/cif/dto/GoodsDTO.java
  11. 384 0
      cif-api/src/main/java/com/medipath/cif/dto/HospitalDTO.java
  12. 395 0
      cif-api/src/main/java/com/medipath/cif/dto/MenuDTO.java
  13. 290 0
      cif-api/src/main/java/com/medipath/cif/dto/OperatorDTO.java
  14. 333 0
      cif-api/src/main/java/com/medipath/cif/dto/OrderDTO.java
  15. 207 0
      cif-api/src/main/java/com/medipath/cif/dto/OrgContractDTO.java
  16. 100 0
      cif-api/src/main/java/com/medipath/cif/dto/OrgDTO.java
  17. 79 0
      cif-api/src/main/java/com/medipath/cif/dto/OrgHospitalDTO.java
  18. 207 0
      cif-api/src/main/java/com/medipath/cif/dto/OrgUserDTO.java
  19. 105 0
      cif-api/src/main/java/com/medipath/cif/dto/Result.java
  20. 164 0
      cif-api/src/main/java/com/medipath/cif/dto/SalesmanDTO.java
  21. 249 0
      cif-api/src/main/java/com/medipath/cif/dto/SettleDTO.java
  22. 164 0
      cif-api/src/main/java/com/medipath/cif/dto/SettleInventoryDTO.java
  23. 122 0
      cif-api/src/main/java/com/medipath/cif/dto/SettlePlanDTO.java
  24. 163 0
      cif-api/src/main/java/com/medipath/cif/dto/SubjectDTO.java
  25. 206 0
      cif-api/src/main/java/com/medipath/cif/dto/SysMessageDTO.java
  26. 100 0
      cif-api/src/main/java/com/medipath/cif/dto/SysMessageTemplateDTO.java
  27. 144 0
      cif-api/src/main/java/com/medipath/cif/dto/UserDTO.java
  28. 143 0
      cif-api/src/main/java/com/medipath/cif/dto/UserFriendDTO.java
  29. 122 0
      cif-api/src/main/java/com/medipath/cif/dto/UserFriendDeleteRecordDTO.java
  30. 143 0
      cif-api/src/main/java/com/medipath/cif/dto/UserFriendRequestDTO.java
  31. 248 0
      cif-api/src/main/java/com/medipath/cif/dto/UserGroupDTO.java
  32. 185 0
      cif-api/src/main/java/com/medipath/cif/dto/UserGroupMemberDTO.java
  33. 101 0
      cif-api/src/main/java/com/medipath/cif/dto/UserIntroductoryDTO.java
  34. 143 0
      cif-api/src/main/java/com/medipath/cif/dto/UserLogDTO.java
  35. 143 0
      cif-api/src/main/java/com/medipath/cif/dto/UserOperatorDTO.java
  36. 143 0
      cif-api/src/main/java/com/medipath/cif/dto/UserSignatureDTO.java
  37. 206 0
      cif-api/src/main/java/com/medipath/cif/dto/WxMchDTO.java
  38. 60 0
      cif-api/src/main/java/com/medipath/cif/enums/BizTypeEnum.java
  39. 64 0
      cif-api/src/main/java/com/medipath/cif/param/CommissionParam.java
  40. 64 0
      cif-api/src/main/java/com/medipath/cif/param/FeeParam.java
  41. 64 0
      cif-api/src/main/java/com/medipath/cif/param/FreezdParam.java
  42. 44 0
      cif-api/src/main/java/com/medipath/cif/param/MessageParam.java
  43. 64 0
      cif-api/src/main/java/com/medipath/cif/param/RechargeParam.java
  44. 64 0
      cif-api/src/main/java/com/medipath/cif/param/TransParam.java
  45. 42 0
      cif-api/src/main/java/com/medipath/cif/param/UnFreezdAndTransParam.java
  46. 64 0
      cif-api/src/main/java/com/medipath/cif/param/WithdrawParam.java
  47. 73 0
      cif-api/src/main/java/com/medipath/cif/service/AccountDubboService.java
  48. 11 0
      cif-api/src/main/java/com/medipath/cif/service/OrgDubboService.java
  49. 32 0
      cif-api/src/main/java/com/medipath/cif/service/SettleDubboService.java
  50. 30 0
      cif-api/src/main/java/com/medipath/cif/service/UserDubboService.java
  51. 293 0
      cif-service/pom.xml
  52. 62 0
      cif-service/src/main/java/com/medipath/cif/CifApplication.java
  53. 42 0
      cif-service/src/main/java/com/medipath/cif/configurer/ConcurrentThreadGlobalConfig.java
  54. 28 0
      cif-service/src/main/java/com/medipath/cif/configurer/CorsFilter.java
  55. 44 0
      cif-service/src/main/java/com/medipath/cif/configurer/IpConfiguration.java
  56. 49 0
      cif-service/src/main/java/com/medipath/cif/configurer/LocalConfig.java
  57. 59 0
      cif-service/src/main/java/com/medipath/cif/configurer/LocalUtil.java
  58. 24 0
      cif-service/src/main/java/com/medipath/cif/configurer/MinioConfig.java
  59. 289 0
      cif-service/src/main/java/com/medipath/cif/configurer/MyWebMvcConfigurer.java
  60. 50 0
      cif-service/src/main/java/com/medipath/cif/configurer/MybatisConfigurer.java
  61. 74 0
      cif-service/src/main/java/com/medipath/cif/configurer/Parameters.java
  62. 20 0
      cif-service/src/main/java/com/medipath/cif/configurer/ProjectConstant.java
  63. 21 0
      cif-service/src/main/java/com/medipath/cif/configurer/RibbonWeightedResponseTimeRuleConfig.java
  64. 8 0
      cif-service/src/main/java/com/medipath/cif/configurer/SensitiveWord.java
  65. 64 0
      cif-service/src/main/java/com/medipath/cif/configurer/SwaggerConfig.java
  66. 116 0
      cif-service/src/main/java/com/medipath/cif/configurer/WebLogAspect.java
  67. 84 0
      cif-service/src/main/java/com/medipath/cif/configurer/WxMpProperties.java
  68. 76 0
      cif-service/src/main/java/com/medipath/cif/configurer/XxlJobConfig.java
  69. 1217 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayApi.java
  70. 257 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayApiConfig.java
  71. 127 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayApiConfigKit.java
  72. 103 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayCore.java
  73. 55 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayProperties.java
  74. 745 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/MyAlipaySignature.java
  75. 404 0
      cif-service/src/main/java/com/medipath/cif/configurer/alipay/MyAntCertificationUtil.java
  76. 32 0
      cif-service/src/main/java/com/medipath/cif/configurer/interceptor/CorsInterceptor.java
  77. 49 0
      cif-service/src/main/java/com/medipath/cif/configurer/springbootshutdown/GracefulShutdownUndertow.java
  78. 29 0
      cif-service/src/main/java/com/medipath/cif/configurer/springbootshutdown/GracefulShutdownUndertowWrapper.java
  79. 27 0
      cif-service/src/main/java/com/medipath/cif/configurer/springbootshutdown/UndertowExtraConfiguration.java
  80. 58 0
      cif-service/src/main/java/com/medipath/cif/constants/MyConstants.java
  81. 11 0
      cif-service/src/main/java/com/medipath/cif/constants/RedisConstants.java
  82. 14 0
      cif-service/src/main/java/com/medipath/cif/constants/WeChatFileTypeConstants.java
  83. 17 0
      cif-service/src/main/java/com/medipath/cif/core/AbstractApiController.java
  84. 93 0
      cif-service/src/main/java/com/medipath/cif/core/AbstractService.java
  85. 106 0
      cif-service/src/main/java/com/medipath/cif/core/AuthService.java
  86. 52 0
      cif-service/src/main/java/com/medipath/cif/core/Const.java
  87. 19 0
      cif-service/src/main/java/com/medipath/cif/core/Mapper.java
  88. 47 0
      cif-service/src/main/java/com/medipath/cif/core/MessageTemplteType.java
  89. 119 0
      cif-service/src/main/java/com/medipath/cif/core/MultipleHiLoPerTableGenerator.java
  90. 595 0
      cif-service/src/main/java/com/medipath/cif/core/RedisUtil.java
  91. 106 0
      cif-service/src/main/java/com/medipath/cif/core/ResultCode.java
  92. 49 0
      cif-service/src/main/java/com/medipath/cif/core/ResultGenerator.java
  93. 53 0
      cif-service/src/main/java/com/medipath/cif/core/ServerConfig.java
  94. 24 0
      cif-service/src/main/java/com/medipath/cif/core/Service.java
  95. 29 0
      cif-service/src/main/java/com/medipath/cif/core/ServiceException.java
  96. 57 0
      cif-service/src/main/java/com/medipath/cif/core/SmsTempletType.java
  97. 34 0
      cif-service/src/main/java/com/medipath/cif/core/cache/CacheKey.java
  98. 104 0
      cif-service/src/main/java/com/medipath/cif/core/cache/CacheType.java
  99. 35 0
      cif-service/src/main/java/com/medipath/cif/core/cache/lock/AbstractDistributedLock.java
  100. 93 0
      cif-service/src/main/java/com/medipath/cif/core/cache/lock/DistributedLock.java

+ 30 - 0
.gitignore

@@ -0,0 +1,30 @@
+/target/
+!.mvn/wrapper/maven-wrapper.jar
+
+### STS ###
+.apt_generated
+.classpath
+.factorypath
+.project
+.settings
+.springBeans
+.sts4-cache
+
+### IntelliJ IDEA ###
+.idea
+*.iws
+*.iml
+*.ipr
+
+### NetBeans ###
+/nbproject/private/
+/nbbuild/
+/dist/
+/nbdist/
+/.nb-gradle/
+/build/
+target/
+/cif-service/src/main/resources/spy.properties
+
+### MAC垃圾文件
+/**/.DS_Store

+ 45 - 0
README.md

@@ -0,0 +1,45 @@
+![Licence](https://img.shields.io/badge/licence-none-green.svg)
+[![GitHub Release](https://img.shields.io/github/release/lihengming/spring-boot-api-project-seed.svg)](https://github.com/lihengming/spring-boot-api-project-seed/releases)
+## 简介
+Spring Boot API Project Seed 是一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目,该种子项目已经有过多个真实项目的实践,稳定、简单、快速,使我们摆脱那些重复劳动,专注于业务代码的编写,减少加班。下面是一个简单的使用演示,看如何基于本项目在短短几十秒钟内实现一套简单的API,并运行提供服务。
+
+[![请选择超清](https://raw.githubusercontent.com/lihengming/java-codes/master/shared-resources/github-images/project-example-youku.png)](http://v.youku.com/v_show/id_XMjg1NjYwNDgxNg==.html?spm=a2h3j.8428770.3416059.1)
+## 特征&提供
+- 最佳实践的项目结构、配置文件、精简的POM([查看项目结构图](https://github.com/lihengming/java-codes/blob/master/shared-resources/github-images/project-struct.png))
+- 统一响应结果封装及生成工具
+- 统一异常处理
+- 简单的接口签名认证
+- 常用基础方法抽象封装
+- 使用Druid Spring Boot Starter 集成Druid数据库连接池与监控
+- 使用FastJsonHttpMessageConverter,提高JSON序列化速度
+- 集成MyBatis、通用Mapper插件、PageHelper分页插件,实现单表业务零SQL
+- 提供代码生成器根据表名生成对应的Model、Mapper、MapperXML、Service、ServiceImpl、Controller等基础代码,其中Controller模板默认提供POST和RESTful两套,根据需求在```CodeGenerator.genController(tableName)```方法中自己选择,默认使用POST模板。代码模板可根据实际项目的需求来扩展,由于每个公司业务都不太一样,所以只提供了一些比较基础、通用的模板,主要是提供一个思路来减少重复代码的编写,我在实际项目的使用中,其实根据公司业务的抽象编写了大量的模板。另外,使用模板也有助于保持团队代码风格的统一
+- 另有彩蛋,待你探索
+## 快速开始
+1. 克隆项目
+2. 对```test```包内的代码生成器```CodeGenerator```进行配置,主要是JDBC,因为要根据表名来生成代码
+3. 如果只是想根据上面的演示来亲自试试的话可以使用```test resources```目录下的```demo-user.sql```,否则忽略该步
+3. 输入表名,运行```CodeGenerator.main()```方法,生成基础代码(可能需要刷新项目目录才会出来)
+4. 根据业务在基础代码上进行扩展
+5. 对开发环境配置文件```application-dev.properties```进行配置,启动项目,Have Fun!
+## 开发建议
+- 表名,建议使用小写,多个单词使用下划线拼接
+- Model内成员变量建议与表字段数量对应,如需扩展成员变量(比如连表查询)建议创建DTO,否则需在扩展的成员变量上加```@Transient```注解,详情见[通用Mapper插件文档说明](https://mapperhelper.github.io/docs/2.use/)
+- 建议业务失败直接使用```ServiceException("message")```抛出,由统一异常处理器来封装业务失败的响应结果,比如```throw new ServiceException("该手机号已被注册")```,会直接被封装为```{"code":400,"message":"该手机号已被注册"}```返回,无需自己处理,尽情抛出
+- 需要工具类的话建议先从```apache-commons-*```和```guava```中找,实在没有再造轮子或引入类库,尽量精简项目
+- 开发规范建议遵循阿里巴巴Java开发手册([最新版下载](https://github.com/lihengming/java-codes/blob/master/shared-resources/%E9%98%BF%E9%87%8C%E5%B7%B4%E5%B7%B4Java%E5%BC%80%E5%8F%91%E6%89%8B%E5%86%8CV1.2.0.pdf))
+- 建议在公司内部使用[ShowDoc](https://github.com/star7th/showdoc)、[SpringFox-Swagger2](https://github.com/springfox/springfox) 、[RAP](https://github.com/thx/RAP)等开源项目来编写、管理API文档
+## 技术选型&文档
+- Spring Boot([查看Spring Boot学习&使用指南](http://www.jianshu.com/p/1a9fd8936bd8))
+- MyBatis([查看官方中文文档](http://www.mybatis.org/mybatis-3/zh/index.html))
+- MyBatisb通用Mapper插件([查看官方中文文档](https://mapperhelper.github.io/docs/))
+- MyBatis PageHelper分页插件([查看官方中文文档](https://pagehelper.github.io/))
+- Druid Spring Boot Starter([查看官方中文文档](https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter/))
+- Fastjson([查看官方中文文档](https://github.com/Alibaba/fastjson/wiki/%E9%A6%96%E9%A1%B5))
+- 其他略
+1
+## License
+无,纯粹开源分享,感谢大家 [Star](https://github.com/lihengming/spring-boot-api-project-seed/stargazers) & [Fork](https://github.com/lihengming/spring-boot-api-project-seed/network/members) 的支持。

+ 78 - 0
cif-api/pom.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>cif</artifactId>
+        <groupId>com.medipath</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>cif-api</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+
+    <properties>
+        <java.version>1.8</java.version>
+        <weixin.version>4.2.0</weixin.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.10</version>
+            <scope>provided</scope>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>com.alibaba</groupId>-->
+<!--            <artifactId>fastjson</artifactId>-->
+<!--            <version>1.2.69</version>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>cn.hutool</groupId>-->
+<!--            <artifactId>hutool-all</artifactId>-->
+<!--            <version>RELEASE</version>-->
+<!--            <scope>compile</scope>-->
+<!--        </dependency>-->
+<!--        <dependency>-->
+<!--            <groupId>com.github.pagehelper</groupId>-->
+<!--            <artifactId>pagehelper</artifactId>-->
+<!--            <version>5.1.2</version>-->
+<!--            <scope>compile</scope>-->
+<!--        </dependency>-->
+
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.5.1</version>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <!-- 要将源码放上去,需要加入这个插件 -->
+            <plugin>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>3.2.0</version>
+                <configuration>
+                    <attach>true</attach>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 228 - 0
cif-api/src/main/java/com/medipath/cif/dto/AccountDTO.java

@@ -0,0 +1,228 @@
+/*
+*
+* AccountDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-04
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class AccountDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 类型 1外部账户 2内部账户 3手续费账户 4营销账户
+     */
+    private Integer type;
+
+    /**
+     * 余额
+     */
+    private BigDecimal balance;
+
+    /**
+     * 冻结金额
+     */
+    private BigDecimal freezeAmount;
+
+    /**
+     * 上日余额
+     */
+    private BigDecimal beforeDayBalance;
+
+    /**
+     * 上日余额更新时间
+     */
+    private Date beforeDayTime;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_account
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 备注
+     * @return remark 备注
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * 备注
+     * @param remark 备注
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 类型 1外部账户 2内部账户 3手续费账户 4营销账户
+     * @return type 类型 1外部账户 2内部账户 3手续费账户 4营销账户
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1外部账户 2内部账户 3手续费账户 4营销账户
+     * @param type 类型 1外部账户 2内部账户 3手续费账户 4营销账户
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 余额
+     * @return balance 余额
+     */
+    public BigDecimal getBalance() {
+        return balance;
+    }
+
+    /**
+     * 余额
+     * @param balance 余额
+     */
+    public void setBalance(BigDecimal balance) {
+        this.balance = balance;
+    }
+
+    /**
+     * 冻结金额
+     * @return freeze_amount 冻结金额
+     */
+    public BigDecimal getFreezeAmount() {
+        return freezeAmount;
+    }
+
+    /**
+     * 冻结金额
+     * @param freezeAmount 冻结金额
+     */
+    public void setFreezeAmount(BigDecimal freezeAmount) {
+        this.freezeAmount = freezeAmount;
+    }
+
+    /**
+     * 上日余额
+     * @return before_day_balance 上日余额
+     */
+    public BigDecimal getBeforeDayBalance() {
+        return beforeDayBalance;
+    }
+
+    /**
+     * 上日余额
+     * @param beforeDayBalance 上日余额
+     */
+    public void setBeforeDayBalance(BigDecimal beforeDayBalance) {
+        this.beforeDayBalance = beforeDayBalance;
+    }
+
+    /**
+     * 上日余额更新时间
+     * @return before_day_time 上日余额更新时间
+     */
+    public Date getBeforeDayTime() {
+        return beforeDayTime;
+    }
+
+    /**
+     * 上日余额更新时间
+     * @param beforeDayTime 上日余额更新时间
+     */
+    public void setBeforeDayTime(Date beforeDayTime) {
+        this.beforeDayTime = beforeDayTime;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 185 - 0
cif-api/src/main/java/com/medipath/cif/dto/AccountFlowDTO.java

@@ -0,0 +1,185 @@
+/*
+*
+* AccountFlowDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-04
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class AccountFlowDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 流水号
+     */
+    private Long flowId;
+
+    /**
+     * 病理号
+     */
+    private String caseNo;
+
+    /**
+     * 账号
+     */
+    private Long accountId;
+
+    /**
+     * 类型 1出金 2入金
+     */
+    private Integer type;
+
+    /**
+     * 业务类型 1充值 2远程诊断 3提现
+     */
+    private Integer bizType;
+
+    /**
+     * 账号名称
+     */
+    private String accountName;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * c_account_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 流水号
+     * @return flow_id 流水号
+     */
+    public Long getFlowId() {
+        return flowId;
+    }
+
+    /**
+     * 流水号
+     * @param flowId 流水号
+     */
+    public void setFlowId(Long flowId) {
+        this.flowId = flowId;
+    }
+
+    /**
+     * 病理号
+     * @return case_no 病理号
+     */
+    public String getCaseNo() {
+        return caseNo;
+    }
+
+    /**
+     * 病理号
+     * @param caseNo 病理号
+     */
+    public void setCaseNo(String caseNo) {
+        this.caseNo = caseNo;
+    }
+
+    /**
+     * 账号
+     * @return account_id 账号
+     */
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    /**
+     * 账号
+     * @param accountId 账号
+     */
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    /**
+     * 类型 1出金 2入金
+     * @return type 类型 1出金 2入金
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1出金 2入金
+     * @param type 类型 1出金 2入金
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 业务类型 1充值 2远程诊断 3提现
+     * @return biz_type 业务类型 1充值 2远程诊断 3提现
+     */
+    public Integer getBizType() {
+        return bizType;
+    }
+
+    /**
+     * 业务类型 1充值 2远程诊断 3提现
+     * @param bizType 业务类型 1充值 2远程诊断 3提现
+     */
+    public void setBizType(Integer bizType) {
+        this.bizType = bizType;
+    }
+
+    /**
+     * 账号名称
+     * @return account_name 账号名称
+     */
+    public String getAccountName() {
+        return accountName;
+    }
+
+    /**
+     * 账号名称
+     * @param accountName 账号名称
+     */
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 186 - 0
cif-api/src/main/java/com/medipath/cif/dto/AccountFreezdDTO.java

@@ -0,0 +1,186 @@
+/*
+*
+* AccountFreezdDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-19
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class AccountFreezdDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 账户id
+     */
+    private Long accountId;
+
+    /**
+     * 流水号
+     */
+    private Long flowId;
+
+    /**
+     * 冻结金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 解冻金额
+     */
+    private BigDecimal unfreezeAmount;
+
+    /**
+     * 状态 1冻结中 2部分冻结 3已解冻
+     */
+    private Integer status;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_account_freezd
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 账户id
+     * @return account_id 账户id
+     */
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    /**
+     * 账户id
+     * @param accountId 账户id
+     */
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    /**
+     * 流水号
+     * @return flow_id 流水号
+     */
+    public Long getFlowId() {
+        return flowId;
+    }
+
+    /**
+     * 流水号
+     * @param flowId 流水号
+     */
+    public void setFlowId(Long flowId) {
+        this.flowId = flowId;
+    }
+
+    /**
+     * 冻结金额
+     * @return amount 冻结金额
+     */
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    /**
+     * 冻结金额
+     * @param amount 冻结金额
+     */
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+    /**
+     * 解冻金额
+     * @return unfreeze_amount 解冻金额
+     */
+    public BigDecimal getUnfreezeAmount() {
+        return unfreezeAmount;
+    }
+
+    /**
+     * 解冻金额
+     * @param unfreezeAmount 解冻金额
+     */
+    public void setUnfreezeAmount(BigDecimal unfreezeAmount) {
+        this.unfreezeAmount = unfreezeAmount;
+    }
+
+    /**
+     * 状态 1冻结中 2部分冻结 3已解冻
+     * @return status 状态 1冻结中 2部分冻结 3已解冻
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1冻结中 2部分冻结 3已解冻
+     * @param status 状态 1冻结中 2部分冻结 3已解冻
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 290 - 0
cif-api/src/main/java/com/medipath/cif/dto/BannerDTO.java

@@ -0,0 +1,290 @@
+/*
+*
+* BannerDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class BannerDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 应用编号
+     */
+    private String appCode;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
+    private String url;
+
+    /**
+     * 链接地址
+     */
+    private String linkUrl;
+
+    /**
+     * 链接类型 1外链 2内链
+     */
+    private Integer linkType;
+
+    /**
+     * 业务类型 1梦想庄园公众号banner
+     */
+    private Integer bizType;
+
+    /**
+     * 状态 1正常 2禁用
+     */
+    private Integer status;
+
+    /**
+     * 排序
+     */
+    private Integer seq;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 创建人
+     */
+    private String createName;
+
+    /**
+     * 更新人
+     */
+    private String updateName;
+
+    /**
+     * c_banner
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 应用编号
+     * @return app_code 应用编号
+     */
+    public String getAppCode() {
+        return appCode;
+    }
+
+    /**
+     * 应用编号
+     * @param appCode 应用编号
+     */
+    public void setAppCode(String appCode) {
+        this.appCode = appCode;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 地址
+     * @return url 地址
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * 地址
+     * @param url 地址
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    /**
+     * 链接地址
+     * @return link_url 链接地址
+     */
+    public String getLinkUrl() {
+        return linkUrl;
+    }
+
+    /**
+     * 链接地址
+     * @param linkUrl 链接地址
+     */
+    public void setLinkUrl(String linkUrl) {
+        this.linkUrl = linkUrl;
+    }
+
+    /**
+     * 链接类型 1外链 2内链
+     * @return link_type 链接类型 1外链 2内链
+     */
+    public Integer getLinkType() {
+        return linkType;
+    }
+
+    /**
+     * 链接类型 1外链 2内链
+     * @param linkType 链接类型 1外链 2内链
+     */
+    public void setLinkType(Integer linkType) {
+        this.linkType = linkType;
+    }
+
+    /**
+     * 业务类型 1梦想庄园公众号banner
+     * @return biz_type 业务类型 1梦想庄园公众号banner
+     */
+    public Integer getBizType() {
+        return bizType;
+    }
+
+    /**
+     * 业务类型 1梦想庄园公众号banner
+     * @param bizType 业务类型 1梦想庄园公众号banner
+     */
+    public void setBizType(Integer bizType) {
+        this.bizType = bizType;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @return status 状态 1正常 2禁用
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @param status 状态 1正常 2禁用
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 排序
+     * @return seq 排序
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * 排序
+     * @param seq 排序
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * 创建人
+     * @return create_name 创建人
+     */
+    public String getCreateName() {
+        return createName;
+    }
+
+    /**
+     * 创建人
+     * @param createName 创建人
+     */
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+
+    /**
+     * 更新人
+     * @return update_name 更新人
+     */
+    public String getUpdateName() {
+        return updateName;
+    }
+
+    /**
+     * 更新人
+     * @param updateName 更新人
+     */
+    public void setUpdateName(String updateName) {
+        this.updateName = updateName;
+    }
+}

+ 186 - 0
cif-api/src/main/java/com/medipath/cif/dto/DayCutDTO.java

@@ -0,0 +1,186 @@
+/*
+*
+* DayCutDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-12-13
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class DayCutDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 科目id
+     */
+    private Integer subjectId;
+
+    /**
+     * 日期
+     */
+    private Date day;
+
+    /**
+     * 期初余额
+     */
+    private BigDecimal initAmount;
+
+    /**
+     * 借方发生额
+     */
+    private BigDecimal debitAmount;
+
+    /**
+     * 贷方发生额
+     */
+    private BigDecimal creditAmount;
+
+    /**
+     * 期末余额
+     */
+    private BigDecimal endAmount;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * c_day_cut
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 科目id
+     * @return subject_id 科目id
+     */
+    public Integer getSubjectId() {
+        return subjectId;
+    }
+
+    /**
+     * 科目id
+     * @param subjectId 科目id
+     */
+    public void setSubjectId(Integer subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    /**
+     * 日期
+     * @return day 日期
+     */
+    public Date getDay() {
+        return day;
+    }
+
+    /**
+     * 日期
+     * @param day 日期
+     */
+    public void setDay(Date day) {
+        this.day = day;
+    }
+
+    /**
+     * 期初余额
+     * @return init_amount 期初余额
+     */
+    public BigDecimal getInitAmount() {
+        return initAmount;
+    }
+
+    /**
+     * 期初余额
+     * @param initAmount 期初余额
+     */
+    public void setInitAmount(BigDecimal initAmount) {
+        this.initAmount = initAmount;
+    }
+
+    /**
+     * 借方发生额
+     * @return debit_amount 借方发生额
+     */
+    public BigDecimal getDebitAmount() {
+        return debitAmount;
+    }
+
+    /**
+     * 借方发生额
+     * @param debitAmount 借方发生额
+     */
+    public void setDebitAmount(BigDecimal debitAmount) {
+        this.debitAmount = debitAmount;
+    }
+
+    /**
+     * 贷方发生额
+     * @return credit_amount 贷方发生额
+     */
+    public BigDecimal getCreditAmount() {
+        return creditAmount;
+    }
+
+    /**
+     * 贷方发生额
+     * @param creditAmount 贷方发生额
+     */
+    public void setCreditAmount(BigDecimal creditAmount) {
+        this.creditAmount = creditAmount;
+    }
+
+    /**
+     * 期末余额
+     * @return end_amount 期末余额
+     */
+    public BigDecimal getEndAmount() {
+        return endAmount;
+    }
+
+    /**
+     * 期末余额
+     * @param endAmount 期末余额
+     */
+    public void setEndAmount(BigDecimal endAmount) {
+        this.endAmount = endAmount;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 249 - 0
cif-api/src/main/java/com/medipath/cif/dto/FlowDTO.java

@@ -0,0 +1,249 @@
+/*
+*
+* FlowDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class FlowDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 业务编号
+     */
+    private String bizNo;
+
+    /**
+     * 诊断号
+     */
+    private String diagnosisNo;
+
+    /**
+     * 入金账户
+     */
+    private Long inAccount;
+
+    /**
+     * 出金账户
+     */
+    private Long outAccount;
+
+    /**
+     * 类型 1充值 2转账 3提现 4冻结
+     */
+    private Integer type;
+
+    /**
+     * 金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 业务类型 
+     */
+    private Integer bizType;
+
+    /**
+     * 状态 1诊断 
+     */
+    private Integer status;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * c_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 业务编号
+     * @return biz_no 业务编号
+     */
+    public String getBizNo() {
+        return bizNo;
+    }
+
+    /**
+     * 业务编号
+     * @param bizNo 业务编号
+     */
+    public void setBizNo(String bizNo) {
+        this.bizNo = bizNo;
+    }
+
+    /**
+     * 诊断号
+     * @return diagnosis_no 诊断号
+     */
+    public String getDiagnosisNo() {
+        return diagnosisNo;
+    }
+
+    /**
+     * 诊断号
+     * @param diagnosisNo 诊断号
+     */
+    public void setDiagnosisNo(String diagnosisNo) {
+        this.diagnosisNo = diagnosisNo;
+    }
+
+    /**
+     * 入金账户
+     * @return in_account 入金账户
+     */
+    public Long getInAccount() {
+        return inAccount;
+    }
+
+    /**
+     * 入金账户
+     * @param inAccount 入金账户
+     */
+    public void setInAccount(Long inAccount) {
+        this.inAccount = inAccount;
+    }
+
+    /**
+     * 出金账户
+     * @return out_account 出金账户
+     */
+    public Long getOutAccount() {
+        return outAccount;
+    }
+
+    /**
+     * 出金账户
+     * @param outAccount 出金账户
+     */
+    public void setOutAccount(Long outAccount) {
+        this.outAccount = outAccount;
+    }
+
+    /**
+     * 类型 1充值 2转账 3提现 4冻结
+     * @return type 类型 1充值 2转账 3提现 4冻结
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1充值 2转账 3提现 4冻结
+     * @param type 类型 1充值 2转账 3提现 4冻结
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 金额
+     * @return amount 金额
+     */
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    /**
+     * 金额
+     * @param amount 金额
+     */
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+    /**
+     * 业务类型 
+     * @return biz_type 业务类型 
+     */
+    public Integer getBizType() {
+        return bizType;
+    }
+
+    /**
+     * 业务类型 
+     * @param bizType 业务类型 
+     */
+    public void setBizType(Integer bizType) {
+        this.bizType = bizType;
+    }
+
+    /**
+     * 状态 1诊断 
+     * @return status 状态 1诊断 
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1诊断 
+     * @param status 状态 1诊断 
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 291 - 0
cif-api/src/main/java/com/medipath/cif/dto/GoodsDTO.java

@@ -0,0 +1,291 @@
+/*
+*
+* GoodsDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2023-03-18
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class GoodsDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 商品名称
+     */
+    private String name;
+
+    /**
+     * 均价说明
+     */
+    private String intro;
+
+    /**
+     * 小图
+     */
+    private String pic;
+
+    /**
+     * 大图
+     */
+    private String bigPic;
+
+    /**
+     * 详情页地址列表 
+     */
+    private String detailPic;
+
+    /**
+     * 备注
+     */
+    private String memo;
+
+    /**
+     * 状态 0未启用 1正常 2停用
+     */
+    private Byte status;
+
+    /**
+     * 定价
+     */
+    private BigDecimal amount;
+
+    /**
+     * 折扣价
+     */
+    private BigDecimal discountAmount;
+
+    /**
+     * 
+     */
+    private Integer sortNum;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * c_goods
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 商品名称
+     * @return name 商品名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 商品名称
+     * @param name 商品名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 均价说明
+     * @return intro 均价说明
+     */
+    public String getIntro() {
+        return intro;
+    }
+
+    /**
+     * 均价说明
+     * @param intro 均价说明
+     */
+    public void setIntro(String intro) {
+        this.intro = intro;
+    }
+
+    /**
+     * 小图
+     * @return pic 小图
+     */
+    public String getPic() {
+        return pic;
+    }
+
+    /**
+     * 小图
+     * @param pic 小图
+     */
+    public void setPic(String pic) {
+        this.pic = pic;
+    }
+
+    /**
+     * 大图
+     * @return big_pic 大图
+     */
+    public String getBigPic() {
+        return bigPic;
+    }
+
+    /**
+     * 大图
+     * @param bigPic 大图
+     */
+    public void setBigPic(String bigPic) {
+        this.bigPic = bigPic;
+    }
+
+    /**
+     * 详情页地址列表 
+     * @return detail_pic 详情页地址列表 
+     */
+    public String getDetailPic() {
+        return detailPic;
+    }
+
+    /**
+     * 详情页地址列表 
+     * @param detailPic 详情页地址列表 
+     */
+    public void setDetailPic(String detailPic) {
+        this.detailPic = detailPic;
+    }
+
+    /**
+     * 备注
+     * @return memo 备注
+     */
+    public String getMemo() {
+        return memo;
+    }
+
+    /**
+     * 备注
+     * @param memo 备注
+     */
+    public void setMemo(String memo) {
+        this.memo = memo;
+    }
+
+    /**
+     * 状态 0未启用 1正常 2停用
+     * @return status 状态 0未启用 1正常 2停用
+     */
+    public Byte getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 0未启用 1正常 2停用
+     * @param status 状态 0未启用 1正常 2停用
+     */
+    public void setStatus(Byte status) {
+        this.status = status;
+    }
+
+    /**
+     * 定价
+     * @return amount 定价
+     */
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    /**
+     * 定价
+     * @param amount 定价
+     */
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+    /**
+     * 折扣价
+     * @return discount_amount 折扣价
+     */
+    public BigDecimal getDiscountAmount() {
+        return discountAmount;
+    }
+
+    /**
+     * 折扣价
+     * @param discountAmount 折扣价
+     */
+    public void setDiscountAmount(BigDecimal discountAmount) {
+        this.discountAmount = discountAmount;
+    }
+
+    /**
+     * 
+     * @return sort_num 
+     */
+    public Integer getSortNum() {
+        return sortNum;
+    }
+
+    /**
+     * 
+     * @param sortNum 
+     */
+    public void setSortNum(Integer sortNum) {
+        this.sortNum = sortNum;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 384 - 0
cif-api/src/main/java/com/medipath/cif/dto/HospitalDTO.java

@@ -0,0 +1,384 @@
+/*
+*
+* HospitalDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-11
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class HospitalDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 管理账号用户id(关联登录账号,结算账户)
+     */
+    private Long userId;
+
+    private String deviceId;
+
+    /**
+     * 结算方案id
+     */
+    private Long settlePlanId;
+
+    /**
+     * 医院名称
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 图标
+     */
+    private String icon;
+
+    /**
+     * 状态 1正常 2禁用
+     */
+    private Integer status;
+
+    /**
+     * 类型 1区域中心 2省级中心 3会诊医院
+     */
+    private Integer type;
+
+    /**
+     * 分类 多个分类 使用 , 分割
+     */
+    private String sysTypes;
+
+    /**
+     * 区域码
+     */
+    private String areaCode;
+
+    /**
+     * 省地区码
+     */
+    private String provinceCode;
+
+    /**
+     * 城市地区码
+     */
+    private String cityCode;
+
+    /**
+     * 公告
+     */
+    private String notice;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 简介
+     */
+    private String introductory;
+
+    /**
+     * 科室简介
+     */
+    private String officeIntro;
+
+    /**
+     * c_hospital
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 管理账号用户id(关联登录账号,结算账户)
+     * @return user_id 管理账号用户id(关联登录账号,结算账户)
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 管理账号用户id(关联登录账号,结算账户)
+     * @param userId 管理账号用户id(关联登录账号,结算账户)
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 结算方案id
+     * @return settle_plan_id 结算方案id
+     */
+    public Long getSettlePlanId() {
+        return settlePlanId;
+    }
+
+    /**
+     * 结算方案id
+     * @param settlePlanId 结算方案id
+     */
+    public void setSettlePlanId(Long settlePlanId) {
+        this.settlePlanId = settlePlanId;
+    }
+
+    /**
+     * 医院名称
+     * @return name 医院名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 医院名称
+     * @param name 医院名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 地址
+     * @return address 地址
+     */
+    public String getAddress() {
+        return address;
+    }
+
+    /**
+     * 地址
+     * @param address 地址
+     */
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    /**
+     * 图标
+     * @return icon 图标
+     */
+    public String getIcon() {
+        return icon;
+    }
+
+    /**
+     * 图标
+     * @param icon 图标
+     */
+    public void setIcon(String icon) {
+        this.icon = icon;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @return status 状态 1正常 2禁用
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @param status 状态 1正常 2禁用
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 类型 1区域中心 2省级中心 3会诊医院
+     * @return type 类型 1区域中心 2省级中心 3会诊医院
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1区域中心 2省级中心 3会诊医院
+     * @param type 类型 1区域中心 2省级中心 3会诊医院
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 分类 多个分类 使用 , 分割
+     * @return sys_types 分类 多个分类 使用 , 分割
+     */
+    public String getSysTypes() {
+        return sysTypes;
+    }
+
+    /**
+     * 分类 多个分类 使用 , 分割
+     * @param sysTypes 分类 多个分类 使用 , 分割
+     */
+    public void setSysTypes(String sysTypes) {
+        this.sysTypes = sysTypes;
+    }
+
+    /**
+     * 区域码
+     * @return area_code 区域码
+     */
+    public String getAreaCode() {
+        return areaCode;
+    }
+
+    /**
+     * 区域码
+     * @param areaCode 区域码
+     */
+    public void setAreaCode(String areaCode) {
+        this.areaCode = areaCode;
+    }
+
+    /**
+     * 省地区码
+     * @return province_code 省地区码
+     */
+    public String getProvinceCode() {
+        return provinceCode;
+    }
+
+    /**
+     * 省地区码
+     * @param provinceCode 省地区码
+     */
+    public void setProvinceCode(String provinceCode) {
+        this.provinceCode = provinceCode;
+    }
+
+    /**
+     * 城市地区码
+     * @return city_code 城市地区码
+     */
+    public String getCityCode() {
+        return cityCode;
+    }
+
+    /**
+     * 城市地区码
+     * @param cityCode 城市地区码
+     */
+    public void setCityCode(String cityCode) {
+        this.cityCode = cityCode;
+    }
+
+    /**
+     * 公告
+     * @return notice 公告
+     */
+    public String getNotice() {
+        return notice;
+    }
+
+    /**
+     * 公告
+     * @param notice 公告
+     */
+    public void setNotice(String notice) {
+        this.notice = notice;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * 简介
+     * @return introductory 简介
+     */
+    public String getIntroductory() {
+        return introductory;
+    }
+
+    /**
+     * 简介
+     * @param introductory 简介
+     */
+    public void setIntroductory(String introductory) {
+        this.introductory = introductory;
+    }
+
+    /**
+     * 科室简介
+     * @return office_intro 科室简介
+     */
+    public String getOfficeIntro() {
+        return officeIntro;
+    }
+
+    /**
+     * 科室简介
+     * @param officeIntro 科室简介
+     */
+    public void setOfficeIntro(String officeIntro) {
+        this.officeIntro = officeIntro;
+    }
+
+    public String getDeviceId() {
+        return deviceId;
+    }
+
+    public void setDeviceId(String deviceId) {
+        this.deviceId = deviceId;
+    }
+}

+ 395 - 0
cif-api/src/main/java/com/medipath/cif/dto/MenuDTO.java

@@ -0,0 +1,395 @@
+/*
+*
+* MenuDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2023-01-05
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class MenuDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 应用编码
+     */
+    private String appCode;
+
+    /**
+     * 来源类型 1应用编码 2组织id 3医院id
+     */
+    private Integer sourceType;
+
+    /**
+     * 来源id
+     */
+    private Long sourceId;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 英文名
+     */
+    private String eName;
+
+    /**
+     * logo图
+     */
+    private String logo;
+
+    /**
+     * 类型 1菜单2叶子菜单
+     */
+    private String type;
+
+    /**
+     * 是否允许点击 1无子菜单 2有子菜单
+     */
+    private String isAction;
+
+    /**
+     * 状态 1正常 2禁用
+     */
+    private Integer status;
+
+    /**
+     * 跳转地址
+     */
+    private String url;
+
+    /**
+     * 前端排版
+     */
+    private String composingKey;
+
+    /**
+     * 排序
+     */
+    private Integer seq;
+
+    /**
+     * 上级菜单
+     */
+    private String parentId;
+
+    /**
+     * 创建人
+     */
+    private String createUserId;
+
+    /**
+     * 更新人
+     */
+    private String updateUserId;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_menu
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 应用编码
+     * @return app_code 应用编码
+     */
+    public String getAppCode() {
+        return appCode;
+    }
+
+    /**
+     * 应用编码
+     * @param appCode 应用编码
+     */
+    public void setAppCode(String appCode) {
+        this.appCode = appCode;
+    }
+
+    /**
+     * 来源类型 1应用编码 2组织id 3医院id
+     * @return source_type 来源类型 1应用编码 2组织id 3医院id
+     */
+    public Integer getSourceType() {
+        return sourceType;
+    }
+
+    /**
+     * 来源类型 1应用编码 2组织id 3医院id
+     * @param sourceType 来源类型 1应用编码 2组织id 3医院id
+     */
+    public void setSourceType(Integer sourceType) {
+        this.sourceType = sourceType;
+    }
+
+    /**
+     * 来源id
+     * @return source_id 来源id
+     */
+    public Long getSourceId() {
+        return sourceId;
+    }
+
+    /**
+     * 来源id
+     * @param sourceId 来源id
+     */
+    public void setSourceId(Long sourceId) {
+        this.sourceId = sourceId;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 英文名
+     * @return e_name 英文名
+     */
+    public String geteName() {
+        return eName;
+    }
+
+    /**
+     * 英文名
+     * @param eName 英文名
+     */
+    public void seteName(String eName) {
+        this.eName = eName;
+    }
+
+    /**
+     * logo图
+     * @return logo logo图
+     */
+    public String getLogo() {
+        return logo;
+    }
+
+    /**
+     * logo图
+     * @param logo logo图
+     */
+    public void setLogo(String logo) {
+        this.logo = logo;
+    }
+
+    /**
+     * 类型 1菜单2叶子菜单
+     * @return type 类型 1菜单2叶子菜单
+     */
+    public String getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1菜单2叶子菜单
+     * @param type 类型 1菜单2叶子菜单
+     */
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    /**
+     * 是否允许点击 1无子菜单 2有子菜单
+     * @return is_action 是否允许点击 1无子菜单 2有子菜单
+     */
+    public String getIsAction() {
+        return isAction;
+    }
+
+    /**
+     * 是否允许点击 1无子菜单 2有子菜单
+     * @param isAction 是否允许点击 1无子菜单 2有子菜单
+     */
+    public void setIsAction(String isAction) {
+        this.isAction = isAction;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @return status 状态 1正常 2禁用
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @param status 状态 1正常 2禁用
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 跳转地址
+     * @return url 跳转地址
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * 跳转地址
+     * @param url 跳转地址
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    /**
+     * 前端排版
+     * @return composing_key 前端排版
+     */
+    public String getComposingKey() {
+        return composingKey;
+    }
+
+    /**
+     * 前端排版
+     * @param composingKey 前端排版
+     */
+    public void setComposingKey(String composingKey) {
+        this.composingKey = composingKey;
+    }
+
+    /**
+     * 排序
+     * @return seq 排序
+     */
+    public Integer getSeq() {
+        return seq;
+    }
+
+    /**
+     * 排序
+     * @param seq 排序
+     */
+    public void setSeq(Integer seq) {
+        this.seq = seq;
+    }
+
+    /**
+     * 上级菜单
+     * @return parent_id 上级菜单
+     */
+    public String getParentId() {
+        return parentId;
+    }
+
+    /**
+     * 上级菜单
+     * @param parentId 上级菜单
+     */
+    public void setParentId(String parentId) {
+        this.parentId = parentId;
+    }
+
+    /**
+     * 创建人
+     * @return create_user_id 创建人
+     */
+    public String getCreateUserId() {
+        return createUserId;
+    }
+
+    /**
+     * 创建人
+     * @param createUserId 创建人
+     */
+    public void setCreateUserId(String createUserId) {
+        this.createUserId = createUserId;
+    }
+
+    /**
+     * 更新人
+     * @return update_user_id 更新人
+     */
+    public String getUpdateUserId() {
+        return updateUserId;
+    }
+
+    /**
+     * 更新人
+     * @param updateUserId 更新人
+     */
+    public void setUpdateUserId(String updateUserId) {
+        this.updateUserId = updateUserId;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 290 - 0
cif-api/src/main/java/com/medipath/cif/dto/OperatorDTO.java

@@ -0,0 +1,290 @@
+/*
+*
+* OperatorDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class OperatorDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 支持登录类型 1,账号登录 2,手机登录 3,邮箱登录 4,微信公众号登录 
+     */
+    private Integer loginType;
+
+    /**
+     * 状态 1正常 2禁用
+     */
+    private Integer status;
+
+    /**
+     * 微信的unionId
+     */
+    private String unionId;
+
+    /**
+     * 登录账号
+     */
+    private String loginAccount;
+
+    /**
+     * 登录密码
+     */
+    private String loginPassword;
+
+    /**
+     * 盐
+     */
+    private String salt;
+
+    /**
+     * 最后登录时间
+     */
+    private Date lastLoginTime;
+
+    /**
+     * 最后登陆token
+     */
+    private String lastToken;
+
+    /**
+     * 创建人
+     */
+    private String createUser;
+
+    /**
+     * 更新人
+     */
+    private String updateUser;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_operator
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 支持登录类型 1,账号登录 2,手机登录 3,邮箱登录 4,微信公众号登录 
+     * @return login_type 支持登录类型 1,账号登录 2,手机登录 3,邮箱登录 4,微信公众号登录 
+     */
+    public Integer getLoginType() {
+        return loginType;
+    }
+
+    /**
+     * 支持登录类型 1,账号登录 2,手机登录 3,邮箱登录 4,微信公众号登录 
+     * @param loginType 支持登录类型 1,账号登录 2,手机登录 3,邮箱登录 4,微信公众号登录 
+     */
+    public void setLoginType(Integer loginType) {
+        this.loginType = loginType;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @return status 状态 1正常 2禁用
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @param status 状态 1正常 2禁用
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 微信的unionId
+     * @return union_id 微信的unionId
+     */
+    public String getUnionId() {
+        return unionId;
+    }
+
+    /**
+     * 微信的unionId
+     * @param unionId 微信的unionId
+     */
+    public void setUnionId(String unionId) {
+        this.unionId = unionId;
+    }
+
+    /**
+     * 登录账号
+     * @return login_account 登录账号
+     */
+    public String getLoginAccount() {
+        return loginAccount;
+    }
+
+    /**
+     * 登录账号
+     * @param loginAccount 登录账号
+     */
+    public void setLoginAccount(String loginAccount) {
+        this.loginAccount = loginAccount;
+    }
+
+    /**
+     * 登录密码
+     * @return login_password 登录密码
+     */
+    public String getLoginPassword() {
+        return loginPassword;
+    }
+
+    /**
+     * 登录密码
+     * @param loginPassword 登录密码
+     */
+    public void setLoginPassword(String loginPassword) {
+        this.loginPassword = loginPassword;
+    }
+
+    /**
+     * 盐
+     * @return salt 盐
+     */
+    public String getSalt() {
+        return salt;
+    }
+
+    /**
+     * 盐
+     * @param salt 盐
+     */
+    public void setSalt(String salt) {
+        this.salt = salt;
+    }
+
+    /**
+     * 最后登录时间
+     * @return last_login_time 最后登录时间
+     */
+    public Date getLastLoginTime() {
+        return lastLoginTime;
+    }
+
+    /**
+     * 最后登录时间
+     * @param lastLoginTime 最后登录时间
+     */
+    public void setLastLoginTime(Date lastLoginTime) {
+        this.lastLoginTime = lastLoginTime;
+    }
+
+    /**
+     * 最后登陆token
+     * @return last_token 最后登陆token
+     */
+    public String getLastToken() {
+        return lastToken;
+    }
+
+    /**
+     * 最后登陆token
+     * @param lastToken 最后登陆token
+     */
+    public void setLastToken(String lastToken) {
+        this.lastToken = lastToken;
+    }
+
+    /**
+     * 创建人
+     * @return create_user 创建人
+     */
+    public String getCreateUser() {
+        return createUser;
+    }
+
+    /**
+     * 创建人
+     * @param createUser 创建人
+     */
+    public void setCreateUser(String createUser) {
+        this.createUser = createUser;
+    }
+
+    /**
+     * 更新人
+     * @return update_user 更新人
+     */
+    public String getUpdateUser() {
+        return updateUser;
+    }
+
+    /**
+     * 更新人
+     * @param updateUser 更新人
+     */
+    public void setUpdateUser(String updateUser) {
+        this.updateUser = updateUser;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 333 - 0
cif-api/src/main/java/com/medipath/cif/dto/OrderDTO.java

@@ -0,0 +1,333 @@
+/*
+*
+* OrderDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2023-03-18
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class OrderDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 流水号
+     */
+    private String flowNo;
+
+    /**
+     * 应用编号
+     */
+    private String appCode;
+
+    /**
+     * 微信的appId
+     */
+    private String outAppId;
+
+    /**
+     * 商户号id
+     */
+    private String mchId;
+
+    /**
+     * 商品id 
+     */
+    private Integer goodsId;
+
+    /**
+     * 商品名称
+     */
+    private String goodsName;
+
+    /**
+     * 支付方式 1微信 2支付宝
+     */
+    private Byte payType;
+
+    /**
+     * 状态 0待支付 1已支付 2支付失败  3用户已支付,待确认  4已退款 5部分退款 
+     */
+    private Byte status;
+
+    /**
+     * 交易金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 已退款金额
+     */
+    private BigDecimal refundAmount;
+
+    /**
+     * 付款时间
+     */
+    private Date payTime;
+
+    /**
+     * 查询次数
+     */
+    private Integer queryNum;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * c_order
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 流水号
+     * @return flow_no 流水号
+     */
+    public String getFlowNo() {
+        return flowNo;
+    }
+
+    /**
+     * 流水号
+     * @param flowNo 流水号
+     */
+    public void setFlowNo(String flowNo) {
+        this.flowNo = flowNo;
+    }
+
+    /**
+     * 应用编号
+     * @return app_code 应用编号
+     */
+    public String getAppCode() {
+        return appCode;
+    }
+
+    /**
+     * 应用编号
+     * @param appCode 应用编号
+     */
+    public void setAppCode(String appCode) {
+        this.appCode = appCode;
+    }
+
+    /**
+     * 微信的appId
+     * @return out_app_id 微信的appId
+     */
+    public String getOutAppId() {
+        return outAppId;
+    }
+
+    /**
+     * 微信的appId
+     * @param outAppId 微信的appId
+     */
+    public void setOutAppId(String outAppId) {
+        this.outAppId = outAppId;
+    }
+
+    /**
+     * 商户号id
+     * @return mch_id 商户号id
+     */
+    public String getMchId() {
+        return mchId;
+    }
+
+    /**
+     * 商户号id
+     * @param mchId 商户号id
+     */
+    public void setMchId(String mchId) {
+        this.mchId = mchId;
+    }
+
+    /**
+     * 商品id 
+     * @return goods_id 商品id 
+     */
+    public Integer getGoodsId() {
+        return goodsId;
+    }
+
+    /**
+     * 商品id 
+     * @param goodsId 商品id 
+     */
+    public void setGoodsId(Integer goodsId) {
+        this.goodsId = goodsId;
+    }
+
+    /**
+     * 商品名称
+     * @return goods_name 商品名称
+     */
+    public String getGoodsName() {
+        return goodsName;
+    }
+
+    /**
+     * 商品名称
+     * @param goodsName 商品名称
+     */
+    public void setGoodsName(String goodsName) {
+        this.goodsName = goodsName;
+    }
+
+    /**
+     * 支付方式 1微信 2支付宝
+     * @return pay_type 支付方式 1微信 2支付宝
+     */
+    public Byte getPayType() {
+        return payType;
+    }
+
+    /**
+     * 支付方式 1微信 2支付宝
+     * @param payType 支付方式 1微信 2支付宝
+     */
+    public void setPayType(Byte payType) {
+        this.payType = payType;
+    }
+
+    /**
+     * 状态 0待支付 1已支付 2支付失败  3用户已支付,待确认  4已退款 5部分退款 
+     * @return status 状态 0待支付 1已支付 2支付失败  3用户已支付,待确认  4已退款 5部分退款 
+     */
+    public Byte getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 0待支付 1已支付 2支付失败  3用户已支付,待确认  4已退款 5部分退款 
+     * @param status 状态 0待支付 1已支付 2支付失败  3用户已支付,待确认  4已退款 5部分退款 
+     */
+    public void setStatus(Byte status) {
+        this.status = status;
+    }
+
+    /**
+     * 交易金额
+     * @return amount 交易金额
+     */
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    /**
+     * 交易金额
+     * @param amount 交易金额
+     */
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+
+    /**
+     * 已退款金额
+     * @return refund_amount 已退款金额
+     */
+    public BigDecimal getRefundAmount() {
+        return refundAmount;
+    }
+
+    /**
+     * 已退款金额
+     * @param refundAmount 已退款金额
+     */
+    public void setRefundAmount(BigDecimal refundAmount) {
+        this.refundAmount = refundAmount;
+    }
+
+    /**
+     * 付款时间
+     * @return pay_time 付款时间
+     */
+    public Date getPayTime() {
+        return payTime;
+    }
+
+    /**
+     * 付款时间
+     * @param payTime 付款时间
+     */
+    public void setPayTime(Date payTime) {
+        this.payTime = payTime;
+    }
+
+    /**
+     * 查询次数
+     * @return query_num 查询次数
+     */
+    public Integer getQueryNum() {
+        return queryNum;
+    }
+
+    /**
+     * 查询次数
+     * @param queryNum 查询次数
+     */
+    public void setQueryNum(Integer queryNum) {
+        this.queryNum = queryNum;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 207 - 0
cif-api/src/main/java/com/medipath/cif/dto/OrgContractDTO.java

@@ -0,0 +1,207 @@
+/*
+*
+* OrgContractDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-04
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class OrgContractDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 发起端组织id
+     */
+    private Long sponsorOrgId;
+
+    /**
+     * 接收端组织id
+     */
+    private Long receivingOrgId;
+
+    /**
+     * 状态 1正常 2解约
+     */
+    private Integer status;
+
+    /**
+     * 合同到期时间
+     */
+    private Date endTime;
+
+    /**
+     * 结算类型 1平台结算  2组织结算
+     */
+    private Integer settleType;
+
+    /**
+     * 结算固定值/笔
+     */
+    private BigDecimal settleFixed;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_org_contract
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 发起端组织id
+     * @return sponsor_org_id 发起端组织id
+     */
+    public Long getSponsorOrgId() {
+        return sponsorOrgId;
+    }
+
+    /**
+     * 发起端组织id
+     * @param sponsorOrgId 发起端组织id
+     */
+    public void setSponsorOrgId(Long sponsorOrgId) {
+        this.sponsorOrgId = sponsorOrgId;
+    }
+
+    /**
+     * 接收端组织id
+     * @return receiving_org_id 接收端组织id
+     */
+    public Long getReceivingOrgId() {
+        return receivingOrgId;
+    }
+
+    /**
+     * 接收端组织id
+     * @param receivingOrgId 接收端组织id
+     */
+    public void setReceivingOrgId(Long receivingOrgId) {
+        this.receivingOrgId = receivingOrgId;
+    }
+
+    /**
+     * 状态 1正常 2解约
+     * @return status 状态 1正常 2解约
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2解约
+     * @param status 状态 1正常 2解约
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 合同到期时间
+     * @return end_time 合同到期时间
+     */
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * 合同到期时间
+     * @param endTime 合同到期时间
+     */
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * 结算类型 1平台结算  2组织结算
+     * @return settle_type 结算类型 1平台结算  2组织结算
+     */
+    public Integer getSettleType() {
+        return settleType;
+    }
+
+    /**
+     * 结算类型 1平台结算  2组织结算
+     * @param settleType 结算类型 1平台结算  2组织结算
+     */
+    public void setSettleType(Integer settleType) {
+        this.settleType = settleType;
+    }
+
+    /**
+     * 结算固定值/笔
+     * @return settle_fixed 结算固定值/笔
+     */
+    public BigDecimal getSettleFixed() {
+        return settleFixed;
+    }
+
+    /**
+     * 结算固定值/笔
+     * @param settleFixed 结算固定值/笔
+     */
+    public void setSettleFixed(BigDecimal settleFixed) {
+        this.settleFixed = settleFixed;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 100 - 0
cif-api/src/main/java/com/medipath/cif/dto/OrgDTO.java

@@ -0,0 +1,100 @@
+/*
+*
+* OrgDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+public class OrgDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    private Long settlePlanId;
+
+    /**
+     * 资金账户(目前只有一个)
+     */
+    private Long accountId;
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    private Long userId;
+
+    /**
+     * 组织名称
+     */
+    private String name;
+
+    /**
+     * 地址
+     */
+    private String address;
+
+    /**
+     * 图标
+     */
+    private String icon;
+
+    /**
+     * 状态 1正常 2禁用
+     */
+    private Integer status;
+
+    /**
+     * 类型 1专家组织 2医院
+     */
+    private Integer type;
+
+    /**
+     * 公告
+     */
+    private String notice;
+
+    /**
+     * 固定金额/病例
+     */
+    private BigDecimal settleFixed;
+
+    /**
+     * 销售员id
+     */
+    private Long salesmanId;
+
+    /**
+     * 销售提成固定金额/病例
+     */
+    private BigDecimal salesSettleFixed;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_org
+     */
+    private static final long serialVersionUID = 1L;
+
+
+}

+ 79 - 0
cif-api/src/main/java/com/medipath/cif/dto/OrgHospitalDTO.java

@@ -0,0 +1,79 @@
+/*
+*
+* OrgHospitalDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-11
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+
+public class OrgHospitalDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 
+     */
+    private Long orgId;
+
+    /**
+     * 
+     */
+    private Long hospitalId;
+
+    /**
+     * c_org_hospital
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return org_id 
+     */
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    /**
+     * 
+     * @param orgId 
+     */
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
+    /**
+     * 
+     * @return hospital_id 
+     */
+    public Long getHospitalId() {
+        return hospitalId;
+    }
+
+    /**
+     * 
+     * @param hospitalId 
+     */
+    public void setHospitalId(Long hospitalId) {
+        this.hospitalId = hospitalId;
+    }
+}

+ 207 - 0
cif-api/src/main/java/com/medipath/cif/dto/OrgUserDTO.java

@@ -0,0 +1,207 @@
+/*
+*
+* OrgUserDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class OrgUserDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 组织id
+     */
+    private Long orgId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 状态 1正常 2已解约
+     */
+    private Integer status;
+
+    /**
+     * 合同到期时间
+     */
+    private Date endTime;
+
+    /**
+     * 类型 1平台单笔结算 2组织结算
+     */
+    private Integer settleType;
+
+    /**
+     * 结算固定值/笔
+     */
+    private BigDecimal settleFixed;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_org_user
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 组织id
+     * @return org_id 组织id
+     */
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    /**
+     * 组织id
+     * @param orgId 组织id
+     */
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
+    /**
+     * 用户id
+     * @return user_id 用户id
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 用户id
+     * @param userId 用户id
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 状态 1正常 2已解约
+     * @return status 状态 1正常 2已解约
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2已解约
+     * @param status 状态 1正常 2已解约
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 合同到期时间
+     * @return end_time 合同到期时间
+     */
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    /**
+     * 合同到期时间
+     * @param endTime 合同到期时间
+     */
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    /**
+     * 类型 1平台单笔结算 2组织结算
+     * @return settle_type 类型 1平台单笔结算 2组织结算
+     */
+    public Integer getSettleType() {
+        return settleType;
+    }
+
+    /**
+     * 类型 1平台单笔结算 2组织结算
+     * @param settleType 类型 1平台单笔结算 2组织结算
+     */
+    public void setSettleType(Integer settleType) {
+        this.settleType = settleType;
+    }
+
+    /**
+     * 结算固定值/笔
+     * @return settle_fixed 结算固定值/笔
+     */
+    public BigDecimal getSettleFixed() {
+        return settleFixed;
+    }
+
+    /**
+     * 结算固定值/笔
+     * @param settleFixed 结算固定值/笔
+     */
+    public void setSettleFixed(BigDecimal settleFixed) {
+        this.settleFixed = settleFixed;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 105 - 0
cif-api/src/main/java/com/medipath/cif/dto/Result.java

@@ -0,0 +1,105 @@
+package com.medipath.cif.dto;
+
+
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+
+/**
+ * 统一API响应结果封装
+ */
+@Data
+@Builder
+@NoArgsConstructor
+public class Result<T> implements Serializable {
+
+    private static final long serialVersionUID = 99199149045139969L;
+    private String code;
+    private String message;
+    private T data;
+
+    public Result(String code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    public Result(String code, String message, T data) {
+        this.code = code;
+        this.message = message;
+        this.data = data;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public Result setCode(String code) {
+        this.code = code;
+        return this;
+    }
+
+    public String getMessage() {
+        return message;
+    }
+
+    public Result setMessage(String message) {
+        this.message = message;
+        return this;
+    }
+
+    public T getData() {
+        return data;
+    }
+
+    public Result setData(T data) {
+        this.data = data;
+        return this;
+    }
+
+    public static Result genSuccessResult() {
+        return new Result()
+                .setCode("200")
+                .setMessage("操作成功");
+    }
+
+    public static Result genSuccessResult(Object data) {
+        return new Result()
+                .setCode("200")
+                .setMessage("操作成功")
+                .setData(data);
+    }
+
+    public static Result genResult(String code,String message) {
+        return new Result()
+                .setCode(code)
+                .setMessage(message);
+    }
+
+    public static Result genFailResult(String message,Object data) {
+        return new Result()
+                .setCode("400")
+                .setMessage(message)
+                .setData(data);
+    }
+
+    public static Result genFailResult(String code,String message,Object data) {
+        return new Result()
+                .setCode(code)
+                .setMessage(message)
+                .setData(data);
+    }
+
+    public static Result genFailResult(Object data) {
+        return new Result()
+                .setCode("400")
+                .setMessage("操作失败")
+                .setData(data);
+    }
+
+//    @Override
+//    public String toString() {
+//        return JSON.toJSONString(this);
+//    }
+}

+ 164 - 0
cif-api/src/main/java/com/medipath/cif/dto/SalesmanDTO.java

@@ -0,0 +1,164 @@
+/*
+*
+* SalesmanDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class SalesmanDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 
+     */
+    private String name;
+
+    /**
+     * 资金账户(目前只有一个)
+     */
+    private Long accountId;
+
+    /**
+     * 状态 1正常 2禁用
+     */
+    private Integer status;
+
+    /**
+     * 电话
+     */
+    private String phoneNo;
+
+    /**
+     * 
+     */
+    private String email;
+
+    /**
+     * 
+     */
+    private Date creatTime;
+
+    /**
+     * c_salesman
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return name 
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 
+     * @param name 
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 资金账户(目前只有一个)
+     * @return account_id 资金账户(目前只有一个)
+     */
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    /**
+     * 资金账户(目前只有一个)
+     * @param accountId 资金账户(目前只有一个)
+     */
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @return status 状态 1正常 2禁用
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1正常 2禁用
+     * @param status 状态 1正常 2禁用
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 电话
+     * @return phone_no 电话
+     */
+    public String getPhoneNo() {
+        return phoneNo;
+    }
+
+    /**
+     * 电话
+     * @param phoneNo 电话
+     */
+    public void setPhoneNo(String phoneNo) {
+        this.phoneNo = phoneNo;
+    }
+
+    /**
+     * 
+     * @return email 
+     */
+    public String getEmail() {
+        return email;
+    }
+
+    /**
+     * 
+     * @param email 
+     */
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
+    /**
+     * 
+     * @return creat_time 
+     */
+    public Date getCreatTime() {
+        return creatTime;
+    }
+
+    /**
+     * 
+     * @param creatTime 
+     */
+    public void setCreatTime(Date creatTime) {
+        this.creatTime = creatTime;
+    }
+}

+ 249 - 0
cif-api/src/main/java/com/medipath/cif/dto/SettleDTO.java

@@ -0,0 +1,249 @@
+/*
+*
+* SettleDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-22
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class SettleDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 组织id
+     */
+    private Long orgId;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 2022-02
+     */
+    private String month;
+
+    /**
+     * 状态 1未结算 2已付款
+     */
+    private Integer status;
+
+    /**
+     * 完成病例数
+     */
+    private Integer finishSize;
+
+    /**
+     * 完成金额
+     */
+    private BigDecimal finishAmount;
+
+    /**
+     * 结算时间
+     */
+    private Date settleTime;
+
+    /**
+     * 结算人
+     */
+    private String settleName;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * c_settle
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 组织id
+     * @return org_id 组织id
+     */
+    public Long getOrgId() {
+        return orgId;
+    }
+
+    /**
+     * 组织id
+     * @param orgId 组织id
+     */
+    public void setOrgId(Long orgId) {
+        this.orgId = orgId;
+    }
+
+    /**
+     * 用户id
+     * @return user_id 用户id
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 用户id
+     * @param userId 用户id
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 2022-02
+     * @return month 2022-02
+     */
+    public String getMonth() {
+        return month;
+    }
+
+    /**
+     * 2022-02
+     * @param month 2022-02
+     */
+    public void setMonth(String month) {
+        this.month = month;
+    }
+
+    /**
+     * 状态 1未结算 2已付款
+     * @return status 状态 1未结算 2已付款
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1未结算 2已付款
+     * @param status 状态 1未结算 2已付款
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 完成病例数
+     * @return finish_size 完成病例数
+     */
+    public Integer getFinishSize() {
+        return finishSize;
+    }
+
+    /**
+     * 完成病例数
+     * @param finishSize 完成病例数
+     */
+    public void setFinishSize(Integer finishSize) {
+        this.finishSize = finishSize;
+    }
+
+    /**
+     * 完成金额
+     * @return finish_amount 完成金额
+     */
+    public BigDecimal getFinishAmount() {
+        return finishAmount;
+    }
+
+    /**
+     * 完成金额
+     * @param finishAmount 完成金额
+     */
+    public void setFinishAmount(BigDecimal finishAmount) {
+        this.finishAmount = finishAmount;
+    }
+
+    /**
+     * 结算时间
+     * @return settle_time 结算时间
+     */
+    public Date getSettleTime() {
+        return settleTime;
+    }
+
+    /**
+     * 结算时间
+     * @param settleTime 结算时间
+     */
+    public void setSettleTime(Date settleTime) {
+        this.settleTime = settleTime;
+    }
+
+    /**
+     * 结算人
+     * @return settle_name 结算人
+     */
+    public String getSettleName() {
+        return settleName;
+    }
+
+    /**
+     * 结算人
+     * @param settleName 结算人
+     */
+    public void setSettleName(String settleName) {
+        this.settleName = settleName;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 更新时间
+     * @return update_time 更新时间
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updateTime 更新时间
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 164 - 0
cif-api/src/main/java/com/medipath/cif/dto/SettleInventoryDTO.java

@@ -0,0 +1,164 @@
+/*
+*
+* SettleInventoryDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-18
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+public class SettleInventoryDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 
+     */
+    private Long planId;
+
+    /**
+     * 系统分类
+     */
+    private Integer sysType;
+
+    /**
+     * 切片数区间下限
+     */
+    private Integer startSize;
+
+    /**
+     * 切片数区间上限(无上限可设置为999999)
+     */
+    private Integer endSize;
+
+    /**
+     * 业务类型 1常规 2冰冻 3疑难
+     */
+    private Integer bizType;
+
+    /**
+     * 金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * c_settle_inventory
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return plan_id 
+     */
+    public Long getPlanId() {
+        return planId;
+    }
+
+    /**
+     * 
+     * @param planId 
+     */
+    public void setPlanId(Long planId) {
+        this.planId = planId;
+    }
+
+    /**
+     * 系统分类
+     * @return sys_type 系统分类
+     */
+    public Integer getSysType() {
+        return sysType;
+    }
+
+    /**
+     * 系统分类
+     * @param sysType 系统分类
+     */
+    public void setSysType(Integer sysType) {
+        this.sysType = sysType;
+    }
+
+    /**
+     * 切片数区间下限
+     * @return start_size 切片数区间下限
+     */
+    public Integer getStartSize() {
+        return startSize;
+    }
+
+    /**
+     * 切片数区间下限
+     * @param startSize 切片数区间下限
+     */
+    public void setStartSize(Integer startSize) {
+        this.startSize = startSize;
+    }
+
+    /**
+     * 切片数区间上限(无上限可设置为999999)
+     * @return end_size 切片数区间上限(无上限可设置为999999)
+     */
+    public Integer getEndSize() {
+        return endSize;
+    }
+
+    /**
+     * 切片数区间上限(无上限可设置为999999)
+     * @param endSize 切片数区间上限(无上限可设置为999999)
+     */
+    public void setEndSize(Integer endSize) {
+        this.endSize = endSize;
+    }
+
+    /**
+     * 业务类型 1常规 2冰冻 3疑难
+     * @return biz_type 业务类型 1常规 2冰冻 3疑难
+     */
+    public Integer getBizType() {
+        return bizType;
+    }
+
+    /**
+     * 业务类型 1常规 2冰冻 3疑难
+     * @param bizType 业务类型 1常规 2冰冻 3疑难
+     */
+    public void setBizType(Integer bizType) {
+        this.bizType = bizType;
+    }
+
+    /**
+     * 金额
+     * @return amount 金额
+     */
+    public BigDecimal getAmount() {
+        return amount;
+    }
+
+    /**
+     * 金额
+     * @param amount 金额
+     */
+    public void setAmount(BigDecimal amount) {
+        this.amount = amount;
+    }
+}

+ 122 - 0
cif-api/src/main/java/com/medipath/cif/dto/SettlePlanDTO.java

@@ -0,0 +1,122 @@
+/*
+*
+* SettlePlanDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-18
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class SettlePlanDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 
+     */
+    private String name;
+
+    /**
+     * 类型 1月结 2季结
+     */
+    private Integer type;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * c_settle_plan
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return name 
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 
+     * @param name 
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 类型 1月结 2季结
+     * @return type 类型 1月结 2季结
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1月结 2季结
+     * @param type 类型 1月结 2季结
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 163 - 0
cif-api/src/main/java/com/medipath/cif/dto/SubjectDTO.java

@@ -0,0 +1,163 @@
+/*
+*
+* SubjectDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-12-13
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+
+public class SubjectDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 父节点
+     */
+    private Integer parentId;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 别名(101)
+     */
+    private String aliases;
+
+    /**
+     * 借贷方向 D:借 C贷
+     */
+    private String direction;
+
+    /**
+     * 类型 1资产类 2负债类 3损益类 4所有者权益
+     */
+    private Integer type;
+
+    /**
+     * 是否为叶子节点 1是 2不是
+     */
+    private Integer leaf;
+
+    /**
+     * c_subject
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 父节点
+     * @return parent_id 父节点
+     */
+    public Integer getParentId() {
+        return parentId;
+    }
+
+    /**
+     * 父节点
+     * @param parentId 父节点
+     */
+    public void setParentId(Integer parentId) {
+        this.parentId = parentId;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 别名(101)
+     * @return aliases 别名(101)
+     */
+    public String getAliases() {
+        return aliases;
+    }
+
+    /**
+     * 别名(101)
+     * @param aliases 别名(101)
+     */
+    public void setAliases(String aliases) {
+        this.aliases = aliases;
+    }
+
+    /**
+     * 借贷方向 D:借 C贷
+     * @return direction 借贷方向 D:借 C贷
+     */
+    public String getDirection() {
+        return direction;
+    }
+
+    /**
+     * 借贷方向 D:借 C贷
+     * @param direction 借贷方向 D:借 C贷
+     */
+    public void setDirection(String direction) {
+        this.direction = direction;
+    }
+
+    /**
+     * 类型 1资产类 2负债类 3损益类 4所有者权益
+     * @return type 类型 1资产类 2负债类 3损益类 4所有者权益
+     */
+    public Integer getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1资产类 2负债类 3损益类 4所有者权益
+     * @param type 类型 1资产类 2负债类 3损益类 4所有者权益
+     */
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    /**
+     * 是否为叶子节点 1是 2不是
+     * @return leaf 是否为叶子节点 1是 2不是
+     */
+    public Integer getLeaf() {
+        return leaf;
+    }
+
+    /**
+     * 是否为叶子节点 1是 2不是
+     * @param leaf 是否为叶子节点 1是 2不是
+     */
+    public void setLeaf(Integer leaf) {
+        this.leaf = leaf;
+    }
+}

+ 206 - 0
cif-api/src/main/java/com/medipath/cif/dto/SysMessageDTO.java

@@ -0,0 +1,206 @@
+/*
+*
+* SysMessageDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2023-02-08
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class SysMessageDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 模板id
+     */
+    private Long templateId;
+
+    /**
+     * 发送用户id
+     */
+    private String sendUserId;
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    private Integer bizType;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * 状态 1未读 2已读
+     */
+    private Integer status;
+
+    /**
+     * 已读时间
+     */
+    private Date readTime;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * c_sys_message
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 用户id
+     * @return user_id 用户id
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 用户id
+     * @param userId 用户id
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 模板id
+     * @return template_id 模板id
+     */
+    public Long getTemplateId() {
+        return templateId;
+    }
+
+    /**
+     * 模板id
+     * @param templateId 模板id
+     */
+    public void setTemplateId(Long templateId) {
+        this.templateId = templateId;
+    }
+
+    /**
+     * 发送用户id
+     * @return send_user_id 发送用户id
+     */
+    public String getSendUserId() {
+        return sendUserId;
+    }
+
+    /**
+     * 发送用户id
+     * @param sendUserId 发送用户id
+     */
+    public void setSendUserId(String sendUserId) {
+        this.sendUserId = sendUserId;
+    }
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     * @return biz_type 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    public Integer getBizType() {
+        return bizType;
+    }
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     * @param bizType 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    public void setBizType(Integer bizType) {
+        this.bizType = bizType;
+    }
+
+    /**
+     * 内容
+     * @return content 内容
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * 内容
+     * @param content 内容
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+
+    /**
+     * 状态 1未读 2已读
+     * @return status 状态 1未读 2已读
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 1未读 2已读
+     * @param status 状态 1未读 2已读
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 已读时间
+     * @return read_time 已读时间
+     */
+    public Date getReadTime() {
+        return readTime;
+    }
+
+    /**
+     * 已读时间
+     * @param readTime 已读时间
+     */
+    public void setReadTime(Date readTime) {
+        this.readTime = readTime;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 100 - 0
cif-api/src/main/java/com/medipath/cif/dto/SysMessageTemplateDTO.java

@@ -0,0 +1,100 @@
+/*
+*
+* SysMessageTemplateDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2023-02-08
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+
+public class SysMessageTemplateDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 名称
+     */
+    private String name;
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    private Integer bizType;
+
+    /**
+     * 内容
+     */
+    private String content;
+
+    /**
+     * c_sys_message_template
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 名称
+     * @return name 名称
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名称
+     * @param name 名称
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     * @return biz_type 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    public Integer getBizType() {
+        return bizType;
+    }
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     * @param bizType 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    public void setBizType(Integer bizType) {
+        this.bizType = bizType;
+    }
+
+    /**
+     * 内容
+     * @return content 内容
+     */
+    public String getContent() {
+        return content;
+    }
+
+    /**
+     * 内容
+     * @param content 内容
+     */
+    public void setContent(String content) {
+        this.content = content;
+    }
+}

+ 144 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserDTO.java

@@ -0,0 +1,144 @@
+/*
+*
+* UserDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+public class UserDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 登录账号
+     */
+    private String loginAccount;
+
+    /**
+     * 用户所属平台 创建用户时定义
+     */
+    private String appCode;
+
+    /**
+     * 资金账户(目前只有一个)
+     */
+    private Long accountId;
+
+    /**
+     * 单位
+     */
+    private String unit;
+
+    /**
+     * 名字
+     */
+    private String name;
+
+    /**
+     * 身份证号
+     */
+    private String identity;
+
+    /**
+     * 状态 0未启用 1正常 2禁用 3停用 4锁定
+     */
+    private Byte status;
+
+    /**
+     * 工作状态 1空闲 2不接诊
+     */
+    private Byte workStatus;
+
+    /**
+     * 电话
+     */
+    private String phoneNo;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
+    /**
+     * 密码
+     */
+    private String pwd;
+
+    /**
+     * 盐
+     */
+    private String salt;
+
+    /**
+     * 头像
+     */
+    private String headPic;
+
+    /**
+     * 居住地址
+     */
+    private String address;
+
+    /**
+     * 性别 0未知 1男 2女
+     */
+    private Byte sex;
+
+    /**
+     * 所属省份代码
+     */
+    private String provinceCode;
+
+    /**
+     * 所属城市码
+     */
+    private String cityCode;
+
+    /**
+     * 所属区域代码
+     */
+    private String areaCode;
+
+    /**
+     * 创建人
+     */
+    private String createUser;
+
+    /**
+     * 更新人
+     */
+    private String updateUser;
+
+    /**
+     * 更新时间
+     */
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 版本号
+     */
+    private String version;
+
+    private String signUrl;
+
+    /**
+     * c_user
+     */
+    private static final long serialVersionUID = 1L;
+
+
+}

+ 143 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserFriendDTO.java

@@ -0,0 +1,143 @@
+/*
+*
+* UserFriendDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-08-30
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserFriendDTO implements Serializable {
+    /**
+     * 主键 ID
+     */
+    private Integer id;
+
+    /**
+     * 用户 UID
+     */
+    private Long uid;
+
+    /**
+     * 好友 UID
+     */
+    private Long friendUid;
+
+    /**
+     * 好友关系状态 -1:拉黑 0:正常
+     */
+    private Byte state;
+
+    /**
+     * 创建时间
+     */
+    private Date createdTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedTime;
+
+    /**
+     * c_user_friend
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键 ID
+     * @return id 主键 ID
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 主键 ID
+     * @param id 主键 ID
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 用户 UID
+     * @return uid 用户 UID
+     */
+    public Long getUid() {
+        return uid;
+    }
+
+    /**
+     * 用户 UID
+     * @param uid 用户 UID
+     */
+    public void setUid(Long uid) {
+        this.uid = uid;
+    }
+
+    /**
+     * 好友 UID
+     * @return friend_uid 好友 UID
+     */
+    public Long getFriendUid() {
+        return friendUid;
+    }
+
+    /**
+     * 好友 UID
+     * @param friendUid 好友 UID
+     */
+    public void setFriendUid(Long friendUid) {
+        this.friendUid = friendUid;
+    }
+
+    /**
+     * 好友关系状态 -1:拉黑 0:正常
+     * @return state 好友关系状态 -1:拉黑 0:正常
+     */
+    public Byte getState() {
+        return state;
+    }
+
+    /**
+     * 好友关系状态 -1:拉黑 0:正常
+     * @param state 好友关系状态 -1:拉黑 0:正常
+     */
+    public void setState(Byte state) {
+        this.state = state;
+    }
+
+    /**
+     * 创建时间
+     * @return created_time 创建时间
+     */
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createdTime 创建时间
+     */
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    /**
+     * 更新时间
+     * @return updated_time 更新时间
+     */
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updatedTime 更新时间
+     */
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+}

+ 122 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserFriendDeleteRecordDTO.java

@@ -0,0 +1,122 @@
+/*
+*
+* UserFriendDeleteRecordDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-08-30
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserFriendDeleteRecordDTO implements Serializable {
+    /**
+     * 主键 ID
+     */
+    private Integer id;
+
+    /**
+     * 用户 UID
+     */
+    private Long uid;
+
+    /**
+     * 好友 UID
+     */
+    private Long friendUid;
+
+    /**
+     * 创建时间
+     */
+    private Date createdTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedTime;
+
+    /**
+     * c_user_friend_delete_record
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键 ID
+     * @return id 主键 ID
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 主键 ID
+     * @param id 主键 ID
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 用户 UID
+     * @return uid 用户 UID
+     */
+    public Long getUid() {
+        return uid;
+    }
+
+    /**
+     * 用户 UID
+     * @param uid 用户 UID
+     */
+    public void setUid(Long uid) {
+        this.uid = uid;
+    }
+
+    /**
+     * 好友 UID
+     * @return friend_uid 好友 UID
+     */
+    public Long getFriendUid() {
+        return friendUid;
+    }
+
+    /**
+     * 好友 UID
+     * @param friendUid 好友 UID
+     */
+    public void setFriendUid(Long friendUid) {
+        this.friendUid = friendUid;
+    }
+
+    /**
+     * 创建时间
+     * @return created_time 创建时间
+     */
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createdTime 创建时间
+     */
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    /**
+     * 更新时间
+     * @return updated_time 更新时间
+     */
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updatedTime 更新时间
+     */
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+}

+ 143 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserFriendRequestDTO.java

@@ -0,0 +1,143 @@
+/*
+*
+* UserFriendRequestDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-08-30
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserFriendRequestDTO implements Serializable {
+    /**
+     * 主键 ID
+     */
+    private Integer id;
+
+    /**
+     * 用户 UID
+     */
+    private Long uid;
+
+    /**
+     * 好友 UID
+     */
+    private Long friendUid;
+
+    /**
+     * 好友关系状态 -1:拒绝添加 0:请求未审核 1:同意添加
+     */
+    private Byte state;
+
+    /**
+     * 创建时间
+     */
+    private Date createdTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedTime;
+
+    /**
+     * c_user_friend_request
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键 ID
+     * @return id 主键 ID
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 主键 ID
+     * @param id 主键 ID
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 用户 UID
+     * @return uid 用户 UID
+     */
+    public Long getUid() {
+        return uid;
+    }
+
+    /**
+     * 用户 UID
+     * @param uid 用户 UID
+     */
+    public void setUid(Long uid) {
+        this.uid = uid;
+    }
+
+    /**
+     * 好友 UID
+     * @return friend_uid 好友 UID
+     */
+    public Long getFriendUid() {
+        return friendUid;
+    }
+
+    /**
+     * 好友 UID
+     * @param friendUid 好友 UID
+     */
+    public void setFriendUid(Long friendUid) {
+        this.friendUid = friendUid;
+    }
+
+    /**
+     * 好友关系状态 -1:拒绝添加 0:请求未审核 1:同意添加
+     * @return state 好友关系状态 -1:拒绝添加 0:请求未审核 1:同意添加
+     */
+    public Byte getState() {
+        return state;
+    }
+
+    /**
+     * 好友关系状态 -1:拒绝添加 0:请求未审核 1:同意添加
+     * @param state 好友关系状态 -1:拒绝添加 0:请求未审核 1:同意添加
+     */
+    public void setState(Byte state) {
+        this.state = state;
+    }
+
+    /**
+     * 创建时间
+     * @return created_time 创建时间
+     */
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createdTime 创建时间
+     */
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    /**
+     * 更新时间
+     * @return updated_time 更新时间
+     */
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updatedTime 更新时间
+     */
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+}

+ 248 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserGroupDTO.java

@@ -0,0 +1,248 @@
+/*
+*
+* UserGroupDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-08-29
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserGroupDTO implements Serializable {
+    /**
+     * 群 ID
+     */
+    private Integer groupId;
+
+    /**
+     * IM 第三方群 ID
+     */
+    private String platformGroupId;
+
+    /**
+     * IM 第三方厂商标识  1:环信
+     */
+    private Integer platform;
+
+    /**
+     * IM 第三方厂商名称
+     */
+    private String platformName;
+
+    /**
+     * 建群用户 UID
+     */
+    private Long groupUid;
+
+    /**
+     * 群名称
+     */
+    private String groupName;
+
+    /**
+     * 群头像
+     */
+    private String groupAvatar;
+
+    /**
+     * 群公告
+     */
+    private String groupNotice;
+
+    /**
+     * 状态 -1:解散  0:正常
+     */
+    private Byte state;
+
+    /**
+     * 创建时间
+     */
+    private Date createdTime;
+
+    /**
+     * 更新时间
+     */
+    private Date updatedTime;
+
+    /**
+     * c_user_group
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 群 ID
+     * @return group_id 群 ID
+     */
+    public Integer getGroupId() {
+        return groupId;
+    }
+
+    /**
+     * 群 ID
+     * @param groupId 群 ID
+     */
+    public void setGroupId(Integer groupId) {
+        this.groupId = groupId;
+    }
+
+    /**
+     * IM 第三方群 ID
+     * @return platform_group_id IM 第三方群 ID
+     */
+    public String getPlatformGroupId() {
+        return platformGroupId;
+    }
+
+    /**
+     * IM 第三方群 ID
+     * @param platformGroupId IM 第三方群 ID
+     */
+    public void setPlatformGroupId(String platformGroupId) {
+        this.platformGroupId = platformGroupId;
+    }
+
+    /**
+     * IM 第三方厂商标识  1:环信
+     * @return platform IM 第三方厂商标识  1:环信
+     */
+    public Integer getPlatform() {
+        return platform;
+    }
+
+    /**
+     * IM 第三方厂商标识  1:环信
+     * @param platform IM 第三方厂商标识  1:环信
+     */
+    public void setPlatform(Integer platform) {
+        this.platform = platform;
+    }
+
+    /**
+     * IM 第三方厂商名称
+     * @return platform_name IM 第三方厂商名称
+     */
+    public String getPlatformName() {
+        return platformName;
+    }
+
+    /**
+     * IM 第三方厂商名称
+     * @param platformName IM 第三方厂商名称
+     */
+    public void setPlatformName(String platformName) {
+        this.platformName = platformName;
+    }
+
+    /**
+     * 建群用户 UID
+     * @return group_uid 建群用户 UID
+     */
+    public Long getGroupUid() {
+        return groupUid;
+    }
+
+    /**
+     * 建群用户 UID
+     * @param groupUid 建群用户 UID
+     */
+    public void setGroupUid(Long groupUid) {
+        this.groupUid = groupUid;
+    }
+
+    /**
+     * 群名称
+     * @return group_name 群名称
+     */
+    public String getGroupName() {
+        return groupName;
+    }
+
+    /**
+     * 群名称
+     * @param groupName 群名称
+     */
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    /**
+     * 群头像
+     * @return group_avatar 群头像
+     */
+    public String getGroupAvatar() {
+        return groupAvatar;
+    }
+
+    /**
+     * 群头像
+     * @param groupAvatar 群头像
+     */
+    public void setGroupAvatar(String groupAvatar) {
+        this.groupAvatar = groupAvatar;
+    }
+
+    /**
+     * 群公告
+     * @return group_notice 群公告
+     */
+    public String getGroupNotice() {
+        return groupNotice;
+    }
+
+    /**
+     * 群公告
+     * @param groupNotice 群公告
+     */
+    public void setGroupNotice(String groupNotice) {
+        this.groupNotice = groupNotice;
+    }
+
+    /**
+     * 状态 -1:解散  0:正常
+     * @return state 状态 -1:解散  0:正常
+     */
+    public Byte getState() {
+        return state;
+    }
+
+    /**
+     * 状态 -1:解散  0:正常
+     * @param state 状态 -1:解散  0:正常
+     */
+    public void setState(Byte state) {
+        this.state = state;
+    }
+
+    /**
+     * 创建时间
+     * @return created_time 创建时间
+     */
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createdTime 创建时间
+     */
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    /**
+     * 更新时间
+     * @return updated_time 更新时间
+     */
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    /**
+     * 更新时间
+     * @param updatedTime 更新时间
+     */
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+}

+ 185 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserGroupMemberDTO.java

@@ -0,0 +1,185 @@
+/*
+*
+* UserGroupMemberDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-08-29
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserGroupMemberDTO implements Serializable {
+    /**
+     * 
+     */
+    private Integer id;
+
+    /**
+     * 群 ID
+     */
+    private Long groupId;
+
+    /**
+     * 用户 UID
+     */
+    private Long uid;
+
+    /**
+     * 用戶群名称
+     */
+    private String groupUserName;
+
+    /**
+     * 是否群管理员 0:否  1:是
+     */
+    private Byte manageType;
+
+    /**
+     * 是否群主 0:否  1:是
+     */
+    private Byte groupMaster;
+
+    /**
+     * 
+     */
+    private Date createdTime;
+
+    /**
+     * 
+     */
+    private Date updatedTime;
+
+    /**
+     * c_user_group_member
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Integer getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    /**
+     * 群 ID
+     * @return group_id 群 ID
+     */
+    public Long getGroupId() {
+        return groupId;
+    }
+
+    /**
+     * 群 ID
+     * @param groupId 群 ID
+     */
+    public void setGroupId(Long groupId) {
+        this.groupId = groupId;
+    }
+
+    /**
+     * 用户 UID
+     * @return uid 用户 UID
+     */
+    public Long getUid() {
+        return uid;
+    }
+
+    /**
+     * 用户 UID
+     * @param uid 用户 UID
+     */
+    public void setUid(Long uid) {
+        this.uid = uid;
+    }
+
+    /**
+     * 用戶群名称
+     * @return group_user_name 用戶群名称
+     */
+    public String getGroupUserName() {
+        return groupUserName;
+    }
+
+    /**
+     * 用戶群名称
+     * @param groupUserName 用戶群名称
+     */
+    public void setGroupUserName(String groupUserName) {
+        this.groupUserName = groupUserName;
+    }
+
+    /**
+     * 是否群管理员 0:否  1:是
+     * @return manage_type 是否群管理员 0:否  1:是
+     */
+    public Byte getManageType() {
+        return manageType;
+    }
+
+    /**
+     * 是否群管理员 0:否  1:是
+     * @param manageType 是否群管理员 0:否  1:是
+     */
+    public void setManageType(Byte manageType) {
+        this.manageType = manageType;
+    }
+
+    /**
+     * 是否群主 0:否  1:是
+     * @return group_master 是否群主 0:否  1:是
+     */
+    public Byte getGroupMaster() {
+        return groupMaster;
+    }
+
+    /**
+     * 是否群主 0:否  1:是
+     * @param groupMaster 是否群主 0:否  1:是
+     */
+    public void setGroupMaster(Byte groupMaster) {
+        this.groupMaster = groupMaster;
+    }
+
+    /**
+     * 
+     * @return created_time 
+     */
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    /**
+     * 
+     * @param createdTime 
+     */
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    /**
+     * 
+     * @return updated_time 
+     */
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    /**
+     * 
+     * @param updatedTime 
+     */
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+}

+ 101 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserIntroductoryDTO.java

@@ -0,0 +1,101 @@
+/*
+*
+* UserIntroductoryDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserIntroductoryDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 
+     */
+    private Long userId;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * 简介
+     */
+    private String introductory;
+
+    /**
+     * c_user_introductory
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return user_id 
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 
+     * @param userId 
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    /**
+     * 简介
+     * @return introductory 简介
+     */
+    public String getIntroductory() {
+        return introductory;
+    }
+
+    /**
+     * 简介
+     * @param introductory 简介
+     */
+    public void setIntroductory(String introductory) {
+        this.introductory = introductory;
+    }
+}

+ 143 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserLogDTO.java

@@ -0,0 +1,143 @@
+/*
+*
+* UserLogDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserLogDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 业务id
+     */
+    private Long bizId;
+
+    /**
+     * 类型 1用户登录 2组织登录 3医院登录 4销售登录
+     */
+    private Long type;
+
+    /**
+     * 版本
+     */
+    private String version;
+
+    /**
+     * ip
+     */
+    private String ip;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * c_user_log
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 业务id
+     * @return biz_id 业务id
+     */
+    public Long getBizId() {
+        return bizId;
+    }
+
+    /**
+     * 业务id
+     * @param bizId 业务id
+     */
+    public void setBizId(Long bizId) {
+        this.bizId = bizId;
+    }
+
+    /**
+     * 类型 1用户登录 2组织登录 3医院登录 4销售登录
+     * @return type 类型 1用户登录 2组织登录 3医院登录 4销售登录
+     */
+    public Long getType() {
+        return type;
+    }
+
+    /**
+     * 类型 1用户登录 2组织登录 3医院登录 4销售登录
+     * @param type 类型 1用户登录 2组织登录 3医院登录 4销售登录
+     */
+    public void setType(Long type) {
+        this.type = type;
+    }
+
+    /**
+     * 版本
+     * @return version 版本
+     */
+    public String getVersion() {
+        return version;
+    }
+
+    /**
+     * 版本
+     * @param version 版本
+     */
+    public void setVersion(String version) {
+        this.version = version;
+    }
+
+    /**
+     * ip
+     * @return ip ip
+     */
+    public String getIp() {
+        return ip;
+    }
+
+    /**
+     * ip
+     * @param ip ip
+     */
+    public void setIp(String ip) {
+        this.ip = ip;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+}

+ 143 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserOperatorDTO.java

@@ -0,0 +1,143 @@
+/*
+*
+* UserOperatorDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserOperatorDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     * 操作员id
+     */
+    private Long operatorId;
+
+    /**
+     * 状态 0无效关系 1正常 2已解绑
+     */
+    private Integer status;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * c_user_operator
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 用户id
+     * @return user_id 用户id
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 用户id
+     * @param userId 用户id
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 操作员id
+     * @return operator_id 操作员id
+     */
+    public Long getOperatorId() {
+        return operatorId;
+    }
+
+    /**
+     * 操作员id
+     * @param operatorId 操作员id
+     */
+    public void setOperatorId(Long operatorId) {
+        this.operatorId = operatorId;
+    }
+
+    /**
+     * 状态 0无效关系 1正常 2已解绑
+     * @return status 状态 0无效关系 1正常 2已解绑
+     */
+    public Integer getStatus() {
+        return status;
+    }
+
+    /**
+     * 状态 0无效关系 1正常 2已解绑
+     * @param status 状态 0无效关系 1正常 2已解绑
+     */
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 143 - 0
cif-api/src/main/java/com/medipath/cif/dto/UserSignatureDTO.java

@@ -0,0 +1,143 @@
+/*
+*
+* UserSignatureDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class UserSignatureDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 
+     */
+    private Long userId;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 签名图片地址
+     */
+    private String url;
+
+    /**
+     * 创建时间
+     */
+    private Date createTime;
+
+    /**
+     * 创建人
+     */
+    private String createName;
+
+    /**
+     * c_user_signature
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 
+     * @return user_id 
+     */
+    public Long getUserId() {
+        return userId;
+    }
+
+    /**
+     * 
+     * @param userId 
+     */
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    /**
+     * 备注
+     * @return remark 备注
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * 备注
+     * @param remark 备注
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    /**
+     * 签名图片地址
+     * @return url 签名图片地址
+     */
+    public String getUrl() {
+        return url;
+    }
+
+    /**
+     * 签名图片地址
+     * @param url 签名图片地址
+     */
+    public void setUrl(String url) {
+        this.url = url;
+    }
+
+    /**
+     * 创建时间
+     * @return create_time 创建时间
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 创建时间
+     * @param createTime 创建时间
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 创建人
+     * @return create_name 创建人
+     */
+    public String getCreateName() {
+        return createName;
+    }
+
+    /**
+     * 创建人
+     * @param createName 创建人
+     */
+    public void setCreateName(String createName) {
+        this.createName = createName;
+    }
+}

+ 206 - 0
cif-api/src/main/java/com/medipath/cif/dto/WxMchDTO.java

@@ -0,0 +1,206 @@
+/*
+*
+* WxMchDTO.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2023-03-21
+*/
+package com.medipath.cif.dto;
+
+import java.io.Serializable;
+import java.util.Date;
+
+public class WxMchDTO implements Serializable {
+    /**
+     * 
+     */
+    private Long id;
+
+    /**
+     * 名字
+     */
+    private String name;
+
+    /**
+     * appId
+     */
+    private String appId;
+
+    /**
+     * 商户id
+     */
+    private String mchId;
+
+    /**
+     * 
+     */
+    private String apiKey;
+
+    /**
+     * p12证书路径
+     */
+    private String keyPath;
+
+    /**
+     * 备注
+     */
+    private String remark;
+
+    /**
+     * 
+     */
+    private Date createTime;
+
+    /**
+     * 
+     */
+    private Date updateTime;
+
+    /**
+     * c_wx_mch
+     */
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 
+     * @return id 
+     */
+    public Long getId() {
+        return id;
+    }
+
+    /**
+     * 
+     * @param id 
+     */
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    /**
+     * 名字
+     * @return name 名字
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * 名字
+     * @param name 名字
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    /**
+     * appId
+     * @return app_id appId
+     */
+    public String getAppId() {
+        return appId;
+    }
+
+    /**
+     * appId
+     * @param appId appId
+     */
+    public void setAppId(String appId) {
+        this.appId = appId;
+    }
+
+    /**
+     * 商户id
+     * @return mch_id 商户id
+     */
+    public String getMchId() {
+        return mchId;
+    }
+
+    /**
+     * 商户id
+     * @param mchId 商户id
+     */
+    public void setMchId(String mchId) {
+        this.mchId = mchId;
+    }
+
+    /**
+     * 
+     * @return api_key 
+     */
+    public String getApiKey() {
+        return apiKey;
+    }
+
+    /**
+     * 
+     * @param apiKey 
+     */
+    public void setApiKey(String apiKey) {
+        this.apiKey = apiKey;
+    }
+
+    /**
+     * p12证书路径
+     * @return key_path p12证书路径
+     */
+    public String getKeyPath() {
+        return keyPath;
+    }
+
+    /**
+     * p12证书路径
+     * @param keyPath p12证书路径
+     */
+    public void setKeyPath(String keyPath) {
+        this.keyPath = keyPath;
+    }
+
+    /**
+     * 备注
+     * @return remark 备注
+     */
+    public String getRemark() {
+        return remark;
+    }
+
+    /**
+     * 备注
+     * @param remark 备注
+     */
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    /**
+     * 
+     * @return create_time 
+     */
+    public Date getCreateTime() {
+        return createTime;
+    }
+
+    /**
+     * 
+     * @param createTime 
+     */
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+
+    /**
+     * 
+     * @return update_time 
+     */
+    public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    /**
+     * 
+     * @param updateTime 
+     */
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+}

+ 60 - 0
cif-api/src/main/java/com/medipath/cif/enums/BizTypeEnum.java

@@ -0,0 +1,60 @@
+package com.medipath.cif.enums;
+
+import lombok.Data;
+
+/**
+ * 支付业务类型枚举类
+ * 业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+ */
+public enum BizTypeEnum {
+
+    RECHARGE( 1001, "充值"),
+    CHARGE_TRANSFER( 2001, "平台收费"),
+    SPECIALIST_TRANSFER( 2002, "专家佣金"),
+    MARKET_TRANSFER( 2003, "销售佣金"),
+    WITHDRAW( 3001, "提现"),
+    DIAGNOSE_FREEZE( 4001, "诊断冻结"),
+    DIAGNOSE_UNFREEZE( 5001, "诊断解冻"),
+    ;
+
+    /**
+     * 平台标识
+     */
+    private int key;
+
+    /**
+     * 平台名称
+     */
+    private String value;
+
+
+    BizTypeEnum(int key, String value) {
+        this.key = key;
+        this.value = value;
+    }
+
+    public static String getValueByKey(int key) {
+        for (BizTypeEnum value : values()) {
+            if (value.key == key) {
+                return value.value;
+            }
+        }
+        return null;
+    }
+
+    public int getKey() {
+        return key;
+    }
+
+    public void setKey(int key) {
+        this.key = key;
+    }
+
+    public String getValue() {
+        return value;
+    }
+
+    public void setValue(String value) {
+        this.value = value;
+    }
+}

+ 64 - 0
cif-api/src/main/java/com/medipath/cif/param/CommissionParam.java

@@ -0,0 +1,64 @@
+/*
+*
+* RechargeParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class CommissionParam implements Serializable {
+
+
+    /**
+     * 业务编号
+     */
+    private String bizNo;
+
+    /**
+     * 业务Id
+     */
+    private String bizId;
+
+    /**
+     * 被收费账户
+     */
+    private Long accountId;
+
+    /**
+     * 金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+     */
+    private Integer bizType;
+
+
+    /**
+     * 交易时间
+     */
+    private Date transTime;
+
+    /**
+     * c_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 64 - 0
cif-api/src/main/java/com/medipath/cif/param/FeeParam.java

@@ -0,0 +1,64 @@
+/*
+*
+* RechargeParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class FeeParam implements Serializable {
+
+
+    /**
+     * 业务编号
+     */
+    private String bizNo;
+
+    /**
+     * 业务Id
+     */
+    private String bizId;
+
+    /**
+     * 被收费账户
+     */
+    private Long accountId;
+
+    /**
+     * 金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+     */
+    private Integer bizType;
+
+
+    /**
+     * 交易时间
+     */
+    private Date transTime;
+
+    /**
+     * c_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 64 - 0
cif-api/src/main/java/com/medipath/cif/param/FreezdParam.java

@@ -0,0 +1,64 @@
+/*
+*
+* FreezdParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class FreezdParam implements Serializable {
+
+
+    /**
+     * 业务编号(病例号)
+     */
+    private String bizNo;
+
+    /**
+     * 业务Id
+     */
+    private String bizId;
+
+    /**
+     * 冻结账户
+     */
+    private Long accountId;
+
+    /**
+     * 冻结金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+     */
+    private Integer bizType;
+
+
+    /**
+     * 交易时间
+     */
+    private Date transTime;
+
+    /**
+     * c_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 44 - 0
cif-api/src/main/java/com/medipath/cif/param/MessageParam.java

@@ -0,0 +1,44 @@
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/12/14 13:56
+ * @Version 1.0
+ */
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class MessageParam implements Serializable {
+
+    private static final long serialVersionUID = -5318595472853014732L;
+
+    /**
+     * 业务类型 1收到新病例 2收到新冰冻病例  3处理中的病例信息更新 4处理中的病例收到发起端新的消息留言 5月账单结算
+     */
+    private Integer bizType;
+
+    /**
+     * 用户id
+     */
+    private Long userId;
+
+    /**
+     *  业务数据
+     */
+    private String bizData;
+
+    /**
+     * 参数 1: hospital、userName 2:hospital、userName、surgeryTime 3:hospital、userName 4:hospital、userName 5:month
+     */
+    private Map<String,String> templateParam;
+
+}

+ 64 - 0
cif-api/src/main/java/com/medipath/cif/param/RechargeParam.java

@@ -0,0 +1,64 @@
+/*
+*
+* RechargeParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class RechargeParam implements Serializable {
+
+
+    /**
+     * 业务编号
+     */
+    private String bizNo;
+
+    /**
+     * 业务Id
+     */
+    private String bizId;
+
+    /**
+     * 充值目标账户
+     */
+    private Long accountId;
+
+    /**
+     * 充值金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+     */
+    private Integer bizType;
+
+
+    /**
+     * 交易时间
+     */
+    private Date transTime;
+
+    /**
+     * c_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 64 - 0
cif-api/src/main/java/com/medipath/cif/param/TransParam.java

@@ -0,0 +1,64 @@
+/*
+*
+* FreezdParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class TransParam implements Serializable {
+
+    /**
+     * 业务编号(病例号)
+     */
+    private String bizNo;
+
+    /**
+     * 业务Id
+     */
+    private String bizId;
+
+    /**
+     * 借账户
+     */
+    private Long debitAccount;
+
+    /**
+     * 贷账户
+     */
+    private Long creditAccount;
+
+    /**
+     * 转账金额
+     */
+    private BigDecimal amount;
+
+    /**
+     *  业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+     */
+    private Integer bizType;
+
+    /**
+     * 交易时间
+     */
+    private Date transTime;
+
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 42 - 0
cif-api/src/main/java/com/medipath/cif/param/UnFreezdAndTransParam.java

@@ -0,0 +1,42 @@
+/*
+*
+* FreezdParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class UnFreezdAndTransParam implements Serializable {
+
+
+
+    /**
+     * 冻结流水号
+     */
+    private Long freezdId;
+
+    /**
+     * 转账入参,交易金额总和应为解冻金额
+     */
+    private List<TransParam> trans;
+
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 64 - 0
cif-api/src/main/java/com/medipath/cif/param/WithdrawParam.java

@@ -0,0 +1,64 @@
+/*
+*
+* RechargeParam.java
+* Copyright(C) 2017-2020 fendo公司
+* @date 2022-11-02
+*/
+package com.medipath.cif.param;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+@Data
+@Builder
+@AllArgsConstructor
+@NoArgsConstructor
+public class WithdrawParam implements Serializable {
+
+
+    /**
+     * 业务编号
+     */
+    private String bizNo;
+
+    /**
+     * 业务Id
+     */
+    private String bizId;
+
+    /**
+     * 提现目标账户
+     */
+    private Long accountId;
+
+    /**
+     * 提现金额
+     */
+    private BigDecimal amount;
+
+    /**
+     * 业务类型 1001充值 2001平台收费 2002专家佣金 2003销售佣金 3001提现 4001诊断冻结 5001诊断解冻
+     */
+    private Integer bizType;
+
+
+    /**
+     * 交易时间
+     */
+    private Date transTime;
+
+    /**
+     * c_flow
+     */
+    private static final long serialVersionUID = 1L;
+
+
+
+
+}

+ 73 - 0
cif-api/src/main/java/com/medipath/cif/service/AccountDubboService.java

@@ -0,0 +1,73 @@
+package com.medipath.cif.service;
+
+
+import com.medipath.cif.dto.*;
+import com.medipath.cif.param.*;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+public interface AccountDubboService {
+
+
+    AccountDTO getAccount(Long userId);
+
+    /**
+     *  检查金额
+     * @param userId
+     * @param amount
+     * @return true 足够  false  不足
+     */
+    Boolean checkFee(Long userId, BigDecimal amount);
+
+    /**
+     * 冻结
+     * @param param
+     * @return 流水号
+     */
+    Result freeze(FreezdParam param);
+
+    /**
+     * 解冻(全额解冻)
+     * @param freezdId
+     */
+    Result unFreeze(Long freezdId);
+
+    /**
+     * 交易
+     * @param param
+     * @return
+     */
+    Result trans(TransParam param);
+
+    /**
+     * 解冻并交易
+     * @param param
+     * @return
+     */
+    Result unFreezeAndTrans(UnFreezdAndTransParam param);
+
+    /**
+     * 解冻并交易
+     * @param param
+     * @return
+     */
+    Result unFreezeAndFreeze(Long freezdId,FreezdParam param);
+
+    /**
+     * 充值
+     * @param param
+     * @return
+     */
+    Result recharge(RechargeParam param);
+
+    /**
+     * 提现
+     * @param param
+     * @return
+     */
+    Result withdraw(WithdrawParam param);
+
+
+
+}

+ 11 - 0
cif-api/src/main/java/com/medipath/cif/service/OrgDubboService.java

@@ -0,0 +1,11 @@
+package com.medipath.cif.service;
+
+import com.medipath.cif.dto.OrgDTO;
+
+public interface OrgDubboService {
+
+    void saveOrgHospital(Long orgId,Long hospitalId, Integer type);
+
+    OrgDTO getOrgById(Long orgId);
+
+}

+ 32 - 0
cif-api/src/main/java/com/medipath/cif/service/SettleDubboService.java

@@ -0,0 +1,32 @@
+package com.medipath.cif.service;
+
+
+import com.medipath.cif.dto.*;
+import com.medipath.cif.param.*;
+
+import java.math.BigDecimal;
+import java.util.List;
+
+/**
+ * 结算
+ */
+public interface SettleDubboService {
+
+    /**
+     * 获取方案金额
+     * @param planId
+     * @param size
+     * @param sysType
+     * @return
+     */
+    BigDecimal getAmount(Long planId, Integer size, Integer sysType, Integer bizType);
+
+    /**
+     * 保存结算记录
+     * @param settles
+     */
+    void saveSettle(String month,List<SettleDTO> settles);
+
+    List<SettleDTO> settleList( Long orgId , Long userId, String year , String orderby);
+
+}

+ 30 - 0
cif-api/src/main/java/com/medipath/cif/service/UserDubboService.java

@@ -0,0 +1,30 @@
+package com.medipath.cif.service;
+
+
+import com.medipath.cif.dto.HospitalDTO;
+import com.medipath.cif.dto.OrgDTO;
+import com.medipath.cif.dto.Result;
+import com.medipath.cif.dto.UserDTO;
+import com.medipath.cif.param.MessageParam;
+
+public interface UserDubboService {
+
+    /**
+     * 验证登录
+     * @param token
+     * @return
+     */
+    Result<UserDTO> validateLogin(String token);
+
+    UserDTO getUser(Long userId);
+
+    OrgDTO getOrgByUserId(Long userId);
+
+    HospitalDTO getHospitalByUserId(Long userId);
+
+    HospitalDTO getHospitalById(Long hospitalId);
+
+    void updateLastTime(Long userId);
+
+    boolean sendMsg(MessageParam param);
+}

+ 293 - 0
cif-service/pom.xml

@@ -0,0 +1,293 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <parent>
+        <artifactId>cif</artifactId>
+        <groupId>com.medipath</groupId>
+        <version>1.0.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>cif-service</artifactId>
+    <packaging>jar</packaging>
+    <version>1.0.0-SNAPSHOT</version>
+    <properties>
+        <java.version>1.8</java.version>
+        <weixin.version>4.2.0</weixin.version>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>com.alipay.sdk</groupId>
+            <artifactId>alipay-sdk-java</artifactId>
+            <version>4.10.182.ALL</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>fastjson</artifactId>
+                    <groupId>com.alibaba</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>com.github.javen205</groupId>
+            <artifactId>IJPay-AliPay</artifactId>
+            <version>2.7.1</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-redis</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>com.esotericsoftware</groupId>
+            <artifactId>kryo</artifactId>
+            <version>4.0.2</version>
+        </dependency>
+        <dependency>
+            <groupId>de.javakaffee</groupId>
+            <artifactId>kryo-serializers</artifactId>
+            <version>0.45</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-lang3</artifactId>
+            <version>3.12.0</version>
+        </dependency>
+        <dependency>
+            <groupId>redis.clients</groupId>
+            <artifactId>jedis</artifactId>
+            <version>3.3.0</version>
+        </dependency>
+        <dependency>
+            <groupId>javax.mail</groupId>
+            <artifactId>mail</artifactId>
+            <version>1.4.7</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>com.easemob.im</groupId>-->
+<!--            <artifactId>im-sdk-core</artifactId>-->
+<!--            <version>0.5.2</version>-->
+<!--        </dependency>-->
+
+        <dependency>
+            <groupId>io.jsonwebtoken</groupId>
+            <artifactId>jjwt</artifactId>
+            <version>0.9.1</version>
+        </dependency>
+
+<!--        <dependency>-->
+<!--            <groupId>com.google.firebase</groupId>-->
+<!--            <artifactId>firebase-admin</artifactId>-->
+<!--            <version>8.1.0</version>-->
+<!--        </dependency>-->
+
+        <!--格式化sql日志-->
+        <dependency>
+            <groupId>p6spy</groupId>
+            <artifactId>p6spy</artifactId>
+            <version>3.8.6</version>
+        </dependency>
+
+        <!--异维科技公共包依赖-->
+        <dependency>
+            <groupId>com.medipath</groupId>
+            <artifactId>common</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.springframework.boot</groupId>
+                    <artifactId>spring-boot-starter-redis</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.commons</groupId>
+                    <artifactId>commons-lang3</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>javax.servlet</groupId>
+                    <artifactId>javax.servlet-api</artifactId>
+                </exclusion>
+                <exclusion>
+                    <artifactId>google-collections</artifactId>
+                    <groupId>com.google.collections</groupId>
+                </exclusion>
+                <exclusion>
+                    <groupId>cn.hutool</groupId>
+                    <artifactId>hutool-all</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <!--        IJPay-AliPay里引用 和undertow的版本冲突-->
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+<!--            <scope>provided</scope>-->
+        </dependency>
+
+        <dependency>
+            <groupId>cn.hutool</groupId>
+            <artifactId>hutool-all</artifactId>
+            <version>RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+
+
+        <!--异维科技dubbo接口包依赖-->
+        <dependency>
+            <groupId>com.medipath</groupId>
+            <artifactId>operating-api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+
+        </dependency>
+
+        <dependency>
+            <groupId>com.medipath</groupId>
+            <artifactId>diagnosis-api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+
+
+
+        <!--异维科技dubbo接口包依赖-->
+        <dependency>
+            <groupId>com.medipath</groupId>
+            <artifactId>cif-api</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+        </dependency>
+
+        <!--test依赖-->
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.rocketmq</groupId>
+            <artifactId>rocketmq-spring-boot-starter</artifactId>
+        </dependency>
+
+        <!-- xxl-job-core -->
+        <dependency>
+            <groupId>com.xuxueli</groupId>
+            <artifactId>xxl-job-core</artifactId>
+            <version>2.3.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.minio</groupId>
+            <artifactId>minio</artifactId>
+            <version>8.2.1</version>
+            <exclusions>
+                <exclusion>
+                    <artifactId>okhttp</artifactId>
+                    <groupId>com.squareup.okhttp3</groupId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>com.squareup.okhttp3</groupId>
+            <artifactId>okhttp</artifactId>
+            <version>4.8.1</version>
+
+        </dependency>
+
+        <dependency>
+            <groupId>me.tongfei</groupId>
+            <artifactId>progressbar</artifactId>
+            <version>0.5.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.jetbrains.kotlin</groupId>
+            <artifactId>kotlin-stdlib</artifactId>
+            <version>1.6.20</version>
+        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>com.vaadin.external.google</groupId>-->
+<!--            <artifactId>android-json</artifactId>-->
+<!--            <version>0.0.20131108.vaadin1</version>-->
+<!--            <scope>compile</scope>-->
+<!--        </dependency>-->
+
+
+        <dependency>
+            <groupId>com.alipay.sdk</groupId>
+            <artifactId>alipay-sdk-java</artifactId>
+            <version>4.10.182.ALL</version>
+        </dependency>
+
+        <!-- 微信相关-->
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>wx-java-pay-spring-boot-starter</artifactId>
+            <version>3.7.0</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.github.binarywang</groupId>
+            <artifactId>wx-java-mp-spring-boot-starter</artifactId>
+            <version>3.7.0</version>
+        </dependency>
+
+
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-amqp</artifactId>
+        </dependency>
+
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <finalName>cif</finalName>
+                </configuration>
+            </plugin>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>${java.version}</source>
+                    <target>${java.version}</target>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${maven-surefire-plugin.version}</version>
+                <configuration>
+                    <skipTests>true</skipTests>  <!--默认关掉单元测试 -->
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-resources-plugin</artifactId>
+                <configuration>
+                    <nonFilteredFileExtensions>
+                        <nonFilteredFileExtension>txt</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>p12</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>mp3</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>jks</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>ico</nonFilteredFileExtension>
+                        <nonFilteredFileExtension>exe</nonFilteredFileExtension>
+                    </nonFilteredFileExtensions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+
+</project>

+ 62 - 0
cif-service/src/main/java/com/medipath/cif/CifApplication.java

@@ -0,0 +1,62 @@
+package com.medipath.cif;
+
+import com.medipath.cif.configurer.RibbonWeightedResponseTimeRuleConfig;
+import com.medipath.cif.configurer.springbootshutdown.GracefulShutdownUndertowWrapper;
+import com.spring4all.swagger.EnableSwagger2Doc;
+import io.undertow.UndertowOptions;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.web.client.RestTemplateBuilder;
+import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
+import org.springframework.cloud.client.loadbalancer.LoadBalanced;
+import org.springframework.cloud.netflix.ribbon.RibbonClient;
+import org.springframework.cloud.netflix.ribbon.RibbonClients;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.web.client.RestTemplate;
+
+@EnableDiscoveryClient
+@SpringBootApplication
+@EnableSwagger2Doc
+@EnableScheduling
+@RibbonClients(value = {
+        @RibbonClient(name = "cif",configuration = RibbonWeightedResponseTimeRuleConfig.class)
+})
+public class CifApplication {
+
+    public static void main(String[] args) throws Exception {
+        ConfigurableApplicationContext applicationContext = SpringApplication.run(CifApplication.class, args);
+    }
+
+    @Autowired
+    private GracefulShutdownUndertowWrapper gracefulShutdownUndertowWrapper;
+
+    @Bean
+    public UndertowServletWebServerFactory servletWebServerFactory() {
+        UndertowServletWebServerFactory factory = new UndertowServletWebServerFactory();
+        factory.addDeploymentInfoCustomizers(deploymentInfo -> deploymentInfo.addOuterHandlerChainWrapper(gracefulShutdownUndertowWrapper));
+        factory.addBuilderCustomizers(builder -> builder.setServerOption(UndertowOptions.ENABLE_STATISTICS, true));
+        return factory;
+    }
+
+    @Bean
+    public static PropertySourcesPlaceholderConfigurer propertyConfigInDev() {
+        return new PropertySourcesPlaceholderConfigurer();//  //使spring能够识别 ${cron}
+    }
+
+    /**
+     * 负载均衡
+     * 默认的负载均衡机制采用的类似轮询的这种均衡机制
+     */
+    @Bean
+    @LoadBalanced
+    public RestTemplate restTemplate(RestTemplateBuilder builder){
+        //spring官网建议RestTemplateBuilder构造器来进行构造,这里体现了构造者设计模式
+        return builder.build();
+    }
+}
+

+ 42 - 0
cif-service/src/main/java/com/medipath/cif/configurer/ConcurrentThreadGlobalConfig.java

@@ -0,0 +1,42 @@
+package com.medipath.cif.configurer;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+
+import javax.annotation.Resource;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * @author riemann
+ * @date 2019/10/31 22:50
+ */
+@Configuration
+public class ConcurrentThreadGlobalConfig {
+
+    @Resource
+    private Parameters parameters;
+
+    @Bean
+    public ThreadPoolTaskExecutor defaultThreadPool() {
+        ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
+        //核心线程数目
+        executor.setCorePoolSize(4);
+        //指定最大线程数
+        executor.setMaxPoolSize(Integer.MAX_VALUE);
+        //队列中最大的数目
+        executor.setQueueCapacity(Integer.MAX_VALUE);
+        //线程名称前缀
+        executor.setThreadNamePrefix(parameters.getApplication()+"ThreadPool_");
+        //rejection-policy:当pool已经达到max size的时候,如何处理新任务
+        //CALLER_RUNS:不在新线程中执行任务,而是由调用者所在的线程来执行
+        //对拒绝task的处理策略
+        executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
+        //线程空闲后的最大存活时间
+        executor.setKeepAliveSeconds(60);
+        //加载
+        executor.initialize();
+
+        return executor;
+    }
+}

+ 28 - 0
cif-service/src/main/java/com/medipath/cif/configurer/CorsFilter.java

@@ -0,0 +1,28 @@
+package com.medipath.cif.configurer;
+import org.springframework.stereotype.Component;
+
+import javax.servlet.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+@Component
+public class CorsFilter implements Filter {
+   @Override
+    public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain) throws IOException, ServletException {
+        HttpServletRequest request = (HttpServletRequest) req;
+        HttpServletResponse response = (HttpServletResponse) res;
+        /* String curOrigin = request.getHeader("Origin");
+        System.out.println("###跨域过滤器->当前访问来源->"+curOrigin+"###");   */
+        response.setHeader("Access-Control-Allow-Origin", "*");
+        response.setHeader("Access-Control-Allow-Methods", "*");
+        response.setHeader("Access-Control-Max-Age", "3600");
+        response.setHeader("Access-Control-Allow-Headers", "x-requested-with");
+        chain.doFilter(req, res);
+    }
+    @Override
+    public void init(FilterConfig filterConfig) {}
+
+    @Override
+    public void destroy() {}
+} 

+ 44 - 0
cif-service/src/main/java/com/medipath/cif/configurer/IpConfiguration.java

@@ -0,0 +1,44 @@
+package com.medipath.cif.configurer;
+
+
+import org.springframework.boot.web.context.WebServerInitializedEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+@Component
+public class IpConfiguration implements ApplicationListener<WebServerInitializedEvent> {
+
+    private int serverPort;
+
+    @Override
+    public void onApplicationEvent(WebServerInitializedEvent event) {
+        this.serverPort = event.getWebServer().getPort();
+    }
+
+    public int getPort() {
+        return this.serverPort;
+    }
+
+    public String getIpAndPort() {
+        InetAddress address = null;
+        try {
+            address = InetAddress.getLocalHost();
+        } catch (UnknownHostException e) {
+            e.printStackTrace();
+        }
+        return address.getHostAddress() +":"+getPort();
+    }
+
+    public String getIp() {
+        InetAddress address = null;
+        try {
+            address = InetAddress.getLocalHost();
+        } catch (UnknownHostException e) {
+            e.printStackTrace();
+        }
+        return address.getHostAddress();
+    }
+}

+ 49 - 0
cif-service/src/main/java/com/medipath/cif/configurer/LocalConfig.java

@@ -0,0 +1,49 @@
+//package com.medipath.cif.configurer;
+//
+//import org.springframework.context.annotation.Bean;
+//import org.springframework.context.annotation.Configuration;
+//import org.springframework.web.servlet.LocaleResolver;
+//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+//import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
+//import org.springframework.web.servlet.i18n.SessionLocaleResolver;
+//
+//import java.util.Locale;
+//
+///**
+// * 描述: 2、配置国际化语言
+// * 版权: Copyright (c) 2020
+// * 公司: XXX
+// * 作者: yanghj
+// * 版本: 4.0
+// * 创建日期: 2020/9/18 10:25
+// */
+//@Configuration
+//public class LocalConfig {
+//
+//    /**
+//     * 默认解析器 其中locale表示默认语言
+//     */
+//    @Bean
+//    public LocaleResolver localeResolver() {
+//        SessionLocaleResolver localeResolver = new SessionLocaleResolver();
+//        localeResolver.setDefaultLocale(Locale.CHINA);
+//        return localeResolver;
+//    }
+//
+//    /**
+//     * 默认拦截器 其中lang表示切换语言的参数名
+//     */
+//    @Bean
+//    public WebMvcConfigurer localeInterceptor() {
+//        return new WebMvcConfigurer() {
+//            @Override
+//            public void addInterceptors(InterceptorRegistry registry) {
+//                LocaleChangeInterceptor localeInterceptor = new LocaleChangeInterceptor();
+//                localeInterceptor.setParamName("lang");  //拦截lang参数
+//                registry.addInterceptor(localeInterceptor);
+//            }
+//        };
+//    }
+//
+//}

+ 59 - 0
cif-service/src/main/java/com/medipath/cif/configurer/LocalUtil.java

@@ -0,0 +1,59 @@
+package com.medipath.cif.configurer;
+
+import org.springframework.context.MessageSource;
+import org.springframework.context.i18n.LocaleContextHolder;
+import org.springframework.stereotype.Component;
+
+import java.util.ResourceBundle;
+
+/**
+ * 描述: 3、国际化工具类
+ * 版权: Copyright (c) 2020
+ * 公司: XXXX
+ * 作者: yanghj
+ * 版本: 4.0
+ * 创建日期: 2020/9/18 10:31
+ */
+
+@Component
+public class LocalUtil
+{
+
+    private static MessageSource messageSource;
+
+    public LocalUtil(MessageSource messageSource)
+    {
+        LocalUtil.messageSource = messageSource;
+    }
+
+    /**
+     * 获取单个国际化翻译值
+     */
+    public static String get(String msgKey)
+    {
+        try
+        {
+            return messageSource.getMessage(msgKey, null, LocaleContextHolder.getLocale());
+        }
+        catch (Exception e)
+        {
+            return null;
+        }
+    }
+
+    /**
+     * 获取单个国际化翻译值
+     */
+    public static String get2(String msgKey)
+    {
+        try
+        {
+            ResourceBundle bundle = ResourceBundle.getBundle("static/i18n/messages", LocaleContextHolder.getLocale());
+            return bundle.getString(msgKey);
+        }
+        catch (Exception e)
+        {
+            return null;
+        }
+    }
+}

+ 24 - 0
cif-service/src/main/java/com/medipath/cif/configurer/MinioConfig.java

@@ -0,0 +1,24 @@
+package com.medipath.cif.configurer;
+
+import io.minio.MinioClient;
+import org.springframework.boot.context.properties.EnableConfigurationProperties;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import javax.annotation.Resource;
+
+@Configuration
+public class MinioConfig {
+
+    @Resource
+    private Parameters parameters;
+
+    @Bean
+    public MinioClient minioClient() {
+        return MinioClient.builder()
+                .endpoint(parameters.getMinioBaseUrl())
+                .credentials(parameters.getMinioAccessKey(), parameters.getMinioSecretKey())
+                .build();
+    }
+
+}

+ 289 - 0
cif-service/src/main/java/com/medipath/cif/configurer/MyWebMvcConfigurer.java

@@ -0,0 +1,289 @@
+package com.medipath.cif.configurer;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.serializer.SerializeConfig;
+import com.alibaba.fastjson.serializer.SerializerFeature;
+import com.alibaba.fastjson.serializer.ToStringSerializer;
+import com.alibaba.fastjson.support.config.FastJsonConfig;
+import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
+import com.medipath.cif.configurer.interceptor.CorsInterceptor;
+import com.medipath.cif.core.ResultCode;
+import com.medipath.cif.core.ServiceException;
+import com.medipath.cif.core.cache.CacheKey;
+import com.medipath.cif.core.cache.CacheType;
+import com.medipath.core.Result;
+import org.apache.commons.codec.digest.DigestUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.http.MediaType;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.HandlerExceptionResolver;
+import org.springframework.web.servlet.ModelAndView;
+import org.springframework.web.servlet.NoHandlerFoundException;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import javax.annotation.Resource;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.util.*;
+
+/**
+ * Spring MVC 配置
+ *
+ * @author lxk
+ */
+@Configuration
+public class MyWebMvcConfigurer implements WebMvcConfigurer {
+
+    private final Logger logger = LoggerFactory.getLogger(MyWebMvcConfigurer.class);
+    //    @Value("${spring.profiles.active}")
+//    private String        env;                                                      // 当前激活的配置文件
+//
+//    @Value("${signature}")
+//    private String        signature;                                                // 是否启用签名
+//
+//    @Value("${login.check}")
+//    private String        loginCheck;                                              // 是否启用登录验证
+    @Resource
+    private RedisTemplate   redisTemplate;
+    //    @Value("${spring.application.name}")
+//    private String        application;
+    @Resource
+    private Parameters      parameters;
+    @Autowired
+    private CorsInterceptor corsInterceptor;
+
+
+    @Override
+    public void addResourceHandlers(ResourceHandlerRegistry registry) {
+        registry.addResourceHandler("swagger-ui.html")
+                .addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("docs.html")
+                .addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("doc.html")
+                .addResourceLocations("classpath:/META-INF/resources/");
+        registry.addResourceHandler("/webjars/**")
+                .addResourceLocations("classpath:/META-INF/resources/webjars/");
+    }
+
+    // 使用阿里 FastJson 作为JSON MessageConverter
+    @Override
+    public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
+        for (int i = converters.size() - 1; i >= 0; i--) {
+            if (converters.get(i) instanceof MappingJackson2HttpMessageConverter) {
+                converters.remove(i);
+            }
+        }
+        FastJsonHttpMessageConverter fastJsonHttpMessageConverter = new FastJsonHttpMessageConverter();
+        //自定义fastjson配置
+        FastJsonConfig config = new FastJsonConfig();
+        config.setDateFormat("yyyy-MM-dd HH:mm:ss");
+        config.setSerializerFeatures(
+                SerializerFeature.WriteMapNullValue,        // 是否输出值为null的字段,默认为false,我们将它打开
+                SerializerFeature.WriteNullListAsEmpty,     // 将Collection类型字段的字段空值输出为[]
+                SerializerFeature.WriteNullStringAsEmpty,   // 将字符串类型字段的空值输出为空字符串
+                SerializerFeature.WriteNullNumberAsZero,    // 将数值类型字段的空值输出为0
+                SerializerFeature.WriteDateUseDateFormat,
+                SerializerFeature.DisableCircularReferenceDetect    // 禁用循环引用
+        );
+        SerializeConfig serializeConfig = SerializeConfig.globalInstance;
+        serializeConfig.put(BigInteger.class, ToStringSerializer.instance);
+//        serializeConfig.put(Long.class, ToStringSerializer.instance);
+//        serializeConfig.put(Long.TYPE, ToStringSerializer.instance);
+        config.setSerializeConfig(serializeConfig);
+        fastJsonHttpMessageConverter.setFastJsonConfig(config);
+        // 添加支持的MediaTypes;不添加时默认为*/*,也就是默认支持全部
+        // 但是MappingJackson2HttpMessageConverter里面支持的MediaTypes为application/json
+        // 参考它的做法, fastjson也只添加application/json的MediaType
+        List<MediaType> fastMediaTypes = new ArrayList<>();
+        fastMediaTypes.add(MediaType.APPLICATION_JSON_UTF8);
+        fastJsonHttpMessageConverter.setSupportedMediaTypes(fastMediaTypes);
+        converters.add(fastJsonHttpMessageConverter);
+        // 设置项目名称
+        ProjectConstant.application = parameters.getApplication();
+    }
+
+    // 统一异常处理
+    @Override
+    public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) {
+        exceptionResolvers.add(new HandlerExceptionResolver() {
+            @Override
+            public ModelAndView resolveException(HttpServletRequest request,
+                                                 HttpServletResponse response, Object handler,
+                                                 Exception e) {
+                Result result = new Result();
+                if (e instanceof ServiceException) {// 业务失败的异常,如“账号或密码错误”
+                    result.setCode(ResultCode.FAIL.getCode()).setMessage(e.getMessage());
+                    logger.info(e.getMessage());
+                } else if (e instanceof NoHandlerFoundException) {
+                    result.setCode(ResultCode.NOT_FOUND.getCode()).setMessage(
+                            "接口 [" + request.getRequestURI() + "] 不存在");
+                } else if (e instanceof ServletException) {
+                    result.setCode(ResultCode.FAIL.getCode()).setMessage(e.getMessage());
+                } else {
+                    result.setCode(ResultCode.INTERNAL_SERVER_ERROR.getCode()).setMessage(
+                            "接口 [" + request.getRequestURI() + "] 内部错误,请联系管理员");
+                    String args = "";
+                    String requestAccept = request.getHeader("Content-Type");
+                    String contentType = "text/html";
+                    //判断请求类型
+                    if (StringUtils.isNotEmpty(requestAccept)) {
+                        if (StringUtils.contains(requestAccept, "application/json") || StringUtils.contains(requestAccept, "text/javascript")
+                                || StringUtils.contains(requestAccept, "text/json")) {
+                            contentType = "application/json";
+                        }
+                    }
+                    StringBuilder sb = new StringBuilder();
+                    for (Map.Entry<String, String[]> stringEntry : request.getParameterMap().entrySet()) {
+                        sb.append(stringEntry.getKey()).append(Arrays.toString(stringEntry.getValue()));
+                    }
+                    args = sb.toString();
+                    StackTraceElement stackTraceElement = e.getStackTrace()[0];
+                    String fileName = stackTraceElement.getFileName();
+                    int lineNumber = stackTraceElement.getLineNumber();
+
+                    logger.error("接口异常 URL: {}  HTTP_METHOD : {} VERSION: {} ARGS : {} token : {}  file: {} lineNum: {} ERROR_MSG {} ERROR {}",
+                            request.getRequestURL().toString(), request.getMethod(), request.getHeader("version"), args, request.getHeader("token"), fileName, lineNumber, e.getMessage(), e);
+                }
+                String msg = LocalUtil.get(ResultCode.getEnumByStatusCode(result.getCode()).name());
+                if (StrUtil.isNotBlank(msg) ){
+                    result.setMessage(msg);
+                }
+                responseResult(response, result);
+                return new ModelAndView();
+            }
+
+        });
+    }
+
+    // 解决跨域问题
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**");
+    }
+
+    // 添加拦截器
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        // 跨域
+//        registry.addInterceptor(corsInterceptor);
+        // wxJava框架 ThreadLocal的remove问题
+
+        // 接口签名认证拦截器,该签名认证比较简单,实际项目中可以使用Json Web Token或其他更好的方式替代。
+        if ("true".equals(parameters.getSignature())) { // 开发环境忽略签名认证
+            registry.addInterceptor(new HandlerInterceptorAdapter() {
+                @Override
+                public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
+                                         Object handler) throws Exception {
+                    // 验证签名
+                    boolean pass = validateSign(request);
+                    if (pass) {
+                        return true;
+                    } else {
+                        logger.warn("签名认证失败,请求接口:{},请求IP:{},请求参数:{}", request.getRequestURI(),
+                                getIpAddress(request), JSON.toJSONString(request.getParameterMap()));
+
+                        Result result = new Result();
+                        result.setCode(ResultCode.UNAUTHORIZED.getCode()).setMessage("签名认证失败");
+                        responseResult(response, result);
+                        return false;
+                    }
+                }
+            });
+        }
+    }
+
+    private void responseResult(HttpServletResponse response, Result result) {
+        response.setCharacterEncoding("UTF-8");
+        response.setHeader("Content-type", "application/json;charset=UTF-8");
+        response.setStatus(200);
+        try {
+            response.getWriter().write(JSON.toJSONString(result));
+        } catch (IOException ex) {
+            logger.error(ex.getMessage());
+        }
+    }
+
+    /**
+     * 一个简单的登录认证
+     */
+    private boolean validateLogin(HttpServletRequest request) {
+        String userId = request.getParameter("userId");
+        if (StringUtils.isBlank(userId)) {
+            return false;
+        }
+        CacheKey key = CacheKey.generateKey(CacheType.AppSecretKey, userId);
+        boolean exists = redisTemplate.hasKey(key.toString());
+        if (exists) {
+            return true;
+        } else {
+            return false;
+        }
+
+    }
+
+    /**
+     * 一个简单的签名认证,规则: 1. 将请求参数按ascii码排序 2. 拼接为a=value&b=value...这样的字符串(不包含sign)
+     * 3. 混合密钥(secret)进行md5获得签名,与请求的签名进行比较
+     */
+    private boolean validateSign(HttpServletRequest request) {
+        String requestSign = request.getParameter("sign");// 获得请求签名,如sign=19e907700db7ad91318424a97c54ed57
+        if (StringUtils.isEmpty(requestSign)) {
+            return false;
+        }
+        List<String> keys = new ArrayList<String>(request.getParameterMap().keySet());
+        keys.remove("sign");// 排除sign参数
+        Collections.sort(keys);// 排序
+
+        StringBuilder sb = new StringBuilder();
+        for (String key : keys) {
+            sb.append(key).append("=").append(request.getParameter(key)).append("&");// 拼接字符串
+        }
+        String linkString = sb.toString();
+        linkString = StringUtils.substring(linkString, 0, linkString.length() - 1);// 去除最后一个'&'
+
+        String secret = "Potato";// 密钥,自己修改
+        String sign = DigestUtils.md5Hex(linkString + secret);// 混合密钥md5
+
+        return StringUtils.equals(sign, requestSign);// 比较
+    }
+
+    private String getIpAddress(HttpServletRequest request) {
+        String ip = request.getHeader("x-forwarded-for");
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("Proxy-Client-IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("WL-Proxy-Client-IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("HTTP_CLIENT_IP");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getHeader("HTTP_X_FORWARDED_FOR");
+        }
+        if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
+            ip = request.getRemoteAddr();
+        }
+        // 如果是多级代理,那么取第一个ip为客户端ip
+        if (ip != null && ip.indexOf(",") != -1) {
+            ip = ip.substring(0, ip.indexOf(",")).trim();
+        }
+
+        return ip;
+    }
+
+}

+ 50 - 0
cif-service/src/main/java/com/medipath/cif/configurer/MybatisConfigurer.java

@@ -0,0 +1,50 @@
+package com.medipath.cif.configurer;
+
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+import org.apache.ibatis.session.SqlSessionFactory;
+import org.mybatis.spring.SqlSessionFactoryBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
+import org.springframework.core.io.support.ResourcePatternResolver;
+
+import tk.mybatis.spring.mapper.MapperScannerConfigurer;
+
+/**
+ * Mybatis & Mapper & PageHelper 配置
+ */
+@Configuration
+public class MybatisConfigurer {
+
+    @Bean
+    public SqlSessionFactory sqlSessionFactoryBean(DataSource dataSource) throws Exception {
+        SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
+        factory.setDataSource(dataSource);
+        factory.setTypeAliasesPackage(ProjectConstant.MODEL_PACKAGE);
+
+        //添加XML目录
+        ResourcePatternResolver resolver = new PathMatchingResourcePatternResolver();
+        factory.setMapperLocations(resolver.getResources("classpath:mapper/*.xml"));
+        return factory.getObject();
+    }
+
+    @Bean
+    public MapperScannerConfigurer mapperScannerConfigurer() {
+        MapperScannerConfigurer mapperScannerConfigurer = new MapperScannerConfigurer();
+        mapperScannerConfigurer.setSqlSessionFactoryBeanName("sqlSessionFactoryBean");
+        mapperScannerConfigurer.setBasePackage(ProjectConstant.MAPPER_PACKAGE);
+
+        //配置通用Mapper,详情请查阅官方文档
+        Properties properties = new Properties();
+        properties.setProperty("mappers", ProjectConstant.MAPPER_INTERFACE_REFERENCE);
+        properties.setProperty("notEmpty", "false");//insert、update是否判断字符串类型!='' 即 test="str != null"表达式内是否追加 and str != ''
+        properties.setProperty("IDENTITY", "MYSQL");
+        mapperScannerConfigurer.setProperties(properties);
+
+        return mapperScannerConfigurer;
+    }
+
+}

+ 74 - 0
cif-service/src/main/java/com/medipath/cif/configurer/Parameters.java

@@ -0,0 +1,74 @@
+package com.medipath.cif.configurer;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.stereotype.Component;
+
+@Component
+@Data
+@RefreshScope
+public class Parameters {
+    /**
+     * 当前激活的配置文件
+     */
+    @Value("${spring.profiles.active}")
+    private String env;
+
+    /**
+     * 是否启用登录验证
+     */
+    @Value("${dubbo.registry.address}")
+    private String dubboRegistryAddress;
+
+    /**
+     * 是否启用签名
+     */
+    @Value("${signature}")
+    private String signature;
+
+    /**
+     * 是否启用登录验证
+     */
+    @Value("${login.check}")
+    private String loginCheck;
+
+    @Value("${spring.application.name}")
+    private String application;
+
+
+    @Value("${minio.endpoint}")
+    private String minioBaseUrl;
+
+    @Value("${minio.bucketName}")
+    private String bucketName;
+
+    @Value("${minio.accessKey}")
+    private String minioAccessKey;
+
+    @Value("${minio.secretKey}")
+    private String minioSecretKey;
+
+    @Value("${base.url}")
+    private String baseUrl;
+
+    @Value("${sign.check}")
+    private Boolean signCheck;
+
+    @Value("${rconsult.url}")
+    private String    rconsultUrl;
+
+
+    @Value("${rconsult.base.url}")
+    private String    rconsultBaseUrl;
+
+    @Value("${ukey.white.list}")
+    private String    ukeyWhiteList;
+
+
+    @Value("${yp.ali.appid}")
+    private String  ypAliAppId;
+
+    @Value("${yp.wx.appid}")
+    private String  ypWxAppId;
+}

+ 20 - 0
cif-service/src/main/java/com/medipath/cif/configurer/ProjectConstant.java

@@ -0,0 +1,20 @@
+package com.medipath.cif.configurer;
+
+/**
+ * 项目常量
+ */
+public final class ProjectConstant {
+    public static final String BASE_PACKAGE = "com.medipath.cif";//项目基础包名称,根据自己公司的项目修改
+
+    public static final String MODEL_PACKAGE = BASE_PACKAGE + ".model";//Model所在包
+    public static final String MAPPER_PACKAGE = BASE_PACKAGE + ".dao";//Mapper所在包
+    public static final String SERVICE_PACKAGE = BASE_PACKAGE + ".service";//Service所在包
+    public static final String SERVICE_IMPL_PACKAGE = SERVICE_PACKAGE + ".impl";//ServiceImpl所在包
+    public static final String SERVICE_DTO_PACKAGE = BASE_PACKAGE + ".dto";//dto所在包
+    public static final String CONTROLLER_PACKAGE = BASE_PACKAGE + ".web.mng";//Controller所在包
+
+    public static final String MAPPER_INTERFACE_REFERENCE = BASE_PACKAGE + ".core.Mapper";//Mapper插件基础接口的完全限定名
+    //项目名称
+    public static  String application;
+
+}

+ 21 - 0
cif-service/src/main/java/com/medipath/cif/configurer/RibbonWeightedResponseTimeRuleConfig.java

@@ -0,0 +1,21 @@
+package com.medipath.cif.configurer;
+
+import com.netflix.loadbalancer.IRule;
+import com.netflix.loadbalancer.WeightedResponseTimeRule;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author: lxk
+ * @Date: 2022/3/14 12:32
+ * @Version 1.0
+ */
+@Configuration
+public class RibbonWeightedResponseTimeRuleConfig {
+
+    //方法名一定要叫iRule
+    @Bean
+    public IRule iRule(){
+        return new WeightedResponseTimeRule();
+    }
+}

File diff suppressed because it is too large
+ 8 - 0
cif-service/src/main/java/com/medipath/cif/configurer/SensitiveWord.java


+ 64 - 0
cif-service/src/main/java/com/medipath/cif/configurer/SwaggerConfig.java

@@ -0,0 +1,64 @@
+package com.medipath.cif.configurer;
+
+import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.ParameterBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.schema.ModelRef;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.service.Contact;
+import springfox.documentation.service.Parameter;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Configuration
+@EnableSwagger2
+@EnableSwaggerBootstrapUI
+@Profile({"dev","test"})
+public class SwaggerConfig {
+
+    @Bean
+    public Docket docket(){
+        //添加header参数
+        List<Parameter> pars = new ArrayList<>();
+        ParameterBuilder ticketPar = new ParameterBuilder();
+        ticketPar.name("token").description("user token")
+                .modelRef(new ModelRef("string")).parameterType("header")
+                .required(false).build(); //header中的ticket参数非必填,传空也可以
+        ticketPar = new ParameterBuilder();
+        ticketPar.name("appCode").description("appCode")
+                .modelRef(new ModelRef("string")).parameterType("header")
+                .required(false).build(); //header中的ticket参数非必填,传空也可以
+
+        pars.add(ticketPar.build());
+        return new Docket(DocumentationType.SWAGGER_2)
+                .globalOperationParameters(pars)
+                .groupName("demo")
+                .apiInfo(getApiInfo())
+                .select()
+                //设置basePackage会将包下的所有被@Api标记类的所有方法作为api
+                .apis(RequestHandlerSelectors.basePackage("com.medipath.web"))
+                //只有标记了@ApiOperation的方法才会暴露出给swagger
+                .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class))
+                .paths(PathSelectors.regex("/api/.*")).build();
+    }
+
+    private ApiInfo getApiInfo(){
+        return new ApiInfoBuilder()
+                .title("API接口文档")
+                .description("swagger2 demo api")
+                .termsOfServiceUrl("http://localhost/swagger-ui.html")
+                .version("1.0").contact(new Contact("admin", "http://localhost/swagger-ui.html", "xxx@qq.com"))
+                .build();
+    }
+
+}

+ 116 - 0
cif-service/src/main/java/com/medipath/cif/configurer/WebLogAspect.java

@@ -0,0 +1,116 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by Fernflower decompiler)
+//
+
+package com.medipath.cif.configurer;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import org.aspectj.lang.JoinPoint;
+import org.aspectj.lang.Signature;
+import org.aspectj.lang.annotation.AfterReturning;
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.Before;
+import org.aspectj.lang.annotation.Pointcut;
+import org.aspectj.lang.reflect.CodeSignature;
+import org.aspectj.lang.reflect.MethodSignature;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+
+@Aspect
+@Component
+public class WebLogAspect {
+    private static Logger logger = LoggerFactory.getLogger(WebLogAspect.class);
+
+    public WebLogAspect() {
+    }
+
+    @Resource
+    private  IpConfiguration ipConfiguration;
+
+    private String ipPort ;
+
+    @Pointcut("execution(public * com.medipath..*Controller.*(..))")
+    public void webLog() {
+    }
+
+    private static String[] types = {"java.lang.Integer", "java.lang.Double",
+            "java.lang.Float", "java.lang.Long", "java.lang.Short",
+            "java.lang.Byte", "java.lang.Boolean", "java.lang.Char",
+            "java.lang.String", "int", "double", "long", "short", "byte",
+            "boolean", "char", "float"};
+
+    @Before("webLog()")
+    public void doBefore(JoinPoint joinPoint) throws Throwable {
+        try {
+            // 接收到请求,记录请求内容
+            ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+            HttpServletRequest request = attributes.getRequest();
+            HttpServletResponse response = attributes.getResponse();
+            StringBuilder logStr = new StringBuilder("ip:");
+            if (StrUtil.isBlank(ipPort)){
+                ipPort = ipConfiguration.getIpAndPort();
+            }
+            logStr.append(ipPort);
+            // 记录下请求内容
+            logStr.append("URL:").append(request.getRequestURI()).append(" | ");
+            logStr.append("token:").append(request.getHeader("token")).append(" | ");
+            logStr.append("appCode:").append(request.getHeader("appCode")).append(" | ");
+            logStr.append("CLASS_METHOD:").append(joinPoint.getSignature().getDeclaringType().getSimpleName()).append(".").append(joinPoint.getSignature().getName()).append(" | ");
+            logStr.append("ARGS:");
+            // joinPoint获取参数名
+            String[] params = ((CodeSignature) joinPoint.getStaticPart().getSignature()).getParameterNames();
+            // joinPoint获取参数值
+            Object[] args = joinPoint.getArgs();
+            Signature signature = joinPoint.getSignature();
+            MethodSignature methodSignature = (MethodSignature) signature;
+            Method method = methodSignature.getMethod();
+            // 打印请求参数
+            int i = 0;
+            for (Object arg : args) {
+                if (arg == request || arg == response) {
+                    i += 1;
+                    continue;
+                }
+                String typeName = "";
+                try {
+                    typeName = arg.getClass().getTypeName();
+                } catch (Exception e) {
+                }
+                if (!Arrays.asList(types).contains(typeName)) {
+                    // 把参数转成json格式
+                    logStr.append("&").append(params[i]).append("=").append(JSONObject.toJSONString(arg));
+                } else {
+                    logStr.append("&").append(params[i]).append("=").append(arg);
+                }
+                i += 1;
+            }
+            logStr.append(" | ");
+            logger.info(logStr.toString());
+        } catch (Throwable e) {
+            logger.error("HaLogParamAspect error.", e);
+        }
+        // ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        // HttpServletRequest request = attributes.getRequest();
+        // logger.info("URL : {} HTTP_METHOD : {} ARGS : {}", new Object[]{request.getRequestURL().toString(), request.getMethod(), Arrays.toString(joinPoint.getArgs())});
+        // logger.info("URL : {} token : {} appCode : {}", new Object[]{request.getRequestURL().toString(), request.getHeader("token"), request.getHeader("appCode")});
+    }
+
+    @AfterReturning(
+            returning = "ret",
+            pointcut = "webLog()"
+    )
+    public void doAfterReturning(Object ret) throws Throwable {
+        logger.info("RESPONSE : {}", ret);
+    }
+}

+ 84 - 0
cif-service/src/main/java/com/medipath/cif/configurer/WxMpProperties.java

@@ -0,0 +1,84 @@
+package com.medipath.cif.configurer;
+
+import com.alibaba.fastjson.JSON;
+import com.binarywang.spring.starter.wxjava.mp.properties.RedisProperties;
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+
+import java.io.Serializable;
+import java.util.List;
+
+import static com.medipath.cif.configurer.WxMpProperties.StorageType.memory;
+
+/**
+ * wechat mp properties
+ *
+ * @author Binary Wang(https://github.com/binarywang)
+ */
+@RefreshScope
+@Data
+@ConfigurationProperties(prefix = "wx.mp")
+public class WxMpProperties {
+    private List<MpConfig> configs;
+
+    @Data
+    public static class MpConfig {
+        /**
+         * 设置微信公众号的appid
+         */
+        private String appId;
+
+        /**
+         * 微信公众号的名字
+         */
+        private String appName;
+
+        /**
+         * 设置微信公众号的app secret
+         */
+        private String secret;
+
+        /**
+         * 设置微信公众号的token
+         */
+        private String token;
+
+        /**
+         * 设置微信公众号的EncodingAESKey
+         */
+        private String aesKey;
+
+    }
+
+    /**
+     * 存储策略, memory, redis.
+     */
+    private ConfigStorage storage = new ConfigStorage();
+
+    @Data
+    public static class ConfigStorage implements Serializable {
+        private static final long serialVersionUID = 4815731027000065434L;
+
+        private StorageType type = memory;
+
+        private RedisProperties redis = new RedisProperties();
+
+    }
+
+    public enum StorageType {
+        /**
+         * 内存.
+         */
+        memory,
+        /**
+         * redis.
+         */
+        redis
+    }
+
+    @Override
+    public String toString() {
+        return JSON.toJSONString(this);
+    }
+}

+ 76 - 0
cif-service/src/main/java/com/medipath/cif/configurer/XxlJobConfig.java

@@ -0,0 +1,76 @@
+package com.medipath.cif.configurer;
+
+import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+
+/**
+ * xxl-job config
+ *
+ * @author xuxueli 2017-04-28
+ */
+@Profile({"local","dev", "test", "pro", "pro2"})
+@Configuration
+public class XxlJobConfig {
+    private Logger logger = LoggerFactory.getLogger(XxlJobConfig.class);
+
+    @Value("${xxl.job.admin.addresses}")
+    private String adminAddresses;
+
+    @Value("${xxl.job.executor.appname}")
+    private String appName;
+
+    @Value("${xxl.job.executor.ip}")
+    private String ip;
+
+    @Value("${xxl.job.executor.port}")
+    private int port;
+
+    @Value("${xxl.job.accessToken}")
+    private String accessToken;
+
+    @Value("${xxl.job.executor.logpath}")
+    private String logPath;
+
+    @Value("${xxl.job.executor.logretentiondays}")
+    private int logRetentionDays;
+
+
+    @Bean
+    public XxlJobSpringExecutor xxlJobExecutor() {
+        logger.info(">>>>>>>>>>> xxl-job config init.");
+        XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor();
+        xxlJobSpringExecutor.setAdminAddresses(adminAddresses);
+        xxlJobSpringExecutor.setAppname(appName);
+        xxlJobSpringExecutor.setIp(ip);
+        xxlJobSpringExecutor.setPort(port);
+        xxlJobSpringExecutor.setAccessToken(accessToken);
+        xxlJobSpringExecutor.setLogPath(logPath);
+        xxlJobSpringExecutor.setLogRetentionDays(logRetentionDays);
+
+        return xxlJobSpringExecutor;
+    }
+
+    /**
+     * 针对多网卡、容器内部署等情况,可借助 "spring-cloud-commons" 提供的 "InetUtils" 组件灵活定制注册IP;
+     *
+     *      1、引入依赖:
+     *          <dependency>
+     *             <groupId>org.springframework.cloud</groupId>
+     *             <artifactId>spring-cloud-commons</artifactId>
+     *             <version>${version}</version>
+     *         </dependency>
+     *
+     *      2、配置文件,或者容器启动变量
+     *          spring.cloud.inetutils.preferred-networks: 'xxx.xxx.xxx.'
+     *
+     *      3、获取IP
+     *          String ip_ = inetUtils.findFirstNonLoopbackHostInfo().getIpAddress();
+     */
+
+
+}

+ 1217 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayApi.java

@@ -0,0 +1,1217 @@
+package com.medipath.cif.configurer.alipay;
+
+import cn.hutool.core.date.DateUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.alipay.api.*;
+import com.alipay.api.domain.*;
+import com.alipay.api.internal.util.StringUtils;
+import com.alipay.api.request.*;
+import com.alipay.api.response.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+/**
+ * <p>IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付常用的支付方式以及各种常用的接口。</p>
+ *
+ * <p>不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。 </p>
+ *
+ * <p>IJPay 交流群: 723992875</p>
+ *
+ * <p>Node.js 版: https://gitee.com/javen205/TNWX</p>
+ *
+ * <p>支付宝支付相关接口</p>
+ *
+ * @author Javen
+ */
+public class AliPayApi {
+
+    /**
+     * 支付宝提供给商户的服务接入网关URL(新)
+     */
+    private static final String GATEWAY_NEW = "https://mapi.alipay.com/gateway.do?";
+
+    public static <T extends AlipayResponse> T doExecute(AlipayRequest<T> request) throws AlipayApiException {
+        if (AliPayApiConfigKit.getAliPayApiConfig().isCertModel()) {
+            return certificateExecute(request);
+        } else {
+            return execute(request);
+        }
+    }
+
+    public static <T extends AlipayResponse> T doExecute(AlipayRequest<T> request, String authToken) throws AlipayApiException {
+        if (AliPayApiConfigKit.getAliPayApiConfig().isCertModel()) {
+            return certificateExecute(request, authToken);
+        } else {
+            return execute(request, authToken);
+        }
+    }
+
+    public static <T extends AlipayResponse> T execute(AlipayRequest<T> request) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().execute(request);
+    }
+
+    public static <T extends AlipayResponse> T execute(AlipayRequest<T> request, String authToken) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().execute(request, authToken);
+    }
+
+    public static <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken, String appAuthToken) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().execute(request, accessToken, appAuthToken);
+    }
+
+    public static <T extends AlipayResponse> T execute(AlipayRequest<T> request, String accessToken, String appAuthToken, String targetAppId) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().execute(request, accessToken, appAuthToken, targetAppId);
+    }
+
+    public static <T extends AlipayResponse> T pageExecute(AlipayRequest<T> request) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().pageExecute(request);
+    }
+
+    public static <T extends AlipayResponse> T pageExecute(AlipayRequest<T> request, String method) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().pageExecute(request, method);
+    }
+
+    public static <T extends AlipayResponse> T sdkExecute(AlipayRequest<T> request) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().sdkExecute(request);
+    }
+
+    public static BatchAlipayResponse execute(BatchAlipayRequest request) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().execute(request);
+    }
+
+    public static <T extends AlipayResponse> T certificateExecute(AlipayRequest<T> request) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().certificateExecute(request);
+    }
+
+    public static <T extends AlipayResponse> T certificateExecute(AlipayRequest<T> request, String authToken) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().certificateExecute(request, authToken);
+    }
+
+    public static <T extends AlipayResponse> T certificateExecute(AlipayRequest<T> request, String accessToken, String appAuthToken) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().certificateExecute(request, accessToken, appAuthToken);
+    }
+
+    public static <T extends AlipayResponse> T certificateExecute(AlipayRequest<T> request, String accessToken, String appAuthToken, String targetAppId) throws AlipayApiException {
+        return AliPayApiConfigKit.getAliPayApiConfig().getAliPayClient().certificateExecute(request, accessToken, appAuthToken, targetAppId);
+    }
+
+    /**
+     * APP支付
+     *
+     * @param model     {@link AlipayTradeAppPayModel}
+     * @param notifyUrl 异步通知 URL
+     * @return {@link AlipayTradeAppPayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeAppPayResponse appPayToResponse(AlipayTradeAppPayModel model, String notifyUrl) throws AlipayApiException {
+        AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        return sdkExecute(request);
+    }
+
+    /**
+     * APP支付
+     *
+     * @param model        {@link AlipayTradeAppPayModel}
+     * @param notifyUrl    异步通知 URL
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeAppPayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeAppPayResponse appPayToResponse(AlipayTradeAppPayModel model, String notifyUrl, String appAuthToken) throws AlipayApiException {
+        AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        request.putOtherTextParam("app_auth_token", appAuthToken);
+        return sdkExecute(request);
+    }
+
+    /**
+     * WAP支付
+     *
+     * @param response  {@link HttpServletResponse}
+     * @param model     {@link AlipayTradeWapPayModel}
+     * @param returnUrl 异步通知URL
+     * @param notifyUrl 同步通知URL
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void wapPay(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl, String notifyUrl) throws AlipayApiException, IOException {
+        String form = wapPayStr(model, returnUrl, notifyUrl);
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        PrintWriter out = response.getWriter();
+        out.write(form);
+        out.flush();
+        out.close();
+    }
+
+    /**
+     * WAP支付
+     *
+     * @param response     {@link HttpServletResponse}
+     * @param model        {@link AlipayTradeWapPayModel}
+     * @param returnUrl    异步通知URL
+     * @param notifyUrl    同步通知URL
+     * @param appAuthToken 应用授权token
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void wapPay(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl,
+                              String notifyUrl, String appAuthToken) throws AlipayApiException, IOException {
+        String form = wapPayStr(model, returnUrl, notifyUrl, appAuthToken);
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        PrintWriter out = response.getWriter();
+        out.write(form);
+        out.flush();
+        out.close();
+    }
+
+    /**
+     * <p>WAP支付</p>
+     *
+     * <p>为了解决 Filter 中使用 OutputStream getOutputStream() 和 PrintWriter getWriter() 冲突异常问题</p>
+     *
+     * @param response     {@link HttpServletResponse}
+     * @param model        {@link AlipayTradeWapPayModel}
+     * @param returnUrl    异步通知URL
+     * @param notifyUrl    同步通知URL
+     * @param appAuthToken 应用授权token
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void wapPayByOutputStream(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl, String notifyUrl, String appAuthToken) throws AlipayApiException, IOException {
+        String form = wapPayStr(model, returnUrl, notifyUrl, appAuthToken);
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        OutputStream out = response.getOutputStream();
+        out.write(form.getBytes(AliPayApiConfigKit.getAliPayApiConfig().getCharset()));
+        response.getOutputStream().flush();
+    }
+
+    /**
+     * <p>WAP支付</p>
+     *
+     * <p>为了解决 Filter 中使用 OutputStream getOutputStream() 和 PrintWriter getWriter() 冲突异常问题</p>
+     *
+     * @param response  {@link HttpServletResponse}
+     * @param model     {@link AlipayTradeWapPayModel}
+     * @param returnUrl 异步通知URL
+     * @param notifyUrl 同步通知URL
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void wapPayByOutputStream(HttpServletResponse response, AlipayTradeWapPayModel model, String returnUrl, String notifyUrl) throws AlipayApiException, IOException {
+        String form = wapPayStr(model, returnUrl, notifyUrl);
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        OutputStream out = response.getOutputStream();
+        out.write(form.getBytes(AliPayApiConfigKit.getAliPayApiConfig().getCharset()));
+        response.getOutputStream().flush();
+    }
+
+    /**
+     * WAP支付
+     *
+     * @param model     {@link AlipayTradeWapPayModel}
+     * @param returnUrl 异步通知URL
+     * @param notifyUrl 同步通知URL
+     * @return {String}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static String wapPayStr(AlipayTradeWapPayModel model, String returnUrl, String notifyUrl) throws AlipayApiException {
+        AlipayTradeWapPayRequest aliPayRequest = new AlipayTradeWapPayRequest();
+        aliPayRequest.setReturnUrl(returnUrl);
+        aliPayRequest.setNotifyUrl(notifyUrl);
+        aliPayRequest.setBizModel(model);
+        return pageExecute(aliPayRequest).getBody();
+    }
+
+    /**
+     * WAP支付
+     *
+     * @param model        {@link AlipayTradeWapPayModel}
+     * @param returnUrl    异步通知URL
+     * @param notifyUrl    同步通知URL
+     * @param appAuthToken 应用授权token
+     * @return {String}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static String wapPayStr(AlipayTradeWapPayModel model, String returnUrl, String notifyUrl, String appAuthToken) throws AlipayApiException {
+        AlipayTradeWapPayRequest aliPayRequest = new AlipayTradeWapPayRequest();
+        aliPayRequest.setReturnUrl(returnUrl);
+        aliPayRequest.setNotifyUrl(notifyUrl);
+        aliPayRequest.setBizModel(model);
+        aliPayRequest.putOtherTextParam("app_auth_token", appAuthToken);
+        return pageExecute(aliPayRequest).getBody();
+    }
+
+    /**
+     * 统一收单交易支付接口接口 <br>
+     * 适用于:条形码支付、声波支付等 <br>
+     *
+     * @param model     {@link AlipayTradePayModel}
+     * @param notifyUrl 异步通知URL
+     * @return {@link AlipayTradePayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradePayResponse tradePayToResponse(AlipayTradePayModel model, String notifyUrl) throws AlipayApiException {
+        AlipayTradePayRequest request = new AlipayTradePayRequest();
+        // 填充业务参数
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易支付接口接口 <br>
+     * 适用于:条形码支付、声波支付等 <br>
+     *
+     * @param model        {AlipayTradePayModel}
+     * @param notifyUrl    异步通知URL
+     * @param appAuthToken 应用授权token
+     * @return {AlipayTradePayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradePayResponse tradePayToResponse(AlipayTradePayModel model, String notifyUrl, String appAuthToken) throws AlipayApiException {
+        AlipayTradePayRequest request = new AlipayTradePayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        request.putOtherTextParam("app_auth_token", appAuthToken);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单线下交易预创建 <br>
+     * 适用于:扫码支付等 <br>
+     *
+     * @param model     {@link AlipayTradePrecreateModel}
+     * @param notifyUrl 异步通知URL
+     * @return {@link AlipayTradePrecreateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradePrecreateResponse tradePrecreatePayToResponse(AlipayTradePrecreateModel model, String notifyUrl) throws AlipayApiException {
+        AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单线下交易预创建 <br>
+     * 适用于:扫码支付等 <br>
+     *
+     * @param model        {@link AlipayTradePrecreateModel}
+     * @param notifyUrl    异步通知URL
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradePrecreateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradePrecreateResponse tradePrecreatePayToResponse(AlipayTradePrecreateModel model,
+                                                                           String notifyUrl, String appAuthToken) throws AlipayApiException {
+        AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 单笔转账到支付宝账户
+     *
+     * @param model {@link AlipayFundTransToaccountTransferModel}
+     * @return 转账是否成功
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    @Deprecated
+    public static boolean transfer(AlipayFundTransToaccountTransferModel model) throws AlipayApiException {
+        AlipayFundTransToaccountTransferResponse response = transferToResponse(model);
+        String result = response.getBody();
+        if (response.isSuccess()) {
+            return true;
+        } else {
+            // 调用查询接口查询数据
+            JSONObject jsonObject = JSONObject.parseObject(result);
+            String outBizNo = jsonObject.getJSONObject("alipay_fund_trans_toaccount_transfer_response").getString("out_biz_no");
+            AlipayFundTransOrderQueryModel queryModel = new AlipayFundTransOrderQueryModel();
+            model.setOutBizNo(outBizNo);
+            return transferQuery(queryModel);
+        }
+    }
+
+    /**
+     * 单笔转账到支付宝账户
+     *
+     * @param model {@link AlipayFundTransToaccountTransferModel}
+     * @return {@link AlipayFundTransToaccountTransferResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundTransToaccountTransferResponse transferToResponse(AlipayFundTransToaccountTransferModel model) throws AlipayApiException {
+        AlipayFundTransToaccountTransferRequest request = new AlipayFundTransToaccountTransferRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 转账查询接口
+     *
+     * @param model {@link AlipayFundTransOrderQueryModel}
+     * @return 是否存在此
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    @Deprecated
+    public static boolean transferQuery(AlipayFundTransOrderQueryModel model) throws AlipayApiException {
+        AlipayFundTransOrderQueryResponse response = transferQueryToResponse(model);
+        return response.isSuccess();
+    }
+
+    /**
+     * 转账查询接口
+     *
+     * @param model {@link AlipayFundTransOrderQueryModel}
+     * @return {@link AlipayFundTransOrderQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundTransOrderQueryResponse transferQueryToResponse(AlipayFundTransOrderQueryModel model) throws AlipayApiException {
+        AlipayFundTransOrderQueryRequest request = new AlipayFundTransOrderQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一转账接口
+     *
+     * @param model        model {@link AlipayFundTransUniTransferModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayFundTransUniTransferResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundTransUniTransferResponse uniTransferToResponse(AlipayFundTransUniTransferModel model, String appAuthToken) throws AlipayApiException {
+        AlipayFundTransUniTransferRequest request = new AlipayFundTransUniTransferRequest();
+        request.setBizModel(model);
+        if (!StringUtils.isEmpty(appAuthToken)) {
+            request.putOtherTextParam("app_auth_token", appAuthToken);
+        }
+        return doExecute(request);
+    }
+
+    /**
+     * 转账业务单据查询接口
+     *
+     * @param model        model {@link AlipayFundTransCommonQueryModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayFundTransCommonQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundTransCommonQueryResponse transCommonQueryToResponse(AlipayFundTransCommonQueryModel model, String appAuthToken) throws AlipayApiException {
+        AlipayFundTransCommonQueryRequest request = new AlipayFundTransCommonQueryRequest();
+        request.setBizModel(model);
+        if (!StringUtils.isEmpty(appAuthToken)) {
+            request.putOtherTextParam("app_auth_token", appAuthToken);
+        }
+        return doExecute(request);
+    }
+
+    /**
+     * 支付宝资金账户资产查询接口
+     *
+     * @param model        model {@link AlipayFundAccountQueryModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayFundAccountQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundAccountQueryResponse accountQueryToResponse(AlipayFundAccountQueryModel model, String appAuthToken) throws AlipayApiException {
+        AlipayFundAccountQueryRequest request = new AlipayFundAccountQueryRequest();
+        request.setBizModel(model);
+        if (!StringUtils.isEmpty(appAuthToken)) {
+            request.putOtherTextParam("app_auth_token", appAuthToken);
+        }
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单线下交易查询接口
+     *
+     * @param model {@link AlipayTradeQueryModel}
+     * @return {@link AlipayTradeQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeQueryResponse tradeQueryToResponse(AlipayTradeQueryModel model) throws AlipayApiException {
+        AlipayTradeQueryRequest request = new AlipayTradeQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单线下交易查询接口
+     *
+     * @param model        {@link AlipayTradeQueryModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeQueryResponse tradeQueryToResponse(AlipayTradeQueryModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradeQueryRequest request = new AlipayTradeQueryRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 统一收单交易撤销接口
+     *
+     * @param model        {@link AlipayTradeCancelModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeCancelResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeCancelResponse tradeCancelToResponse(AlipayTradeCancelModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradeCancelRequest request = new AlipayTradeCancelRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 统一收单交易撤销接口
+     *
+     * @param model {@link AlipayTradeCancelModel}
+     * @return {@link AlipayTradeCancelResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeCancelResponse tradeCancelToResponse(AlipayTradeCancelModel model)
+            throws AlipayApiException {
+        AlipayTradeCancelRequest request = new AlipayTradeCancelRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易关闭接口
+     *
+     * @param model        {@link AlipayTradeCloseModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeCloseResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeCloseResponse tradeCloseToResponse(AlipayTradeCloseModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradeCloseRequest request = new AlipayTradeCloseRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+
+    }
+
+    /**
+     * 统一收单交易关闭接口
+     *
+     * @param model {@link AlipayTradeCloseModel}
+     * @return {@link AlipayTradeCloseResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeCloseResponse tradeCloseToResponse(AlipayTradeCloseModel model) throws AlipayApiException {
+        AlipayTradeCloseRequest request = new AlipayTradeCloseRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易创建接口
+     *
+     * @param model     {@link AlipayTradeCreateModel}
+     * @param notifyUrl 异步通知URL
+     * @return {@link AlipayTradeCreateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeCreateResponse tradeCreateToResponse(AlipayTradeCreateModel model, String notifyUrl) throws AlipayApiException {
+        AlipayTradeCreateRequest request = new AlipayTradeCreateRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易创建接口
+     *
+     * @param model        {@link AlipayTradeCreateModel}
+     * @param notifyUrl    异步通知URL
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeCreateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeCreateResponse tradeCreateToResponse(AlipayTradeCreateModel model, String notifyUrl, String appAuthToken) throws AlipayApiException {
+        AlipayTradeCreateRequest request = new AlipayTradeCreateRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 统一收单交易退款接口
+     *
+     * @param model {@link AlipayTradeRefundModel}
+     * @return {@link AlipayTradeRefundResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeRefundResponse tradeRefundToResponse(AlipayTradeRefundModel model) throws AlipayApiException {
+        AlipayTradeRefundRequest request = new AlipayTradeRefundRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易退款接口
+     *
+     * @param model        {@link AlipayTradeRefundModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeRefundResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeRefundResponse tradeRefundToResponse(AlipayTradeRefundModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradeRefundRequest request = new AlipayTradeRefundRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 统一收单退款页面接口
+     *
+     * @param model {@link AlipayTradePageRefundModel}
+     * @return {@link AlipayTradePageRefundResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradePageRefundResponse tradeRefundToResponse(AlipayTradePageRefundModel model) throws AlipayApiException {
+        AlipayTradePageRefundRequest request = new AlipayTradePageRefundRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单退款页面接口
+     *
+     * @param model        {@link AlipayTradePageRefundModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradePageRefundResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradePageRefundResponse tradeRefundToResponse(AlipayTradePageRefundModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradePageRefundRequest request = new AlipayTradePageRefundRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 统一收单交易退款查询
+     *
+     * @param model {@link AlipayTradeFastpayRefundQueryModel}
+     * @return {@link AlipayTradeFastpayRefundQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeFastpayRefundQueryResponse tradeRefundQueryToResponse(AlipayTradeFastpayRefundQueryModel model) throws AlipayApiException {
+        AlipayTradeFastpayRefundQueryRequest request = new AlipayTradeFastpayRefundQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易退款查询
+     *
+     * @param model        {@link AlipayTradeFastpayRefundQueryModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeFastpayRefundQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeFastpayRefundQueryResponse tradeRefundQueryToResponse(AlipayTradeFastpayRefundQueryModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradeFastpayRefundQueryRequest request = new AlipayTradeFastpayRefundQueryRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 查询对账单下载地址
+     *
+     * @param model {@link AlipayDataDataserviceBillDownloadurlQueryModel}
+     * @return 对账单下载地址
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static String billDownloadUrlQuery(AlipayDataDataserviceBillDownloadurlQueryModel model) throws AlipayApiException {
+        AlipayDataDataserviceBillDownloadurlQueryResponse response = billDownloadUrlQueryToResponse(model);
+        return response.getBillDownloadUrl();
+    }
+
+    /**
+     * 查询对账单下载地址
+     *
+     * @param model {@link AlipayDataDataserviceBillDownloadurlQueryModel}
+     * @return {@link AlipayDataDataserviceBillDownloadurlQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayDataDataserviceBillDownloadurlQueryResponse billDownloadUrlQueryToResponse(AlipayDataDataserviceBillDownloadurlQueryModel model) throws AlipayApiException {
+        AlipayDataDataserviceBillDownloadurlQueryRequest request = new AlipayDataDataserviceBillDownloadurlQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 查询对账单下载地址
+     *
+     * @param model        {@link AlipayDataDataserviceBillDownloadurlQueryModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayDataDataserviceBillDownloadurlQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayDataDataserviceBillDownloadurlQueryResponse billDownloadUrlQueryToResponse(AlipayDataDataserviceBillDownloadurlQueryModel model, String appAuthToken) throws AlipayApiException {
+        AlipayDataDataserviceBillDownloadurlQueryRequest request = new AlipayDataDataserviceBillDownloadurlQueryRequest();
+        request.setBizModel(model);
+        request.putOtherTextParam("app_auth_token", appAuthToken);
+        return doExecute(request);
+    }
+
+    /**
+     * 统一收单交易结算接口
+     *
+     * @param model        {@link AlipayTradeOrderSettleModel}
+     * @param appAuthToken 应用授权token
+     * @return {@link AlipayTradeOrderSettleResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeOrderSettleResponse tradeOrderSettleToResponse(AlipayTradeOrderSettleModel model, String appAuthToken) throws AlipayApiException {
+        AlipayTradeOrderSettleRequest request = new AlipayTradeOrderSettleRequest();
+        request.setBizModel(model);
+        return execute(request, null, appAuthToken);
+    }
+
+    /**
+     * 统一收单交易结算接口
+     *
+     * @param model {@link AlipayTradeOrderSettleModel}
+     * @return {@link AlipayTradeOrderSettleResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeOrderSettleResponse tradeOrderSettleToResponse(AlipayTradeOrderSettleModel model) throws AlipayApiException {
+        AlipayTradeOrderSettleRequest request = new AlipayTradeOrderSettleRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 电脑网站支付(PC支付)
+     *
+     * @param response  {@link HttpServletResponse}
+     * @param model     {@link AlipayTradePagePayModel}
+     * @param notifyUrl 异步通知URL
+     * @param returnUrl 同步通知URL
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void tradePage(HttpServletResponse response, AlipayTradePagePayModel model, String notifyUrl, String returnUrl) throws AlipayApiException, IOException {
+        AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        request.setReturnUrl(returnUrl);
+        String form = pageExecute(request).getBody();
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        PrintWriter out = response.getWriter();
+        out.write(form);
+        out.flush();
+        out.close();
+    }
+
+    /**
+     * 电脑网站支付(PC支付)
+     *
+     * @param response     {@link HttpServletResponse}
+     * @param model        {@link AlipayTradePagePayModel}
+     * @param notifyUrl    异步通知URL
+     * @param returnUrl    同步通知URL
+     * @param appAuthToken 应用授权token
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void tradePage(HttpServletResponse response, AlipayTradePagePayModel model, String notifyUrl, String returnUrl, String appAuthToken) throws AlipayApiException, IOException {
+        AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        request.setReturnUrl(returnUrl);
+        request.putOtherTextParam("app_auth_token", appAuthToken);
+        String form = pageExecute(request).getBody();
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        PrintWriter out = response.getWriter();
+        out.write(form);
+        out.flush();
+        out.close();
+    }
+
+    /**
+     * 电脑网站支付(PC支付)
+     *
+     * @param response  {@link HttpServletResponse}
+     * @param model     {@link AlipayTradePagePayModel}
+     * @param notifyUrl 异步通知URL
+     * @param returnUrl 同步通知URL
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void tradePageByOutputStream(HttpServletResponse response, AlipayTradePagePayModel model, String notifyUrl, String returnUrl) throws AlipayApiException, IOException {
+        AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        request.setReturnUrl(returnUrl);
+        String form = pageExecute(request).getBody();
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        OutputStream out = response.getOutputStream();
+        out.write(form.getBytes(AliPayApiConfigKit.getAliPayApiConfig().getCharset()));
+        response.getOutputStream().flush();
+    }
+
+    /**
+     * 电脑网站支付(PC支付)
+     *
+     * @param response     {@link HttpServletResponse}
+     * @param model        {@link AlipayTradePagePayModel}
+     * @param notifyUrl    异步通知URL
+     * @param returnUrl    同步通知URL
+     * @param appAuthToken 应用授权token
+     * @throws AlipayApiException 支付宝 Api 异常
+     * @throws IOException        IO 异常
+     */
+    public static void tradePageByOutputStream(HttpServletResponse response, AlipayTradePagePayModel model,
+                                               String notifyUrl, String returnUrl, String appAuthToken) throws AlipayApiException, IOException {
+        AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
+        request.setBizModel(model);
+        request.setNotifyUrl(notifyUrl);
+        request.setReturnUrl(returnUrl);
+        request.putOtherTextParam("app_auth_token", appAuthToken);
+        String form = pageExecute(request).getBody();
+        response.setContentType("text/html;charset=" + AliPayApiConfigKit.getAliPayApiConfig().getCharset());
+        OutputStream out = response.getOutputStream();
+        out.write(form.getBytes(AliPayApiConfigKit.getAliPayApiConfig().getCharset()));
+        response.getOutputStream().flush();
+    }
+
+    /**
+     * 资金预授权冻结接口
+     *
+     * @param model {@link AlipayFundAuthOrderFreezeModel}
+     * @return {@link AlipayFundAuthOrderFreezeResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundAuthOrderFreezeResponse authOrderFreezeToResponse(AlipayFundAuthOrderFreezeModel model) throws AlipayApiException {
+        AlipayFundAuthOrderFreezeRequest request = new AlipayFundAuthOrderFreezeRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 资金授权解冻接口
+     *
+     * @param model {@link AlipayFundAuthOrderUnfreezeModel}
+     * @return {@link AlipayFundAuthOrderUnfreezeResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundAuthOrderUnfreezeResponse authOrderUnfreezeToResponse(AlipayFundAuthOrderUnfreezeModel model) throws AlipayApiException {
+        AlipayFundAuthOrderUnfreezeRequest request = new AlipayFundAuthOrderUnfreezeRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 资金预授权冻结接口
+     *
+     * @param model {@link AlipayFundAuthOrderVoucherCreateModel}
+     * @return {@link AlipayFundAuthOrderVoucherCreateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundAuthOrderVoucherCreateResponse authOrderVoucherCreateToResponse(AlipayFundAuthOrderVoucherCreateModel model) throws AlipayApiException {
+        AlipayFundAuthOrderVoucherCreateRequest request = new AlipayFundAuthOrderVoucherCreateRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 资金授权撤销接口
+     *
+     * @param model {@link AlipayFundAuthOperationCancelModel}
+     * @return {@link AlipayFundAuthOperationCancelResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundAuthOperationCancelResponse authOperationCancelToResponse(AlipayFundAuthOperationCancelModel model) throws AlipayApiException {
+        AlipayFundAuthOperationCancelRequest request = new AlipayFundAuthOperationCancelRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 资金授权操作查询接口
+     *
+     * @param model {@link AlipayFundAuthOperationDetailQueryModel}
+     * @return {@link AlipayFundAuthOperationDetailQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundAuthOperationDetailQueryResponse authOperationDetailQueryToResponse(AlipayFundAuthOperationDetailQueryModel model) throws AlipayApiException {
+        AlipayFundAuthOperationDetailQueryRequest request = new AlipayFundAuthOperationDetailQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 红包无线支付接口
+     *
+     * @param model {@link AlipayFundCouponOrderAppPayModel}
+     * @return {@link AlipayFundCouponOrderAppPayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundCouponOrderAppPayResponse fundCouponOrderAppPayToResponse(AlipayFundCouponOrderAppPayModel model) throws AlipayApiException {
+        AlipayFundCouponOrderAppPayRequest request = new AlipayFundCouponOrderAppPayRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 红包页面支付接口
+     *
+     * @param model {@link AlipayFundCouponOrderPagePayModel}
+     * @return {@link AlipayFundCouponOrderPagePayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundCouponOrderPagePayResponse fundCouponOrderPagePayToResponse(AlipayFundCouponOrderPagePayModel model) throws AlipayApiException {
+        AlipayFundCouponOrderPagePayRequest request = new AlipayFundCouponOrderPagePayRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 红包协议支付接口
+     *
+     * @param model {@link AlipayFundCouponOrderAgreementPayModel}
+     * @return {@link AlipayFundCouponOrderAgreementPayResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundCouponOrderAgreementPayResponse fundCouponOrderAgreementPayToResponse(AlipayFundCouponOrderAgreementPayModel model) throws AlipayApiException {
+        AlipayFundCouponOrderAgreementPayRequest request = new AlipayFundCouponOrderAgreementPayRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 红包打款接口
+     *
+     * @param model {@link AlipayFundCouponOrderDisburseModel}
+     * @return {@link AlipayFundCouponOrderDisburseResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundCouponOrderDisburseResponse fundCouponOrderDisburseToResponse(AlipayFundCouponOrderDisburseModel model) throws AlipayApiException {
+        AlipayFundCouponOrderDisburseRequest request = new AlipayFundCouponOrderDisburseRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 红包退回接口
+     *
+     * @param model {@link AlipayFundCouponOrderRefundModel}
+     * @return {@link AlipayFundCouponOrderRefundResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundCouponOrderRefundResponse fundCouponOrderRefundToResponse(AlipayFundCouponOrderRefundModel model) throws AlipayApiException {
+        AlipayFundCouponOrderRefundRequest request = new AlipayFundCouponOrderRefundRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 红包退回接口
+     *
+     * @param model {@link AlipayFundCouponOperationQueryModel}
+     * @return {@link AlipayFundCouponOperationQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayFundCouponOperationQueryResponse fundCouponOperationQueryToResponse(AlipayFundCouponOperationQueryModel model) throws AlipayApiException {
+        AlipayFundCouponOperationQueryRequest request = new AlipayFundCouponOperationQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 应用授权 URL 拼装
+     *
+     * @param appId       应用编号
+     * @param redirectUri 回调 URI
+     * @return 应用授权 URL
+     * @throws UnsupportedEncodingException 编码异常
+     */
+    public static String getOauth2Url(String appId, String redirectUri) throws UnsupportedEncodingException {
+        return new StringBuffer().append("https://openauth.alipay.com/oauth2/appToAppAuth.htm?app_id=").append(appId).append("&redirect_uri=").append(URLEncoder.encode(redirectUri, "UTF-8")).toString();
+    }
+
+    /**
+     * 使用 app_auth_code 换取 app_auth_token
+     *
+     * @param model {@link AlipayOpenAuthTokenAppModel}
+     * @return {@link AlipayOpenAuthTokenAppResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayOpenAuthTokenAppResponse openAuthTokenAppToResponse(AlipayOpenAuthTokenAppModel model) throws AlipayApiException {
+        AlipayOpenAuthTokenAppRequest request = new AlipayOpenAuthTokenAppRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 查询授权信息
+     *
+     * @param model {@link AlipayOpenAuthTokenAppQueryModel}
+     * @return {@link AlipayOpenAuthTokenAppQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayOpenAuthTokenAppQueryResponse openAuthTokenAppQueryToResponse(AlipayOpenAuthTokenAppQueryModel model) throws AlipayApiException {
+        AlipayOpenAuthTokenAppQueryRequest request = new AlipayOpenAuthTokenAppQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 地铁购票发码
+     *
+     * @param model {@link AlipayCommerceCityfacilitatorVoucherGenerateModel}
+     * @return {@link AlipayCommerceCityfacilitatorVoucherGenerateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayCommerceCityfacilitatorVoucherGenerateResponse voucherGenerateToResponse(AlipayCommerceCityfacilitatorVoucherGenerateModel model) throws AlipayApiException {
+        AlipayCommerceCityfacilitatorVoucherGenerateRequest request = new AlipayCommerceCityfacilitatorVoucherGenerateRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 地铁购票发码退款
+     *
+     * @param model {@link AlipayCommerceCityfacilitatorVoucherRefundModel}
+     * @return {@link AlipayCommerceCityfacilitatorVoucherRefundResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayCommerceCityfacilitatorVoucherRefundResponse metroRefundToResponse(AlipayCommerceCityfacilitatorVoucherRefundModel model) throws AlipayApiException {
+        AlipayCommerceCityfacilitatorVoucherRefundRequest request = new AlipayCommerceCityfacilitatorVoucherRefundRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 地铁车站数据查询
+     *
+     * @param model {@link AlipayCommerceCityfacilitatorStationQueryModel}
+     * @return {@link AlipayCommerceCityfacilitatorStationQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayCommerceCityfacilitatorStationQueryResponse stationQueryToResponse(AlipayCommerceCityfacilitatorStationQueryModel model) throws AlipayApiException {
+        AlipayCommerceCityfacilitatorStationQueryRequest request = new AlipayCommerceCityfacilitatorStationQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 核销码批量查询
+     *
+     * @param model {@link AlipayCommerceCityfacilitatorVoucherBatchqueryModel}
+     * @return {@link AlipayCommerceCityfacilitatorVoucherBatchqueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayCommerceCityfacilitatorVoucherBatchqueryResponse voucherBatchqueryToResponse(AlipayCommerceCityfacilitatorVoucherBatchqueryModel model) throws AlipayApiException {
+        AlipayCommerceCityfacilitatorVoucherBatchqueryRequest request = new AlipayCommerceCityfacilitatorVoucherBatchqueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    public static void batchTrans(Map<String, String> params, String privateKey, String signType, HttpServletResponse response) throws IOException {
+        params.put("service", "batch_trans_notify");
+        params.put("_input_charset", "UTF-8");
+        params.put("pay_date", DateUtil.format(new Date(), "YYYYMMDD"));
+        Map<String, String> param = AliPayCore.buildRequestPara(params, privateKey, signType);
+        response.sendRedirect(GATEWAY_NEW.concat(AliPayCore.createLinkString(param)));
+    }
+
+    /**
+     * 将异步通知的参数转化为Map
+     *
+     * @param request {HttpServletRequest}
+     * @return 转化后的Map
+     */
+    public static Map<String, String> toMap(HttpServletRequest request) {
+        Map<String, String> params = new HashMap<String, String>();
+        Map<String, String[]> requestParams = request.getParameterMap();
+        for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext(); ) {
+            String name = iter.next();
+            String[] values = requestParams.get(name);
+            String valueStr = "";
+            for (int i = 0; i < values.length; i++) {
+                valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ",";
+            }
+            params.put(name, valueStr);
+        }
+        return params;
+    }
+
+    /**
+     * 生活缴费查询账单
+     *
+     * @param orderType       支付宝订单类型
+     * @param merchantOrderNo 业务流水号
+     * @return {@link AlipayEbppBillGetResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayEbppBillGetResponse ebppBillGet(String orderType, String merchantOrderNo) throws AlipayApiException {
+        AlipayEbppBillGetRequest request = new AlipayEbppBillGetRequest();
+        request.setOrderType(orderType);
+        request.setMerchantOrderNo(merchantOrderNo);
+        return doExecute(request);
+    }
+
+    /**
+     * H5刷脸认证初始化
+     *
+     * @param model {@link ZolozIdentificationUserWebInitializeModel}
+     * @return {@link ZolozIdentificationUserWebInitializeResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozIdentificationUserWebInitializeResponse identificationUserWebInitialize(ZolozIdentificationUserWebInitializeModel model) throws AlipayApiException {
+        ZolozIdentificationUserWebInitializeRequest request = new ZolozIdentificationUserWebInitializeRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * H5刷脸认证查询
+     *
+     * @param model {@link ZolozIdentificationUserWebQueryModel}
+     * @return {@link ZolozIdentificationUserWebQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozIdentificationUserWebQueryResponse identificationUserWebInitialize(ZolozIdentificationUserWebQueryModel model) throws AlipayApiException {
+        ZolozIdentificationUserWebQueryRequest request = new ZolozIdentificationUserWebQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 热脸入库
+     *
+     * @param model {@link ZolozAuthenticationCustomerFacemanageCreateModel}
+     * @return {@link ZolozAuthenticationCustomerFacemanageCreateResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozAuthenticationCustomerFacemanageCreateResponse authenticationCustomerFaceManageCreate(ZolozAuthenticationCustomerFacemanageCreateModel model) throws AlipayApiException {
+        ZolozAuthenticationCustomerFacemanageCreateRequest request = new ZolozAuthenticationCustomerFacemanageCreateRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 热脸出库
+     *
+     * @param model {@link ZolozAuthenticationCustomerFacemanageDeleteModel}
+     * @return {@link ZolozAuthenticationCustomerFacemanageDeleteResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozAuthenticationCustomerFacemanageDeleteResponse authenticationCustomerFaceManageDelete(ZolozAuthenticationCustomerFacemanageDeleteModel model) throws AlipayApiException {
+        ZolozAuthenticationCustomerFacemanageDeleteRequest request = new ZolozAuthenticationCustomerFacemanageDeleteRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 人脸 ftoken 查询消费接口
+     *
+     * @param model {@link ZolozAuthenticationCustomerFtokenQueryModel}
+     * @return {@link ZolozAuthenticationCustomerFtokenQueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozAuthenticationCustomerFtokenQueryResponse
+    authenticationCustomerFTokenQuery(ZolozAuthenticationCustomerFtokenQueryModel model) throws AlipayApiException {
+        ZolozAuthenticationCustomerFtokenQueryRequest request = new ZolozAuthenticationCustomerFtokenQueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 人脸初始化刷脸付
+     *
+     * @param model {@link ZolozAuthenticationSmilepayInitializeModel}
+     * @return {@link ZolozAuthenticationSmilepayInitializeResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozAuthenticationSmilepayInitializeResponse authenticationSmilePayInitialize(ZolozAuthenticationSmilepayInitializeModel model) throws AlipayApiException {
+        ZolozAuthenticationSmilepayInitializeRequest request = new ZolozAuthenticationSmilepayInitializeRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 人脸初始化唤起zim
+     *
+     * @param model {@link ZolozAuthenticationCustomerSmilepayInitializeModel}
+     * @return {@link ZolozAuthenticationCustomerSmilepayInitializeResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static ZolozAuthenticationCustomerSmilepayInitializeResponse authenticationCustomerSmilePayInitialize(ZolozAuthenticationCustomerSmilepayInitializeModel model) throws AlipayApiException {
+        ZolozAuthenticationCustomerSmilepayInitializeRequest request = new ZolozAuthenticationCustomerSmilepayInitializeRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 生态激励项目ISV代签约接口
+     *
+     * @return {@link AlipayCommerceAdContractSignResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayCommerceAdContractSignResponse commerceAdContractSign() throws AlipayApiException {
+        AlipayCommerceAdContractSignRequest request = new AlipayCommerceAdContractSignRequest();
+        return doExecute(request);
+    }
+
+    /**
+     * 分账关系绑定
+     *
+     * @param model {@link AlipayTradeRoyaltyRelationBindModel}
+     * @return {@link AlipayTradeRoyaltyRelationBindResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeRoyaltyRelationBindResponse tradeRoyaltyRelationBind(
+            AlipayTradeRoyaltyRelationBindModel model) throws AlipayApiException {
+        AlipayTradeRoyaltyRelationBindRequest request = new AlipayTradeRoyaltyRelationBindRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 分账关系解绑
+     *
+     * @param model {@link AlipayTradeRoyaltyRelationUnbindModel}
+     * @return {@link AlipayTradeRoyaltyRelationUnbindResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeRoyaltyRelationUnbindResponse tradeRoyaltyRelationUnBind(
+            AlipayTradeRoyaltyRelationUnbindModel model) throws AlipayApiException {
+        AlipayTradeRoyaltyRelationUnbindRequest request = new AlipayTradeRoyaltyRelationUnbindRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+    /**
+     * 分账关系查询
+     *
+     * @param model {@link AlipayTradeRoyaltyRelationBatchqueryModel}
+     * @return {@link AlipayTradeRoyaltyRelationBatchqueryResponse}
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public static AlipayTradeRoyaltyRelationBatchqueryResponse tradeRoyaltyRelationBatchQuery(
+            AlipayTradeRoyaltyRelationBatchqueryModel model) throws AlipayApiException {
+        AlipayTradeRoyaltyRelationBatchqueryRequest request = new AlipayTradeRoyaltyRelationBatchqueryRequest();
+        request.setBizModel(model);
+        return doExecute(request);
+    }
+
+}

+ 257 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayApiConfig.java

@@ -0,0 +1,257 @@
+package com.medipath.cif.configurer.alipay;
+
+import cn.hutool.core.io.IORuntimeException;
+import cn.hutool.core.io.IoUtil;
+import cn.hutool.core.util.StrUtil;
+import com.alipay.api.AlipayApiException;
+import com.alipay.api.AlipayClient;
+import com.alipay.api.CertAlipayRequest;
+import com.alipay.api.DefaultAlipayClient;
+import com.medipath.cif.util.FileUtils;
+
+import java.io.InputStream;
+import java.io.Serializable;
+import java.nio.charset.Charset;
+
+/**
+ * <p>IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付常用的支付方式以及各种常用的接口。</p>
+ *
+ * <p>不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。 </p>
+ *
+ * <p>IJPay 交流群: 723992875</p>
+ *
+ * <p>Node.js 版: https://gitee.com/javen205/TNWXX</p>
+ *
+ * <p>支付宝支付配置</p>
+ *
+ * @author Javen
+ */
+public class AliPayApiConfig implements Serializable {
+    private static final long serialVersionUID = -4736760736935998953L;
+
+    private String privateKey;
+    private String aliPayPublicKey;
+    private String appId;
+    private String serviceUrl;
+    private String charset;
+    private String signType;
+    private String format;
+    private boolean certModel;
+    private String appCertPath;
+    private String aliPayCertPath;
+    private String aliPayRootCertPath;
+    private AlipayClient alipayClient;
+    private String domain;
+
+    private AliPayApiConfig() {
+    }
+
+    public static AliPayApiConfig builder() {
+        return new AliPayApiConfig();
+    }
+
+    /**
+     * 普通公钥方式
+     *
+     * @return AliPayApiConfig 支付宝配置
+     */
+    public AliPayApiConfig build() {
+        this.alipayClient = new DefaultAlipayClient(getServiceUrl(), getAppId(), getPrivateKey(), getFormat(),
+                getCharset(), getAliPayPublicKey(), getSignType());
+        return this;
+    }
+
+    /**
+     * 证书模式
+     *
+     * @return AliPayApiConfig 支付宝配置
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public AliPayApiConfig buildByCert() throws AlipayApiException {
+        return build(getAppCertPath(), getAliPayCertPath(), getAliPayRootCertPath());
+    }
+
+    /**
+     * @param appCertPath        应用公钥证书路径
+     * @param aliPayCertPath     支付宝公钥证书文件路径
+     * @param aliPayRootCertPath 支付宝CA根证书文件路径
+     * @return {@link AliPayApiConfig}  支付宝支付配置
+     * @throws AlipayApiException 支付宝 Api 异常
+     */
+    public AliPayApiConfig build(String appCertPath, String aliPayCertPath, String aliPayRootCertPath) throws AlipayApiException {
+        CertAlipayRequest certAlipayRequest = new CertAlipayRequest();
+        certAlipayRequest.setServerUrl(getServiceUrl());
+        certAlipayRequest.setAppId(getAppId());
+        certAlipayRequest.setPrivateKey(getPrivateKey());
+        certAlipayRequest.setFormat(getFormat());
+        certAlipayRequest.setCharset(getCharset());
+        certAlipayRequest.setSignType(getSignType());
+        // 传入证书绝对路径
+        //        certAlipayRequest.setCertPath(appCertPath);
+        //        certAlipayRequest.setAlipayPublicCertPath(aliPayCertPath);
+        //        certAlipayRequest.setRootCertPath(aliPayRootCertPath);
+
+        // 传入读取证书内容
+        certAlipayRequest.setCertContent(readFileToString(appCertPath));
+        certAlipayRequest.setRootCertContent(readFileToString(aliPayRootCertPath));
+        certAlipayRequest.setAlipayPublicCertContent(readFileToString(aliPayCertPath));
+
+        this.alipayClient = new DefaultAlipayClient(certAlipayRequest);
+        this.certModel = true;
+        return this;
+    }
+
+    public String readFileToString(String path) {
+        InputStream inputStream = FileUtils.buildInputStream(path);
+        try {
+            return IoUtil.read(inputStream, Charset.defaultCharset());
+        } catch (IORuntimeException e) {
+            throw new RuntimeException("支付宝证书加载出错", e);
+        } finally {
+            IoUtil.close(inputStream);
+        }
+    }
+
+    public String getPrivateKey() {
+        if (StrUtil.isBlank(privateKey)) {
+            throw new IllegalStateException("privateKey 未被赋值");
+        }
+        return privateKey;
+    }
+
+    public AliPayApiConfig setPrivateKey(String privateKey) {
+        if (StrUtil.isEmpty(privateKey)) {
+            throw new IllegalArgumentException("privateKey 值不能为 null");
+        }
+        this.privateKey = privateKey;
+        return this;
+    }
+
+    public String getAliPayPublicKey() {
+        return aliPayPublicKey;
+    }
+
+    public AliPayApiConfig setAliPayPublicKey(String aliPayPublicKey) {
+        this.aliPayPublicKey = aliPayPublicKey;
+        return this;
+    }
+
+    public String getAppId() {
+        if (StrUtil.isEmpty(appId)) {
+            throw new IllegalStateException("appId 未被赋值");
+        }
+        return appId;
+    }
+
+    public AliPayApiConfig setAppId(String appId) {
+        if (StrUtil.isEmpty(appId)) {
+            throw new IllegalArgumentException("appId 值不能为 null");
+        }
+        this.appId = appId;
+        return this;
+    }
+
+    public String getServiceUrl() {
+        if (StrUtil.isEmpty(serviceUrl)) {
+            throw new IllegalStateException("serviceUrl 未被赋值");
+        }
+        return serviceUrl;
+    }
+
+    public AliPayApiConfig setServiceUrl(String serviceUrl) {
+        if (StrUtil.isEmpty(serviceUrl)) {
+            serviceUrl = "https://openapi.alipay.com/gateway.do";
+        }
+        this.serviceUrl = serviceUrl;
+        return this;
+    }
+
+    public String getCharset() {
+        if (StrUtil.isEmpty(charset)) {
+            charset = "UTF-8";
+        }
+        return charset;
+    }
+
+    public AliPayApiConfig setCharset(String charset) {
+        if (StrUtil.isEmpty(charset)) {
+            charset = "UTF-8";
+        }
+        this.charset = charset;
+        return this;
+    }
+
+    public String getSignType() {
+        if (StrUtil.isEmpty(signType)) {
+            signType = "RSA2";
+        }
+        return signType;
+    }
+
+    public AliPayApiConfig setSignType(String signType) {
+        if (StrUtil.isEmpty(signType)) {
+            signType = "RSA2";
+        }
+        this.signType = signType;
+        return this;
+    }
+
+    public String getFormat() {
+        if (StrUtil.isEmpty(format)) {
+            format = "json";
+        }
+        return format;
+    }
+
+    public String getAppCertPath() {
+        return appCertPath;
+    }
+
+    public AliPayApiConfig setAppCertPath(String appCertPath) {
+        this.appCertPath = appCertPath;
+        return this;
+    }
+
+    public String getAliPayCertPath() {
+        return aliPayCertPath;
+    }
+
+    public AliPayApiConfig setAliPayCertPath(String aliPayCertPath) {
+        this.aliPayCertPath = aliPayCertPath;
+        return this;
+    }
+
+    public String getAliPayRootCertPath() {
+        return aliPayRootCertPath;
+    }
+
+    public AliPayApiConfig setAliPayRootCertPath(String aliPayRootCertPath) {
+        this.aliPayRootCertPath = aliPayRootCertPath;
+        return this;
+    }
+
+    public boolean isCertModel() {
+        return certModel;
+    }
+
+    public AliPayApiConfig setCertModel(boolean certModel) {
+        this.certModel = certModel;
+        return this;
+    }
+
+    public AlipayClient getAliPayClient() {
+        if (alipayClient == null) {
+            throw new IllegalStateException("aliPayClient 未被初始化");
+        }
+        return alipayClient;
+    }
+
+    public AliPayApiConfig setDomain(String domain) {
+        this.domain = domain;
+        return this;
+    }
+
+    public String getDomain() {
+        return domain;
+    }
+}

+ 127 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayApiConfigKit.java

@@ -0,0 +1,127 @@
+package com.medipath.cif.configurer.alipay;
+
+import cn.hutool.core.util.StrUtil;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * <p>IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付常用的支付方式以及各种常用的接口。</p>
+ *
+ * <p>不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。 </p>
+ *
+ * <p>IJPay 交流群: 723992875</p>
+ *
+ * <p>Node.js 版: https://gitee.com/javen205/TNWX</p>
+ *
+ * @author Javen
+ */
+public class AliPayApiConfigKit {
+    private static final ThreadLocal<String> TL = new ThreadLocal<>();
+
+    private static final Map<String, AliPayApiConfig> CFG_MAP = new ConcurrentHashMap<>();
+    private static final String DEFAULT_CFG_KEY = "_default_key_";
+
+    /**
+     * <p>向缓存中设置 AliPayApiConfig </p>
+     * <p>每个 appId 只需添加一次,相同 appId 将被覆盖</p>
+     *
+     * @param aliPayApiConfig 支付宝支付配置
+     * @return {@link AliPayApiConfig}
+     */
+    public static AliPayApiConfig putApiConfig(AliPayApiConfig aliPayApiConfig) {
+        if (CFG_MAP.size() == 0) {
+            CFG_MAP.put(DEFAULT_CFG_KEY, aliPayApiConfig);
+        }
+        return CFG_MAP.put(aliPayApiConfig.getAppId(), aliPayApiConfig);
+    }
+
+    /**
+     * 向当前线程中设置 {@link AliPayApiConfig}
+     *
+     * @param aliPayApiConfig {@link AliPayApiConfig} 支付宝配置对象
+     * @return {@link AliPayApiConfig}
+     */
+    public static AliPayApiConfig setThreadLocalAliPayApiConfig(AliPayApiConfig aliPayApiConfig) {
+        if (StrUtil.isNotEmpty(aliPayApiConfig.getAppId())){
+            setThreadLocalAppId(aliPayApiConfig.getAppId());
+        }
+        return putApiConfig(aliPayApiConfig);
+    }
+
+    /**
+     * 通过 AliPayApiConfig 移除支付配置
+     *
+     * @param aliPayApiConfig {@link AliPayApiConfig} 支付宝配置对象
+     * @return {@link AliPayApiConfig}
+     */
+    public static AliPayApiConfig removeApiConfig(AliPayApiConfig aliPayApiConfig) {
+        return removeApiConfig(aliPayApiConfig.getAppId());
+    }
+
+    /**
+     * 通过 appId 移除支付配置
+     *
+     * @param appId 支付宝应用编号
+     * @return {@link AliPayApiConfig}
+     */
+    public static AliPayApiConfig removeApiConfig(String appId) {
+        return CFG_MAP.remove(appId);
+    }
+
+    /**
+     * 向当前线程中设置 appId
+     *
+     * @param appId 支付宝应用编号
+     */
+    public static void setThreadLocalAppId(String appId) {
+        if (StrUtil.isEmpty(appId)) {
+            appId = CFG_MAP.get(DEFAULT_CFG_KEY).getAppId();
+        }
+        TL.set(appId);
+    }
+
+    /**
+     * 移除当前线程中的 appId
+     */
+    public static void removeThreadLocalAppId() {
+        TL.remove();
+    }
+
+    /**
+     * 获取当前线程中的  appId
+     *
+     * @return 支付宝应用编号 appId
+     */
+    public static String getAppId() {
+        String appId = TL.get();
+        if (StrUtil.isEmpty(appId)) {
+            appId = CFG_MAP.get(DEFAULT_CFG_KEY).getAppId();
+        }
+        return appId;
+    }
+
+    /**
+     * 获取当前线程中的 AliPayApiConfig
+     *
+     * @return {@link AliPayApiConfig}
+     */
+    public static AliPayApiConfig getAliPayApiConfig() {
+        String appId = getAppId();
+        return getApiConfig(appId);
+    }
+
+    /**
+     * 通过 appId 获取 AliPayApiConfig
+     *
+     * @param appId 支付宝应用编号
+     * @return {@link AliPayApiConfig}
+     */
+    public static AliPayApiConfig getApiConfig(String appId) {
+        AliPayApiConfig cfg = CFG_MAP.get(appId);
+        if (cfg == null) {
+            throw new IllegalStateException("需事先调用 AliPayApiConfigKit.putApiConfig(aliPayApiConfig) 将 appId对应的 aliPayApiConfig 对象存入,才可以使用 AliPayApiConfigKit.getAliPayApiConfig() 的系列方法");
+        }
+        return cfg;
+    }
+}

+ 103 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayCore.java

@@ -0,0 +1,103 @@
+package com.medipath.cif.configurer.alipay;
+
+import cn.hutool.crypto.SecureUtil;
+import enums.SignType;
+
+import java.util.*;
+
+/**
+ * <p>IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付常用的支付方式以及各种常用的接口。</p>
+ *
+ * <p>不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。 </p>
+ *
+ * <p>IJPay 交流群: 723992875</p>
+ *
+ * <p>Node.js 版: https://gitee.com/javen205/TNWX</p>
+ *
+ * @author Javen
+ */
+public class AliPayCore {
+
+    /**
+     * 生成签名结果
+     *
+     * @param params   要签名的数组
+     * @param key      签名密钥
+     * @param signType 签名类型
+     * @return 签名结果字符串
+     */
+    public static String buildRequestMySign(Map<String, String> params, String key, String signType) {
+        // 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
+        String preStr = createLinkString(params);
+        if (SignType.MD5.getType().equals(signType)) {
+            return SecureUtil.md5(preStr.concat(key));
+        }
+        return null;
+    }
+
+    /**
+     * 生成要请求给支付宝的参数数组
+     *
+     * @param params   请求前的参数数组
+     * @param key      商户的私钥
+     * @param signType 签名类型
+     * @return 要请求的参数数组
+     */
+    public static Map<String, String> buildRequestPara(Map<String, String> params, String key, String signType) {
+        // 除去数组中的空值和签名参数
+        Map<String, String> tempMap = paraFilter(params);
+        // 生成签名结果
+        String mySign = buildRequestMySign(params, key, signType);
+
+        // 签名结果与签名方式加入请求提交参数组中
+        tempMap.put("sign", mySign);
+        tempMap.put("sign_type", signType);
+
+        return tempMap;
+    }
+
+    /**
+     * 除去数组中的空值和签名参数
+     *
+     * @param sArray 签名参数组
+     * @return 去掉空值与签名参数后的新签名参数组
+     */
+    public static Map<String, String> paraFilter(Map<String, String> sArray) {
+        Map<String, String> result = new HashMap<String, String>(sArray.size());
+        if (sArray == null || sArray.size() <= 0) {
+            return result;
+        }
+        for (String key : sArray.keySet()) {
+            String value = sArray.get(key);
+            if (value == null || "".equals(value) || "sign".equalsIgnoreCase(key)
+                    || "sign_type".equalsIgnoreCase(key)) {
+                continue;
+            }
+            result.put(key, value);
+        }
+        return result;
+    }
+
+    /**
+     * 把数组所有元素排序
+     *
+     * @param params 需要排序并参与字符拼接的参数组
+     * @return 拼接后字符串
+     */
+    public static String createLinkString(Map<String, String> params) {
+        List<String> keys = new ArrayList<String>(params.keySet());
+        Collections.sort(keys);
+        StringBuffer content = new StringBuffer();
+        for (int i = 0; i < keys.size(); i++) {
+            String key = keys.get(i);
+            String value = params.get(key);
+            // 拼接时,不包括最后一个&字符
+            if (i == keys.size() - 1) {
+                content.append(key + "=" + value);
+            } else {
+                content.append(key + "=" + value + "&");
+            }
+        }
+        return content.toString();
+    }
+}

+ 55 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/AliPayProperties.java

@@ -0,0 +1,55 @@
+package com.medipath.cif.configurer.alipay;
+
+import com.alibaba.fastjson.JSON;
+import com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties;
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.cloud.context.config.annotation.RefreshScope;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+
+/**
+ * <p>IJPay 让支付触手可及,封装了微信支付、支付宝支付、银联支付常用的支付方式以及各种常用的接口。</p>
+ *
+ * <p>不依赖任何第三方 mvc 框架,仅仅作为工具使用简单快速完成支付模块的开发,可轻松嵌入到任何系统里。 </p>
+ *
+ * <p>IJPay 交流群: 723992875</p>
+ *
+ * <p>Node.js 版: https://gitee.com/javen205/TNWX</p>
+ *
+ * <p>支付宝配置 Bean</p>
+ *
+ * @author Javen
+ */
+@Component
+@NacosConfigurationProperties(dataId = "alipay-${spring.profiles.active}.properties",
+        autoRefreshed = true
+)
+@RefreshScope
+@ConfigurationProperties(prefix = "alipay")
+@Data
+public class AliPayProperties {
+
+    private String defaultAppId;
+
+    private List<AliPayConfig> configs;
+
+    @Data
+    public static class AliPayConfig {
+        private String appId;
+        private String privateKey;
+        private String publicKey;
+        private String appCertPath;
+        private String aliPayCertPath;
+        private String aliPayRootCertPath;
+        private String serverUrl;
+        private String domain;
+    }
+
+    @Override
+    public String toString() {
+        return JSON.toJSONString(this);
+    }
+
+}

+ 745 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/MyAlipaySignature.java

@@ -0,0 +1,745 @@
+/**
+ * Alipay.com Inc. Copyright (c) 2004-2012 All Rights Reserved.
+ */
+package com.medipath.cif.configurer.alipay;
+
+import com.alipay.api.AlipayApiException;
+import com.alipay.api.AlipayConstants;
+import com.alipay.api.internal.util.AlipayHashMap;
+import com.alipay.api.internal.util.RequestParametersHolder;
+import com.alipay.api.internal.util.SignSourceData;
+import com.alipay.api.internal.util.StringUtils;
+import com.alipay.api.internal.util.asymmetric.AsymmetricManager;
+import com.alipay.api.internal.util.asymmetric.RSAEncryptor;
+
+import java.io.InputStream;
+import java.security.PrivateKey;
+import java.security.PublicKey;
+import java.util.*;
+
+/**
+ * @author junying.wjy
+ */
+public class MyAlipaySignature {
+    /**
+     * 通用签名方法
+     *
+     * @param content    待签名内容
+     * @param privateKey 私钥
+     * @param charset    编码格式
+     * @param signType   签名类型:RSA、RSA2、SM2
+     * @return
+     * @throws AlipayApiException
+     */
+    public static String sign(String content, String privateKey, String charset,
+                              String signType) throws AlipayApiException {
+
+        return AsymmetricManager.getByName(signType).sign(content, charset, privateKey);
+    }
+
+    /**
+     * 通用签名方法
+     *
+     * @param params     待签名内容
+     * @param privateKey 私钥
+     * @param charset    编码格式
+     * @param signType   签名类型:RSA、RSA2、SM2
+     * @return
+     * @throws AlipayApiException
+     */
+    public static String sign(Map<String, String> params, String privateKey, String charset,
+                              String signType) throws AlipayApiException {
+        String signContent = getSignContent(params);
+        return AsymmetricManager.getByName(signType).sign(signContent, charset, privateKey);
+    }
+
+    /**
+     * 密钥模式RSA、RSA2、SM2通用验签方法,主要用于支付接口的返回参数的验签比如:当面付,APP支付,手机网站支付,电脑网站支付
+     *
+     * @param params    待验签的从支付宝接收到的参数Map
+     * @param publicKey 支付宝公钥
+     * @param charset   参数内容编码集
+     * @param signType  指定采用的签名方式,RSA、RSA2、SM2
+     * @return true:验签通过;false:验签不通过
+     * @throws AlipayApiException
+     */
+    public static boolean verifyV1(Map<String, String> params, String publicKey,
+                                   String charset, String signType) throws AlipayApiException {
+        String sign = params.get("sign");
+        String content = getSignCheckContentV1(params);
+
+        return AsymmetricManager.getByName(signType).verify(content, charset, publicKey, sign);
+    }
+
+    /**
+     * 证书模式RSA、RSA2、SM2通用验签方法,主要用于支付接口的返回参数的验签比如:当面付,APP支付,手机网站支付,电脑网站支付
+     *
+     * @param params               待验签的从支付宝接收到的参数Map
+     * @param alipayPublicCertPath 支付宝公钥路径
+     * @param charset              参数内容编码集
+     * @param signType             指定采用的签名方式,RSA、RSA2、SM2
+     * @return true:验签通过;false:验签不通过
+     * @throws AlipayApiException
+     */
+    public static boolean certVerifyV1(Map<String, String> params, String alipayPublicCertPath,
+                                       String charset, String signType) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+        return verifyV1(params, publicKey, charset, signType);
+    }
+
+    /**
+     * 密钥模式RSA、RSA2、SM2通用验签方法,主要是用于生活号相关的事件消息和口碑服务市场订购信息等发送到应用网关地址的异步信息的验签
+     *
+     * @param params    待验签的从支付宝接收到的参数Map
+     * @param publicKey 支付宝公钥
+     * @param charset   参数内容编码集
+     * @param signType  指定采用的签名方式,RSA、RSA2、SM2
+     * @return true:验签通过;false:验签不通过
+     * @throws AlipayApiException
+     */
+    public static boolean verifyV2(Map<String, String> params, String publicKey,
+                                   String charset, String signType) throws AlipayApiException {
+        String sign = params.get("sign");
+        String content = getSignCheckContentV2(params);
+
+        return AsymmetricManager.getByName(signType).verify(content, charset, publicKey, sign);
+    }
+
+    /**
+     * 证书模式RSA、RSA2、SM2通用验签方法,主要是用于生活号相关的事件消息和口碑服务市场订购信息等发送到应用网关地址的异步信息的验签
+     *
+     * @param params               待验签的从支付宝接收到的参数Map
+     * @param alipayPublicCertPath 支付宝公钥路径
+     * @param charset              参数内容编码集
+     * @param signType             指定采用的签名方式,RSA、RSA2、SM2
+     * @return true:验签通过;false:验签不通过
+     * @throws AlipayApiException
+     */
+    public static boolean certVerifyV2(Map<String, String> params, String alipayPublicCertPath,
+                                       String charset, String signType) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+
+        return verifyV2(params, publicKey, charset, signType);
+    }
+
+    /**
+     * 密钥模式RSA、RSA2、SM2通用验签方法
+     *
+     * @param content   待验签字符串
+     * @param sign      签名
+     * @param publicKey 支付宝公钥
+     * @param charset   参数内容编码集
+     * @param signType  指定采用的签名方式,RSA、RSA2、SM2
+     * @return
+     * @throws AlipayApiException
+     */
+    public static boolean verify(String content, String sign, String publicKey, String charset,
+                                 String signType) throws AlipayApiException {
+
+        return AsymmetricManager.getByName(signType).verify(content, charset, publicKey, sign);
+    }
+
+    /**
+     * 证书模式RSA、RSA2、SM2通用验签方法
+     *
+     * @param content              待验签字符串
+     * @param sign                 签名
+     * @param alipayPublicCertPath 支付宝公钥路径
+     * @param charset              参数内容编码集
+     * @param signType             指定采用的签名方式,RSA、RSA2、SM2
+     * @return
+     * @throws AlipayApiException
+     */
+    public static boolean certVerify(String content, String sign, String alipayPublicCertPath, String charset,
+                                     String signType) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+        return verify(content, sign, publicKey, charset, signType);
+    }
+
+    /**
+     * 公钥加密
+     *
+     * @param content   待加密内容
+     * @param publicKey 公钥
+     * @param charset   字符集,如UTF-8, GBK, GB2312
+     * @param signType  指定采用的签名方式,RSA、RSA2、SM2
+     * @return 密文内容
+     * @throws AlipayApiException
+     */
+    public static String encrypt(String content, String publicKey,
+                                 String charset, String signType) throws AlipayApiException {
+        return AsymmetricManager.getByName(signType).encrypt(content, charset, publicKey);
+    }
+
+    /**
+     * 私钥解密
+     *
+     * @param content    待解密内容
+     * @param privateKey 私钥
+     * @param charset    字符集,如UTF-8, GBK, GB2312
+     * @param signType   指定采用的签名方式,RSA、RSA2、SM2
+     * @return 明文内容
+     * @throws AlipayApiException
+     */
+    public static String decrypt(String content, String privateKey,
+                                 String charset, String signType) throws AlipayApiException {
+
+        return AsymmetricManager.getByName(signType).decrypt(content, charset, privateKey);
+    }
+
+    /**
+     * 加密并签名<br> <b>目前适用于公众号</b>
+     *
+     * @param bizContent      待加密、签名内容
+     * @param alipayPublicKey 支付宝公钥
+     * @param cusPrivateKey   商户私钥
+     * @param charset         字符集,如UTF-8, GBK, GB2312
+     * @param isEncrypt       是否加密,true-加密  false-不加密
+     * @param isSign          是否签名,true-签名  false-不签名
+     * @param signType        指定采用的签名方式,RSA、RSA2、SM2
+     * @return 加密、签名后xml内容字符串 <p> 返回示例: <alipay> <response>密文</response> <encryption_type>RSA</encryption_type> <sign>sign</sign>
+     * <sign_type>RSA</sign_type> </alipay> </p>
+     * @throws AlipayApiException
+     */
+    public static String encryptAndSign(String bizContent, String alipayPublicKey,
+                                        String cusPrivateKey, String charset, boolean isEncrypt,
+                                        boolean isSign, String signType) throws AlipayApiException {
+        StringBuilder sb = new StringBuilder();
+        if (StringUtils.isEmpty(charset)) {
+            charset = AlipayConstants.CHARSET_GBK;
+        }
+        sb.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>");
+        if (isEncrypt) {// 加密
+            sb.append("<alipay>");
+            String encrypted = encrypt(bizContent, alipayPublicKey, charset, signType);
+            sb.append("<response>" + encrypted + "</response>");
+            sb.append("<encryption_type>RSA</encryption_type>");
+            if (isSign) {
+                String sign = sign(encrypted, cusPrivateKey, charset, signType);
+                sb.append("<sign>" + sign + "</sign>");
+                sb.append("<sign_type>RSA</sign_type>");
+            }
+            sb.append("</alipay>");
+        } else if (isSign) {// 不加密,但需要签名
+            sb.append("<alipay>");
+            sb.append("<response>" + bizContent + "</response>");
+            String sign = sign(bizContent, cusPrivateKey, charset, signType);
+            sb.append("<sign>" + sign + "</sign>");
+            sb.append("<sign_type>RSA</sign_type>");
+            sb.append("</alipay>");
+        } else {// 不加密,不加签
+            sb.append(bizContent);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * 验签并解密 <p> <b>目前适用于公众号</b><br> params参数示例: <br>{
+     * <br>biz_content=M0qGiGz+8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic/MIUjvXo2BLB++BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt16
+     * /IkB9HzAccEqKmRHrZJ7PjQWE0KfvDAHsJqFIeMvEYk1Zei2QkwSQPlso7K0oheo/iT+HYE8aTATnkqD
+     * /ByD9iNDtGg38pCa2xnnns63abKsKoV8h0DfHWgPH62urGY7Pye3r9FCOXA2Ykm8X4/Bl1bWFN/PFCEJHWe/HXj8KJKjWMO6ttsoV0xRGfeyUO8agu6t587Dl5ux5zD
+     * /s8Lbg5QXygaOwo3Fz1G8EqmGhi4+soEIQb8DBYanQOS3X+m46tVqBGMw8Oe+hsyIMpsjwF4HaPKMr37zpW3fe7xOMuimbZ0wq53YP
+     * /jhQv6XWodjT3mL0H5ACqcsSn727B5ztquzCPiwrqyjUHjJQQefFTzOse8snaWNQTUsQS7aLsHq0FveGpSBYORyA90qPdiTjXIkVP7mAiYiAIWW9pCEC7F3XtViKTZ8FRMM9ySicfuAlf3jtap6v2KPMtQv70X+hlmzO/IXB6W0Ep8DovkF5rB4r/BJYJLw/6AS0LZM9w5JfnAZhfGM2rKzpfNsgpOgEZS1WleG4I2hoQC0nxg9IcP0Hs+nWIPkEUcYNaiXqeBc=,
+     * <br>sign=rlqgA8O+RzHBVYLyHmrbODVSANWPXf3pSrr82OCO/bm3upZiXSYrX5fZr6UBmG6BZRAydEyTIguEW6VRuAKjnaO/sOiR9BsSrOdXbD5Rhos/Xt7
+     * /mGUWbTOt/F+3W0/XLuDNmuYg1yIC/6hzkg44kgtdSTsQbOC9gWM7ayB4J4c=, sign_type=RSA, <br>charset=UTF-8 <br>} </p>
+     *
+     * @param params
+     * @param alipayPublicKey 支付宝公钥
+     * @param cusPrivateKey   商户私钥
+     * @param isCheckSign     是否验签
+     * @param isDecrypt       是否解密
+     * @param signType        指定采用的签名方式,RSA、RSA2、SM2
+     * @return 解密后明文,验签失败则异常抛出
+     * @throws AlipayApiException
+     */
+    public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey,
+                                             String cusPrivateKey, boolean isCheckSign,
+                                             boolean isDecrypt, String signType) throws AlipayApiException {
+        String charset = params.get("charset");
+        String bizContent = params.get("biz_content");
+        if (isCheckSign) {
+            if (!verifyV2(params, alipayPublicKey, charset, signType)) {
+                throw new AlipayApiException("rsaCheck failure:rsaParams=" + params);
+            }
+        }
+
+        if (isDecrypt) {
+            return decrypt(bizContent, cusPrivateKey, charset, signType);
+        }
+
+        return bizContent;
+    }
+
+    public static String getSignatureContent(RequestParametersHolder requestHolder) {
+        return getSignContent(getSortedMap(requestHolder));
+    }
+
+    public static Map<String, String> getSortedMap(RequestParametersHolder requestHolder) {
+        Map<String, String> sortedParams = new TreeMap<String, String>();
+        AlipayHashMap appParams = requestHolder.getApplicationParams();
+        if (appParams != null && appParams.size() > 0) {
+            sortedParams.putAll(appParams);
+        }
+        AlipayHashMap protocalMustParams = requestHolder.getProtocalMustParams();
+        if (protocalMustParams != null && protocalMustParams.size() > 0) {
+            sortedParams.putAll(protocalMustParams);
+        }
+        AlipayHashMap protocalOptParams = requestHolder.getProtocalOptParams();
+        if (protocalOptParams != null && protocalOptParams.size() > 0) {
+            sortedParams.putAll(protocalOptParams);
+        }
+
+        return sortedParams;
+    }
+
+    /**
+     * @param sortedParams
+     * @return
+     */
+    public static String getSignContent(Map<String, String> sortedParams) {
+        StringBuilder content = new StringBuilder();
+        List<String> keys = new ArrayList<String>(sortedParams.keySet());
+        Collections.sort(keys);
+        int index = 0;
+        for (String key : keys) {
+            String value = sortedParams.get(key);
+            if (StringUtils.areNotEmpty(key, value)) {
+                content.append(index == 0 ? "" : "&").append(key).append("=").append(value);
+                index++;
+            }
+        }
+        return content.toString();
+    }
+
+    public static SignSourceData extractSignContent(String str, int begin) {
+        if (str == null) {
+            return null;
+        }
+
+        int beginIndex = extractBeginPosition(str, begin);
+        if (beginIndex >= str.length()) {
+            return null;
+        }
+
+        int endIndex = extractEndPosition(str, beginIndex);
+        return new SignSourceData(str.substring(beginIndex, endIndex), beginIndex, endIndex);
+    }
+
+    private static int extractBeginPosition(String responseString, int begin) {
+        int beginPosition = begin;
+        //找到第一个左大括号(对应响应的是JSON对象的情况:普通调用OpenAPI响应明文)
+        //或者双引号(对应响应的是JSON字符串的情况:加密调用OpenAPI响应Base64串),作为待验签内容的起点
+        while (beginPosition < responseString.length()
+                && responseString.charAt(beginPosition) != '{'
+                && responseString.charAt(beginPosition) != '"') {
+            ++beginPosition;
+        }
+        return beginPosition;
+    }
+
+    private static int extractEndPosition(String responseString, int beginPosition) {
+        //提取明文验签内容终点
+        if (responseString.charAt(beginPosition) == '{') {
+            return extractJsonObjectEndPosition(responseString, beginPosition);
+        }
+        //提取密文验签内容终点
+        else {
+            return extractJsonBase64ValueEndPosition(responseString, beginPosition);
+        }
+    }
+
+    private static int extractJsonBase64ValueEndPosition(String responseString, int beginPosition) {
+        for (int index = beginPosition; index < responseString.length(); ++index) {
+            //找到第2个双引号作为终点,由于中间全部是Base64编码的密文,所以不会有干扰的特殊字符
+            if (responseString.charAt(index) == '"' && index != beginPosition) {
+                return index + 1;
+            }
+        }
+        //如果没有找到第2个双引号,说明验签内容片段提取失败,直接尝试选取剩余整个响应字符串进行验签
+        return responseString.length();
+    }
+
+    private static int extractJsonObjectEndPosition(String responseString, int beginPosition) {
+        //记录当前尚未发现配对闭合的大括号
+        LinkedList<String> braces = new LinkedList<String>();
+        //记录当前字符是否在双引号中
+        boolean inQuotes = false;
+        //记录当前字符前面连续的转义字符个数
+        int consecutiveEscapeCount = 0;
+        //从待验签字符的起点开始遍历后续字符串,找出待验签字符串的终止点,终点即是与起点{配对的}
+        for (int index = beginPosition; index < responseString.length(); ++index) {
+            //提取当前字符
+            char currentChar = responseString.charAt(index);
+
+            //如果当前字符是"且前面有偶数个转义标记(0也是偶数)
+            if (currentChar == '"' && consecutiveEscapeCount % 2 == 0) {
+                //是否在引号中的状态取反
+                inQuotes = !inQuotes;
+            }
+            //如果当前字符是{且不在引号中
+            else if (currentChar == '{' && !inQuotes) {
+                //将该{加入未闭合括号中
+                braces.push("{");
+            }
+            //如果当前字符是}且不在引号中
+            else if (currentChar == '}' && !inQuotes) {
+                //弹出一个未闭合括号
+                braces.pop();
+                //如果弹出后,未闭合括号为空,说明已经找到终点
+                if (braces.isEmpty()) {
+                    return index + 1;
+                }
+            }
+
+            //如果当前字符是转义字符
+            if (currentChar == '\\') {
+                //连续转义字符个数+1
+                ++consecutiveEscapeCount;
+            } else {
+                //连续转义字符个数置0
+                consecutiveEscapeCount = 0;
+            }
+        }
+
+        //如果没有找到配对的闭合括号,说明验签内容片段提取失败,直接尝试选取剩余整个响应字符串进行验签
+        return responseString.length();
+    }
+
+    /**
+     * rsa内容签名
+     *
+     * @param content
+     * @param privateKey
+     * @param charset
+     * @return
+     * @throws AlipayApiException
+     */
+    public static String rsaSign(String content, String privateKey, String charset,
+                                 String signType) throws AlipayApiException {
+
+        return AsymmetricManager.getByName(signType).sign(content, charset, privateKey);
+    }
+
+    /**
+     * sha256WithRsa 加签
+     *
+     * @param content
+     * @param privateKey
+     * @param charset
+     * @return
+     * @throws AlipayApiException
+     */
+    public static String rsa256Sign(String content, String privateKey,
+                                    String charset) throws AlipayApiException {
+
+        return AsymmetricManager.getByName("RSA2").sign(content, charset, privateKey);
+    }
+
+    /**
+     * sha1WithRsa 加签
+     *
+     * @param content
+     * @param privateKey
+     * @param charset
+     * @return
+     * @throws AlipayApiException
+     */
+    public static String rsaSign(String content, String privateKey,
+                                 String charset) throws AlipayApiException {
+
+        return AsymmetricManager.getByName("RSA").sign(content, charset, privateKey);
+    }
+
+    public static String rsaSign(Map<String, String> params, String privateKey,
+                                 String charset) throws AlipayApiException {
+        String signContent = getSignContent(params);
+
+        return rsaSign(signContent, privateKey, charset);
+
+    }
+
+    public static PrivateKey getPrivateKeyFromPKCS8(String algorithm,
+                                                    InputStream ins) throws Exception {
+
+        return RSAEncryptor.getPrivateKeyFromPKCS8(algorithm, ins);
+    }
+
+    public static String getSignCheckContentV1(Map<String, String> params) {
+        if (params == null) {
+            return null;
+        }
+
+        params.remove("sign");
+        params.remove("sign_type");
+
+        StringBuilder content = new StringBuilder();
+        List<String> keys = new ArrayList<String>(params.keySet());
+        Collections.sort(keys);
+
+        for (int i = 0; i < keys.size(); i++) {
+            String key = keys.get(i);
+            String value = params.get(key);
+            content.append((i == 0 ? "" : "&") + key + "=" + value);
+        }
+
+        return content.toString();
+    }
+
+    public static String getSignCheckContentV2(Map<String, String> params) {
+        if (params == null) {
+            return null;
+        }
+
+        params.remove("sign");
+
+        StringBuilder content = new StringBuilder();
+        List<String> keys = new ArrayList<String>(params.keySet());
+        Collections.sort(keys);
+
+        for (int i = 0; i < keys.size(); i++) {
+            String key = keys.get(i);
+            String value = params.get(key);
+            content.append(i == 0 ? "" : "&").append(key).append("=").append(value);
+        }
+
+        return content.toString();
+    }
+
+    /**
+     * 如果是RSA签名,请调用此方法进行验签
+     *
+     * @param params    待验签的从支付宝接收到的参数Map
+     * @param publicKey 支付宝公钥
+     * @param charset   参数内容编码集
+     * @return true:验签通过;false:验签不通过
+     * @throws AlipayApiException
+     */
+    public static boolean rsaCheckV1(Map<String, String> params, String publicKey,
+                                     String charset) throws AlipayApiException {
+        String sign = params.get("sign");
+        String content = getSignCheckContentV1(params);
+
+        return rsaCheckContent(content, sign, publicKey, charset);
+    }
+
+    public static boolean rsaCertCheckV1(Map<String, String> params, String alipayPublicCertPath,
+                                         String charset) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+        return rsaCheckV1(params, publicKey, charset);
+    }
+
+    /**
+     * 如果是RSA或RSA2签名,请调用此方法进行验签
+     *
+     * @param params    待验签的从支付宝接收到的参数Map
+     * @param publicKey 支付宝公钥
+     * @param charset   参数内容编码集
+     * @param signType  指定采用的签名方式,RSA或RSA2
+     * @return true:验签通过;false:验签不通过
+     * @throws AlipayApiException
+     */
+    public static boolean rsaCheckV1(Map<String, String> params, String publicKey,
+                                     String charset, String signType) throws AlipayApiException {
+        String sign = params.get("sign");
+        String content = getSignCheckContentV1(params);
+
+        return rsaCheck(content, sign, publicKey, charset, signType);
+    }
+
+    public static boolean rsaCertCheckV1(Map<String, String> params, String alipayPublicCertPath,
+                                         String charset, String signType) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+        return rsaCheckV1(params, publicKey, charset, signType);
+    }
+
+    public static boolean rsaCheckV2(Map<String, String> params, String publicKey,
+                                     String charset) throws AlipayApiException {
+        String sign = params.get("sign");
+        String content = getSignCheckContentV2(params);
+
+        return rsaCheckContent(content, sign, publicKey, charset);
+    }
+
+    public static boolean rsaCertCheckV2(Map<String, String> params, String alipayPublicCertPath,
+                                         String charset) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+        return rsaCheckV2(params, publicKey, charset);
+    }
+
+    public static boolean rsaCheckV2(Map<String, String> params, String publicKey,
+                                     String charset, String signType) throws AlipayApiException {
+        String sign = params.get("sign");
+        String content = getSignCheckContentV2(params);
+
+        return rsaCheck(content, sign, publicKey, charset, signType);
+    }
+
+    public static boolean rsaCertCheckV2(Map<String, String> params, String alipayPublicCertPath,
+                                         String charset, String signType) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+
+        return rsaCheckV2(params, publicKey, charset, signType);
+    }
+
+    public static boolean rsaCheck(String content, String sign, String publicKey, String charset,
+                                   String signType) throws AlipayApiException {
+
+        return AsymmetricManager.getByName(signType).verify(content, charset, publicKey, sign);
+    }
+
+    public static boolean rsaCertCheck(String content, String sign, String alipayPublicCertPath, String charset,
+                                       String signType) throws AlipayApiException {
+        String publicKey = getAlipayPublicKey(alipayPublicCertPath);
+        return rsaCheck(content, sign, publicKey, charset, signType);
+    }
+
+    public static boolean rsa256CheckContent(String content, String sign, String publicKey,
+                                             String charset) throws AlipayApiException {
+
+        return AsymmetricManager.getByName("RSA2").verify(content, charset, publicKey, sign);
+    }
+
+    public static boolean rsaCheckContent(String content, String sign, String publicKey,
+                                          String charset) throws AlipayApiException {
+
+        return AsymmetricManager.getByName("RSA").verify(content, charset, publicKey, sign);
+    }
+
+    public static PublicKey getPublicKeyFromX509(String algorithm,
+                                                 InputStream ins) throws Exception {
+
+        return RSAEncryptor.getPublicKeyFromX509(algorithm, ins);
+    }
+
+    /**
+     * 验签并解密 <p> <b>目前适用于公众号</b><br> params参数示例: <br>{
+     * <br>biz_content=M0qGiGz+8kIpxe8aF4geWJdBn0aBTuJRQItLHo9R7o5JGhpic/MIUjvXo2BLB++BbkSq2OsJCEQFDZ0zK5AJYwvBgeRX30gvEj6eXqXRt16
+     * /IkB9HzAccEqKmRHrZJ7PjQWE0KfvDAHsJqFIeMvEYk1Zei2QkwSQPlso7K0oheo/iT+HYE8aTATnkqD
+     * /ByD9iNDtGg38pCa2xnnns63abKsKoV8h0DfHWgPH62urGY7Pye3r9FCOXA2Ykm8X4/Bl1bWFN/PFCEJHWe/HXj8KJKjWMO6ttsoV0xRGfeyUO8agu6t587Dl5ux5zD
+     * /s8Lbg5QXygaOwo3Fz1G8EqmGhi4+soEIQb8DBYanQOS3X+m46tVqBGMw8Oe+hsyIMpsjwF4HaPKMr37zpW3fe7xOMuimbZ0wq53YP
+     * /jhQv6XWodjT3mL0H5ACqcsSn727B5ztquzCPiwrqyjUHjJQQefFTzOse8snaWNQTUsQS7aLsHq0FveGpSBYORyA90qPdiTjXIkVP7mAiYiAIWW9pCEC7F3XtViKTZ8FRMM9ySicfuAlf3jtap6v2KPMtQv70X+hlmzO/IXB6W0Ep8DovkF5rB4r/BJYJLw/6AS0LZM9w5JfnAZhfGM2rKzpfNsgpOgEZS1WleG4I2hoQC0nxg9IcP0Hs+nWIPkEUcYNaiXqeBc=,
+     * <br>sign=rlqgA8O+RzHBVYLyHmrbODVSANWPXf3pSrr82OCO/bm3upZiXSYrX5fZr6UBmG6BZRAydEyTIguEW6VRuAKjnaO/sOiR9BsSrOdXbD5Rhos/Xt7
+     * /mGUWbTOt/F+3W0/XLuDNmuYg1yIC/6hzkg44kgtdSTsQbOC9gWM7ayB4J4c=, sign_type=RSA, <br>charset=UTF-8 <br>} </p>
+     *
+     * @param params
+     * @param alipayPublicKey 支付宝公钥
+     * @param cusPrivateKey   商户私钥
+     * @param isCheckSign     是否验签
+     * @param isDecrypt       是否解密
+     * @return 解密后明文,验签失败则异常抛出
+     * @throws AlipayApiException
+     */
+    public static String checkSignAndDecrypt(Map<String, String> params, String alipayPublicKey,
+                                             String cusPrivateKey, boolean isCheckSign,
+                                             boolean isDecrypt) throws AlipayApiException {
+        String charset = params.get("charset");
+        String bizContent = params.get("biz_content");
+        if (isCheckSign) {
+            if (!rsaCheckV2(params, alipayPublicKey, charset)) {
+                throw new AlipayApiException("rsaCheck failure:rsaParams=" + params);
+            }
+        }
+
+        if (isDecrypt) {
+            return rsaDecrypt(bizContent, cusPrivateKey, charset);
+        }
+
+        return bizContent;
+    }
+
+    /**
+     * 加密并签名<br> <b>目前适用于公众号</b>
+     *
+     * @param bizContent      待加密、签名内容
+     * @param alipayPublicKey 支付宝公钥
+     * @param cusPrivateKey   商户私钥
+     * @param charset         字符集,如UTF-8, GBK, GB2312
+     * @param isEncrypt       是否加密,true-加密  false-不加密
+     * @param isSign          是否签名,true-签名  false-不签名
+     * @return 加密、签名后xml内容字符串 <p> 返回示例: <alipay> <response>密文</response> <encryption_type>RSA</encryption_type> <sign>sign</sign>
+     * <sign_type>RSA</sign_type> </alipay> </p>
+     * @throws AlipayApiException
+     */
+    public static String encryptAndSign(String bizContent, String alipayPublicKey,
+                                        String cusPrivateKey, String charset, boolean isEncrypt,
+                                        boolean isSign) throws AlipayApiException {
+        StringBuilder sb = new StringBuilder();
+        if (StringUtils.isEmpty(charset)) {
+            charset = AlipayConstants.CHARSET_GBK;
+        }
+        sb.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>");
+        if (isEncrypt) {// 加密
+            sb.append("<alipay>");
+            String encrypted = rsaEncrypt(bizContent, alipayPublicKey, charset);
+            sb.append("<response>" + encrypted + "</response>");
+            sb.append("<encryption_type>RSA</encryption_type>");
+            if (isSign) {
+                String sign = rsaSign(encrypted, cusPrivateKey, charset);
+                sb.append("<sign>" + sign + "</sign>");
+                sb.append("<sign_type>RSA</sign_type>");
+            }
+            sb.append("</alipay>");
+        } else if (isSign) {// 不加密,但需要签名
+            sb.append("<alipay>");
+            sb.append("<response>" + bizContent + "</response>");
+            String sign = rsaSign(bizContent, cusPrivateKey, charset);
+            sb.append("<sign>" + sign + "</sign>");
+            sb.append("<sign_type>RSA</sign_type>");
+            sb.append("</alipay>");
+        } else {// 不加密,不加签
+            sb.append(bizContent);
+        }
+        return sb.toString();
+    }
+
+    /**
+     * 公钥加密
+     *
+     * @param content   待加密内容
+     * @param publicKey 公钥
+     * @param charset   字符集,如UTF-8, GBK, GB2312
+     * @return 密文内容
+     * @throws AlipayApiException
+     */
+    public static String rsaEncrypt(String content, String publicKey,
+                                    String charset) throws AlipayApiException {
+        return AsymmetricManager.getByName("RSA").encrypt(content, charset, publicKey);
+    }
+
+    /**
+     * 私钥解密
+     *
+     * @param content    待解密内容
+     * @param privateKey 私钥
+     * @param charset    字符集,如UTF-8, GBK, GB2312
+     * @return 明文内容
+     * @throws AlipayApiException
+     */
+    public static String rsaDecrypt(String content, String privateKey,
+                                    String charset) throws AlipayApiException {
+
+        return AsymmetricManager.getByName("RSA").decrypt(content, charset, privateKey);
+    }
+
+    /**
+     * 从公钥证书中提取公钥序列号
+     *
+     * @param certPath 公钥证书存放路径,例如:/home/admin/cert.crt
+     * @return 公钥证书序列号
+     * @throws AlipayApiException
+     */
+    public static String getCertSN(String certPath) throws AlipayApiException {
+        return MyAntCertificationUtil.getCertSN(MyAntCertificationUtil.getCertFromPath(certPath));
+    }
+
+    /**
+     * 从公钥证书中提取公钥
+     *
+     * @param alipayPublicCertPath 公钥证书存放路径,例如:/home/admin/cert.crt
+     * @return 公钥
+     * @throws AlipayApiException
+     */
+    public static String getAlipayPublicKey(String alipayPublicCertPath) throws AlipayApiException {
+        return MyAntCertificationUtil.getAlipayPublicKey(alipayPublicCertPath);
+    }
+}

+ 404 - 0
cif-service/src/main/java/com/medipath/cif/configurer/alipay/MyAntCertificationUtil.java

@@ -0,0 +1,404 @@
+package com.medipath.cif.configurer.alipay;
+
+import com.alipay.api.AlipayApiException;
+import com.alipay.api.AlipayConstants;
+import com.alipay.api.internal.util.AlipayLogger;
+import com.alipay.api.internal.util.StringUtils;
+import com.alipay.api.internal.util.codec.Base64;
+import com.medipath.cif.util.FileUtils;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
+
+import java.io.ByteArrayInputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.*;
+import java.security.cert.Certificate;
+import java.security.cert.*;
+import java.util.*;
+
+/**
+ * 证书文件可信校验
+ *
+ * @author junying.wjy
+ * @version $Id: AntCertificationUtil.java, v 0.1 2019-07-29 下午04:46 junying.wjy Exp $
+ */
+public class MyAntCertificationUtil {
+
+    private static BouncyCastleProvider provider;
+
+    static {
+        provider = new BouncyCastleProvider();
+        Security.addProvider(provider);
+    }
+
+    /**
+     * 验证证书的是否可信
+     *
+     * @param cert            需要验证的目标证书或者证书链
+     * @param rootCertContent 可信根证书列表
+     */
+    public static boolean isTrusted(String cert, String rootCertContent) {
+        X509Certificate[] certificates;
+        try {
+            certificates = readPemCertChain(cert);
+        } catch (Exception e) {
+            AlipayLogger.logBizError(("读取证书失败"));
+            throw new RuntimeException(e);
+        }
+
+        List<X509Certificate> rootCerts = new ArrayList<X509Certificate>();
+        try {
+            X509Certificate[] certs = readPemCertChain(rootCertContent);
+            for (X509Certificate c : certs) {
+                rootCerts.add(c);
+            }
+        } catch (Exception e) {
+            AlipayLogger.logBizError(("读取根证书失败"));
+            throw new RuntimeException(e);
+        }
+
+        boolean result = verifyCertChain(certificates, rootCerts.toArray(new X509Certificate[rootCerts.size()]));
+        return result;
+    }
+
+    /**
+     * 验证证书是否是信任证书库中证书签发的
+     *
+     * @param cert      目标验证证书
+     * @param rootCerts 可信根证书列表
+     * @return 验证结果
+     */
+    private static boolean verifyCert(X509Certificate cert, X509Certificate[] rootCerts) {
+        try {
+            cert.checkValidity();
+        } catch (CertificateExpiredException e) {
+            AlipayLogger.logBizError(("证书已经过期"));
+            return false;
+        } catch (CertificateNotYetValidException e) {
+            AlipayLogger.logBizError(("证书未激活"));
+            return false;
+        }
+
+        Map<Principal, X509Certificate> subjectMap = new HashMap<Principal, X509Certificate>();
+
+        for (X509Certificate root : rootCerts) {
+            subjectMap.put(root.getSubjectDN(), root);
+        }
+
+        Principal issuerDN = cert.getIssuerDN();
+        X509Certificate issuer = subjectMap.get(issuerDN);
+        if (issuer == null) {
+            AlipayLogger.logBizError(("证书链验证失败"));
+            return false;
+        }
+        try {
+            PublicKey publicKey = issuer.getPublicKey();
+            verifySignature(publicKey, cert);
+        } catch (Exception e) {
+            AlipayLogger.logBizError(("证书链验证失败"));
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * 验证证书链是否是信任证书库中证书签发的
+     *
+     * @param certs     目标验证证书列表
+     * @param rootCerts 可信根证书列表
+     * @return 验证结果
+     */
+    private static boolean verifyCertChain(X509Certificate[] certs, X509Certificate[] rootCerts) {
+        boolean sorted = sortByDn(certs);
+        if (!sorted) {
+            AlipayLogger.logBizError(("证书链验证失败:不是完整的证书链"));
+            return false;
+        }
+
+        //先验证第一个证书是不是信任库中证书签发的
+        X509Certificate prev = certs[0];
+        boolean firstOK = verifyCert(prev, rootCerts);
+        if (!firstOK || certs.length == 1) {
+            return firstOK;
+        }
+
+        //验证证书链
+        for (int i = 1; i < certs.length; i++) {
+            try {
+                X509Certificate cert = certs[i];
+                try {
+                    cert.checkValidity();
+                } catch (CertificateExpiredException e) {
+                    AlipayLogger.logBizError(("证书已经过期"));
+                    return false;
+                } catch (CertificateNotYetValidException e) {
+                    AlipayLogger.logBizError(("证书未激活"));
+                    return false;
+                }
+                verifySignature(prev.getPublicKey(), cert);
+                prev = cert;
+            } catch (Exception e) {
+                AlipayLogger.logBizError(("证书链验证失败"));
+                return false;
+            }
+        }
+
+        return true;
+    }
+
+    private static void verifySignature(PublicKey publicKey, X509Certificate cert)
+            throws NoSuchProviderException, CertificateException, NoSuchAlgorithmException, InvalidKeyException,
+            SignatureException {
+        cert.verify(publicKey, provider.getName());
+    }
+
+    /**
+     * 将证书链按照完整的签发顺序进行排序,排序后证书链为:[issuerA, subjectA]-[issuerA, subjectB]-[issuerB, subjectC]-[issuerC, subjectD]...
+     *
+     * @param certs 证书链
+     * @return true:排序成功,false:证书链不完整
+     */
+    private static boolean sortByDn(X509Certificate[] certs) {
+        //主题和证书的映射
+        Map<Principal, X509Certificate> subjectMap = new HashMap<Principal, X509Certificate>();
+        //签发者和证书的映射
+        Map<Principal, X509Certificate> issuerMap = new HashMap<Principal, X509Certificate>();
+        //是否包含自签名证书
+        boolean hasSelfSignedCert = false;
+
+        for (X509Certificate cert : certs) {
+            if (isSelfSigned(cert)) {
+                if (hasSelfSignedCert) {
+                    return false;
+                }
+                hasSelfSignedCert = true;
+            }
+
+            Principal subjectDN = cert.getSubjectDN();
+            Principal issuerDN = cert.getIssuerDN();
+
+            subjectMap.put(subjectDN, cert);
+            issuerMap.put(issuerDN, cert);
+        }
+
+        List<X509Certificate> certChain = new ArrayList<X509Certificate>();
+
+        X509Certificate current = certs[0];
+        addressingUp(subjectMap, certChain, current);
+        addressingDown(issuerMap, certChain, current);
+
+        //说明证书链不完整
+        if (certs.length != certChain.size()) {
+            return false;
+        }
+
+        //将证书链复制到原先的数据
+        for (int i = 0; i < certChain.size(); i++) {
+            certs[i] = certChain.get(i);
+        }
+        return true;
+    }
+
+    /**
+     * 验证证书是否是自签发的
+     *
+     * @param cert 目标证书
+     * @return true;自签发,false;不是自签发
+     */
+    private static boolean isSelfSigned(X509Certificate cert) {
+        return cert.getSubjectDN().equals(cert.getIssuerDN());
+    }
+
+    /**
+     * 向上构造证书链
+     *
+     * @param subjectMap 主题和证书的映射
+     * @param certChain  证书链
+     * @param current    当前需要插入证书链的证书,include
+     */
+    private static void addressingUp(final Map<Principal, X509Certificate> subjectMap, List<X509Certificate> certChain,
+                                     final X509Certificate current) {
+        certChain.add(0, current);
+        if (isSelfSigned(current)) {
+            return;
+        }
+        Principal issuerDN = current.getIssuerDN();
+        X509Certificate issuer = subjectMap.get(issuerDN);
+        if (issuer == null) {
+            return;
+        }
+        addressingUp(subjectMap, certChain, issuer);
+    }
+
+    /**
+     * 向下构造证书链
+     *
+     * @param issuerMap 签发者和证书的映射
+     * @param certChain 证书链
+     * @param current   当前需要插入证书链的证书,exclude
+     */
+    private static void addressingDown(final Map<Principal, X509Certificate> issuerMap, List<X509Certificate> certChain,
+                                       final X509Certificate current) {
+        Principal subjectDN = current.getSubjectDN();
+        X509Certificate subject = issuerMap.get(subjectDN);
+        if (subject == null) {
+            return;
+        }
+        if (isSelfSigned(subject)) {
+            return;
+        }
+        certChain.add(subject);
+        addressingDown(issuerMap, certChain, subject);
+    }
+
+    private static X509Certificate[] readPemCertChain(String cert) throws CertificateException {
+        ByteArrayInputStream inputStream = new ByteArrayInputStream(cert.getBytes());
+        CertificateFactory factory = CertificateFactory.getInstance("X.509", provider);
+        Collection<? extends Certificate> certificates = factory.generateCertificates(inputStream);
+        return (X509Certificate[]) certificates.toArray(new X509Certificate[certificates.size()]);
+    }
+
+    /**
+     * 获取根证书序列号
+     *
+     * @param rootCertContent
+     * @return
+     */
+    public static String getRootCertSN(String rootCertContent) {
+        String rootCertSN = null;
+        try {
+            X509Certificate[] x509Certificates = readPemCertChain(rootCertContent);
+            MessageDigest md = MessageDigest.getInstance("MD5");
+            for (X509Certificate c : x509Certificates) {
+                if (c.getSigAlgOID().startsWith("1.2.840.113549.1.1")) {
+                    md.update((c.getIssuerX500Principal().getName() + c.getSerialNumber()).getBytes());
+                    String certSN = new BigInteger(1, md.digest()).toString(16);
+                    //BigInteger会把0省略掉,需补全至32位
+                    certSN = fillMD5(certSN);
+                    if (StringUtils.isEmpty(rootCertSN)) {
+                        rootCertSN = certSN;
+                    } else {
+                        rootCertSN = rootCertSN + "_" + certSN;
+                    }
+                }
+
+            }
+        } catch (Exception e) {
+            AlipayLogger.logBizError(("提取根证书失败"));
+        }
+        return rootCertSN;
+
+    }
+
+    /**
+     * 获取根证书序列号
+     *
+     * @param rootCertContent
+     * @return
+     */
+    public static String getRootCertSN(String rootCertContent, String signType) {
+        if (AlipayConstants.SIGN_TYPE_SM2.equals(signType)) {
+            String rootCertSN = null;
+            try {
+                X509Certificate[] x509Certificates = readPemCertChain(rootCertContent);
+                MessageDigest md = MessageDigest.getInstance("MD5");
+                for (X509Certificate c : x509Certificates) {
+                    if (c.getSigAlgOID().startsWith("1.2.156.10197.1.501")) {
+                        md.update((c.getIssuerX500Principal().getName() + c.getSerialNumber()).getBytes());
+                        String certSN = new BigInteger(1, md.digest()).toString(16);
+                        //BigInteger会把0省略掉,需补全至32位
+                        certSN = fillMD5(certSN);
+                        if (StringUtils.isEmpty(rootCertSN)) {
+                            rootCertSN = certSN;
+                        } else {
+                            rootCertSN = rootCertSN + "_" + certSN;
+                        }
+                    }
+                }
+            } catch (Exception e) {
+                AlipayLogger.logBizError(("提取根证书失败"));
+            }
+            return rootCertSN;
+
+        } else {
+            return getRootCertSN(rootCertContent);
+        }
+
+    }
+
+    private static String fillMD5(String md5) {
+        return md5.length() == 32 ? md5 : fillMD5("0" + md5);
+    }
+
+    /**
+     * @param certPath 证书路径
+     * @return
+     * @throws AlipayApiException
+     */
+    public static X509Certificate getCertFromPath(String certPath) throws AlipayApiException {
+        InputStream inputStream = null;
+        try {
+            inputStream = new FileInputStream(certPath);
+            CertificateFactory cf = CertificateFactory.getInstance("X.509", "BC");
+            return (X509Certificate) cf.generateCertificate(inputStream);
+        } catch (Exception e) {
+            throw new AlipayApiException(e);
+        } finally {
+            try {
+                if (inputStream != null) {
+                    inputStream.close();
+                }
+            } catch (IOException e) {
+                throw new AlipayApiException(e);
+            }
+        }
+    }
+
+    public static X509Certificate getCertFromContent(String certContent) throws AlipayApiException {
+        try {
+            InputStream inputStream = new ByteArrayInputStream(certContent.getBytes());
+            CertificateFactory cf = CertificateFactory.getInstance("X.509", "BC");
+            return (X509Certificate) cf.generateCertificate(inputStream);
+        } catch (Exception e) {
+            throw new AlipayApiException(e);
+        }
+    }
+
+    public static String getCertSN(X509Certificate cf) throws AlipayApiException {
+        try {
+            MessageDigest md = MessageDigest.getInstance("MD5");
+            md.update((cf.getIssuerX500Principal().getName() + cf.getSerialNumber()).getBytes());
+            String certSN = new BigInteger(1, md.digest()).toString(16);
+            //BigInteger会把0省略掉,需补全至32位
+            certSN = fillMD5(certSN);
+            return certSN;
+        } catch (NoSuchAlgorithmException e) {
+            throw new AlipayApiException(e);
+        }
+    }
+
+    public static String getAlipayPublicKey(String alipayPublicCertPath) throws AlipayApiException {
+        InputStream inputStream = null;
+        try {
+            inputStream = FileUtils.buildInputStream(alipayPublicCertPath);
+            CertificateFactory cf = CertificateFactory.getInstance("X.509", "BC");
+            X509Certificate cert = (X509Certificate) cf.generateCertificate(inputStream);
+            PublicKey publicKey = cert.getPublicKey();
+            return Base64.encodeBase64String(publicKey.getEncoded());
+        } catch (NoSuchProviderException e) {
+            throw new AlipayApiException(e);
+        } catch (CertificateException e) {
+            throw new AlipayApiException(e);
+        } finally {
+            try {
+                if (inputStream != null) {
+                    inputStream.close();
+                }
+            } catch (IOException e) {
+                throw new AlipayApiException(e);
+            }
+        }
+    }
+}

+ 32 - 0
cif-service/src/main/java/com/medipath/cif/configurer/interceptor/CorsInterceptor.java

@@ -0,0 +1,32 @@
+package com.medipath.cif.configurer.interceptor;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.http.HttpHeaders;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * 跨域CORS拦截器
+ *
+ * @author lxk
+ */
+@Component
+@Slf4j
+public class CorsInterceptor extends HandlerInterceptorAdapter {
+
+    @Override
+    public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+        if (request.getHeader(HttpHeaders.ORIGIN) != null) {
+            //添加跨域CORS
+            response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
+            response.setHeader("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, source-type, Accept-Language, country, Accept, token, enctype, *");
+            response.setHeader("Access-Control-Allow-Methods", "GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, PATCH");
+            response.addHeader("Access-Control-Allow-Credentials", "true");
+            response.addHeader("Access-Control-Max-Age", "3600 * 24");
+        }
+        return true;
+    }
+}

+ 49 - 0
cif-service/src/main/java/com/medipath/cif/configurer/springbootshutdown/GracefulShutdownUndertow.java

@@ -0,0 +1,49 @@
+package com.medipath.cif.configurer.springbootshutdown;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/11/29 15:08
+ * @Version 1.0
+ */
+import io.undertow.Undertow;
+import io.undertow.server.ConnectorStatistics;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.web.embedded.undertow.UndertowServletWebServer;
+import org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext;
+import org.springframework.context.ApplicationListener;
+import org.springframework.context.event.ContextClosedEvent;
+import org.springframework.stereotype.Component;
+
+import java.lang.reflect.Field;
+import java.util.List;
+
+/**
+ *
+ * 优雅关闭 Spring Boot undertow
+ */
+@Component
+public class GracefulShutdownUndertow implements ApplicationListener<ContextClosedEvent> {
+
+    @Autowired
+    private GracefulShutdownUndertowWrapper gracefulShutdownUndertowWrapper;
+
+    @Autowired(required = false)
+    private ServletWebServerApplicationContext context;
+
+    @Override
+    public void onApplicationEvent(ContextClosedEvent contextClosedEvent){
+        gracefulShutdownUndertowWrapper.getGracefulShutdownHandler().shutdown();
+        try {
+            UndertowServletWebServer webServer = (UndertowServletWebServer)context.getWebServer();
+            Field field = webServer.getClass().getDeclaredField("undertow");
+            field.setAccessible(true);
+            Undertow undertow = (Undertow) field.get(webServer);
+            List<Undertow.ListenerInfo> listenerInfo = undertow.getListenerInfo();
+            Undertow.ListenerInfo listener = listenerInfo.get(0);
+            ConnectorStatistics connectorStatistics = listener.getConnectorStatistics();
+            while (connectorStatistics.getActiveConnections() > 0){}
+        }catch (Exception e){
+            // Application Shutdown
+        }
+    }
+}

+ 29 - 0
cif-service/src/main/java/com/medipath/cif/configurer/springbootshutdown/GracefulShutdownUndertowWrapper.java

@@ -0,0 +1,29 @@
+package com.medipath.cif.configurer.springbootshutdown;
+
+import io.undertow.server.HandlerWrapper;
+import io.undertow.server.HttpHandler;
+import io.undertow.server.handlers.GracefulShutdownHandler;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/11/29 15:08
+ * @Version 1.0
+ */
+@Component
+public class GracefulShutdownUndertowWrapper implements HandlerWrapper {
+
+    private GracefulShutdownHandler gracefulShutdownHandler;
+
+    @Override
+    public HttpHandler wrap(HttpHandler handler) {
+        if (gracefulShutdownHandler == null) {
+            this.gracefulShutdownHandler = new GracefulShutdownHandler(handler);
+        }
+        return gracefulShutdownHandler;
+    }
+
+    public GracefulShutdownHandler getGracefulShutdownHandler() {
+        return gracefulShutdownHandler;
+    }
+}

+ 27 - 0
cif-service/src/main/java/com/medipath/cif/configurer/springbootshutdown/UndertowExtraConfiguration.java

@@ -0,0 +1,27 @@
+package com.medipath.cif.configurer.springbootshutdown;
+
+import io.undertow.UndertowOptions;
+import lombok.AllArgsConstructor;
+import org.springframework.boot.web.embedded.undertow.UndertowServletWebServerFactory;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Author: lxk
+ * @Date: 2019/11/29 15:13
+ * @Version 1.0
+ */
+@Component
+@AllArgsConstructor
+public class UndertowExtraConfiguration {
+
+    private final GracefulShutdownUndertowWrapper gracefulShutdownWrapper;
+
+    @Bean
+    public UndertowServletWebServerFactory servletWebServerFactory() {
+        UndertowServletWebServerFactory factory = new UndertowServletWebServerFactory();
+        factory.addDeploymentInfoCustomizers(deploymentInfo -> deploymentInfo.addOuterHandlerChainWrapper(gracefulShutdownWrapper));
+        factory.addBuilderCustomizers(builder -> builder.setServerOption(UndertowOptions.ENABLE_STATISTICS, true));
+        return factory;
+    }
+}

+ 58 - 0
cif-service/src/main/java/com/medipath/cif/constants/MyConstants.java

@@ -0,0 +1,58 @@
+package com.medipath.cif.constants;
+
+/**
+ * @author lxk
+ */
+public class MyConstants {
+
+  /**
+   * 兼容微信请求
+   */
+  public static final String DEFAULT = "default";
+
+  /**
+   * 平台资金账户(资产类)id
+   */
+  public static final Long INNER_CAPITAL = 1L;
+
+  /**
+   * 主营收入账户(损益类)id
+   */
+  public static final Long INNER_INCOME = 2L;
+
+  /**
+   * 平台营销账户(负债类)id
+   */
+  public static final Long INNER_MARKETING = 3L;
+
+  /**
+   * 销售提成(损益类)id
+   */
+  public static final Long INNER_SALE = 4L;
+
+  /**
+   * 专家提成(损益类)id
+   */
+  public static final Long INNER_SPECIALIST = 5L;
+
+  /**
+   *  本年利润
+   */
+  public static final Long INNER_PROFIT = 7L;
+
+
+  /**
+   *  用户默认头像
+   */
+  public static final String ICON_USER = "/public/user.png";
+
+  /**
+   *  医院默认头像
+   */
+  public static final String ICON_HOSPITAL = "/public/hospital.png";
+
+  /**
+   *  组织默认头像
+   */
+  public static final String ICON_ORG = "/public/group.png";
+}

+ 11 - 0
cif-service/src/main/java/com/medipath/cif/constants/RedisConstants.java

@@ -0,0 +1,11 @@
+package com.medipath.cif.constants;
+
+/**
+ * redis的key
+ * @author lxk
+ */
+public class RedisConstants {
+
+  public static final String USER_EMAIL_CODE = "user:email:code:%s";
+
+}

+ 14 - 0
cif-service/src/main/java/com/medipath/cif/constants/WeChatFileTypeConstants.java

@@ -0,0 +1,14 @@
+package com.medipath.cif.constants;
+
+/**
+ * 文件类型
+ * @author lxk
+ */
+public class WeChatFileTypeConstants {
+
+  public static final String FILE_JPEG = "jpeg";
+  public static final String FILE_JPG = "jpg";
+  public static final String FILE_MP3 = "mp3";
+  public static final String FILE_AMR = "amr";
+  public static final String FILE_MP4 = "mp4";
+}

+ 17 - 0
cif-service/src/main/java/com/medipath/cif/core/AbstractApiController.java

@@ -0,0 +1,17 @@
+package com.medipath.cif.core;
+
+/**
+ * 公共控制器
+ */
+public abstract class AbstractApiController {
+
+    /**
+     * 当前登录用户 UID 参数
+     * 从 Header 中获取
+     */
+    public static final String X_CLIENT_TOKEN_USERID = "x-client-token-userId";
+    public static final String X_CLIENT_TOKEN_OPERATORID = "x-client-token-operatorId";
+    public static final String APP_CODE = "appCode";
+
+
+}

+ 93 - 0
cif-service/src/main/java/com/medipath/cif/core/AbstractService.java

@@ -0,0 +1,93 @@
+package com.medipath.cif.core;
+
+import org.apache.ibatis.exceptions.TooManyResultsException;
+import org.springframework.beans.factory.annotation.Autowired;
+import tk.mybatis.mapper.entity.Condition;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.ParameterizedType;
+import java.util.List;
+
+/**
+ * 基于通用MyBatis Mapper插件的Service接口的实现
+ */
+public abstract class AbstractService<T> implements Service<T> {
+
+    @Autowired
+    protected Mapper<T> mapper;
+
+    private Class<T> modelClass;    // 当前泛型真实类型的Class
+
+    public AbstractService() {
+        ParameterizedType pt = (ParameterizedType) this.getClass().getGenericSuperclass();
+        modelClass = (Class<T>) pt.getActualTypeArguments()[0];
+    }
+
+    @Override
+    public int  save(T model) {
+       return mapper.insertSelective(model);
+    }
+
+    @Override
+    public int  saveUseGeneratedKeys(T model) {
+        return mapper.insertUseGeneratedKeys(model);
+    }
+
+    @Override
+    public int  save(List<T> models) {
+    	return mapper.insertList(models);
+    }
+
+    @Override
+    public void deleteById(Number id) {
+        mapper.deleteByPrimaryKey(id);
+    }
+
+    @Override
+    public void deleteByIds(String ids) {
+        mapper.deleteByIds(ids);
+    }
+
+    @Override
+    public void update(T model) {
+        mapper.updateByPrimaryKeySelective(model);
+    }
+
+    @Override
+    public T findById(Number id) {
+        return mapper.selectByPrimaryKey(id);
+    }
+
+    @Override
+    public T findBy(String fieldName, Object value) throws TooManyResultsException {
+        try {
+            T model = modelClass.newInstance();
+            Field field = modelClass.getDeclaredField(fieldName);
+            field.setAccessible(true);
+            field.set(model, value);
+            return mapper.selectOne(model);
+        } catch (ReflectiveOperationException e) {
+            throw new ServiceException(e.getMessage(), e);
+        }
+    }
+
+    @Override
+    public List<T> findByIds(String ids) {
+        return mapper.selectByIds(ids);
+    }
+
+    @Override
+    public List<T> findByCondition(Condition condition) {
+        return mapper.selectByCondition(condition);
+    }
+
+    @Override
+    public Integer countByCondition(Condition condition) {
+        return mapper.selectCountByCondition(condition);
+    }
+
+    @Override
+    public List<T> findAll() {
+        return mapper.selectAll();
+    }
+}

+ 106 - 0
cif-service/src/main/java/com/medipath/cif/core/AuthService.java

@@ -0,0 +1,106 @@
+package com.medipath.cif.core;
+
+import cn.hutool.core.date.DateField;
+import cn.hutool.core.date.DateUtil;
+import io.jsonwebtoken.Claims;
+import io.jsonwebtoken.ExpiredJwtException;
+import io.jsonwebtoken.Jwts;
+import io.jsonwebtoken.SignatureAlgorithm;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.lang3.tuple.ImmutableTriple;
+import org.apache.commons.lang3.tuple.Triple;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Service;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.*;
+
+
+@Service
+@Slf4j
+public class AuthService {
+
+    private static final String BEARER = "Bearer ";
+
+    /**
+     * jwt token 密钥,主要用于token解析,签名验证
+     */
+    @Value("${spring.security.oauth2.jwt.signingKey}")
+    private static String signingKey = "123456";
+
+
+    public String buildJwtToken(Long operatorId, Long userId) {
+        String KEY = "123456";
+        Date now = DateUtil.date();
+        Date exp = DateUtil.offset(now, DateField.DAY_OF_YEAR,30);
+        Map<String, Object> claims = new HashMap<String, Object>();
+        claims.put("userId", userId);
+        claims.put("operatorId", operatorId);
+
+        String jwtToken = Jwts.builder()
+                .setClaims(claims)
+                .setId(UUID.randomUUID().toString())
+                .setIssuedAt(now)
+                .setSubject("sawa")
+                .signWith(SignatureAlgorithm.HS256, KEY.getBytes())
+                .setExpiration(exp).compact();
+
+        return "Bearer " +jwtToken;
+    }
+
+    public String buildJwtTokenWithRole(Long operatorId, Long userId,Integer role, Integer day) {
+        String KEY = "123456";
+        Date now = DateUtil.date();
+        Date exp = DateUtil.offset(now, DateField.DAY_OF_YEAR,day);
+        Map<String, Object> claims = new HashMap<String, Object>();
+        claims.put("userId", userId);
+        claims.put("operatorId", operatorId);
+        claims.put("role", role);
+
+        String jwtToken = Jwts.builder()
+                .setClaims(claims)
+                .setId(UUID.randomUUID().toString())
+                .setIssuedAt(now)
+                .setSubject("sawa")
+                .signWith(SignatureAlgorithm.HS256, KEY.getBytes())
+                .setExpiration(exp).compact();
+
+        return "Bearer " +jwtToken;
+    }
+
+    public Claims getClaimsFromToken(String authentication) {
+        try {
+            final Claims claims = this.getJwt(authentication);
+            boolean pass = DateUtil.compare(DateUtil.date(),claims.getExpiration()) < 0;
+            if (pass){
+                return claims;
+            }
+        } catch (Exception e) {
+            log.error("get userId from token error:{}", e.getMessage());
+        }
+        return null;
+    }
+
+
+    private static Claims getJwt(String jwtToken) {
+        if (jwtToken.startsWith(BEARER)) {
+            jwtToken = StringUtils.substring(jwtToken, BEARER.length());
+        }
+        Claims claims;
+        try {
+            claims = Jwts.parser()  //得到DefaultJwtParser
+                    .setSigningKey(signingKey.getBytes()) //设置签名的秘钥
+                    .parseClaimsJws(jwtToken).getBody();
+        } catch(ExpiredJwtException e) {
+            claims = e.getClaims();
+        }
+
+        return claims;
+    }
+
+}
+
+
+
+

+ 52 - 0
cif-service/src/main/java/com/medipath/cif/core/Const.java

@@ -0,0 +1,52 @@
+package com.medipath.cif.core;
+
+public class Const {
+    public static final String X_CLIENT_TOKEN_USER = "x-client-token-user";
+    public static final String X_CLIENT_TOKEN_UID = "x-client-token-uid";
+
+    public static final String C_ALGORA_BASEURL = "https://api.agora.io/dev/";
+    public static final String C_ALGORA_APPID = "2ca95fa5a53644e7abd67609bdffd5d6";
+    public static final String C_ALGORA_KEY = "0964dd92c45b43dbb53ed1c3665b9dd3";
+    public static final String C_ALGORA_SECRET = "9ca460b739894b89ad7380d897ed68a9";
+
+    public static final String C_ALGORA_CERTIFACATE ="ff07240bf2514328905fda423e91de62";
+
+    public static final String C_EASEMOB_BASEURL = "http://a1.easemob.com/1106210817094158/sawaplay/";
+    public static final String C_EASEMOB_APPID = "1106210817094158";
+//    public static final String C_EASEMOB_APPKEY = "1106210817094158#sawaplay";
+    public static final String C_EASEMOB_APPKEY = "1152220323110128#freecity";
+//    public static final String C_EASEMOB_CLIENTID = "YXA6nn01xMf8SpKI1uJUmQkf6w";
+    public static final String C_EASEMOB_CLIENTID = "YXA600pK3XPhS_yRf7BWkmgC-g";
+//    public static final String C_EASEMOB_CLIENT_SECRET = "YXA6F4q2LcCVnUSsLWTJsVkC-UDGUO0";
+    public static final String C_EASEMOB_CLIENT_SECRET = "YXA6aaV5RTDE6bjJmI0wzcj1yvMM6Wk";
+
+
+    public static final Integer C_ROOM_SYNC_INTERVAL = 2000;                                    //多少毫秒同步一次房间
+
+    // public static final String  C_REDIS_BASEKEY_ROOM_CACHE = "roomcache:";                      //从平台拉取的缓存
+    public static final String  C_REDIS_BASEKEY_ROOM_ZSET = "roomzset:";                        //房间列表 
+    public static final String  C_REDIS_BASEKEY_ROOM_INFO = "roominfo:";                        //房间详细信息
+    public static final String  C_REDIS_BASEKEY_ROOM_UPVOTE_CACHE = "room_upvote_cache:";       //房间点赞记录
+    public static final String  C_REDIS_BASEKEY_ROOM_FOLLOW = "room_follow:";                   //关注的房间
+    public static final String  C_REDIS_BASEKEY_ROOM_FOLLOWERS = "room_followers:";             //房间关注者列表
+    // public static final String  C_REDIS_BASEKEY_ROOM_CHATTER_LIST = "room_chatter_list:";       //房间chatter列表缓存
+    public static final String  C_REDIS_BASEKEY_ROOM_JOINED_USERS = "room_joined_users:";       //房间joined uid列表缓存
+
+    public static final Integer C_REDIS_ROOM_EXPIRATION = 5;                                   // s
+    public static final String  C_REDIS_BASEKEY_LOGIN_LIST = "login_list:";                     //登陆时间记录 
+    public static final String  C_REDIS_BASEKEY_LOGIN_REWARD_LIST = "login_reward_list:";       //登陆时间记录 
+    public static final String  C_REDIS_BASEKEY_CONT_LOGIN_COUNT = "cont_login_count:";         //连续登陆天数计数器
+
+    public static final String  C_REDIS_BASEKEY_USER_NEW_NOTIFY = "notify:";                    //玩家通知
+
+    public static final  String C_REDIS_BASEKEY_MYGIFT = "mygift:";                             //我的礼物列表
+    public static final  String C_REDIS_BASEKEY_MYGOODS = "mygoods:";                           //我的物品列表
+    public static final  String C_REDIS_BASEKEY_USEGOODS = "usegoods:";                         //我使用的物品列表
+    public static final  String C_REDIS_BASEKEY_MYGOODS_COUNT = "mygoods_count:";               //我的物品数量
+    // public static final  String C_REDIS_BASEKEY_MY_UNIQ_ROOMIDS = "my_uniq_room_ids:";          //uniq room ids
+
+    public static final  String C_REDIS_BASEKEY_POST = "post:";                                 //post
+    public static final  String C_REDIS_BASEKEY_POST_LIKE = "post_like:";                       //post like
+    public static final  String C_REDIS_BASEKEY_POST_COMMENT_LIKE = "post_comment_like:";       //post comment like
+    public static final  String C_REDIS_BASEKEY_POST_COMMENT_REPLY = "post_comment_reply:";       // post comment reply
+}

+ 19 - 0
cif-service/src/main/java/com/medipath/cif/core/Mapper.java

@@ -0,0 +1,19 @@
+package com.medipath.cif.core;
+
+import tk.mybatis.mapper.common.BaseMapper;
+import tk.mybatis.mapper.common.ConditionMapper;
+import tk.mybatis.mapper.common.IdsMapper;
+import tk.mybatis.mapper.common.special.InsertListMapper;
+import tk.mybatis.mapper.common.special.InsertUseGeneratedKeysMapper;
+
+/**
+ * 定制版MyBatis Mapper插件接口,如需其他接口参考官方文档自行添加。
+ */
+public interface Mapper<T>
+        extends
+        BaseMapper<T>,
+        ConditionMapper<T>,
+        IdsMapper<T>,
+        InsertListMapper<T> ,
+        InsertUseGeneratedKeysMapper<T> {
+}

+ 47 - 0
cif-service/src/main/java/com/medipath/cif/core/MessageTemplteType.java

@@ -0,0 +1,47 @@
+package com.medipath.cif.core;
+
+/**
+ * 消息模板枚举
+ */
+public enum MessageTemplteType {
+
+	/** 保修报事-派单通知 */
+	DISPATCH_NOTICE("dispatchNotice", "保修报事-派单通知"),
+	/** 物业缴费-缴费提醒通知 */
+	PAYMENT_REMINDER_NOTICE("paymentReminderNotice", "物业缴费-缴费提醒通知"),
+
+
+	;
+
+	private final String code; // 状态码
+	private final String desc;
+
+	MessageTemplteType(String code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+
+	public String getCode() {
+		return code;
+	}
+
+	public String getDesc() {
+		return desc;
+	}
+
+	/**
+	 * 通过状态码获取ENUM的名字
+	 * 
+	 * @param code
+	 * @return
+	 */
+	public static ResultCode getEnumByStatusCode(String code) {
+		for (ResultCode p : ResultCode.values()) {
+			if (p.code().equalsIgnoreCase(code)) {
+				return p;
+			}
+		}
+
+		return null;
+	}
+}

+ 119 - 0
cif-service/src/main/java/com/medipath/cif/core/MultipleHiLoPerTableGenerator.java

@@ -0,0 +1,119 @@
+package com.medipath.cif.core;
+
+import com.medipath.cif.dao.SequenceMapper;
+import com.medipath.cif.model.Sequence;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+import java.sql.SQLException;
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * A hilo <tt>IdentifierGenerator</tt> that returns a <tt>Long</tt>, constructed using
+ * a hi/lo algorithm. The hi value MUST be fetched in a seperate transaction
+ * to the <tt>Session</tt> transaction so the generator must be able to obtain
+ * a new connection and commit it. Hence this implementation may not
+ * be used  when the user is supplying connections. In this
+ * case a <tt>SequenceHiLoGenerator</tt> would be a better choice (where
+ * supported).<br>
+ * <br>
+ * <p>
+ * A hilo <tt>IdentifierGenerator</tt> that uses a database
+ * table to store the last generated values. A table can contains
+ * several hi values. They are distinct from each other through a key
+ * <p/>
+ * <p>This implementation is not compliant with a user connection</p>
+ * <p/>
+ *
+ * <p>Allowed parameters (all of them are optional):</p>
+ * <ul>
+ * <li>table: table name (default <tt>hibernate_sequences</tt>)</li>
+ * <li>primary_key_column: key column name (default <tt>sequence_name</tt>)</li>
+ * <li>value_column: hi value column name(default <tt>sequence_next_hi_value</tt>)</li>
+ * <li>primary_key_value: key value for the current entity (default to the entity's primary table name)</li>
+ * <li>primary_key_length: length of the key column in DB represented as a varchar (default to 255)</li>
+ * <li>max_lo: max low value before increasing hi (default to Short.MAX_VALUE)</li>
+ * </ul>
+ *
+ * @author Emmanuel Bernard
+ * @author <a href="mailto:kr@hbt.de">Klaus Richarz</a>.
+ */
+public class MultipleHiLoPerTableGenerator {
+
+    private static Logger logger = LoggerFactory.getLogger(MultipleHiLoPerTableGenerator.class);
+
+    private SequenceMapper sequenceMapper;
+
+    //hilo params
+    public static final String MAX_LO = "max_lo";
+
+    private static long maxLo = 999;
+
+    private long lo;
+    private long hi;
+
+    private static String query = "com.kameng.project.model.sequence.select";
+    private static String insert = "com.kameng.project.model.sequence.insert";
+    private static String update = "com.kameng.project.model.sequence.update";
+
+    private Sequence sequence;
+
+    private static Map<String, MultipleHiLoPerTableGenerator> sms = new ConcurrentHashMap<>();
+
+    public static MultipleHiLoPerTableGenerator build(SequenceMapper sequenceMapper, Sequence sequence) {
+
+        MultipleHiLoPerTableGenerator g = sms.get(sequence.getName());
+        if (g == null) {
+            synchronized (MultipleHiLoPerTableGenerator.class) {
+                g = sms.get(sequence.getName());
+                if (g == null) {
+                    g = new MultipleHiLoPerTableGenerator();
+                    g.init(sequenceMapper, sequence);
+                    sms.put(sequence.getName(), g);
+                }
+            }
+        }
+        return g;
+    }
+
+    private void init(SequenceMapper sequenceMapper, Sequence sequence) {
+        if (StringUtils.isBlank(sequence.getName())) {
+            logger.error("序列号名称不能为空");
+            throw new RuntimeException();
+        }
+        if (StringUtils.isBlank(sequence.getService())) {
+            logger.error("服务名称不能为空");
+            throw new RuntimeException();
+        }
+        this.sequenceMapper = sequenceMapper;
+        this.sequence = new Sequence();
+        this.sequence.setName(sequence.getName());
+        this.sequence.setService(sequence.getService());
+        long hival = ((Long) doWorkInCurrentTransaction());
+        lo = (hival == 0) ? 1 : 0;
+        hi = hival * (maxLo + 1);
+    }
+
+    /**
+     * hi
+     *
+     * @return
+     * @throws SQLException
+     */
+    public Serializable doWorkInCurrentTransaction() {
+        this.sequenceMapper.replaceInto(sequence);
+        return this.sequence.getId();
+    }
+
+    public synchronized Serializable generate() { // one jvm must synchronized
+        if (lo > maxLo) {
+            long hival = ((Long) doWorkInCurrentTransaction()).longValue();
+            lo = (hival == 0) ? 1 : 0;
+            hi = hival * (maxLo + 1);
+        }
+        return hi + lo++;
+    }
+}

+ 595 - 0
cif-service/src/main/java/com/medipath/cif/core/RedisUtil.java

@@ -0,0 +1,595 @@
+package com.medipath.cif.core;
+
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.stereotype.Component;
+import org.springframework.util.CollectionUtils;
+
+import javax.annotation.Resource;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ *
+ * @author
+ * 基于spring和redis的redisTemplate工具类
+ * 针对所有的hash 都是以h开头的方法
+ * 针对所有的Set 都是以s开头的方法                    不含通用方法
+ * 针对所有的List 都是以l开头的方法
+ */
+@Component
+public class RedisUtil {
+
+	@Resource
+	private RedisTemplate<String, Object> redisTemplate;
+
+	//=============================common============================
+	/**
+	 * 指定缓存失效时间
+	 * @param key 键
+	 * @param time 时间(秒)
+	 * @return
+	 */
+	public boolean expire(String key,long time, TimeUnit timeUnit){
+		try {
+			if(time>0){
+				redisTemplate.expire(key, time, timeUnit);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 指定缓存失效时间
+	 * @param key 键
+	 * @param time 时间(毫秒)
+	 * @return
+	 */
+	public boolean expireByMilliSeconds(String key,long time){
+		try {
+			if(time>0){
+				redisTemplate.expire(key, time, TimeUnit.MILLISECONDS);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 根据key 获取过期时间
+	 * @param key 键 不能为null
+	 * @return 时间(秒) 返回0代表为永久有效
+	 */
+	public long getExpire(String key){
+		return redisTemplate.getExpire(key,TimeUnit.SECONDS);
+	}
+
+	/**
+	 * 判断key是否存在
+	 * @param key 键
+	 * @return true 存在 false不存在
+	 */
+	public boolean hasKey(String key){
+		try {
+			return redisTemplate.hasKey(key);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 删除缓存
+	 * @param key 可以传一个值 或多个
+	 */
+	@SuppressWarnings("unchecked")
+	public void del(String ... key){
+		if(key!=null&&key.length>0){
+			if(key.length==1){
+				redisTemplate.delete(key[0]);
+			}else{
+				redisTemplate.delete(CollectionUtils.arrayToList(key));
+			}
+		}
+	}
+
+	//============================String=============================
+	/**
+	 * 普通缓存获取
+	 * @param key 键
+	 * @return 值
+	 */
+	public Object get(String key){
+		return key==null?null:redisTemplate.opsForValue().get(key);
+	}
+
+	/**
+	 * 普通缓存放入
+	 * @param key 键
+	 * @param value 值
+	 * @return true成功 false失败
+	 */
+	public boolean set(String key,Object value) {
+		try {
+			redisTemplate.opsForValue().set(key, value);
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+
+	}
+
+	/**
+	 * 普通缓存放入并设置时间
+	 * @param key 键
+	 * @param value 值
+	 * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
+	 * @return true成功 false 失败
+	 */
+	public boolean set(String key,Object value,long time){
+		try {
+			if(time>0){
+				redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
+			}else{
+				set(key, value);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 普通缓存放入并设置时间
+	 * @param key 键
+	 * @param value 值
+	 * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期
+	 * @return true成功 false 失败
+	 */
+	public boolean set(String key,Object value,long time, TimeUnit timeUnit){
+		try {
+			if(time>0){
+				redisTemplate.opsForValue().set(key, value, time, timeUnit);
+			}else{
+				set(key, value);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 递增
+	 * @param key 键
+	 * @param delta 要增加几(大于0)
+	 * @return
+	 */
+	public long incr(String key, long delta){
+		if(delta<0){
+			throw new RuntimeException("递增因子必须大于0");
+		}
+		return redisTemplate.opsForValue().increment(key, delta);
+	}
+
+	/**
+	 * 递减
+	 * @param key 键
+	 * @param delta 要减少几(小于0)
+	 * @return
+	 */
+	public long decr(String key, long delta){
+		if(delta<0){
+			throw new RuntimeException("递减因子必须大于0");
+		}
+		return redisTemplate.opsForValue().increment(key, -delta);
+	}
+
+	//================================Map=================================
+	/**
+	 * HashGet
+	 * @param key 键 不能为null
+	 * @param item 项 不能为null
+	 * @return 值
+	 */
+	public Object hget(String key,String item){
+		return redisTemplate.opsForHash().get(key, item);
+	}
+
+	/**
+	 * 获取hashKey对应的所有键值
+	 * @param key 键
+	 * @return 对应的多个键值
+	 */
+	public Map<Object,Object> hmget(String key){
+		return redisTemplate.opsForHash().entries(key);
+	}
+
+	/**
+	 * HashSet
+	 * @param key 键
+	 * @param map 对应多个键值
+	 * @return true 成功 false 失败
+	 */
+	public boolean hmset(String key, Map<String,Object> map){
+		try {
+			redisTemplate.opsForHash().putAll(key, map);
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * HashSet 并设置时间
+	 * @param key 键
+	 * @param map 对应多个键值
+	 * @param time 时间(秒)
+	 * @return true成功 false失败
+	 */
+	public boolean hmset(String key, Map<String,Object> map, long time, TimeUnit timeUnit){
+		try {
+			redisTemplate.opsForHash().putAll(key, map);
+			if(time>0){
+				expire(key, time, timeUnit);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 向一张hash表中放入数据,如果不存在将创建
+	 * @param key 键
+	 * @param item 项
+	 * @param value 值
+	 * @return true 成功 false失败
+	 */
+	public boolean hset(String key,String item,Object value) {
+		try {
+			redisTemplate.opsForHash().put(key, item, value);
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 向一张hash表中放入数据,如果不存在将创建
+	 * @param key 键
+	 * @param item 项
+	 * @param value 值
+	 * @param time 时间(秒)  注意:如果已存在的hash表有时间,这里将会替换原有的时间
+	 * @return true 成功 false失败
+	 */
+	public boolean hset(String key,String item,Object value,long time, TimeUnit timeUnit) {
+		try {
+			redisTemplate.opsForHash().put(key, item, value);
+			if(time>0){
+				expire(key, time, timeUnit);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 删除hash表中的值
+	 * @param key 键 不能为null
+	 * @param item 项 可以使多个 不能为null
+	 */
+	public void hdel(String key, Object... item){
+		redisTemplate.opsForHash().delete(key,item);
+	}
+
+	/**
+	 * 判断hash表中是否有该项的值
+	 * @param key 键 不能为null
+	 * @param item 项 不能为null
+	 * @return true 存在 false不存在
+	 */
+	public boolean hHasKey(String key, String item){
+		return redisTemplate.opsForHash().hasKey(key, item);
+	}
+
+	/**
+	 * hash递增 如果不存在,就会创建一个 并把新增后的值返回
+	 * @param key 键
+	 * @param item 项
+	 * @param by 要增加几(大于0)
+	 * @return
+	 */
+	public double hincr(String key, String item,double by){
+		return redisTemplate.opsForHash().increment(key, item, by);
+	}
+
+	/**
+	 * hash递减
+	 * @param key 键
+	 * @param item 项
+	 * @param by 要减少记(小于0)
+	 * @return
+	 */
+	public double hdecr(String key, String item,double by){
+		return redisTemplate.opsForHash().increment(key, item,-by);
+	}
+
+	//============================set=============================
+	/**
+	 * 根据key获取Set中的所有值
+	 * @param key 键
+	 * @return
+	 */
+	public Set<Object> sGet(String key){
+		try {
+			return redisTemplate.opsForSet().members(key);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * 根据key随机获取Set中的指定值
+	 * @param key 键
+	 * @return
+	 */
+	public Set<Object> sGetRandom(String key,Long size){
+		try {
+			return redisTemplate.opsForSet().distinctRandomMembers(key,size);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+
+	/**
+	 * 根据value从一个set中查询,是否存在
+	 * @param key 键
+	 * @param value 值
+	 * @return true 存在 false不存在
+	 */
+	public boolean sHasKey(String key,Object value){
+		try {
+			return redisTemplate.opsForSet().isMember(key, value);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 将数据放入set缓存
+	 * @param key 键
+	 * @param values 值 可以是多个
+	 * @return 成功个数
+	 */
+	public long sSet(String key, Object...values) {
+		try {
+			return redisTemplate.opsForSet().add(key, values);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return 0;
+		}
+	}
+
+	/**
+	 * 将set数据放入缓存
+	 * @param key 键
+	 * @param time 时间(秒)
+	 * @param values 值 可以是多个
+	 * @return 成功个数
+	 */
+	public long sSetAndTime(String key,long time, TimeUnit timeUnit, Object...values) {
+		try {
+			Long count = redisTemplate.opsForSet().add(key, values);
+			if(time>0){
+				expire(key, time, timeUnit);
+			}
+			return count;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return 0;
+		}
+	}
+
+	/**
+	 * 获取set缓存的长度
+	 * @param key 键
+	 * @return
+	 */
+	public long sGetSetSize(String key){
+		try {
+			return redisTemplate.opsForSet().size(key);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return 0;
+		}
+	}
+
+	/**
+	 * 移除值为value的
+	 * @param key 键
+	 * @param values 值 可以是多个
+	 * @return 移除的个数
+	 */
+	public long setRemove(String key, Object ...values) {
+		try {
+			Long count = redisTemplate.opsForSet().remove(key, values);
+			return count;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return 0;
+		}
+	}
+	//===============================list=================================
+
+	/**
+	 * 获取list缓存的内容
+	 * @param key 键
+	 * @param start 开始
+	 * @param end 结束  0 到 -1代表所有值
+	 * @return
+	 */
+	public List<Object> lGet(String key,long start, long end){
+		try {
+			return redisTemplate.opsForList().range(key, start, end);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * 获取list缓存的长度
+	 * @param key 键
+	 * @return
+	 */
+	public long lGetListSize(String key){
+		try {
+			return redisTemplate.opsForList().size(key);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return 0;
+		}
+	}
+
+	/**
+	 * 通过索引 获取list中的值
+	 * @param key 键
+	 * @param index 索引  index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
+	 * @return
+	 */
+	public Object lGetIndex(String key,long index){
+		try {
+			return redisTemplate.opsForList().index(key, index);
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	/**
+	 * 将list放入缓存
+	 * @param key 键
+	 * @param value 值
+	 * @return
+	 */
+	public boolean lSet(String key, Object value) {
+		try {
+			redisTemplate.opsForList().rightPush(key, value);
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 将list放入缓存
+	 * @param key 键
+	 * @param value 值
+	 * @param time 时间(秒)
+	 * @return
+	 */
+	public boolean lSet(String key, Object value, long time, TimeUnit timeUnit) {
+		try {
+			redisTemplate.opsForList().rightPush(key, value);
+			if (time > 0) {
+				expire(key, time, timeUnit);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 将list放入缓存
+	 * @param key 键
+	 * @param value 值
+	 * @return
+	 */
+	public boolean lSet(String key, List<Object> value) {
+		try {
+			redisTemplate.opsForList().rightPushAll(key, value);
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 将list放入缓存
+	 * @param key 键
+	 * @param value 值
+	 * @param time 时间(秒)
+	 * @return
+	 */
+	public boolean lSet(String key, List<Object> value, long time, TimeUnit timeUnit) {
+		try {
+			redisTemplate.opsForList().rightPushAll(key, value);
+			if (time > 0){
+				expire(key, time, timeUnit);
+			}
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 根据索引修改list中的某条数据
+	 * @param key 键
+	 * @param index 索引
+	 * @param value 值
+	 * @return
+	 */
+	public boolean lUpdateIndex(String key, long index,Object value) {
+		try {
+			redisTemplate.opsForList().set(key, index, value);
+			return true;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return false;
+		}
+	}
+
+	/**
+	 * 移除N个值为value
+	 * @param key 键
+	 * @param count 移除多少个
+	 * @param value 值
+	 * @return 移除的个数
+	 */
+	public long lRemove(String key,long count,Object value) {
+		try {
+			Long remove = redisTemplate.opsForList().remove(key, count, value);
+			return remove;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return 0;
+		}
+	}
+
+}

+ 106 - 0
cif-service/src/main/java/com/medipath/cif/core/ResultCode.java

@@ -0,0 +1,106 @@
+package com.medipath.cif.core;
+
+import cn.hutool.core.util.StrUtil;
+import com.medipath.cif.configurer.LocalUtil;
+
+/**
+ * 响应码枚举,参考HTTP状态码的语义
+ */
+public enum ResultCode {
+    /**
+     * 系统错误
+     */
+    SUCCESS("200", "成功"),//成功
+    FAIL("400", "失败"),//失败
+    UNAUTHORIZED("401", "未认证(签名错误)"),//未认证(签名错误)
+    NOT_FOUND("404", "接口不存在"),//接口不存在
+    INTERNAL_SERVER_ERROR("500", "服务器内部错误"),
+    PERMISSION_NOT_HAS("409", "没有操作权限"),
+    BACKSTAGE_IS_ERROR("501", "网关异常"),
+    OAUTH_INVALID_ACCESS_TOKEN("598", "登录失效"),
+    REDIS_KEY_IS_NOT_NULL("1007", "您操作的太快了,请再试一次"),
+    /**
+     * 业务错误
+     */
+    OBJECT_IS_NULL("6000", "对象不能为空"),
+    ID_IS_NULL("6001", "对象ID不能为空"),
+    CODE_IS_NULL("6002", "编号不能为空"),
+    NAME_IS_NULL("6003", "名称不能为空"),
+    SEQ_IS_NULL("6004", "排序不能为空"),
+    USERID_IS_NULL("6006", "用户id不能为空"),
+    RESULT_IS_NULL("6007", "查询结果为空"),
+    TYPE_IS_NULL("6008", "查询结果为空"),
+    SQL_ERROR("6009", "数据库异常"),
+    OPERATOR_IS_NULL("1001", "没有找到该用户的操作员信息"),
+    OPERATOR_IS_ERROR("1002", "该用户的操作员信息有误"),
+    USER_IS_NULL("1003", "未找到用户"),
+    UNLOGIN_PWD_ERROR("1004", "密码错误"),
+    APPCODE_IS_NULL("1005", "应用编号不能为空"),
+    STATUS_IS_NULL("1013", "状态异常"),
+    ACCOUNT_IS_NULL("1051", "账号不能为空"),
+    HOSPITAL_IS_NULL("1052", "医院不能为空" ),
+    SETTLEPLANID_IS_NULL("1053", "请选择结算方案" ),
+    ALIASES_IS_HAVE("1054", "科目别名已存在" ),
+    SUBJECTTYPE_IS_ERROR("1055", "科目类型异常"),
+    SETTLE_HAVE_DATA("1056", "已有结算数据,请联系管理员"),
+    AMOUNT_IS_INSUFFICIENT("1057", "账户金额不足,请联系管理员" ),
+    ALIASES_IS_ERROR("1058", "您输入的科目别名有误,请输入非重复别名,例:109"),
+    ENDTIME_ERROR("1059", "您输入的结束时间不能大于昨天" ),
+    STARTTIME_ERROR("1060", "您输入的开始时间早于系统建立之初" ),
+    UNBINDING_NOT_SLEF("1061", "无法解绑群主"  ),
+    USER_STATUS_IS_ERROR("1062", "用户状态异常,请联系管理员"  ),
+    PAY_TYPE_IS_ERROR("1063", "未知的支付类型,请联系管理员"  ),
+    SIGN_ERROR("1064", "签名错误,请联系管理员" ),
+    HOSPITAL_DEVICE_IS_NULL("1065", "医院插件未安装,请联系管理员" ),
+    APPID_IS_NULL("1066", "该设备未配置商户appid,请联系管理员" ),
+
+    UKEY_IS_NULL("2000", "Ukey未找到,请联系管理员"  ),
+    UKEY_IS_SOLD("2001", "Ukey已售出,请联系管理员" ),
+    USERID_IS_ERROR("1067", "用户id异常" ),
+    LOGINACCOUNT_IS_NULL("1068", "登录账号不能为空"),
+    ORG_IS_NULL("1069", "组织机构未找到" );
+
+    private final String code;   //状态码
+    private final String message;
+
+    ResultCode(String code, String message) {
+        this.code = code;
+        this.message = message;
+    }
+
+    public String code() {
+        return code;
+    }
+
+    public String message() {
+        return message;
+    }
+
+    public String getCode() {
+        return code;
+    }
+
+    public String getMessage() {
+        String msg = LocalUtil.get(this.name());
+        if (StrUtil.isNotBlank(msg) ){
+           return msg;
+        }
+        return message;
+    }
+
+    /**
+     * 通过状态码获取ENUM的名字
+     *
+     * @param code
+     * @return
+     */
+    public static ResultCode getEnumByStatusCode(String code) {
+        for (ResultCode p : ResultCode.values()) {
+            if (p.code().equalsIgnoreCase(code)) {
+                return p;
+            }
+        }
+
+        return null;
+    }
+}

+ 49 - 0
cif-service/src/main/java/com/medipath/cif/core/ResultGenerator.java

@@ -0,0 +1,49 @@
+package com.medipath.cif.core;
+
+
+import com.medipath.core.Result;
+
+/**
+ * 响应结果生成工具
+ */
+public class ResultGenerator {
+
+    public static Result genSuccessResult() {
+        return new Result()
+                .setCode(ResultCode.SUCCESS.getCode())
+                .setMessage(ResultCode.SUCCESS.getMessage());
+    }
+
+    public static Result genSuccessResult(Object data) {
+        return new Result()
+                .setCode(ResultCode.SUCCESS.getCode())
+                .setMessage(ResultCode.SUCCESS.getMessage())
+                .setData(data);
+    }
+
+    public static Result genFailResult(Object data) {
+        return new Result()
+                .setCode(ResultCode.FAIL.getCode())
+                .setMessage(ResultCode.FAIL.getMessage())
+                .setData(data);
+    }
+
+
+    public static Result genFailResult(ResultCode code) {
+        return new Result()
+                .setCode(code.getCode())
+                .setMessage(code.getMessage());
+    }
+    
+    public static Result genFailResult(ResultCode code,Object data) {
+        return new Result()
+                .setCode(code.getCode())
+                .setMessage(code.getMessage())
+                .setData(data);
+    }
+    public static Result genFailResult(String msg) {
+        return new Result()
+                .setCode(ResultCode.FAIL.getCode())
+                .setMessage(msg);
+    }
+}

+ 53 - 0
cif-service/src/main/java/com/medipath/cif/core/ServerConfig.java

@@ -0,0 +1,53 @@
+package com.medipath.cif.core;
+
+import org.springframework.boot.web.context.WebServerInitializedEvent;
+import org.springframework.context.ApplicationListener;
+import org.springframework.stereotype.Component;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+@Component
+public class ServerConfig implements ApplicationListener<WebServerInitializedEvent> {
+    private int serverPort;
+
+    public String getUrl() {
+        InetAddress address = null;
+        try {
+            address = InetAddress.getLocalHost();
+        } catch (UnknownHostException e) {
+            e.printStackTrace();
+        }
+        return "http://" + address.getHostAddress() + ":" + this.serverPort;
+    }
+
+    public String getLocalIp() {
+        try {
+            InetAddress address = InetAddress.getLocalHost();
+            return address.getHostAddress();
+        } catch (UnknownHostException e) {
+            e.printStackTrace();
+            return "127.0.0.1";
+        }
+    }
+
+    public String getIp() {
+        InetAddress address = null;
+        try {
+            address = InetAddress.getLocalHost();
+        } catch (UnknownHostException e) {
+            e.printStackTrace();
+        }
+        return address.getHostAddress();
+    }
+
+    public int getPort() {
+        return serverPort;
+    }
+
+    @Override
+    public void onApplicationEvent(WebServerInitializedEvent event) {
+        this.serverPort = event.getWebServer().getPort();
+    }
+
+}

+ 24 - 0
cif-service/src/main/java/com/medipath/cif/core/Service.java

@@ -0,0 +1,24 @@
+package com.medipath.cif.core;
+
+import org.apache.ibatis.exceptions.TooManyResultsException;
+import tk.mybatis.mapper.entity.Condition;
+
+import java.util.List;
+
+/**
+ * Service 层 基础接口,其他Service 接口 请继承该接口
+ */
+public interface Service<T> {
+	int  save(T model);//持久化
+    int  saveUseGeneratedKeys(T model);//持久化
+	int  save(List<T> models);//批量持久化
+    void deleteById(Number id);//通过主鍵刪除
+    void deleteByIds(String ids);//批量刪除 eg:ids -> “1,2,3,4”
+    void update(T model);//更新
+    T findById(Number id);//通过ID查找
+    T findBy(String fieldName, Object value) throws TooManyResultsException; //通过Model中某个成员变量名称(非数据表中column的名称)查找,value需符合unique约束
+    List<T> findByIds(String ids);//通过多个ID查找//eg:ids -> “1,2,3,4”
+    List<T> findByCondition(Condition condition);//根据条件查找
+    Integer countByCondition(Condition condition);//根据条件查找数量
+    List<T> findAll();//获取所有
+}

+ 29 - 0
cif-service/src/main/java/com/medipath/cif/core/ServiceException.java

@@ -0,0 +1,29 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by Fernflower decompiler)
+//
+
+package com.medipath.cif.core;
+
+import lombok.Data;
+
+@Data
+public class ServiceException extends RuntimeException {
+
+    private ResultCode code;
+
+    public ServiceException() {
+    }
+
+    public ServiceException(ResultCode code) {
+        this.code = code;
+    }
+
+    public ServiceException(String message) {
+        super(message);
+    }
+
+    public ServiceException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}

+ 57 - 0
cif-service/src/main/java/com/medipath/cif/core/SmsTempletType.java

@@ -0,0 +1,57 @@
+package com.medipath.cif.core;
+
+/**
+ * 短信模板枚举
+ */
+public enum SmsTempletType {
+	
+	RAPID_REGISTRATION("rapidRegistration","快速注册短信验证码"),
+	THIRD_PARTY_LOGIN("thirdPartyLogin","第三方登陆短信验证码"),
+	VERIFICATION_CODE_LANDING("verificationCodeLanding","验证码登陆"),
+	UPDATE_VERIFICATION_CODE("updateVerificationCode","更绑手机验证码"),
+	SET_PASSWORD_VERIFICATION_CODE("setPasswordVerificationCode","设置密码验证码"),
+	
+	;
+	
+	private String code;
+	private String desc;
+	
+	SmsTempletType(String code, String desc) {
+		this.code = code;
+		this.desc = desc;
+	}
+	
+	
+	/**
+	 * 通过状态码获取ENUM的名字
+	 * 
+	 * @param code
+	 * @return
+	 */
+	public static ResultCode getEnumByStatusCode(String code) {
+		for (ResultCode p : ResultCode.values()) {
+			if (p.code().equalsIgnoreCase(code)) {
+				return p;
+			}
+		}
+
+		return null;
+	}
+	
+	public String getCode() {
+		return code;
+	}
+	public void setCode(String code) {
+		this.code = code;
+	}
+	public String getDesc() {
+		return desc;
+	}
+	public void setDesc(String desc) {
+		this.desc = desc;
+	}
+	
+	
+	
+
+}

+ 34 - 0
cif-service/src/main/java/com/medipath/cif/core/cache/CacheKey.java

@@ -0,0 +1,34 @@
+package com.medipath.cif.core.cache;
+
+import java.io.Serializable;
+
+
+public class CacheKey implements Serializable {
+
+	private CacheType cacheType;
+
+	private String subKey;
+
+	private CacheKey() {
+	}
+
+	public static CacheKey generateKey(CacheType cacheType, String subKey) {
+		if (cacheType == null) {
+			throw new NullPointerException("CacheKey不允许存在空参数");
+		}
+		CacheKey key = new CacheKey();
+		key.cacheType = cacheType;
+		key.subKey = subKey;
+		return key;
+	}
+
+	@Override
+	public String toString() {
+		return new StringBuilder().append(cacheType).append("_").append(subKey != null ? subKey : "").toString();
+	}
+
+	public CacheType getType() {
+		return cacheType;
+	}
+
+}

+ 104 - 0
cif-service/src/main/java/com/medipath/cif/core/cache/CacheType.java

@@ -0,0 +1,104 @@
+package com.medipath.cif.core.cache;
+
+import com.medipath.cif.configurer.ProjectConstant;
+
+public enum CacheType {
+
+	// ----------------------- token 密钥相关 ------------------------
+
+	/**
+	 * app端密钥
+	 */
+	AppSecretKey,
+
+	sjtcRefundCallback,
+
+	// ------------------------- 订单相关 -------------------------
+	/**
+	 * 用户相关的一些配置:黑名单等
+	 */
+	UserToken,
+
+	/**
+	 * 玩家id
+	 */
+	PlayerIdToken,
+
+	/**
+	 * Geo 用户城市位置
+	 */
+	GeoCity,
+
+	/**
+	 * 用户登录
+	 */
+	UserLogin,
+
+	/**
+	 * 短链接
+	 */
+	ShortUrl,
+
+	/**
+	 * Geo 学校位置
+	 */
+	GeoSchool,
+
+	/**
+	 * 好友
+	 */
+	UserFriend,
+
+	/**
+	 * 报表
+	 */
+	report,
+
+	/**
+	 * 好友更新记录
+	 */
+	UserFriendUpdate,
+
+	/**
+	 * 用户虚拟
+	 */
+	UserVirtual,
+
+	/**
+	 * 周总结消息
+	 */
+	WeekMsg,
+	/**
+	 * 周总结等级
+	 */
+	WeekLevelMsg,
+
+	/**
+	 * 好友列表
+	 */
+	UserFriendList,
+
+	RQCode,
+
+	SubscribePopup,
+
+	/**
+	 * 累计总结等级
+	 */
+	QuestionLevelMsg,
+
+
+	XdAwardKey,
+
+    imageInfo;
+
+
+
+
+	private static String keyHead = ProjectConstant.application;
+
+	@Override
+	public String toString() {
+		return keyHead + "_" + name();
+	};
+}

+ 35 - 0
cif-service/src/main/java/com/medipath/cif/core/cache/lock/AbstractDistributedLock.java

@@ -0,0 +1,35 @@
+package com.medipath.cif.core.cache.lock;
+
+/**
+ * 分布式锁抽象类
+ *
+ * @author zlt
+ * @date 2018/5/29 14:14
+ */
+public abstract class AbstractDistributedLock implements DistributedLock{
+
+    @Override
+    public boolean lock(String key) {
+        return lock(key, TIMEOUT_MILLIS, RETRY_TIMES, SLEEP_MILLIS);
+    }
+
+    @Override
+    public boolean lock(String key, int retryTimes) {
+        return lock(key, TIMEOUT_MILLIS, retryTimes, SLEEP_MILLIS);
+    }
+
+    @Override
+    public boolean lock(String key, int retryTimes, long sleepMillis) {
+        return lock(key, TIMEOUT_MILLIS, retryTimes, sleepMillis);
+    }
+
+    @Override
+    public boolean lock(String key, long expire) {
+        return lock(key, expire, RETRY_TIMES, SLEEP_MILLIS);
+    }
+
+    @Override
+    public boolean lock(String key, long expire, int retryTimes) {
+        return lock(key, expire, retryTimes, SLEEP_MILLIS);
+    }
+}

+ 93 - 0
cif-service/src/main/java/com/medipath/cif/core/cache/lock/DistributedLock.java

@@ -0,0 +1,93 @@
+package com.medipath.cif.core.cache.lock;
+
+/**
+ * 分布式锁顶级接口
+ * 例如:
+ * RETRY_TIMES=100,SLEEP_MILLIS=100
+ * RETRY_TIMES * SLEEP_MILLIS = 10000 意味着如果一直获取不了锁,最长会等待10秒后抛超时异常
+ *
+ * @author zlt
+ * @date 2018/5/29 14:12
+ */
+public interface DistributedLock {
+
+    /**
+     * 默认超时时间
+     */
+    long TIMEOUT_MILLIS = 5000;
+
+    /**
+     * 重试次数
+     */
+    int RETRY_TIMES = 100;
+
+    /**
+     * 每次重试后等待的时间
+     */
+    long SLEEP_MILLIS = 100;
+
+    /**
+     * 获取锁
+     *
+     * @param key key
+     * @return 成功/失败
+     */
+    boolean lock(String key);
+
+    /**
+     * 获取锁
+     *
+     * @param key        key
+     * @param retryTimes 重试次数
+     * @return 成功/失败
+     */
+    boolean lock(String key, int retryTimes);
+
+    /**
+     * 获取锁
+     *
+     * @param key         key
+     * @param retryTimes  重试次数
+     * @param sleepMillis 获取锁失败的重试间隔
+     * @return 成功/失败
+     */
+    boolean lock(String key, int retryTimes, long sleepMillis);
+
+    /**
+     * 获取锁
+     *
+     * @param key    key
+     * @param expire 获取锁超时时间
+     * @return 成功/失败
+     */
+    boolean lock(String key, long expire);
+
+    /**
+     * 获取锁
+     *
+     * @param key        key
+     * @param expire     获取锁超时时间
+     * @param retryTimes 重试次数
+     * @return 成功/失败
+     */
+    boolean lock(String key, long expire, int retryTimes);
+
+    /**
+     * 获取锁
+     *
+     * @param key         key
+     * @param expire      获取锁超时时间
+     * @param retryTimes  重试次数
+     * @param sleepMillis 获取锁失败的重试间隔
+     * @return 成功/失败
+     */
+    boolean lock(String key, long expire, int retryTimes, long sleepMillis);
+
+    /**
+     * 释放锁
+     *
+     * @param key key值
+     * @return 释放结果
+     */
+    boolean releaseLock(String key);
+}

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