renqianlong преди 2 години
родител
ревизия
bf6f50002e
променени са 100 файла, в които са добавени 2720 реда и са изтрити 7080 реда
  1. 11 0
      pom.xml
  2. 0 18
      zzbusiness-common/pom.xml
  3. 214 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/doentity/BaseEntity.java
  4. 68 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/doentity/TenantEntity.java
  5. 34 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/env/TokenConstants.java
  6. 51 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/IUserClientFallback.java
  7. 105 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/entity/User.java
  8. 60 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/entity/UserInfo.java
  9. 107 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/entity/UserOauth.java
  10. 0 154
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/AesUtil.java
  11. 0 323
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/AuthInfo.java
  12. 0 20
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/IClientDetails.java
  13. 0 11
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/IClientDetailsService.java
  14. 0 38
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/SecureException.java
  15. 0 337
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/SecureUtil.java
  16. 0 73
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/TokenInfo.java
  17. 0 94
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/ZhongZhengTokenProperties.java
  18. 0 253
      zzbusiness-common/src/main/java/org/zhongzheng/common/secure/ZhongZhengUser.java
  19. 0 52
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Base64Util.java
  20. 0 191
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/BaseBeanCopier.java
  21. 0 24
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/BeanProperty.java
  22. 0 137
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/BeanUtil.java
  23. 0 36
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Charsets.java
  24. 0 65
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/ClassUtil.java
  25. 0 37
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/CollectionUtil.java
  26. 0 69
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/ConcurrentDateFormat.java
  27. 0 267
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DateUtil.java
  28. 751 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DateUtils.java
  29. 0 89
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DigestUtil.java
  30. 195 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DoubleUtils.java
  31. 0 581
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Func.java
  32. 0 99
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/HexUtil.java
  33. 11 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/IResultCode.java
  34. 0 66
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/IoUtil.java
  35. 0 312
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/JsonUtil.java
  36. 0 102
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Kv.java
  37. 158 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/R.java
  38. 159 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/ServletUtils.java
  39. 128 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/SnowflakeIdUtils.java
  40. 0 56
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/StrFormatter.java
  41. 0 238
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/StrSpliter.java
  42. 0 741
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/StringUtil.java
  43. 73 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/TelPhoneUtils.java
  44. 96 0
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Threads.java
  45. 0 269
      zzbusiness-common/src/main/java/org/zhongzheng/common/utils/WebUtil.java
  46. 9 0
      zzbusiness-info/pom.xml
  47. 0 107
      zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyCertificateController.java
  48. 0 104
      zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyController.java
  49. 0 98
      zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyDepartmentController.java
  50. 0 84
      zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyUserController.java
  51. 0 95
      zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffBankInfoController.java
  52. 0 102
      zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffCertificateController.java
  53. 0 94
      zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffContractArchivesController.java
  54. 0 101
      zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffController.java
  55. 0 99
      zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffEduBgController.java
  56. 0 98
      zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffEmergencyContactController.java
  57. 0 36
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyUserAddBo.java
  58. 0 43
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyUserEditBo.java
  59. 0 46
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyUserQueryBo.java
  60. 0 26
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/UserBsAccountLoginBo.java
  61. 0 19
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyCertificateMapper.java
  62. 0 15
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyDepartmentMapper.java
  63. 0 14
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyMapper.java
  64. 0 14
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyUserMapper.java
  65. 0 58
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyCertificateService.java
  66. 0 58
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyDepartmentService.java
  67. 0 56
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyService.java
  68. 0 56
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyUserService.java
  69. 0 435
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/impl/CompanyCertificateServiceImpl.java
  70. 0 209
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/impl/CompanyDepartmentServiceImpl.java
  71. 0 207
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/impl/CompanyServiceImpl.java
  72. 46 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/controller/ICompanyCertificateClientFallback.java
  73. 41 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/controller/ICompanyClientFallback.java
  74. 32 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/controller/ICompanyDepartmentClientFallback.java
  75. 5 2
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyAddBo.java
  76. 4 3
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateAddBo.java
  77. 4 2
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateEditBo.java
  78. 5 3
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateInfo.java
  79. 6 5
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateQueryBo.java
  80. 5 2
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyDepartmentAddBo.java
  81. 5 2
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyDepartmentEditBo.java
  82. 6 5
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyDepartmentQueryBo.java
  83. 5 2
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyEditBo.java
  84. 7 5
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyQueryBo.java
  85. 5 2
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/ExcelCompanyCertificateBo.java
  86. 1 1
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/Company.java
  87. 1 1
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/CompanyCertificate.java
  88. 1 1
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/CompanyDepartment.java
  89. 1 1
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/CompanyUser.java
  90. 67 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/service/ICompanyCertificateClient.java
  91. 65 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/service/ICompanyClient.java
  92. 49 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/service/ICompanyDepartmentClient.java
  93. 4 3
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyCertificateVo.java
  94. 4 3
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyDepartmentVo.java
  95. 4 3
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyUserVo.java
  96. 6 5
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyVo.java
  97. 5 3
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/ExcelCompanyCertificateVo.java
  98. 15 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/staff/controller/IStaffBankInfoClientFallback.java
  99. 43 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/staff/controller/IStaffCertificateClientFallback.java
  100. 48 0
      zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/staff/controller/IStaffClientFallback.java

+ 11 - 0
pom.xml

@@ -31,6 +31,7 @@
         <mysql.connector.version>8.0.32</mysql.connector.version>
         <captcha.version>1.6.2</captcha.version>
         <hutool.version>5.5.8</hutool.version>
+        <poi.version>4.1.0</poi.version>
     </properties>
 
     <!-- 作用:锁定版本 子module不用写groupId和version -->
@@ -72,6 +73,16 @@
                 <groupId>org.apache.tomcat.embed</groupId>
                 <artifactId>tomcat-embed-core</artifactId>
             </dependency>
+            <dependency>
+                <groupId>org.apache.poi</groupId>
+                <artifactId>poi-ooxml</artifactId>
+                <version>${poi.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.poi</groupId>
+                <artifactId>poi</artifactId>
+                <version>${poi.version}</version>
+            </dependency>
         </dependencies>
     </dependencyManagement>
 

+ 0 - 18
zzbusiness-common/pom.xml

@@ -84,24 +84,6 @@
             <groupId>javax.servlet</groupId>
             <artifactId>javax.servlet-api</artifactId>
         </dependency>
-        <dependency>
-            <groupId>repository.com.github.pagehelper</groupId>
-            <artifactId>pagehelper</artifactId>
-            <version>5.2.0</version>
-        </dependency>
-        <dependency>
-            <groupId>jakarta.validation</groupId>
-            <artifactId>jakarta.validation-api</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>commons-codec</groupId>
-            <artifactId>commons-codec</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>repository.com.google.code.gson</groupId>
-            <artifactId>gson</artifactId>
-            <version>2.9.1</version>
-        </dependency>
 
         <!--redis-->
         <dependency>

+ 214 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/doentity/BaseEntity.java

@@ -0,0 +1,214 @@
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+package org.zhongzheng.common.doentity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.Date;
+import org.springframework.format.annotation.DateTimeFormat;
+
+public class BaseEntity implements Serializable {
+    @JsonSerialize(
+            using = ToStringSerializer.class
+    )
+    @ApiModelProperty("创建人")
+    private Long createUser;
+    @DateTimeFormat(
+            pattern = "yyyy-MM-dd HH:mm:ss"
+    )
+    @JsonFormat(
+            pattern = "yyyy-MM-dd HH:mm:ss"
+    )
+    @ApiModelProperty("创建时间")
+    private Date createTime;
+    @JsonSerialize(
+            using = ToStringSerializer.class
+    )
+    @ApiModelProperty("更新人")
+    private Long updateUser;
+    @DateTimeFormat(
+            pattern = "yyyy-MM-dd HH:mm:ss"
+    )
+    @JsonFormat(
+            pattern = "yyyy-MM-dd HH:mm:ss"
+    )
+    @ApiModelProperty("更新时间")
+    private Date updateTime;
+    @ApiModelProperty("业务状态")
+    private Integer status;
+    @TableLogic
+    @ApiModelProperty("是否已删除")
+    private Integer isDeleted;
+
+    public BaseEntity() {
+    }
+
+    public Long getCreateUser() {
+        return this.createUser;
+    }
+
+    public Date getCreateTime() {
+        return this.createTime;
+    }
+
+    public Long getUpdateUser() {
+        return this.updateUser;
+    }
+
+    public Date getUpdateTime() {
+        return this.updateTime;
+    }
+
+    public Integer getStatus() {
+        return this.status;
+    }
+
+    public Integer getIsDeleted() {
+        return this.isDeleted;
+    }
+
+    public void setCreateUser(final Long createUser) {
+        this.createUser = createUser;
+    }
+
+    @JsonFormat(
+            pattern = "yyyy-MM-dd HH:mm:ss"
+    )
+    public void setCreateTime(final Date createTime) {
+        this.createTime = createTime;
+    }
+
+    public void setUpdateUser(final Long updateUser) {
+        this.updateUser = updateUser;
+    }
+
+    @JsonFormat(
+            pattern = "yyyy-MM-dd HH:mm:ss"
+    )
+    public void setUpdateTime(final Date updateTime) {
+        this.updateTime = updateTime;
+    }
+
+    public void setStatus(final Integer status) {
+        this.status = status;
+    }
+
+    public void setIsDeleted(final Integer isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof org.zhongzheng.common.doentity.BaseEntity)) {
+            return false;
+        } else {
+            org.zhongzheng.common.doentity.BaseEntity other = (org.zhongzheng.common.doentity.BaseEntity)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else {
+                Object this$createUser = this.getCreateUser();
+                Object other$createUser = other.getCreateUser();
+                if (this$createUser == null) {
+                    if (other$createUser != null) {
+                        return false;
+                    }
+                } else if (!this$createUser.equals(other$createUser)) {
+                    return false;
+                }
+
+                Object this$updateUser = this.getUpdateUser();
+                Object other$updateUser = other.getUpdateUser();
+                if (this$updateUser == null) {
+                    if (other$updateUser != null) {
+                        return false;
+                    }
+                } else if (!this$updateUser.equals(other$updateUser)) {
+                    return false;
+                }
+
+                Object this$status = this.getStatus();
+                Object other$status = other.getStatus();
+                if (this$status == null) {
+                    if (other$status != null) {
+                        return false;
+                    }
+                } else if (!this$status.equals(other$status)) {
+                    return false;
+                }
+
+                label62: {
+                    Object this$isDeleted = this.getIsDeleted();
+                    Object other$isDeleted = other.getIsDeleted();
+                    if (this$isDeleted == null) {
+                        if (other$isDeleted == null) {
+                            break label62;
+                        }
+                    } else if (this$isDeleted.equals(other$isDeleted)) {
+                        break label62;
+                    }
+
+                    return false;
+                }
+
+                label55: {
+                    Object this$createTime = this.getCreateTime();
+                    Object other$createTime = other.getCreateTime();
+                    if (this$createTime == null) {
+                        if (other$createTime == null) {
+                            break label55;
+                        }
+                    } else if (this$createTime.equals(other$createTime)) {
+                        break label55;
+                    }
+
+                    return false;
+                }
+
+                Object this$updateTime = this.getUpdateTime();
+                Object other$updateTime = other.getUpdateTime();
+                if (this$updateTime == null) {
+                    if (other$updateTime != null) {
+                        return false;
+                    }
+                } else if (!this$updateTime.equals(other$updateTime)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof org.zhongzheng.common.doentity.BaseEntity;
+    }
+
+    public int hashCode() {
+        int result = 1;
+        Object $createUser = this.getCreateUser();
+        result = result * 59 + ($createUser == null ? 43 : $createUser.hashCode());
+        Object $updateUser = this.getUpdateUser();
+        result = result * 59 + ($updateUser == null ? 43 : $updateUser.hashCode());
+        Object $status = this.getStatus();
+        result = result * 59 + ($status == null ? 43 : $status.hashCode());
+        Object $isDeleted = this.getIsDeleted();
+        result = result * 59 + ($isDeleted == null ? 43 : $isDeleted.hashCode());
+        Object $createTime = this.getCreateTime();
+        result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
+        Object $updateTime = this.getUpdateTime();
+        result = result * 59 + ($updateTime == null ? 43 : $updateTime.hashCode());
+        return result;
+    }
+
+    public String toString() {
+        return "BaseEntity(createUser=" + this.getCreateUser() + ", createTime=" + this.getCreateTime() + ", updateUser=" + this.getUpdateUser() + ", updateTime=" + this.getUpdateTime() + ", status=" + this.getStatus() + ", isDeleted=" + this.getIsDeleted() + ")";
+    }
+}

+ 68 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/doentity/TenantEntity.java

@@ -0,0 +1,68 @@
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+package org.zhongzheng.common.doentity;
+
+import io.swagger.annotations.ApiModelProperty;
+import org.zhongzheng.common.doentity.BaseEntity;
+
+public class TenantEntity extends BaseEntity {
+    @ApiModelProperty("租户ID")
+    private String tenantId;
+
+    public TenantEntity() {
+    }
+
+    public String getTenantId() {
+        return this.tenantId;
+    }
+
+    public void setTenantId(final String tenantId) {
+        this.tenantId = tenantId;
+    }
+
+    public String toString() {
+        return "TenantEntity(tenantId=" + this.getTenantId() + ")";
+    }
+
+    public boolean equals(final Object o) {
+        if (o == this) {
+            return true;
+        } else if (!(o instanceof org.zhongzheng.common.doentity.TenantEntity)) {
+            return false;
+        } else {
+            org.zhongzheng.common.doentity.TenantEntity other = (org.zhongzheng.common.doentity.TenantEntity)o;
+            if (!other.canEqual(this)) {
+                return false;
+            } else if (!super.equals(o)) {
+                return false;
+            } else {
+                Object this$tenantId = this.getTenantId();
+                Object other$tenantId = other.getTenantId();
+                if (this$tenantId == null) {
+                    if (other$tenantId != null) {
+                        return false;
+                    }
+                } else if (!this$tenantId.equals(other$tenantId)) {
+                    return false;
+                }
+
+                return true;
+            }
+        }
+    }
+
+    protected boolean canEqual(final Object other) {
+        return other instanceof org.zhongzheng.common.doentity.TenantEntity;
+    }
+
+    public int hashCode() {
+        int result = super.hashCode();
+        Object $tenantId = this.getTenantId();
+        result = result * 59 + ($tenantId == null ? 43 : $tenantId.hashCode());
+        return result;
+    }
+}

+ 34 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/env/TokenConstants.java

@@ -0,0 +1,34 @@
+
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+package org.zhongzheng.common.env;
+
+public interface TokenConstants {
+    String AVATAR = "avatar";
+    String HEADER = "zhongzheng-auth";
+    String BEARER = "bearer";
+    String CRYPTO = "crypto";
+    String ACCESS_TOKEN = "access_token";
+    String REFRESH_TOKEN = "refresh_token";
+    String TOKEN_TYPE = "token_type";
+    String EXPIRES_IN = "expires_in";
+    String ACCOUNT = "account";
+    String USER_ID = "user_id";
+    String ROLE_ID = "role_id";
+    String DEPT_ID = "dept_id";
+    String USER_NAME = "user_name";
+    String ROLE_NAME = "role_name";
+    String TENANT_ID = "tenant_id";
+    String OAUTH_ID = "oauth_id";
+    String CLIENT_ID = "client_id";
+    String LICENSE = "license";
+    String LICENSE_NAME = "powered by ZhongZheng";
+    String DEFAULT_AVATAR = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";
+    Integer AUTH_LENGTH = 7;
+    String SIGN_KEY = "zhongzhengxisapowerfulmicroservicearchitectureupgradedandoptimizedfromacommercialproject";
+    int SIGN_KEY_LENGTH = 32;
+}

+ 51 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/IUserClientFallback.java

@@ -0,0 +1,51 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.zhongzheng.common.feignclient.zzbusinessuser;
+
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.common.feignclient.zzbusinessuser.entity.User;
+import org.zhongzheng.common.feignclient.zzbusinessuser.entity.UserInfo;
+import org.zhongzheng.common.feignclient.zzbusinessuser.entity.UserOauth;
+import org.springframework.stereotype.Component;
+
+/**
+ * Feign失败配置
+ *
+ * @author Chill
+ */
+@Component
+public class IUserClientFallback implements IUserClient {
+
+	@Override
+	public R<UserInfo> userInfo(Long userId) {
+		return R.fail("未获取到账号信息");
+	}
+
+	@Override
+	public R<UserInfo> userInfo(String tenantId, String account, String password) {
+		return R.fail("未获取到账号信息");
+	}
+
+	@Override
+	public R<UserInfo> userAuthInfo(UserOauth userOauth) {
+		return R.fail("未获取到账号信息");
+	}
+
+	@Override
+	public R<Boolean> saveUser(User user) {
+		return R.fail("创建用户失败");
+	}
+}

+ 105 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/entity/User.java

@@ -0,0 +1,105 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.zhongzheng.common.feignclient.zzbusinessuser.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.zhongzheng.common.doentity.TenantEntity;
+
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("zhongzheng_user")
+@EqualsAndHashCode(callSuper = true)
+public class User extends TenantEntity {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键id
+	 */
+	@ApiModelProperty(value = "主键")
+	@TableId(value = "id", type = IdType.ASSIGN_ID)
+	@JsonSerialize(using = ToStringSerializer.class)
+	private Long id;
+
+
+	/**
+	 * 编号
+	 */
+	private String code;
+	/**
+	 * 账号
+	 */
+	private String account;
+	/**
+	 * 密码
+	 */
+	private String password;
+	/**
+	 * 昵称
+	 */
+	private String name;
+	/**
+	 * 真名
+	 */
+	private String realName;
+	/**
+	 * 头像
+	 */
+	private String avatar;
+	/**
+	 * 邮箱
+	 */
+	private String email;
+	/**
+	 * 手机
+	 */
+	private String phone;
+	/**
+	 * 生日
+	 */
+	private Date birthday;
+	/**
+	 * 性别
+	 */
+	private Integer sex;
+	/**
+	 * 角色id
+	 */
+	private String roleId;
+	/**
+	 * 部门id
+	 */
+	private String deptId;
+	/**
+	 * 部门id
+	 */
+	private String postId;
+
+
+}

+ 60 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/entity/UserInfo.java

@@ -0,0 +1,60 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.zhongzheng.common.feignclient.zzbusinessuser.entity;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 用户信息
+ *
+ * @author Chill
+ */
+@Data
+@ApiModel(description = "用户信息")
+public class UserInfo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 用户基础信息
+	 */
+	@ApiModelProperty(value = "用户")
+	private User user;
+
+	/**
+	 * 权限标识集合
+	 */
+	@ApiModelProperty(value = "权限集合")
+	private List<String> permissions;
+
+	/**
+	 * 角色集合
+	 */
+	@ApiModelProperty(value = "角色集合")
+	private List<String> roles;
+
+	/**
+	 * 第三方授权id
+	 */
+	@ApiModelProperty(value = "第三方授权id")
+	private String oauthId;
+
+}

+ 107 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/feignclient/zzbusinessuser/entity/UserOauth.java

@@ -0,0 +1,107 @@
+/**
+ * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
+ * <p>
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.zhongzheng.common.feignclient.zzbusinessuser.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.databind.annotation.JsonSerialize;
+import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * 实体类
+ *
+ * @author Chill
+ */
+@Data
+@TableName("blade_user_oauth")
+public class UserOauth implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+
+	/**
+	 * 主键
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty(value = "主键")
+	@TableId(value = "id", type = IdType.ASSIGN_ID)
+	private Long id;
+
+	/**
+	 * 租户ID
+	 */
+	private String tenantId;
+
+	/**
+	 * 第三方系统用户ID
+	 */
+	private String uuid;
+
+	/**
+	 * 用户ID
+	 */
+	@JsonSerialize(using = ToStringSerializer.class)
+	@ApiModelProperty(value = "用户主键")
+	private Long userId;
+
+	/**
+	 * 用户名
+	 */
+	private String username;
+	/**
+	 * 用户昵称
+	 */
+	private String nickname;
+	/**
+	 * 用户头像
+	 */
+	private String avatar;
+	/**
+	 * 用户网址
+	 */
+	private String blog;
+	/**
+	 * 所在公司
+	 */
+	private String company;
+	/**
+	 * 位置
+	 */
+	private String location;
+	/**
+	 * 用户邮箱
+	 */
+	private String email;
+	/**
+	 * 用户备注(各平台中的用户个人介绍)
+	 */
+	private String remark;
+	/**
+	 * 性别
+	 */
+	private String gender;
+	/**
+	 * 用户来源
+	 */
+	private String source;
+
+
+}

+ 0 - 154
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/AesUtil.java

@@ -1,154 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.nio.charset.Charset;
-import java.util.Arrays;
-import java.util.Objects;
-import javax.crypto.Cipher;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import org.springframework.lang.Nullable;
-import org.springframework.util.Assert;
-import org.zhongzheng.common.utils.*;
-
-public class AesUtil {
-    public static final Charset DEFAULT_CHARSET;
-
-    public AesUtil() {
-    }
-
-    public static String genAesKey() {
-        return StringUtil.random(32);
-    }
-
-    public static byte[] encrypt(String content, String aesTextKey) {
-        return encrypt(content.getBytes(DEFAULT_CHARSET), aesTextKey);
-    }
-
-    public static byte[] encrypt(String content, Charset charset, String aesTextKey) {
-        return encrypt(content.getBytes(charset), aesTextKey);
-    }
-
-    public static byte[] encrypt(byte[] content, String aesTextKey) {
-        return encrypt(content, ((String)Objects.requireNonNull(aesTextKey)).getBytes(DEFAULT_CHARSET));
-    }
-
-    public static String encryptToHex(String content, String aesTextKey) {
-        return HexUtil.encodeToString(encrypt(content, aesTextKey));
-    }
-
-    public static String encryptToHex(byte[] content, String aesTextKey) {
-        return HexUtil.encodeToString(encrypt(content, aesTextKey));
-    }
-
-    public static String encryptToBase64(String content, String aesTextKey) {
-        return Base64Util.encodeToString(encrypt(content, aesTextKey));
-    }
-
-    public static String encryptToBase64(byte[] content, String aesTextKey) {
-        return Base64Util.encodeToString(encrypt(content, aesTextKey));
-    }
-
-    @Nullable
-    public static String decryptFormHexToString(@Nullable String content, String aesTextKey) {
-        byte[] hexBytes = decryptFormHex(content, aesTextKey);
-        return hexBytes == null ? null : new String(hexBytes, DEFAULT_CHARSET);
-    }
-
-    @Nullable
-    public static byte[] decryptFormHex(@Nullable String content, String aesTextKey) {
-        return StringUtil.isBlank(content) ? null : decryptFormHex(content.getBytes(DEFAULT_CHARSET), aesTextKey);
-    }
-
-    public static byte[] decryptFormHex(byte[] content, String aesTextKey) {
-        return decrypt(HexUtil.decode(content), aesTextKey);
-    }
-
-    @Nullable
-    public static String decryptFormBase64ToString(@Nullable String content, String aesTextKey) {
-        byte[] hexBytes = decryptFormBase64(content, aesTextKey);
-        return hexBytes == null ? null : new String(hexBytes, DEFAULT_CHARSET);
-    }
-
-    @Nullable
-    public static byte[] decryptFormBase64(@Nullable String content, String aesTextKey) {
-        return StringUtil.isBlank(content) ? null : decryptFormBase64(content.getBytes(DEFAULT_CHARSET), aesTextKey);
-    }
-
-    public static byte[] decryptFormBase64(byte[] content, String aesTextKey) {
-        return decrypt(Base64Util.decode(content), aesTextKey);
-    }
-
-    public static String decryptToString(byte[] content, String aesTextKey) {
-        return new String(decrypt(content, aesTextKey), DEFAULT_CHARSET);
-    }
-
-    public static byte[] decrypt(byte[] content, String aesTextKey) {
-        return decrypt(content, ((String)Objects.requireNonNull(aesTextKey)).getBytes(DEFAULT_CHARSET));
-    }
-
-    public static byte[] encrypt(byte[] content, byte[] aesKey) {
-        return aes(AesUtil.Pkcs7Encoder.encode(content), aesKey, 1);
-    }
-
-    public static byte[] decrypt(byte[] encrypted, byte[] aesKey) {
-        return AesUtil.Pkcs7Encoder.decode(aes(encrypted, aesKey, 2));
-    }
-
-    private static byte[] aes(byte[] encrypted, byte[] aesKey, int mode) {
-        Assert.isTrue(aesKey.length == 32, "IllegalAesKey, aesKey's length must be 32");
-
-        try {
-            Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding");
-            SecretKeySpec keySpec = new SecretKeySpec(aesKey, "AES");
-            IvParameterSpec iv = new IvParameterSpec(Arrays.copyOfRange(aesKey, 0, 16));
-            cipher.init(mode, keySpec, iv);
-            return cipher.doFinal(encrypted);
-        } catch (Exception var6) {
-            throw Exceptions.unchecked(var6);
-        }
-    }
-
-    static {
-        DEFAULT_CHARSET = Charsets.UTF_8;
-    }
-
-    private static class Pkcs7Encoder {
-        private static final int BLOCK_SIZE = 32;
-
-        private Pkcs7Encoder() {
-        }
-
-        private static byte[] encode(byte[] src) {
-            int count = src.length;
-            int amountToPad = 32 - count % 32;
-            byte pad = (byte)(amountToPad & 255);
-            byte[] pads = new byte[amountToPad];
-
-            int length;
-            for(length = 0; length < amountToPad; ++length) {
-                pads[length] = pad;
-            }
-
-            length = count + amountToPad;
-            byte[] dest = new byte[length];
-            System.arraycopy(src, 0, dest, 0, count);
-            System.arraycopy(pads, 0, dest, count, amountToPad);
-            return dest;
-        }
-
-        private static byte[] decode(byte[] decrypted) {
-            int pad = decrypted[decrypted.length - 1];
-            if (pad < 1 || pad > 32) {
-                pad = 0;
-            }
-
-            return pad > 0 ? Arrays.copyOfRange(decrypted, 0, decrypted.length - pad) : decrypted;
-        }
-    }
-}

+ 0 - 323
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/AuthInfo.java

@@ -1,323 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import com.fasterxml.jackson.databind.annotation.JsonSerialize;
-import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-@ApiModel(
-        description = "认证信息"
-)
-public class AuthInfo {
-    @ApiModelProperty("令牌")
-    private String accessToken;
-    @ApiModelProperty("令牌类型")
-    private String tokenType;
-    @ApiModelProperty("刷新令牌")
-    private String refreshToken;
-    @ApiModelProperty("用户ID")
-    @JsonSerialize(
-            using = ToStringSerializer.class
-    )
-    private Long userId;
-    @ApiModelProperty("租户ID")
-    private String tenantId;
-    @ApiModelProperty("第三方系统ID")
-    private String oauthId;
-    @ApiModelProperty("头像")
-    private String avatar = "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png";
-    @ApiModelProperty("角色名")
-    private String authority;
-    @ApiModelProperty("用户名")
-    private String userName;
-    @ApiModelProperty("账号名")
-    private String account;
-    @ApiModelProperty("过期时间")
-    private long expiresIn;
-    @ApiModelProperty("许可证")
-    private String license = "powered by zhongzheng";
-
-    public AuthInfo() {
-    }
-
-    public String getAccessToken() {
-        return this.accessToken;
-    }
-
-    public String getTokenType() {
-        return this.tokenType;
-    }
-
-    public String getRefreshToken() {
-        return this.refreshToken;
-    }
-
-    public Long getUserId() {
-        return this.userId;
-    }
-
-    public String getTenantId() {
-        return this.tenantId;
-    }
-
-    public String getOauthId() {
-        return this.oauthId;
-    }
-
-    public String getAvatar() {
-        return this.avatar;
-    }
-
-    public String getAuthority() {
-        return this.authority;
-    }
-
-    public String getUserName() {
-        return this.userName;
-    }
-
-    public String getAccount() {
-        return this.account;
-    }
-
-    public long getExpiresIn() {
-        return this.expiresIn;
-    }
-
-    public String getLicense() {
-        return this.license;
-    }
-
-    public void setAccessToken(final String accessToken) {
-        this.accessToken = accessToken;
-    }
-
-    public void setTokenType(final String tokenType) {
-        this.tokenType = tokenType;
-    }
-
-    public void setRefreshToken(final String refreshToken) {
-        this.refreshToken = refreshToken;
-    }
-
-    public void setUserId(final Long userId) {
-        this.userId = userId;
-    }
-
-    public void setTenantId(final String tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    public void setOauthId(final String oauthId) {
-        this.oauthId = oauthId;
-    }
-
-    public void setAvatar(final String avatar) {
-        this.avatar = avatar;
-    }
-
-    public void setAuthority(final String authority) {
-        this.authority = authority;
-    }
-
-    public void setUserName(final String userName) {
-        this.userName = userName;
-    }
-
-    public void setAccount(final String account) {
-        this.account = account;
-    }
-
-    public void setExpiresIn(final long expiresIn) {
-        this.expiresIn = expiresIn;
-    }
-
-    public void setLicense(final String license) {
-        this.license = license;
-    }
-
-    public boolean equals(final Object o) {
-        if (o == this) {
-            return true;
-        } else if (!(o instanceof AuthInfo)) {
-            return false;
-        } else {
-            AuthInfo other = (AuthInfo)o;
-            if (!other.canEqual(this)) {
-                return false;
-            } else if (this.getExpiresIn() != other.getExpiresIn()) {
-                return false;
-            } else {
-                label145: {
-                    Object this$userId = this.getUserId();
-                    Object other$userId = other.getUserId();
-                    if (this$userId == null) {
-                        if (other$userId == null) {
-                            break label145;
-                        }
-                    } else if (this$userId.equals(other$userId)) {
-                        break label145;
-                    }
-
-                    return false;
-                }
-
-                Object this$accessToken = this.getAccessToken();
-                Object other$accessToken = other.getAccessToken();
-                if (this$accessToken == null) {
-                    if (other$accessToken != null) {
-                        return false;
-                    }
-                } else if (!this$accessToken.equals(other$accessToken)) {
-                    return false;
-                }
-
-                Object this$tokenType = this.getTokenType();
-                Object other$tokenType = other.getTokenType();
-                if (this$tokenType == null) {
-                    if (other$tokenType != null) {
-                        return false;
-                    }
-                } else if (!this$tokenType.equals(other$tokenType)) {
-                    return false;
-                }
-
-                label124: {
-                    Object this$refreshToken = this.getRefreshToken();
-                    Object other$refreshToken = other.getRefreshToken();
-                    if (this$refreshToken == null) {
-                        if (other$refreshToken == null) {
-                            break label124;
-                        }
-                    } else if (this$refreshToken.equals(other$refreshToken)) {
-                        break label124;
-                    }
-
-                    return false;
-                }
-
-                Object this$tenantId = this.getTenantId();
-                Object other$tenantId = other.getTenantId();
-                if (this$tenantId == null) {
-                    if (other$tenantId != null) {
-                        return false;
-                    }
-                } else if (!this$tenantId.equals(other$tenantId)) {
-                    return false;
-                }
-
-                Object this$oauthId = this.getOauthId();
-                Object other$oauthId = other.getOauthId();
-                if (this$oauthId == null) {
-                    if (other$oauthId != null) {
-                        return false;
-                    }
-                } else if (!this$oauthId.equals(other$oauthId)) {
-                    return false;
-                }
-
-                label103: {
-                    Object this$avatar = this.getAvatar();
-                    Object other$avatar = other.getAvatar();
-                    if (this$avatar == null) {
-                        if (other$avatar == null) {
-                            break label103;
-                        }
-                    } else if (this$avatar.equals(other$avatar)) {
-                        break label103;
-                    }
-
-                    return false;
-                }
-
-                Object this$authority = this.getAuthority();
-                Object other$authority = other.getAuthority();
-                if (this$authority == null) {
-                    if (other$authority != null) {
-                        return false;
-                    }
-                } else if (!this$authority.equals(other$authority)) {
-                    return false;
-                }
-
-                label89: {
-                    Object this$userName = this.getUserName();
-                    Object other$userName = other.getUserName();
-                    if (this$userName == null) {
-                        if (other$userName == null) {
-                            break label89;
-                        }
-                    } else if (this$userName.equals(other$userName)) {
-                        break label89;
-                    }
-
-                    return false;
-                }
-
-                Object this$account = this.getAccount();
-                Object other$account = other.getAccount();
-                if (this$account == null) {
-                    if (other$account != null) {
-                        return false;
-                    }
-                } else if (!this$account.equals(other$account)) {
-                    return false;
-                }
-
-                Object this$license = this.getLicense();
-                Object other$license = other.getLicense();
-                if (this$license == null) {
-                    if (other$license == null) {
-                        return true;
-                    }
-                } else if (this$license.equals(other$license)) {
-                    return true;
-                }
-
-                return false;
-            }
-        }
-    }
-
-    protected boolean canEqual(final Object other) {
-        return other instanceof AuthInfo;
-    }
-
-    public int hashCode() {
-        int result = 1;
-        long $expiresIn = this.getExpiresIn();
-        result = result * 59 + (int)($expiresIn >>> 32 ^ $expiresIn);
-        Object $userId = this.getUserId();
-        result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
-        Object $accessToken = this.getAccessToken();
-        result = result * 59 + ($accessToken == null ? 43 : $accessToken.hashCode());
-        Object $tokenType = this.getTokenType();
-        result = result * 59 + ($tokenType == null ? 43 : $tokenType.hashCode());
-        Object $refreshToken = this.getRefreshToken();
-        result = result * 59 + ($refreshToken == null ? 43 : $refreshToken.hashCode());
-        Object $tenantId = this.getTenantId();
-        result = result * 59 + ($tenantId == null ? 43 : $tenantId.hashCode());
-        Object $oauthId = this.getOauthId();
-        result = result * 59 + ($oauthId == null ? 43 : $oauthId.hashCode());
-        Object $avatar = this.getAvatar();
-        result = result * 59 + ($avatar == null ? 43 : $avatar.hashCode());
-        Object $authority = this.getAuthority();
-        result = result * 59 + ($authority == null ? 43 : $authority.hashCode());
-        Object $userName = this.getUserName();
-        result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
-        Object $account = this.getAccount();
-        result = result * 59 + ($account == null ? 43 : $account.hashCode());
-        Object $license = this.getLicense();
-        result = result * 59 + ($license == null ? 43 : $license.hashCode());
-        return result;
-    }
-
-    public String toString() {
-        return "AuthInfo(accessToken=" + this.getAccessToken() + ", tokenType=" + this.getTokenType() + ", refreshToken=" + this.getRefreshToken() + ", userId=" + this.getUserId() + ", tenantId=" + this.getTenantId() + ", oauthId=" + this.getOauthId() + ", avatar=" + this.getAvatar() + ", authority=" + this.getAuthority() + ", userName=" + this.getUserName() + ", account=" + this.getAccount() + ", expiresIn=" + this.getExpiresIn() + ", license=" + this.getLicense() + ")";
-    }
-}

+ 0 - 20
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/IClientDetails.java

@@ -1,20 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.io.Serializable;
-
-public interface IClientDetails extends Serializable {
-    String getClientId();
-
-    String getClientSecret();
-
-    Integer getAccessTokenValidity();
-
-    Integer getRefreshTokenValidity();
-}
-

+ 0 - 11
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/IClientDetailsService.java

@@ -1,11 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-public interface IClientDetailsService {
-    IClientDetails loadClientByClientId(String clientId);
-}

+ 0 - 38
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/SecureException.java

@@ -1,38 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import org.zhongzheng.common.utils.IResultCode;
-import org.zhongzheng.common.utils.impl.ResultCode;
-
-public class SecureException extends RuntimeException {
-    private static final long serialVersionUID = 2359767895161832954L;
-    private final IResultCode resultCode;
-
-    public SecureException(String message) {
-        super(message);
-        this.resultCode = ResultCode.UN_AUTHORIZED;
-    }
-
-    public SecureException(IResultCode resultCode) {
-        super(resultCode.getMessage());
-        this.resultCode = resultCode;
-    }
-
-    public SecureException(IResultCode resultCode, Throwable cause) {
-        super(cause);
-        this.resultCode = resultCode;
-    }
-
-    public Throwable fillInStackTrace() {
-        return this;
-    }
-
-    public IResultCode getResultCode() {
-        return this.resultCode;
-    }
-}

+ 0 - 337
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/SecureUtil.java

@@ -1,337 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import io.jsonwebtoken.Claims;
-import io.jsonwebtoken.JwtBuilder;
-import io.jsonwebtoken.Jwts;
-import io.jsonwebtoken.SignatureAlgorithm;
-
-import java.io.UnsupportedEncodingException;
-import java.security.Key;
-import java.util.Base64;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Map;
-import java.util.Objects;
-import javax.crypto.spec.SecretKeySpec;
-import javax.servlet.http.HttpServletRequest;
-import org.zhongzheng.common.env.TokenConstants;
-import org.zhongzheng.common.secure.ZhongZhengUser;
-import org.zhongzheng.common.secure.TokenInfo;
-import org.zhongzheng.common.secure.SecureException;
-import org.zhongzheng.common.secure.ZhongZhengTokenProperties;
-import org.zhongzheng.common.secure.IClientDetails;
-import org.zhongzheng.common.secure.IClientDetailsService;
-import org.zhongzheng.common.secure.AesUtil;
-import org.zhongzheng.common.utils.Charsets;
-import org.zhongzheng.common.utils.Func;
-import org.zhongzheng.common.utils.SpringUtil;
-import org.zhongzheng.common.utils.StringUtil;
-import org.zhongzheng.common.utils.WebUtil;
-
-public class SecureUtil {
-    private static final String ZHONGZHENG_USER_REQUEST_ATTR = "_ZHONGZHENG_USER_REQUEST_ATTR_";
-    private static final String HEADER = "blade-auth";
-    private static final String BEARER = "bearer";
-    private static final String CRYPTO = "crypto";
-    private static final String ACCOUNT = "account";
-    private static final String USER_ID = "user_id";
-    private static final String ROLE_ID = "role_id";
-    private static final String DEPT_ID = "dept_id";
-    private static final String USER_NAME = "user_name";
-    private static final String ROLE_NAME = "role_name";
-    private static final String TENANT_ID = "tenant_id";
-    private static final String CLIENT_ID = "client_id";
-    private static final Integer AUTH_LENGTH;
-    private static IClientDetailsService CLIENT_DETAILS_SERVICE;
-    private static ZhongZhengTokenProperties TOKEN_PROPERTIES;
-    private static String BASE64_SECURITY;
-
-    public SecureUtil() {
-    }
-
-    private static IClientDetailsService getClientDetailsService() {
-        if (CLIENT_DETAILS_SERVICE == null) {
-            CLIENT_DETAILS_SERVICE = (IClientDetailsService)SpringUtil.getBean(IClientDetailsService.class);
-        }
-
-        return CLIENT_DETAILS_SERVICE;
-    }
-
-    private static ZhongZhengTokenProperties getTokenProperties() {
-        if (TOKEN_PROPERTIES == null) {
-            TOKEN_PROPERTIES = (ZhongZhengTokenProperties)SpringUtil.getBean(ZhongZhengTokenProperties.class);
-        }
-
-        return TOKEN_PROPERTIES;
-    }
-
-    private static String getBase64Security() {
-        if (BASE64_SECURITY == null) {
-            BASE64_SECURITY = Base64.getEncoder().encodeToString(getTokenProperties().getSignKey().getBytes(Charsets.UTF_8));
-        }
-
-        return BASE64_SECURITY;
-    }
-
-    public static ZhongZhengUser getUser() {
-        HttpServletRequest request = WebUtil.getRequest();
-        if (request == null) {
-            return null;
-        } else {
-            Object zzUser = request.getAttribute("_ZHONGZHENG_USER_REQUEST_ATTR_");
-            if (zzUser == null) {
-                zzUser = getUser(request);
-                if (zzUser != null) {
-                    request.setAttribute("_ZHONGZHENG_USER_REQUEST_ATTR_", zzUser);
-                }
-            }
-
-            return (ZhongZhengUser)zzUser;
-        }
-    }
-
-    public static ZhongZhengUser getUser(HttpServletRequest request) {
-        Claims claims = getClaims(request);
-        if (claims == null) {
-            return null;
-        } else {
-            String clientId = Func.toStr(claims.get("client_id"));
-            Long userId = Func.toLong(claims.get("user_id"));
-            String tenantId = Func.toStr(claims.get("tenant_id"));
-            String roleId = Func.toStr(claims.get("role_id"));
-            String deptId = Func.toStr(claims.get("dept_id"));
-            String account = Func.toStr(claims.get("account"));
-            String roleName = Func.toStr(claims.get("role_name"));
-            String userName = Func.toStr(claims.get("user_name"));
-            ZhongZhengUser zzUser = new ZhongZhengUser();
-            zzUser.setClientId(clientId);
-            zzUser.setUserId(userId);
-            zzUser.setTenantId(tenantId);
-            zzUser.setAccount(account);
-            zzUser.setRoleId(roleId);
-            zzUser.setDeptId(deptId);
-            zzUser.setRoleName(roleName);
-            zzUser.setUserName(userName);
-            return zzUser;
-        }
-    }
-
-    public static boolean isAdministrator() {
-        return StringUtil.containsAny(getUserRole(), new CharSequence[]{"administrator"});
-    }
-
-    public static Long getUserId() {
-        ZhongZhengUser user = getUser();
-        return null == user ? -1L : user.getUserId();
-    }
-
-    public static Long getUserId(HttpServletRequest request) {
-        ZhongZhengUser user = getUser(request);
-        return null == user ? -1L : user.getUserId();
-    }
-
-    public static String getUserAccount() {
-        ZhongZhengUser user = getUser();
-        return null == user ? "" : user.getAccount();
-    }
-
-    public static String getUserAccount(HttpServletRequest request) {
-        ZhongZhengUser user = getUser(request);
-        return null == user ? "" : user.getAccount();
-    }
-
-    public static String getUserName() {
-        ZhongZhengUser user = getUser();
-        return null == user ? "" : user.getUserName();
-    }
-
-    public static String getUserName(HttpServletRequest request) {
-        ZhongZhengUser user = getUser(request);
-        return null == user ? "" : user.getUserName();
-    }
-
-    public static String getUserRole() {
-        ZhongZhengUser user = getUser();
-        return null == user ? "" : user.getRoleName();
-    }
-
-    public static String getUserRole(HttpServletRequest request) {
-        ZhongZhengUser user = getUser(request);
-        return null == user ? "" : user.getRoleName();
-    }
-
-    public static String getTenantId() {
-        ZhongZhengUser user = getUser();
-        return null == user ? "" : user.getTenantId();
-    }
-
-    public static String getTenantId(HttpServletRequest request) {
-        ZhongZhengUser user = getUser(request);
-        return null == user ? "" : user.getTenantId();
-    }
-
-    public static String getClientId() {
-        ZhongZhengUser user = getUser();
-        return null == user ? "" : user.getClientId();
-    }
-
-    public static String getClientId(HttpServletRequest request) {
-        ZhongZhengUser user = getUser(request);
-        return null == user ? "" : user.getClientId();
-    }
-
-    public static Claims getClaims(HttpServletRequest request) {
-        String auth = request.getHeader("blade-auth");
-        String token = getToken(StringUtil.isNotBlank(auth) ? auth : request.getParameter("blade-auth"));
-        return parseJWT(token);
-    }
-
-    public static String getToken(String auth) {
-        if (isBearer(auth)) {
-            return auth.substring(AUTH_LENGTH);
-        } else {
-            return isCrypto(auth) ? AesUtil.decryptFormBase64ToString(auth.substring(AUTH_LENGTH), getTokenProperties().getAesKey()) : null;
-        }
-    }
-
-    public static Boolean isBearer(String auth) {
-        if (auth != null && auth.length() > AUTH_LENGTH) {
-            String headStr = auth.substring(0, 6).toLowerCase();
-            return headStr.compareTo("bearer") == 0;
-        } else {
-            return false;
-        }
-    }
-
-    public static Boolean isCrypto(String auth) {
-        if (auth != null && auth.length() > AUTH_LENGTH) {
-            String headStr = auth.substring(0, 6).toLowerCase();
-            return headStr.compareTo("crypto") == 0;
-        } else {
-            return false;
-        }
-    }
-
-    public static String getHeader() {
-        return getHeader((HttpServletRequest)Objects.requireNonNull(WebUtil.getRequest()));
-    }
-
-    public static String getHeader(HttpServletRequest request) {
-        return request.getHeader("blade-auth");
-    }
-
-    public static Claims parseJWT(String jsonWebToken) {
-        try {
-            return (Claims)Jwts.parserBuilder().setSigningKey(Base64.getDecoder().decode(getBase64Security())).build().parseClaimsJws(jsonWebToken).getBody();
-        } catch (Exception var2) {
-            return null;
-        }
-    }
-
-    public static TokenInfo createJWT(Map<String, String> user, String audience, String issuer, String tokenType) throws UnsupportedEncodingException {
-        String[] tokens = extractAndDecodeHeader();
-
-        assert tokens.length == 2;
-
-        String clientId = tokens[0];
-        String clientSecret = tokens[1];
-        IClientDetails clientDetails = clientDetails(clientId);
-        if (!validateClient(clientDetails, clientId, clientSecret)) {
-            throw new SecureException("客户端认证失败!");
-        } else {
-            SignatureAlgorithm signatureAlgorithm = SignatureAlgorithm.HS256;
-            long nowMillis = System.currentTimeMillis();
-            Date now = new Date(nowMillis);
-            byte[] apiKeySecretBytes = Base64.getDecoder().decode(getBase64Security());
-            Key signingKey = new SecretKeySpec(apiKeySecretBytes, signatureAlgorithm.getJcaName());
-            JwtBuilder builder = Jwts.builder().setHeaderParam("typ", "JWT").setIssuer(issuer).setAudience(audience).signWith(signingKey);
-            user.forEach(builder::claim);
-            builder.claim("client_id", clientId);
-            long expireMillis;
-            if (tokenType.equals("access_token")) {
-                expireMillis = (long)(clientDetails.getAccessTokenValidity() * 1000);
-            } else if (tokenType.equals("refresh_token")) {
-                expireMillis = (long)(clientDetails.getRefreshTokenValidity() * 1000);
-            } else {
-                expireMillis = getExpire();
-            }
-
-            long expMillis = nowMillis + expireMillis;
-            Date exp = new Date(expMillis);
-            builder.setExpiration(exp).setNotBefore(now);
-            TokenInfo tokenInfo = new TokenInfo();
-            tokenInfo.setToken(builder.compact());
-            tokenInfo.setExpire((int)expireMillis / 1000);
-            return tokenInfo;
-        }
-    }
-
-    public static long getExpire() {
-        Calendar cal = Calendar.getInstance();
-        cal.add(6, 1);
-        cal.set(11, 3);
-        cal.set(13, 0);
-        cal.set(12, 0);
-        cal.set(14, 0);
-        return cal.getTimeInMillis() - System.currentTimeMillis();
-    }
-
-    public static String[] extractAndDecodeHeader() throws UnsupportedEncodingException {
-        try {
-            String header = ((HttpServletRequest)Objects.requireNonNull(WebUtil.getRequest())).getHeader("Authorization");
-            header = Func.toStr(header).replace("Basic%20", "Basic ");
-            if (!header.startsWith("Basic ")) {
-                throw new SecureException("No client information in request header");
-            } else {
-                byte[] base64Token = header.substring(6).getBytes(Charsets.UTF_8_NAME);
-
-                byte[] decoded;
-                try {
-                    decoded = Base64.getDecoder().decode(base64Token);
-                } catch (IllegalArgumentException var5) {
-                    throw new RuntimeException("Failed to decode basic authentication token");
-                }
-
-                String token = new String(decoded, Charsets.UTF_8_NAME);
-                int index = token.indexOf(":");
-                if (index == -1) {
-                    throw new RuntimeException("Invalid basic authentication token");
-                } else {
-                    return new String[]{token.substring(0, index), token.substring(index + 1)};
-                }
-            }
-        } catch (Throwable var6) {
-            throw var6;
-        }
-    }
-
-    public static String getClientIdFromHeader() throws UnsupportedEncodingException {
-        String[] tokens = extractAndDecodeHeader();
-
-        assert tokens.length == 2;
-
-        return tokens[0];
-    }
-
-    private static IClientDetails clientDetails(String clientId) {
-        return getClientDetailsService().loadClientByClientId(clientId);
-    }
-
-    private static boolean validateClient(IClientDetails clientDetails, String clientId, String clientSecret) {
-        if (clientDetails == null) {
-            return false;
-        } else {
-            return StringUtil.equals(clientId, clientDetails.getClientId()) && StringUtil.equals(clientSecret, clientDetails.getClientSecret());
-        }
-    }
-
-    static {
-        AUTH_LENGTH = TokenConstants.AUTH_LENGTH;
-    }
-}

+ 0 - 73
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/TokenInfo.java

@@ -1,73 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-public class TokenInfo {
-    private String token;
-    private int expire;
-
-    public TokenInfo() {
-    }
-
-    public String getToken() {
-        return this.token;
-    }
-
-    public int getExpire() {
-        return this.expire;
-    }
-
-    public void setToken(final String token) {
-        this.token = token;
-    }
-
-    public void setExpire(final int expire) {
-        this.expire = expire;
-    }
-
-    public boolean equals(final Object o) {
-        if (o == this) {
-            return true;
-        } else if (!(o instanceof TokenInfo)) {
-            return false;
-        } else {
-            TokenInfo other = (TokenInfo)o;
-            if (!other.canEqual(this)) {
-                return false;
-            } else if (this.getExpire() != other.getExpire()) {
-                return false;
-            } else {
-                Object this$token = this.getToken();
-                Object other$token = other.getToken();
-                if (this$token == null) {
-                    if (other$token != null) {
-                        return false;
-                    }
-                } else if (!this$token.equals(other$token)) {
-                    return false;
-                }
-
-                return true;
-            }
-        }
-    }
-
-    protected boolean canEqual(final Object other) {
-        return other instanceof TokenInfo;
-    }
-
-    public int hashCode() {
-        int result = 1;
-        result = result * 59 + this.getExpire();
-        Object $token = this.getToken();
-        result = result * 59 + ($token == null ? 43 : $token.hashCode());
-        return result;
-    }
-
-    public String toString() {
-        return "TokenInfo(token=" + this.getToken() + ", expire=" + this.getExpire() + ")";
-    }
-}

+ 0 - 94
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/ZhongZhengTokenProperties.java

@@ -1,94 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import io.jsonwebtoken.JwtException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-
-@ConfigurationProperties("blade.token")
-public class ZhongZhengTokenProperties {
-    private static final Logger log = LoggerFactory.getLogger(ZhongZhengTokenProperties.class);
-    private String signKey = "";
-    private String aesKey = "";
-
-    public String getSignKey() {
-        if (this.signKey.length() < 32) {
-            throw new JwtException("请配置 zhongzheng.token.sign-key 的值, 长度32位以上");
-        } else {
-            return this.signKey;
-        }
-    }
-
-    public ZhongZhengTokenProperties() {
-    }
-
-    public String getAesKey() {
-        return this.aesKey;
-    }
-
-    public void setSignKey(final String signKey) {
-        this.signKey = signKey;
-    }
-
-    public void setAesKey(final String aesKey) {
-        this.aesKey = aesKey;
-    }
-
-    public boolean equals(final Object o) {
-        if (o == this) {
-            return true;
-        } else if (!(o instanceof ZhongZhengTokenProperties)) {
-            return false;
-        } else {
-            ZhongZhengTokenProperties other = (ZhongZhengTokenProperties)o;
-            if (!other.canEqual(this)) {
-                return false;
-            } else {
-                Object this$signKey = this.getSignKey();
-                Object other$signKey = other.getSignKey();
-                if (this$signKey == null) {
-                    if (other$signKey != null) {
-                        return false;
-                    }
-                } else if (!this$signKey.equals(other$signKey)) {
-                    return false;
-                }
-
-                Object this$aesKey = this.getAesKey();
-                Object other$aesKey = other.getAesKey();
-                if (this$aesKey == null) {
-                    if (other$aesKey != null) {
-                        return false;
-                    }
-                } else if (!this$aesKey.equals(other$aesKey)) {
-                    return false;
-                }
-
-                return true;
-            }
-        }
-    }
-
-    protected boolean canEqual(final Object other) {
-        return other instanceof ZhongZhengTokenProperties;
-    }
-
-    public int hashCode() {
-        int result = 1;
-        Object $signKey = this.getSignKey();
-        result = result * 59 + ($signKey == null ? 43 : $signKey.hashCode());
-        Object $aesKey = this.getAesKey();
-        result = result * 59 + ($aesKey == null ? 43 : $aesKey.hashCode());
-        return result;
-    }
-
-    public String toString() {
-        return "ZhongZhengTokenProperties(signKey=" + this.getSignKey() + ", aesKey=" + this.getAesKey() + ")";
-    }
-}

+ 0 - 253
zzbusiness-common/src/main/java/org/zhongzheng/common/secure/ZhongZhengUser.java

@@ -1,253 +0,0 @@
-package org.zhongzheng.common.secure;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import io.swagger.annotations.ApiModelProperty;
-import java.io.Serializable;
-
-public class ZhongZhengUser implements Serializable {
-    private static final long serialVersionUID = 1L;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String clientId;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private Long userId;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String tenantId;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String deptId;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String userName;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String account;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String roleId;
-    @ApiModelProperty(
-            hidden = true
-    )
-    private String roleName;
-
-    public ZhongZhengUser() {
-    }
-
-    public String getClientId() {
-        return this.clientId;
-    }
-
-    public Long getUserId() {
-        return this.userId;
-    }
-
-    public String getTenantId() {
-        return this.tenantId;
-    }
-
-    public String getDeptId() {
-        return this.deptId;
-    }
-
-    public String getUserName() {
-        return this.userName;
-    }
-
-    public String getAccount() {
-        return this.account;
-    }
-
-    public String getRoleId() {
-        return this.roleId;
-    }
-
-    public String getRoleName() {
-        return this.roleName;
-    }
-
-    public void setClientId(final String clientId) {
-        this.clientId = clientId;
-    }
-
-    public void setUserId(final Long userId) {
-        this.userId = userId;
-    }
-
-    public void setTenantId(final String tenantId) {
-        this.tenantId = tenantId;
-    }
-
-    public void setDeptId(final String deptId) {
-        this.deptId = deptId;
-    }
-
-    public void setUserName(final String userName) {
-        this.userName = userName;
-    }
-
-    public void setAccount(final String account) {
-        this.account = account;
-    }
-
-    public void setRoleId(final String roleId) {
-        this.roleId = roleId;
-    }
-
-    public void setRoleName(final String roleName) {
-        this.roleName = roleName;
-    }
-
-    public boolean equals(final Object o) {
-        if (o == this) {
-            return true;
-        } else if (!(o instanceof ZhongZhengUser)) {
-            return false;
-        } else {
-            ZhongZhengUser other = (ZhongZhengUser)o;
-            if (!other.canEqual(this)) {
-                return false;
-            } else {
-                label107: {
-                    Object this$userId = this.getUserId();
-                    Object other$userId = other.getUserId();
-                    if (this$userId == null) {
-                        if (other$userId == null) {
-                            break label107;
-                        }
-                    } else if (this$userId.equals(other$userId)) {
-                        break label107;
-                    }
-
-                    return false;
-                }
-
-                Object this$clientId = this.getClientId();
-                Object other$clientId = other.getClientId();
-                if (this$clientId == null) {
-                    if (other$clientId != null) {
-                        return false;
-                    }
-                } else if (!this$clientId.equals(other$clientId)) {
-                    return false;
-                }
-
-                Object this$tenantId = this.getTenantId();
-                Object other$tenantId = other.getTenantId();
-                if (this$tenantId == null) {
-                    if (other$tenantId != null) {
-                        return false;
-                    }
-                } else if (!this$tenantId.equals(other$tenantId)) {
-                    return false;
-                }
-
-                label86: {
-                    Object this$deptId = this.getDeptId();
-                    Object other$deptId = other.getDeptId();
-                    if (this$deptId == null) {
-                        if (other$deptId == null) {
-                            break label86;
-                        }
-                    } else if (this$deptId.equals(other$deptId)) {
-                        break label86;
-                    }
-
-                    return false;
-                }
-
-                label79: {
-                    Object this$userName = this.getUserName();
-                    Object other$userName = other.getUserName();
-                    if (this$userName == null) {
-                        if (other$userName == null) {
-                            break label79;
-                        }
-                    } else if (this$userName.equals(other$userName)) {
-                        break label79;
-                    }
-
-                    return false;
-                }
-
-                label72: {
-                    Object this$account = this.getAccount();
-                    Object other$account = other.getAccount();
-                    if (this$account == null) {
-                        if (other$account == null) {
-                            break label72;
-                        }
-                    } else if (this$account.equals(other$account)) {
-                        break label72;
-                    }
-
-                    return false;
-                }
-
-                Object this$roleId = this.getRoleId();
-                Object other$roleId = other.getRoleId();
-                if (this$roleId == null) {
-                    if (other$roleId != null) {
-                        return false;
-                    }
-                } else if (!this$roleId.equals(other$roleId)) {
-                    return false;
-                }
-
-                Object this$roleName = this.getRoleName();
-                Object other$roleName = other.getRoleName();
-                if (this$roleName == null) {
-                    if (other$roleName != null) {
-                        return false;
-                    }
-                } else if (!this$roleName.equals(other$roleName)) {
-                    return false;
-                }
-
-                return true;
-            }
-        }
-    }
-
-    protected boolean canEqual(final Object other) {
-        return other instanceof ZhongZhengUser;
-    }
-
-    public int hashCode() {
-        int result = 1;
-        Object $userId = this.getUserId();
-        result = result * 59 + ($userId == null ? 43 : $userId.hashCode());
-        Object $clientId = this.getClientId();
-        result = result * 59 + ($clientId == null ? 43 : $clientId.hashCode());
-        Object $tenantId = this.getTenantId();
-        result = result * 59 + ($tenantId == null ? 43 : $tenantId.hashCode());
-        Object $deptId = this.getDeptId();
-        result = result * 59 + ($deptId == null ? 43 : $deptId.hashCode());
-        Object $userName = this.getUserName();
-        result = result * 59 + ($userName == null ? 43 : $userName.hashCode());
-        Object $account = this.getAccount();
-        result = result * 59 + ($account == null ? 43 : $account.hashCode());
-        Object $roleId = this.getRoleId();
-        result = result * 59 + ($roleId == null ? 43 : $roleId.hashCode());
-        Object $roleName = this.getRoleName();
-        result = result * 59 + ($roleName == null ? 43 : $roleName.hashCode());
-        return result;
-    }
-
-    public String toString() {
-        return "ZhongZhengUser(clientId=" + this.getClientId() + ", userId=" + this.getUserId() + ", tenantId=" + this.getTenantId() + ", deptId=" + this.getDeptId() + ", userName=" + this.getUserName() + ", account=" + this.getAccount() + ", roleId=" + this.getRoleId() + ", roleName=" + this.getRoleName() + ")";
-    }
-}

+ 0 - 52
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Base64Util.java

@@ -1,52 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.nio.charset.Charset;
-import org.springframework.util.Base64Utils;
-
-public class Base64Util extends Base64Utils {
-    public Base64Util() {
-    }
-
-    public static String encode(String value) {
-        return encode(value, Charsets.UTF_8);
-    }
-
-    public static String encode(String value, Charset charset) {
-        byte[] val = value.getBytes(charset);
-        return new String(encode(val), charset);
-    }
-
-    public static String encodeUrlSafe(String value) {
-        return encodeUrlSafe(value, Charsets.UTF_8);
-    }
-
-    public static String encodeUrlSafe(String value, Charset charset) {
-        byte[] val = value.getBytes(charset);
-        return new String(encodeUrlSafe(val), charset);
-    }
-
-    public static String decode(String value) {
-        return decode(value, Charsets.UTF_8);
-    }
-
-    public static String decode(String value, Charset charset) {
-        byte[] val = value.getBytes(charset);
-        byte[] decodedValue = decode(val);
-        return new String(decodedValue, charset);
-    }
-
-    public static String decodeUrlSafe(String value) {
-        return decodeUrlSafe(value, Charsets.UTF_8);
-    }
-
-    public static String decodeUrlSafe(String value, Charset charset) {
-        byte[] val = value.getBytes(charset);
-        byte[] decodedValue = decodeUrlSafe(val);
-        return new String(decodedValue, charset);
-    }
-}

+ 0 - 191
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/BaseBeanCopier.java

@@ -1,191 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.beans.PropertyDescriptor;
-import java.lang.reflect.Modifier;
-import java.security.ProtectionDomain;
-import java.util.HashMap;
-import java.util.Map;
-import org.xupeng.common.utils.BeanUtil;
-import org.springframework.asm.ClassVisitor;
-import org.springframework.asm.Type;
-import org.springframework.cglib.core.AbstractClassGenerator;
-import org.springframework.cglib.core.ClassEmitter;
-import org.springframework.cglib.core.CodeEmitter;
-import org.springframework.cglib.core.Constants;
-import org.springframework.cglib.core.Converter;
-import org.springframework.cglib.core.EmitUtils;
-import org.springframework.cglib.core.KeyFactory;
-import org.springframework.cglib.core.Local;
-import org.springframework.cglib.core.MethodInfo;
-import org.springframework.cglib.core.ReflectUtils;
-import org.springframework.cglib.core.Signature;
-import org.springframework.cglib.core.TypeUtils;
-
-public abstract class BaseBeanCopier {
-    private static final BeanCopierKey KEY_FACTORY = (BeanCopierKey)KeyFactory.create(BeanCopierKey.class);
-    private static final Type CONVERTER = TypeUtils.parseType("org.springframework.cglib.core.Converter");
-    private static final Type BEAN_COPIER = TypeUtils.parseType(BaseBeanCopier.class.getName());
-    private static final Signature COPY;
-    private static final Signature CONVERT;
-
-    public BaseBeanCopier() {
-    }
-
-    public static BaseBeanCopier create(Class source, Class target, boolean useConverter) {
-        return create(source, target, (ClassLoader)null, useConverter);
-    }
-
-    public static BaseBeanCopier create(Class source, Class target, ClassLoader classLoader, boolean useConverter) {
-        Generator gen;
-        if (classLoader == null) {
-            gen = new Generator();
-        } else {
-            gen = new Generator(classLoader);
-        }
-
-        gen.setSource(source);
-        gen.setTarget(target);
-        gen.setUseConverter(useConverter);
-        return gen.create();
-    }
-
-    public abstract void copy(Object from, Object to, Converter converter);
-
-    static {
-        COPY = new Signature("copy", Type.VOID_TYPE, new Type[]{Constants.TYPE_OBJECT, Constants.TYPE_OBJECT, CONVERTER});
-        CONVERT = TypeUtils.parseSignature("Object convert(Object, Class, Object)");
-    }
-
-    public static class Generator extends AbstractClassGenerator {
-        private static final AbstractClassGenerator.Source SOURCE = new AbstractClassGenerator.Source(BaseBeanCopier.class.getName());
-        private final ClassLoader classLoader;
-        private Class source;
-        private Class target;
-        private boolean useConverter;
-
-        Generator() {
-            super(SOURCE);
-            this.classLoader = null;
-        }
-
-        Generator(ClassLoader classLoader) {
-            super(SOURCE);
-            this.classLoader = classLoader;
-        }
-
-        public void setSource(Class source) {
-            if (!Modifier.isPublic(source.getModifiers())) {
-                this.setNamePrefix(source.getName());
-            }
-
-            this.source = source;
-        }
-
-        public void setTarget(Class target) {
-            if (!Modifier.isPublic(target.getModifiers())) {
-                this.setNamePrefix(target.getName());
-            }
-
-            this.target = target;
-        }
-
-        public void setUseConverter(boolean useConverter) {
-            this.useConverter = useConverter;
-        }
-
-        protected ClassLoader getDefaultClassLoader() {
-            return this.target.getClassLoader();
-        }
-
-        protected ProtectionDomain getProtectionDomain() {
-            return ReflectUtils.getProtectionDomain(this.source);
-        }
-
-        public BaseBeanCopier create() {
-            Object key = BaseBeanCopier.KEY_FACTORY.newInstance(this.source.getName(), this.target.getName(), this.useConverter);
-            return (BaseBeanCopier)super.create(key);
-        }
-
-        public void generateClass(ClassVisitor v) {
-            Type sourceType = Type.getType(this.source);
-            Type targetType = Type.getType(this.target);
-            ClassEmitter ce = new ClassEmitter(v);
-            ce.begin_class(46, 1, this.getClassName(), BaseBeanCopier.BEAN_COPIER, (Type[])null, "<generated>");
-            EmitUtils.null_constructor(ce);
-            CodeEmitter e = ce.begin_method(1, BaseBeanCopier.COPY, (Type[])null);
-            PropertyDescriptor[] getters = BeanUtil.getBeanGetters(this.source);
-            PropertyDescriptor[] setters = BeanUtil.getBeanSetters(this.target);
-            Map<String, Object> names = new HashMap(16);
-            PropertyDescriptor[] var9 = getters;
-            int var10 = getters.length;
-
-            int i;
-            PropertyDescriptor setter;
-            for(i = 0; i < var10; ++i) {
-                setter = var9[i];
-                names.put(setter.getName(), setter);
-            }
-
-            Local targetLocal = e.make_local();
-            Local sourceLocal = e.make_local();
-            e.load_arg(1);
-            e.checkcast(targetType);
-            e.store_local(targetLocal);
-            e.load_arg(0);
-            e.checkcast(sourceType);
-            e.store_local(sourceLocal);
-
-            for(i = 0; i < setters.length; ++i) {
-                setter = setters[i];
-                PropertyDescriptor getter = (PropertyDescriptor)names.get(setter.getName());
-                if (getter != null) {
-                    MethodInfo read = ReflectUtils.getMethodInfo(getter.getReadMethod());
-                    MethodInfo write = ReflectUtils.getMethodInfo(setter.getWriteMethod());
-                    if (this.useConverter) {
-                        Type setterType = write.getSignature().getArgumentTypes()[0];
-                        e.load_local(targetLocal);
-                        e.load_arg(2);
-                        e.load_local(sourceLocal);
-                        e.invoke(read);
-                        e.box(read.getSignature().getReturnType());
-                        EmitUtils.load_class(e, setterType);
-                        e.push(write.getSignature().getName());
-                        e.invoke_interface(BaseBeanCopier.CONVERTER, BaseBeanCopier.CONVERT);
-                        e.unbox_or_zero(setterType);
-                        e.invoke(write);
-                    } else if (compatible(getter, setter)) {
-                        e.load_local(targetLocal);
-                        e.load_local(sourceLocal);
-                        e.invoke(read);
-                        e.invoke(write);
-                    }
-                }
-            }
-
-            e.return_value();
-            e.end_method();
-            ce.end_class();
-        }
-
-        private static boolean compatible(PropertyDescriptor getter, PropertyDescriptor setter) {
-            return setter.getPropertyType().isAssignableFrom(getter.getPropertyType());
-        }
-
-        protected Object firstInstance(Class type) {
-            return ReflectUtils.newInstance(type);
-        }
-
-        protected Object nextInstance(Object instance) {
-            return instance;
-        }
-    }
-
-    interface BeanCopierKey {
-        Object newInstance(String source, String target, boolean useConverter);
-    }
-}

+ 0 - 24
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/BeanProperty.java

@@ -1,24 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-public class BeanProperty {
-    private final String name;
-    private final Class<?> type;
-
-    public String getName() {
-        return this.name;
-    }
-
-    public Class<?> getType() {
-        return this.type;
-    }
-
-    public BeanProperty(final String name, final Class<?> type) {
-        this.name = name;
-        this.type = type;
-    }
-}

+ 0 - 137
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/BeanUtil.java

@@ -1,137 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.beans.PropertyDescriptor;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import org.xupeng.common.utils.BaseBeanCopier;
-import org.xupeng.common.utils.BeanProperty;
-import org.springframework.beans.BeanUtils;
-import org.springframework.beans.BeansException;
-import org.springframework.cglib.beans.BeanGenerator;
-import org.springframework.cglib.beans.BeanMap;
-import org.springframework.cglib.core.CodeGenerationException;
-import org.springframework.cglib.core.Converter;
-import org.springframework.util.Assert;
-
-public class BeanUtil extends BeanUtils {
-    public BeanUtil() {
-    }
-
-    public static <T> T newInstance(Class<?> clazz) {
-        return (T)instantiateClass(clazz);
-    }
-
-    public static <T> T newInstance(String clazzStr) {
-        try {
-            Class<?> clazz = Class.forName(clazzStr);
-            return newInstance(clazz);
-        } catch (ClassNotFoundException var2) {
-            throw new RuntimeException(var2);
-        }
-    }
-
-    public static Object getProperty(Object bean, String propertyName) {
-        Assert.notNull(bean, "bean Could not null");
-        return BeanMap.create(bean).get(propertyName);
-    }
-
-    public static void setProperty(Object bean, String propertyName, Object value) {
-        Assert.notNull(bean, "bean Could not null");
-        BeanMap.create(bean).put(propertyName, value);
-    }
-
-    public static <T> T clone(T source) {
-        return (T)copy(source, source.getClass());
-    }
-
-    public static <T> T copy(Object source, Class<T> clazz) {
-        BaseBeanCopier copier = BaseBeanCopier.create(source.getClass(), clazz, false);
-        T to = newInstance(clazz);
-        copier.copy(source, to, (Converter)null);
-        return to;
-    }
-
-    public static void copy(Object source, Object targetBean) {
-        BaseBeanCopier copier = BaseBeanCopier.create(source.getClass(), targetBean.getClass(), false);
-        copier.copy(source, targetBean, (Converter)null);
-    }
-
-    public static <T> T copyProperties(Object source, Class<T> target) throws BeansException {
-        T to = newInstance(target);
-        copyProperties(source, to);
-        return to;
-    }
-
-    public static Map<String, Object> toMap(Object bean) {
-        return BeanMap.create(bean);
-    }
-
-    public static <T> T toBean(Map<String, Object> beanMap, Class<T> valueType) {
-        T bean = newInstance(valueType);
-        BeanMap.create(bean).putAll(beanMap);
-        return bean;
-    }
-
-    public static Object generator(Object superBean, BeanProperty... props) {
-        Class<?> superclass = superBean.getClass();
-        Object genBean = generator(superclass, props);
-        copy(superBean, genBean);
-        return genBean;
-    }
-
-    public static Object generator(Class<?> superclass, BeanProperty... props) {
-        BeanGenerator generator = new BeanGenerator();
-        generator.setSuperclass(superclass);
-        generator.setUseCache(true);
-        BeanProperty[] var3 = props;
-        int var4 = props.length;
-
-        for(int var5 = 0; var5 < var4; ++var5) {
-            BeanProperty prop = var3[var5];
-            generator.addProperty(prop.getName(), prop.getType());
-        }
-
-        return generator.create();
-    }
-
-    public static PropertyDescriptor[] getBeanGetters(Class type) {
-        return getPropertiesHelper(type, true, false);
-    }
-
-    public static PropertyDescriptor[] getBeanSetters(Class type) {
-        return getPropertiesHelper(type, false, true);
-    }
-
-    private static PropertyDescriptor[] getPropertiesHelper(Class type, boolean read, boolean write) {
-        try {
-            PropertyDescriptor[] all = getPropertyDescriptors(type);
-            if (read && write) {
-                return all;
-            } else {
-                List<PropertyDescriptor> properties = new ArrayList(all.length);
-                PropertyDescriptor[] var5 = all;
-                int var6 = all.length;
-
-                for(int var7 = 0; var7 < var6; ++var7) {
-                    PropertyDescriptor pd = var5[var7];
-                    if (read && pd.getReadMethod() != null) {
-                        properties.add(pd);
-                    } else if (write && pd.getWriteMethod() != null) {
-                        properties.add(pd);
-                    }
-                }
-
-                return (PropertyDescriptor[])properties.toArray(new PropertyDescriptor[0]);
-            }
-        } catch (BeansException var9) {
-            throw new CodeGenerationException(var9);
-        }
-    }
-}

+ 0 - 36
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Charsets.java

@@ -1,36 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-import java.nio.charset.UnsupportedCharsetException;
-
-public class Charsets {
-    public static final Charset ISO_8859_1;
-    public static final String ISO_8859_1_NAME;
-    public static final Charset GBK;
-    public static final String GBK_NAME;
-    public static final Charset UTF_8;
-    public static final String UTF_8_NAME;
-
-    public Charsets() {
-    }
-
-    public static Charset charset(String charsetName) throws UnsupportedCharsetException {
-        return StringUtil.isBlank(charsetName) ? Charset.defaultCharset() : Charset.forName(charsetName);
-    }
-
-    static {
-        ISO_8859_1 = StandardCharsets.ISO_8859_1;
-        ISO_8859_1_NAME = ISO_8859_1.name();
-        GBK = Charset.forName("GBK");
-        GBK_NAME = GBK.name();
-        UTF_8 = StandardCharsets.UTF_8;
-        UTF_8_NAME = UTF_8.name();
-    }
-}

+ 0 - 65
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/ClassUtil.java

@@ -1,65 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import org.springframework.core.BridgeMethodResolver;
-import org.springframework.core.DefaultParameterNameDiscoverer;
-import org.springframework.core.MethodParameter;
-import org.springframework.core.ParameterNameDiscoverer;
-import org.springframework.core.annotation.AnnotatedElementUtils;
-import org.springframework.core.annotation.SynthesizingMethodParameter;
-import org.springframework.util.ClassUtils;
-import org.springframework.web.method.HandlerMethod;
-
-public class ClassUtil extends ClassUtils {
-    private static final ParameterNameDiscoverer PARAMETER_NAME_DISCOVERER = new DefaultParameterNameDiscoverer();
-
-    public ClassUtil() {
-    }
-
-    public static MethodParameter getMethodParameter(Constructor<?> constructor, int parameterIndex) {
-        MethodParameter methodParameter = new SynthesizingMethodParameter(constructor, parameterIndex);
-        methodParameter.initParameterNameDiscovery(PARAMETER_NAME_DISCOVERER);
-        return methodParameter;
-    }
-
-    public static MethodParameter getMethodParameter(Method method, int parameterIndex) {
-        MethodParameter methodParameter = new SynthesizingMethodParameter(method, parameterIndex);
-        methodParameter.initParameterNameDiscovery(PARAMETER_NAME_DISCOVERER);
-        return methodParameter;
-    }
-
-    public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationType) {
-        Class<?> targetClass = method.getDeclaringClass();
-        Method specificMethod = getMostSpecificMethod(method, targetClass);
-        specificMethod = BridgeMethodResolver.findBridgedMethod(specificMethod);
-        A annotation = AnnotatedElementUtils.findMergedAnnotation(specificMethod, annotationType);
-        return null != annotation ? annotation : AnnotatedElementUtils.findMergedAnnotation(specificMethod.getDeclaringClass(), annotationType);
-    }
-
-    public static <A extends Annotation> A getAnnotation(HandlerMethod handlerMethod, Class<A> annotationType) {
-        A annotation = handlerMethod.getMethodAnnotation(annotationType);
-        if (null != annotation) {
-            return annotation;
-        } else {
-            Class<?> beanType = handlerMethod.getBeanType();
-            return AnnotatedElementUtils.findMergedAnnotation(beanType, annotationType);
-        }
-    }
-
-    public static <A extends Annotation> boolean isAnnotated(Method method, Class<A> annotationType) {
-        boolean isMethodAnnotated = AnnotatedElementUtils.isAnnotated(method, annotationType);
-        if (isMethodAnnotated) {
-            return true;
-        } else {
-            Class<?> targetClass = method.getDeclaringClass();
-            return AnnotatedElementUtils.isAnnotated(targetClass, annotationType);
-        }
-    }
-}

+ 0 - 37
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/CollectionUtil.java

@@ -1,37 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Map;
-import org.springframework.lang.Nullable;
-import org.springframework.util.CollectionUtils;
-import org.springframework.util.ObjectUtils;
-
-public class CollectionUtil extends CollectionUtils {
-    public CollectionUtil() {
-    }
-
-    public static <T> boolean contains(@Nullable T[] array, final T element) {
-        return array == null ? false : Arrays.stream(array).anyMatch((x) -> {
-            return ObjectUtils.nullSafeEquals(x, element);
-        });
-    }
-
-    public static boolean isArray(Object obj) {
-        return null == obj ? false : obj.getClass().isArray();
-    }
-
-    public static boolean isNotEmpty(@Nullable Collection<?> coll) {
-        return !CollectionUtils.isEmpty(coll);
-    }
-
-    public static boolean isNotEmpty(@Nullable Map<?, ?> map) {
-        return !CollectionUtils.isEmpty(map);
-    }
-}

+ 0 - 69
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/ConcurrentDateFormat.java

@@ -1,69 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Queue;
-import java.util.TimeZone;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-public class ConcurrentDateFormat {
-    private final String format;
-    private final Locale locale;
-    private final TimeZone timezone;
-    private final Queue<SimpleDateFormat> queue = new ConcurrentLinkedQueue();
-
-    private ConcurrentDateFormat(String format, Locale locale, TimeZone timezone) {
-        this.format = format;
-        this.locale = locale;
-        this.timezone = timezone;
-        SimpleDateFormat initial = this.createInstance();
-        this.queue.add(initial);
-    }
-
-    public static ConcurrentDateFormat of(String format) {
-        return new ConcurrentDateFormat(format, Locale.getDefault(), TimeZone.getDefault());
-    }
-
-    public static ConcurrentDateFormat of(String format, TimeZone timezone) {
-        return new ConcurrentDateFormat(format, Locale.getDefault(), timezone);
-    }
-
-    public static ConcurrentDateFormat of(String format, Locale locale, TimeZone timezone) {
-        return new ConcurrentDateFormat(format, locale, timezone);
-    }
-
-    public String format(Date date) {
-        SimpleDateFormat sdf = (SimpleDateFormat)this.queue.poll();
-        if (sdf == null) {
-            sdf = this.createInstance();
-        }
-
-        String result = sdf.format(date);
-        this.queue.add(sdf);
-        return result;
-    }
-
-    public Date parse(String source) throws ParseException {
-        SimpleDateFormat sdf = (SimpleDateFormat)this.queue.poll();
-        if (sdf == null) {
-            sdf = this.createInstance();
-        }
-
-        Date result = sdf.parse(source);
-        this.queue.add(sdf);
-        return result;
-    }
-
-    private SimpleDateFormat createInstance() {
-        SimpleDateFormat sdf = new SimpleDateFormat(this.format, this.locale);
-        sdf.setTimeZone(this.timezone);
-        return sdf;
-    }
-}

+ 0 - 267
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DateUtil.java

@@ -1,267 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.text.ParseException;
-import java.time.Duration;
-import java.time.Instant;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.Period;
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
-import java.time.format.DateTimeFormatter;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.time.temporal.TemporalAmount;
-import java.time.temporal.TemporalQuery;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.GregorianCalendar;
-import java.util.TimeZone;
-import org.springframework.util.Assert;
-
-public final class DateUtil {
-    public static final String PATTERN_DATETIME = "yyyy-MM-dd HH:mm:ss";
-    public static final String PATTERN_DATE = "yyyy-MM-dd";
-    public static final String PATTERN_TIME = "HH:mm:ss";
-    public static final ConcurrentDateFormat DATETIME_FORMAT = ConcurrentDateFormat.of("yyyy-MM-dd HH:mm:ss");
-    public static final ConcurrentDateFormat DATE_FORMAT = ConcurrentDateFormat.of("yyyy-MM-dd");
-    public static final ConcurrentDateFormat TIME_FORMAT = ConcurrentDateFormat.of("HH:mm:ss");
-    public static final DateTimeFormatter DATETIME_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-    public static final DateTimeFormatter DATE_FORMATTER = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-    public static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern("HH:mm:ss");
-
-    public static Date now() {
-        return new Date();
-    }
-
-    public static Date plusYears(Date date, int yearsToAdd) {
-        return set(date, 1, yearsToAdd);
-    }
-
-    public static Date plusMonths(Date date, int monthsToAdd) {
-        return set(date, 2, monthsToAdd);
-    }
-
-    public static Date plusWeeks(Date date, int weeksToAdd) {
-        return plus(date, Period.ofWeeks(weeksToAdd));
-    }
-
-    public static Date plusDays(Date date, long daysToAdd) {
-        return plus(date, Duration.ofDays(daysToAdd));
-    }
-
-    public static Date plusHours(Date date, long hoursToAdd) {
-        return plus(date, Duration.ofHours(hoursToAdd));
-    }
-
-    public static Date plusMinutes(Date date, long minutesToAdd) {
-        return plus(date, Duration.ofMinutes(minutesToAdd));
-    }
-
-    public static Date plusSeconds(Date date, long secondsToAdd) {
-        return plus(date, Duration.ofSeconds(secondsToAdd));
-    }
-
-    public static Date plusMillis(Date date, long millisToAdd) {
-        return plus(date, Duration.ofMillis(millisToAdd));
-    }
-
-    public static Date plusNanos(Date date, long nanosToAdd) {
-        return plus(date, Duration.ofNanos(nanosToAdd));
-    }
-
-    public static Date plus(Date date, TemporalAmount amount) {
-        Instant instant = date.toInstant();
-        return Date.from(instant.plus(amount));
-    }
-
-    public static Date minusYears(Date date, int years) {
-        return set(date, 1, -years);
-    }
-
-    public static Date minusMonths(Date date, int months) {
-        return set(date, 2, -months);
-    }
-
-    public static Date minusWeeks(Date date, int weeks) {
-        return minus(date, Period.ofWeeks(weeks));
-    }
-
-    public static Date minusDays(Date date, long days) {
-        return minus(date, Duration.ofDays(days));
-    }
-
-    public static Date minusHours(Date date, long hours) {
-        return minus(date, Duration.ofHours(hours));
-    }
-
-    public static Date minusMinutes(Date date, long minutes) {
-        return minus(date, Duration.ofMinutes(minutes));
-    }
-
-    public static Date minusSeconds(Date date, long seconds) {
-        return minus(date, Duration.ofSeconds(seconds));
-    }
-
-    public static Date minusMillis(Date date, long millis) {
-        return minus(date, Duration.ofMillis(millis));
-    }
-
-    public static Date minusNanos(Date date, long nanos) {
-        return minus(date, Duration.ofNanos(nanos));
-    }
-
-    public static Date minus(Date date, TemporalAmount amount) {
-        Instant instant = date.toInstant();
-        return Date.from(instant.minus(amount));
-    }
-
-    private static Date set(Date date, int calendarField, int amount) {
-        Assert.notNull(date, "The date must not be null");
-        Calendar c = Calendar.getInstance();
-        c.setLenient(false);
-        c.setTime(date);
-        c.add(calendarField, amount);
-        return c.getTime();
-    }
-
-    public static String formatDateTime(Date date) {
-        return DATETIME_FORMAT.format(date);
-    }
-
-    public static String formatDate(Date date) {
-        return DATE_FORMAT.format(date);
-    }
-
-    public static String formatTime(Date date) {
-        return TIME_FORMAT.format(date);
-    }
-
-    public static String format(Date date, String pattern) {
-        return ConcurrentDateFormat.of(pattern).format(date);
-    }
-
-    public static String formatDateTime(TemporalAccessor temporal) {
-        return DATETIME_FORMATTER.format(temporal);
-    }
-
-    public static String formatDate(TemporalAccessor temporal) {
-        return DATE_FORMATTER.format(temporal);
-    }
-
-    public static String formatTime(TemporalAccessor temporal) {
-        return TIME_FORMATTER.format(temporal);
-    }
-
-    public static String format(TemporalAccessor temporal, String pattern) {
-        return DateTimeFormatter.ofPattern(pattern).format(temporal);
-    }
-
-    public static Date parse(String dateStr, String pattern) {
-        ConcurrentDateFormat format = ConcurrentDateFormat.of(pattern);
-
-        try {
-            return format.parse(dateStr);
-        } catch (ParseException var4) {
-            throw Exceptions.unchecked(var4);
-        }
-    }
-
-    public static Date parse(String dateStr, ConcurrentDateFormat format) {
-        try {
-            return format.parse(dateStr);
-        } catch (ParseException var3) {
-            throw Exceptions.unchecked(var3);
-        }
-    }
-
-    public static <T> T parse(String dateStr, String pattern, TemporalQuery<T> query) {
-        return DateTimeFormatter.ofPattern(pattern).parse(dateStr, query);
-    }
-
-    public static Instant toInstant(LocalDateTime dateTime) {
-        return dateTime.atZone(ZoneId.systemDefault()).toInstant();
-    }
-
-    public static LocalDateTime toDateTime(Instant instant) {
-        return LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
-    }
-
-    public static Date toDate(LocalDateTime dateTime) {
-        return Date.from(toInstant(dateTime));
-    }
-
-    public static Date toDate(final LocalDate localDate) {
-        return Date.from(localDate.atStartOfDay(ZoneId.systemDefault()).toInstant());
-    }
-
-    public static Calendar toCalendar(final LocalDateTime localDateTime) {
-        return GregorianCalendar.from(ZonedDateTime.of(localDateTime, ZoneId.systemDefault()));
-    }
-
-    public static long toMilliseconds(final LocalDateTime localDateTime) {
-        return localDateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli();
-    }
-
-    public static long toMilliseconds(LocalDate localDate) {
-        return toMilliseconds(localDate.atStartOfDay());
-    }
-
-    public static LocalDateTime fromCalendar(final Calendar calendar) {
-        TimeZone tz = calendar.getTimeZone();
-        ZoneId zid = tz == null ? ZoneId.systemDefault() : tz.toZoneId();
-        return LocalDateTime.ofInstant(calendar.toInstant(), zid);
-    }
-
-    public static LocalDateTime fromInstant(final Instant instant) {
-        return LocalDateTime.ofInstant(instant, ZoneId.systemDefault());
-    }
-
-    public static LocalDateTime fromDate(final Date date) {
-        return LocalDateTime.ofInstant(date.toInstant(), ZoneId.systemDefault());
-    }
-
-    public static LocalDateTime fromMilliseconds(final long milliseconds) {
-        return LocalDateTime.ofInstant(Instant.ofEpochMilli(milliseconds), ZoneId.systemDefault());
-    }
-
-    public static Duration between(Temporal startInclusive, Temporal endExclusive) {
-        return Duration.between(startInclusive, endExclusive);
-    }
-
-    public static Period between(LocalDate startDate, LocalDate endDate) {
-        return Period.between(startDate, endDate);
-    }
-
-    public static Duration between(Date startDate, Date endDate) {
-        return Duration.between(startDate.toInstant(), endDate.toInstant());
-    }
-
-    public static String secondToTime(Long second) {
-        if (second != null && second != 0L) {
-            long days = second / 86400L;
-            second = second % 86400L;
-            long hours = second / 3600L;
-            second = second % 3600L;
-            long minutes = second / 60L;
-            second = second % 60L;
-            return days > 0L ? StringUtil.format("{}天{}小时{}分{}秒", new Object[]{days, hours, minutes, second}) : StringUtil.format("{}小时{}分{}秒", new Object[]{hours, minutes, second});
-        } else {
-            return "";
-        }
-    }
-
-    public static String today() {
-        return format(new Date(), "yyyyMMdd");
-    }
-
-    private DateUtil() {
-        throw new UnsupportedOperationException("This is a utility class and cannot be instantiated");
-    }
-}
-

+ 751 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DateUtils.java

@@ -0,0 +1,751 @@
+package org.zhongzheng.common.utils;
+
+
+import cn.hutool.core.lang.Validator;
+import org.apache.commons.lang3.RandomStringUtils;
+import org.apache.commons.lang3.time.DateFormatUtils;
+import org.apache.http.util.Args;
+
+import java.lang.management.ManagementFactory;
+import java.lang.ref.SoftReference;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.time.*;
+import java.time.format.DateTimeFormatter;
+import java.util.*;
+
+/**
+ * 时间工具类
+ *
+ * @author zhongzheng
+ */
+public class DateUtils extends org.apache.commons.lang3.time.DateUtils
+{
+    public static String YYYY = "yyyy";
+
+    public static String YYYY_MM = "yyyy-MM";
+
+    public static String YYYY_MM_DD = "yyyy-MM-dd";
+
+    public static String YYYYMMDD = "yyyyMMdd";
+
+    public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss";
+
+    public static String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";
+
+    private static String[] parsePatterns = {
+            "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss", "yyyy-MM-dd HH:mm", "yyyy-MM",
+            "yyyy/MM/dd", "yyyy/MM/dd HH:mm:ss", "yyyy/MM/dd HH:mm", "yyyy/MM",
+            "yyyy.MM.dd", "yyyy.MM.dd HH:mm:ss", "yyyy.MM.dd HH:mm", "yyyy.MM"};
+
+    static final class DateFormatHolder {
+        private static final ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>> THREADLOCAL_FORMATS = new ThreadLocal<SoftReference<Map<String, SimpleDateFormat>>>();
+
+        DateFormatHolder() {
+        }
+
+        public static SimpleDateFormat formatFor(String pattern) {
+            SoftReference<Map<String, SimpleDateFormat>> ref = THREADLOCAL_FORMATS.get();
+            Map<String, SimpleDateFormat> formats = ref == null ? null : ref.get();
+            if (formats == null) {
+                formats = new HashMap<String, SimpleDateFormat>();
+                THREADLOCAL_FORMATS.set(new SoftReference(formats));
+            }
+
+            SimpleDateFormat format = formats.get(pattern);
+
+            if (format == null) {
+                format = new SimpleDateFormat(pattern);
+                format.setTimeZone(TimeZone.getTimeZone("GMT+8"));
+                ((Map) formats).put(pattern, format);
+            }
+
+            return format;
+        }
+
+        public static void clearThreadLocal() {
+            THREADLOCAL_FORMATS.remove();
+        }
+    }
+
+    public static String formatDateV3(Date date, String pattern) {
+        Args.notNull(date, "Date");
+        Args.notNull(pattern, "Pattern");
+        SimpleDateFormat formatFor = DateFormatHolder.formatFor(pattern);
+        return formatFor.format(date);
+    }
+
+    /**
+     * 获取当前Date型日期
+     *
+     * @return Date() 当前日期
+     */
+    public static Date getNowDate()
+    {
+        return new Date();
+    }
+
+    /**
+     * 获取当前日期, 默认格式为yyyy-MM-dd
+     *
+     * @return String
+     */
+    public static String getDate()
+    {
+        return dateTimeNow(YYYY_MM_DD);
+    }
+
+    public static final String getTime()
+    {
+        return dateTimeNow(YYYY_MM_DD_HH_MM_SS);
+    }
+
+    public static final String dateTimeNow()
+    {
+        return dateTimeNow(YYYYMMDDHHMMSS);
+    }
+
+    public static final String dateTimeNow(final String format)
+    {
+        return parseDateToStr(format, new Date());
+    }
+
+    public static final String dateTime(final Date date)
+    {
+        return parseDateToStr(YYYY_MM_DD, date);
+    }
+
+    public static final String parseDateToStr(final String format, final Date date)
+    {
+        return new SimpleDateFormat(format).format(date);
+    }
+
+    public static final Date dateTimeThrow(final String format, final String ts) throws ParseException {
+        return new SimpleDateFormat(format).parse(ts);
+    }
+
+    public static final Date dateTime(final String format, final String ts)
+    {
+        try
+        {
+            return new SimpleDateFormat(format).parse(ts);
+        }
+        catch (ParseException e)
+        {
+
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static final Long dateTimeSec(final String format, final String ts)
+    {
+        try
+        {
+            return (new SimpleDateFormat(format).parse(ts)).getTime()/1000;
+        }
+        catch (ParseException e)
+        {
+
+            throw new RuntimeException(e);
+        }
+    }
+
+    public static String timestampToDateFormat(Long times){
+        if(Validator.isEmpty(times)){
+            return "";
+        }
+        long t = times.longValue();
+        t = t * 1000;
+        Date date = new Date(t);
+        return DateFormatUtils.format(date, "yyyy/MM/dd");
+    }
+
+    public static Date timeToDate(Long times){
+        long t = times.longValue();
+        t = t * 1000;
+        return new Date(t);
+    }
+
+    public static String timestampToDateFormatMonth(Long times){
+        if(Validator.isEmpty(times)){
+            return "";
+        }
+        long t = times.longValue();
+        t = t * 1000;
+        Date date = new Date(t);
+        return DateFormatUtils.format(date, "MM月dd号");
+    }
+
+    public static String timestampToDateFormatMonthTwo(Long times){
+        if(Validator.isEmpty(times)){
+            return "";
+        }
+        long t = times.longValue();
+        t = t * 1000;
+        Date date = new Date(t);
+        return DateFormatUtils.format(date, "MM.dd");
+    }
+
+    public static String timestampToDateFormat(Long times,String patternStr){
+        if(Validator.isEmpty(times)){
+            return "";
+        }
+        long t = times.longValue();
+        t = t * 1000;
+        Date date = new Date(t);
+        return DateFormatUtils.format(date, patternStr);
+    }
+
+
+    /**
+     * 将秒转为时分秒格式【01:01:01】
+     * @param second 需要转化的秒数
+     * @return
+     */
+    public static String secondConvertHourMinSecond(Long second) {
+        String str = "";
+        if (second == null || second < 0) {
+            return str;
+        }
+
+        // 得到小时
+        long h = second / 3600;
+        str = h > 0 ? ((h < 10 ? ("0" + h) : h) + "时") : "";
+
+        // 得到分钟
+        long m = (second % 3600) / 60;
+        str += m > 0? (m < 10 ? ("0" + m) : m) + "分":"";
+
+        //得到剩余秒
+        long s = second % 60;
+        str += s > 0?(s < 10 ? ("0" + s) : s)+"秒":"";
+        return str;
+    }
+
+    public static String timestampToDate(Long times){
+        if(Validator.isEmpty(times)){
+            return "";
+        }
+        long t = times.longValue();
+        t = t * 1000;
+        Date date = new Date(t);
+        return dateTime(date);
+    }
+
+    /**
+     * 日期路径 即年/月/日 如2018/08/08
+     */
+    public static final String datePath()
+    {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyy/MM/dd");
+    }
+
+    /**
+     * 日期路径 即年/月/日 如20180808
+     */
+    public static final String dateTime()
+    {
+        Date now = new Date();
+        return DateFormatUtils.format(now, "yyyyMMdd");
+    }
+
+    /**
+     * 日期型字符串转化为日期 格式
+     */
+    public static Date parseDate(Object str)
+    {
+        if (str == null)
+        {
+            return null;
+        }
+        try
+        {
+            return parseDate(str.toString(), parsePatterns);
+        }
+        catch (ParseException e)
+        {
+            return null;
+        }
+    }
+
+    /**
+     * 获取服务器启动时间
+     */
+    public static Date getServerStartDate()
+    {
+        long time = ManagementFactory.getRuntimeMXBean().getStartTime();
+        return new Date(time);
+    }
+
+    /**
+     * 计算两个时间差
+     */
+    public static String getDatePoor(Date endDate, Date nowDate)
+    {
+        long nd = 1000 * 24 * 60 * 60;
+        long nh = 1000 * 60 * 60;
+        long nm = 1000 * 60;
+        // long ns = 1000;
+        // 获得两个时间的毫秒时间差异
+        long diff = endDate.getTime() - nowDate.getTime();
+        // 计算差多少天
+        long day = diff / nd;
+        // 计算差多少小时
+        long hour = diff % nd / nh;
+        // 计算差多少分钟
+        long min = diff % nd % nh / nm;
+        // 计算差多少秒//输出结果
+        // long sec = diff % nd % nh % nm / ns;
+        return day + "天" + hour + "小时" + min + "分钟";
+    }
+
+    public static Long getNowTime()
+    {
+        return System.currentTimeMillis()/1000;
+    }
+
+    /**
+     * 获取今天凌晨时间戳
+     */
+    public static Long getTodayZeroTime()
+    {
+        Calendar cal = Calendar.getInstance();
+        cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
+        return cal.getTimeInMillis() / 1000;  //今天凌晨
+    }
+
+    /**
+     * 获取指定时间的凌晨时间戳
+     */
+    public static Long getScheduleTimeStrZeroTime(String timeStr,String patternStr)
+    {
+        Long time = dateTimeSec(patternStr,timeStr);
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(timeToDate(time));
+        cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
+        return cal.getTimeInMillis() / 1000;  //今天凌晨
+    }
+
+    /**
+     * 获取指定时间的凌晨时间戳
+     */
+    public static Long getScheduleTimeZeroTime(Long scheduleTime)
+    {
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(timeToDate(scheduleTime));
+        cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
+        return cal.getTimeInMillis() / 1000;  //今天凌晨
+    }
+
+    public static String formatDate(Date time,String str)
+    {
+       SimpleDateFormat sdf = new SimpleDateFormat(str);
+        return sdf.format(time);
+    }
+
+    /**
+     * 获取明天凌晨时间戳
+     */
+    public static Long getTomorrowZeroTime()
+    {
+        Calendar cal = Calendar.getInstance();
+        cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH), 0, 0, 0);
+        Calendar cal1 = Calendar.getInstance();
+        cal1.setTime(cal.getTime());
+        cal1.add(Calendar.DAY_OF_MONTH , +1);
+        return cal1.getTimeInMillis() / 1000; //明天凌晨
+    }
+
+    /**
+     * 获取当月第一天的凌晨时间戳
+     */
+    public static Long getToMonthZeroTime()
+    {
+        Calendar cal = Calendar.getInstance();
+        cal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), 1, 0, 0, 0);
+        return cal.getTime().getTime()/1000;
+    }
+
+    /**
+     * 获取本年第一天的凌晨时间戳
+     */
+    public static Long getToYearZeroTime()
+    {
+        Calendar calendar = Calendar.getInstance();
+        // 设置当前时间为年初的第一天
+        calendar.set(Calendar.DAY_OF_YEAR, 1);
+        Date startOfCurrentYear = calendar.getTime();
+        return startOfCurrentYear.getTime()/1000;
+    }
+
+    /**
+     * 根据当前日期获得所在周的日期区间(周一和周日日期)
+     */
+    public static Map<String, Long> getTimeInterval(Date date){
+        Map<String, Long> map = new HashMap<>();
+        Calendar cal = Calendar.getInstance();
+        cal.setTime(date);
+        // 判断要计算的日期是否是周日,如果是则减一天计算周六的,否则会出问题,计算到下一周去了
+        int dayWeek = cal.get(Calendar.DAY_OF_WEEK);// 获得当前日期是一个星期的第几天
+        if(1 == dayWeek){
+            cal.add(Calendar.DAY_OF_MONTH,-1);
+        }
+        // 设置一个星期的第一天,按中国的习惯一个星期的第一天是星期一
+        cal.setFirstDayOfWeek(Calendar.MONDAY);
+        // 获得当前日期是一个星期的第几天
+        int day = cal.get(Calendar.DAY_OF_WEEK);
+        // 根据日历的规则,给当前日期减去星期几与一个星期第一天的差值
+        cal.add(Calendar.DATE, cal.getFirstDayOfWeek() - day);
+        Long imptimeBegin = cal.getTime().getTime();
+        cal.add(Calendar.DATE,6);
+        Long imptimeEnd = cal.getTime().getTime();
+        map.put("start", imptimeBegin/1000);
+        map.put("end", imptimeEnd/1000);
+        return map;
+    }
+
+
+    /**
+     * 根据当前日期获得上周的日期区间(上周周一和周日日期)
+     */
+    public static Map<String, Long> getLastTimeInterval(Date date){
+        Map<String, Long> map = new HashMap<>();
+        Calendar calendar1 = Calendar.getInstance();
+        Calendar calendar2 = Calendar.getInstance();
+        calendar1.setTime(date);
+        calendar2.setTime(date);
+        int dayOfWeek = calendar1.get(Calendar.DAY_OF_WEEK) - 1;
+        if(dayOfWeek <= 0){
+            dayOfWeek = 7;
+        }
+        int offset1 = 1 - dayOfWeek;
+        int offset2 = 7 - dayOfWeek;
+        calendar1.add(Calendar.DATE, offset1 - 7);
+        calendar2.add(Calendar.DATE, offset2 - 7);
+        // last Monday
+        Long lastBeginDate = calendar1.getTime().getTime();
+        // last Sunday
+        Long lastEndDate = calendar2.getTime().getTime();
+        map.put("laststart", lastBeginDate/1000);
+        map.put("lastend", lastEndDate/1000);
+        return map;
+    }
+
+    /**
+     * 获取日期格式订单号
+     * @return
+     */
+    public static String getDateOrderSn()
+    {
+        DateTimeFormatter ofPattern = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+        String localDate = (LocalDateTime.now().format(ofPattern)).substring(2);
+        //随机数
+        String randomNumeric = RandomStringUtils.randomNumeric(8);
+        return localDate+randomNumeric;
+    }
+
+    public static String getDateInputOrderSn()
+    {
+        return "LD"+getDateOrderSn();
+    }
+
+
+    public static String getPayOrderSn()
+    {
+        return "P"+getDateOrderSn();
+    }
+
+    public static String getInvoiceOrderSn()
+    {
+        DateTimeFormatter ofPattern = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
+        String localDate = (LocalDateTime.now().format(ofPattern)).substring(2);
+        //随机数
+        String randomNumeric = RandomStringUtils.randomNumeric(4);
+        return "IN"+localDate+randomNumeric;
+
+    }
+
+    public static String getTagOrderSn(String tag)
+    {
+        return tag+getDateOrderSn();
+    }
+
+    public static String secToTime(int time) {
+        String timeStr = null;
+        int hour = 0;
+        int minute = 0;
+        int second = 0;
+        if (time <= 0)
+            return "00:00";
+        else {
+            minute = time / 60;
+            if (minute < 60) {
+                second = time % 60;
+                timeStr = "00:"+unitFormat(minute) + ":" + unitFormat(second);
+            } else {
+                hour = minute / 60;
+                if (hour > 99){
+                    return "99:59:59";
+                }
+                minute = minute % 60;
+                second = time - hour * 3600 - minute * 60;
+                timeStr = unitFormat(hour) + ":" + unitFormat(minute) + ":" + unitFormat(second);
+            }
+        }
+        return timeStr;
+    }
+
+    public static String unitFormat(int i) {
+        String retStr = null;
+        if (i >= 0 && i < 10)
+            retStr = "0" + Integer.toString(i);
+        else
+            retStr = "" + i;
+        return retStr;
+    }
+
+    public static Integer durationFormat(String duration) {
+        int index1=duration.indexOf(":");
+        int index2=duration.indexOf(":",index1+1);
+        int hh=Integer.parseInt(duration.substring(0,index1));
+        int mi=Integer.parseInt(duration.substring(index1+1,index2));
+        int ss=Integer.parseInt(duration.substring(index2+1));
+        return hh*60*60+mi*60+ss;
+    }
+
+    public static Integer dayBetween(Long s1,Long s2) {
+        String date1str = timestampToDateFormat(s1);
+        String date2str = timestampToDateFormat(s2);
+        int count = 0;
+        if("".equals(date1str) || date1str == null || "".equals(date2str) || date2str == null) {
+            return count;
+        }
+        SimpleDateFormat format = new SimpleDateFormat("yyyy/MM/dd");
+       try {
+           Date date1 = format.parse(date1str);
+           Date date2 = format.parse(date2str);
+           count = ((int) ((date1.getTime() - date2.getTime()) / (1000*3600*24)));
+           return count;
+        }catch (Exception e){
+           return null;
+       }
+    }
+
+    public static  Integer getTodayWeek(){
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(new Date());
+        int weekIdx = calendar.get(Calendar.DAY_OF_WEEK) - 1;
+        switch (weekIdx) {
+            case 1:
+                return 1;
+            case 2:
+                return 2;
+            case 3:
+                return 3;
+            case 4:
+                return 4;
+            case 5:
+                return 5;
+            case 6:
+                return 6;
+            default:
+                return 7;
+        }
+    }
+
+
+    public static LocalDate[] getDateArray() {
+        // 创建一个长度为30的数组
+        LocalDate[] dates = new LocalDate[30];
+        // 获取今天的日期
+        LocalDate today = LocalDate.now();
+        // 用循环给数组赋值
+        for (int i = 0; i < dates.length; i++) {
+            // 用today.plusDays(i)得到第i天的日期
+            dates[i] = today.plusDays(i);
+        }
+        // 返回数组
+        return dates;
+    }
+
+    static List<String> holiday =new ArrayList<>();
+    static List<String> extraWorkDay =new ArrayList<>();
+    public static Boolean isWorkingDay(long time) {
+        LocalDateTime dateTime = LocalDateTime.ofInstant(Instant.ofEpochMilli(time), ZoneOffset.of("+8"));
+        String formatTime = dateTime.format(DateTimeFormatter.ofPattern("yyyy-MM-dd"));
+        initHoliday();
+        initExtraWorkDay();
+        //是否加班日
+        if(extraWorkDay.contains(formatTime)){
+            return true;
+        }
+        //是否节假日
+        if(holiday.contains(formatTime)){
+            return false;
+        }
+        //如果是1-5表示周一到周五  是工作日
+        DayOfWeek week = dateTime.getDayOfWeek();
+        if(week==DayOfWeek.SATURDAY||week==DayOfWeek.SUNDAY){
+            return false;
+        }
+        return true;
+
+    }
+
+    /**
+     *  初始化节假日
+     */
+    public static void initHoliday(){
+        holiday.add("2023-06-22");
+        holiday.add("2023-06-23");
+        holiday.add("2023-09-29");
+        holiday.add("2023-09-30");
+        holiday.add("2023-10-01");
+        holiday.add("2023-10-02");
+        holiday.add("2023-10-03");
+        holiday.add("2023-10-04");
+        holiday.add("2023-10-05");
+        holiday.add("2023-10-06");
+    }
+    /**
+     *  初始化额外加班日
+     */
+    public static void initExtraWorkDay(){
+        extraWorkDay.add("2023-06-25");
+        extraWorkDay.add("2023-10-07");
+        extraWorkDay.add("2023-10-08");
+    }
+
+
+    public static Long getAppointTime(Long millisecond, Integer day) {
+        for (Integer i = 0; i < day; i++) {
+            Long dayAfter = getDayBefore(millisecond, 1);
+            Calendar calendar = Calendar.getInstance();
+            calendar.setTime(timeToDate(dayAfter));
+            int index = calendar.get(Calendar.DAY_OF_WEEK) - 1;
+            String[] weeks = new String[]{"星期天", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"};
+
+            if (weeks[index].equals("星期六") || weeks[index].equals("星期天")) {
+                day += 1;
+
+            }
+            //判断当前是否为工作日
+            if (!isWorkingDay(dayAfter)) {
+                day += 1;
+            }
+            millisecond = dayAfter;
+        }
+
+        return millisecond;
+    }
+
+    /**
+     * 指定时间往前或往后推n天
+     *
+     * @param dateTime 指定时间
+     * @param x 指定天数
+     * @return
+     */
+    public static Long getDayBefore(Long dateTime, int x) {
+        Calendar c = Calendar.getInstance();
+        Date date = new Date(dateTime*1000);
+        c.setTime(date);
+        int day = c.get(Calendar.DATE);
+        c.set(Calendar.DATE, day - x);    //往前推几天
+        //c.set(Calendar.DATE, day + x);  往后推几天
+        return c.getTime().getTime()/1000;
+    }
+
+    /**
+     * 指定时间往前或往后推n天
+     *
+     * @param dateTime 指定时间
+     * @param x 指定天数
+     * @return
+     */
+    public static Long getDayAfter(Long dateTime, int x) {
+        Calendar c = Calendar.getInstance();
+        Date date = new Date(dateTime*1000);
+        c.setTime(date);
+        int day = c.get(Calendar.DATE);
+//        c.set(Calendar.DATE, day - x);    //往前推几天
+        c.set(Calendar.DATE, day + x);  //往后推几天
+        return c.getTime().getTime()/1000;
+    }
+
+
+    public static List<Long> getWeekData(Long dataTime){
+        List<Long> week = new ArrayList();
+        Calendar calendar = Calendar.getInstance();
+        Long zeroTime = DateUtils.getScheduleTimeZeroTime(dataTime);
+        calendar.setTime(timeToDate(zeroTime));
+        // 如果是周日
+        if (calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
+            calendar.add(Calendar.DAY_OF_YEAR,-1);
+        }
+        // 获取当前日期是当周的第i天
+        int i = calendar.get(Calendar.DAY_OF_WEEK) - 1;
+         // 获取当前日期所在周的第一天
+        calendar.add(Calendar.DATE , -i);
+
+        for (int j = 0; j < 7; j++) {
+            if(j >0){
+                calendar.add(Calendar.DATE , 1);
+            }
+            Long time = calendar.getTime().getTime()/1000;
+            if (j == 6){
+                time = time + 86400L;
+            }
+            week.add(time);
+        }
+        return week;
+    }
+
+
+    public static Map<Long,Long> getWeekTime(Long startTime,Long endTime){
+        Map<Long,Long> mapList = new LinkedHashMap<>();
+        Long zeroTime = DateUtils.getScheduleTimeZeroTime(startTime);
+        //一天的时间戳
+        Long time = 86400L;
+        for (Long i = zeroTime; i <= endTime; i = i+time) {
+            List<Long> weekData = DateUtils.getWeekData(i);
+            mapList.put(weekData.get(0),weekData.get(weekData.size()-1));
+        }
+        return mapList;
+    }
+
+    public static Map<Long,Long> getMonthTime(Long startTime,Long endTime){
+        //一天的时间戳
+        Long time = 86400L;
+        Map<Long,Long> map = new  LinkedHashMap<>();
+        try{
+            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM");
+            Date d1 = DateUtils.timeToDate(startTime);
+            Date d2 = DateUtils.timeToDate(endTime);
+            Calendar dd = Calendar.getInstance();//定义日期实例
+            dd.setTime(d1);//设置日期起始时间
+            while (dd.getTime().before(d2)) {//判断是否到结束日期
+                SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");
+                String str = sdf.format(dd.getTime());
+                Calendar c = Calendar.getInstance();
+                c.setTime(format.parse(str));
+                c.add(Calendar.MONTH, 0);
+                c.set(Calendar.DAY_OF_MONTH,1);//设置为1号,当前日期既为本月第一天
+                Long start = c.getTime().getTime()/1000;
+                dd.setTime(DateUtils.timeToDate(start));
+                //获取当前月最后一天
+                Calendar ca = Calendar.getInstance();
+                ca.setTime(format.parse(str));
+                ca.set(Calendar.DAY_OF_MONTH, ca.getActualMaximum(Calendar.DAY_OF_MONTH));
+                Long end = ca.getTime().getTime()/1000 + time;
+                map.put(start,end);
+                dd.add(Calendar.MONTH, 1);//进行当前日期月份加1
+            }
+        }catch (Exception e){
+            System.out.println("异常"+e.getMessage());
+        }
+        return map;
+    }
+
+}

+ 0 - 89
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DigestUtil.java

@@ -1,89 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import org.springframework.lang.Nullable;
-import org.springframework.util.DigestUtils;
-
-public class DigestUtil extends DigestUtils {
-    private static final char[] HEX_DIGITS = "0123456789abcdef".toCharArray();
-
-    public DigestUtil() {
-    }
-
-    public static String md5Hex(final String data) {
-        return md5DigestAsHex(data.getBytes(Charsets.UTF_8));
-    }
-
-    public static String md5Hex(final byte[] bytes) {
-        return md5DigestAsHex(bytes);
-    }
-
-    public static String sha1(String srcStr) {
-        return hash("SHA-1", srcStr);
-    }
-
-    public static String sha256(String srcStr) {
-        return hash("SHA-256", srcStr);
-    }
-
-    public static String sha384(String srcStr) {
-        return hash("SHA-384", srcStr);
-    }
-
-    public static String sha512(String srcStr) {
-        return hash("SHA-512", srcStr);
-    }
-
-    public static String hash(String algorithm, String srcStr) {
-        try {
-            MessageDigest md = MessageDigest.getInstance(algorithm);
-            byte[] bytes = md.digest(srcStr.getBytes(Charsets.UTF_8));
-            return toHex(bytes);
-        } catch (NoSuchAlgorithmException var4) {
-            throw Exceptions.unchecked(var4);
-        }
-    }
-
-    public static String toHex(byte[] bytes) {
-        StringBuilder ret = new StringBuilder(bytes.length * 2);
-
-        for(int i = 0; i < bytes.length; ++i) {
-            ret.append(HEX_DIGITS[bytes[i] >> 4 & 15]);
-            ret.append(HEX_DIGITS[bytes[i] & 15]);
-        }
-
-        return ret.toString();
-    }
-
-    public static boolean slowEquals(@Nullable String a, @Nullable String b) {
-        return a != null && b != null ? slowEquals(a.getBytes(Charsets.UTF_8), b.getBytes(Charsets.UTF_8)) : false;
-    }
-
-    public static boolean slowEquals(@Nullable byte[] a, @Nullable byte[] b) {
-        if (a != null && b != null) {
-            if (a.length != b.length) {
-                return false;
-            } else {
-                int diff = a.length ^ b.length;
-
-                for(int i = 0; i < a.length && i < b.length; ++i) {
-                    diff |= a[i] ^ b[i];
-                }
-
-                return diff == 0;
-            }
-        } else {
-            return false;
-        }
-    }
-
-    public static String encrypt(String data) {
-        return sha1(md5Hex(data));
-    }
-}

+ 195 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/DoubleUtils.java

@@ -0,0 +1,195 @@
+package org.zhongzheng.common.utils;
+
+import java.math.BigDecimal;
+
+public class DoubleUtils {
+    // 默认除法运算精度
+    private static final Integer DEF_DIV_SCALE = 2;
+
+    /**
+     * 提供精确的加法运算。
+     *
+     * @param value1
+     *            被加数
+     * @param value2
+     *            加数
+     * @return 两个参数的和
+     */
+    public static Double add(Number value1, Number value2) {
+        return add(value1, value2, DEF_DIV_SCALE);
+    }
+
+    /**
+     * 提供精确的加法运算。
+     *
+     * @param value1
+     *            被加数
+     * @param value2
+     *            加数
+     * @param scale
+     *            表示需要精确到小数点以后几位。
+     * @return 两个参数的和
+     */
+    public static Double add(Number value1, Number value2, Integer scale) {
+        BigDecimal b1 = new BigDecimal(Double.toString(value1.doubleValue()));
+        BigDecimal b2 = new BigDecimal(Double.toString(value2.doubleValue()));
+        BigDecimal add = b1.add(b2);
+        BigDecimal setScale = add.setScale(scale, BigDecimal.ROUND_HALF_UP);
+        return setScale.doubleValue();
+    }
+
+    /**
+     * 提供精确的减法运算。
+     *
+     * @param value1
+     *            被减数
+     * @param value2
+     *            减数
+     * @return
+     */
+    public static Double sub(Number value1, Number value2) {
+        return sub(value1, value2, DEF_DIV_SCALE);
+    }
+
+    /**
+     *
+     * @param value1
+     *            被减数
+     * @param value2
+     *            减数
+     * @param scale
+     *            表示需要精确到小数点以后几位。
+     * @return 两个参数的差
+     */
+    public static Double sub(Number value1, Number value2, Integer scale) {
+        BigDecimal b1 = new BigDecimal(Double.toString(value1.doubleValue()));
+        BigDecimal b2 = new BigDecimal(Double.toString(value2.doubleValue()));
+        BigDecimal subtract = b1.subtract(b2);
+        BigDecimal setScale = subtract.setScale(scale, BigDecimal.ROUND_HALF_UP);
+        return setScale.doubleValue();
+    }
+
+    /**
+     * 提供精确的乘法运算。
+     *
+     * @param value1
+     *            被乘数
+     * @param value2
+     *            乘数
+     * @return 两个参数的积
+     */
+    public static Double mul(Number value1, Number value2) {
+        return mul(value1, value2, DEF_DIV_SCALE);
+    }
+
+    /**
+     * 提供精确的乘法运算。
+     *
+     * @param value1
+     *            被乘数
+     * @param value2
+     *            乘数
+     * @param scale
+     *            表示需要精确到小数点以后几位。
+     * @return 两个参数的积
+     */
+    public static Double mul(Number value1, Number value2, Integer scale) {
+        BigDecimal b1 = new BigDecimal(Double.toString(value1.doubleValue()));
+        BigDecimal b2 = new BigDecimal(Double.toString(value2.doubleValue()));
+        BigDecimal multiply = b1.multiply(b2);
+        BigDecimal setScale = multiply.setScale(scale, BigDecimal.ROUND_HALF_UP);
+        return setScale.doubleValue();
+    }
+
+    /**
+     * 提供精确的乘法运算。
+     *
+     * @param value1
+     *            被乘数
+     * @param value2
+     *            乘数
+     * @param scale
+     *            表示需要精确到小数点以后几位。
+     *
+     * @return 两个参数的积
+     */
+    public static Double mul(Number value1, Number value2, int scale, int roundingMode) {
+        BigDecimal b1 = new BigDecimal(Double.toString(value1.doubleValue()));
+        BigDecimal b2 = new BigDecimal(Double.toString(value2.doubleValue()));
+        BigDecimal multiply = b1.multiply(b2);
+        BigDecimal setScale = multiply.setScale(scale, roundingMode);
+        return setScale.doubleValue();
+    }
+
+    /**
+     * 提供(相对)精确的除法运算,当发生除不尽的情况时, 精确到小数点以后2位,以后的数字四舍五入。
+     *
+     * @param dividend
+     *            被除数
+     * @param divisor
+     *            除数
+     * @return 两个参数的商
+     */
+    public static Double div(Number dividend, Number divisor) {
+        return DoubleUtils.div(dividend, divisor, DEF_DIV_SCALE);
+    }
+
+    /**
+     * 提供(相对)精确的除法运算。 当发生除不尽的情况时,由scale参数指定精度,以后的数字四舍五入。
+     *
+     * @param dividend
+     *            被除数
+     * @param divisor
+     *            除数
+     * @param scale
+     *            表示需要精确到小数点以后几位。
+     * @return 两个参数的商
+     */
+    public static Double div(Number dividend, Number divisor, Integer scale) {
+        if (scale < 0) {
+            throw new IllegalArgumentException("The scale must be a positive integer or zero");
+        }
+        BigDecimal b1 = new BigDecimal(Double.toString(dividend.doubleValue()));
+        BigDecimal b2 = new BigDecimal(Double.toString(divisor.doubleValue()));
+        return b1.divide(b2, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+
+    /**
+     * 提供(相对)精确的除法运算。 当发生除不尽的情况时,由scale参数指定精度,以后的数字四舍五入。
+     *
+     * @param dividend
+     *            被除数
+     * @param divisor
+     *            除数
+     * @param scale
+     *            表示需要精确到小数点以后几位。
+     * @return 两个参数的商
+     */
+    public static Double div(Number dividend, Number divisor, Integer scale, int roundingMode) {
+        if (scale < 0) {
+            throw new IllegalArgumentException("The scale must be a positive integer or zero");
+        }
+        BigDecimal b1 = new BigDecimal(Double.toString(dividend.doubleValue()));
+        BigDecimal b2 = new BigDecimal(Double.toString(divisor.doubleValue()));
+        return b1.divide(b2, scale, roundingMode).doubleValue();
+    }
+
+    /**
+     * 提供精确的小数位四舍五入处理。
+     *
+     * @param value
+     *            需要四舍五入的数字
+     * @param scale
+     *            小数点后保留几位
+     * @return 四舍五入后的结果
+     */
+    public static Double round(Double value, Integer scale) {
+        if (scale < 0) {
+            throw new IllegalArgumentException("The scale must be a positive integer or zero");
+        }
+        BigDecimal b = new BigDecimal(Double.toString(value));
+        BigDecimal one = new BigDecimal("1");
+        return b.divide(one, scale, BigDecimal.ROUND_HALF_UP).doubleValue();
+    }
+
+}

+ 0 - 581
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Func.java

@@ -1,581 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.JsonNode;
-import java.io.Closeable;
-import java.io.InputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Method;
-import java.nio.charset.Charset;
-import java.time.Duration;
-import java.time.format.DateTimeFormatter;
-import java.time.temporal.Temporal;
-import java.time.temporal.TemporalAccessor;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.function.Supplier;
-
-import org.springframework.util.ObjectUtils;
-import org.zhongzheng.common.utils.JsonUtil;
-import org.springframework.beans.BeansException;
-import org.springframework.core.MethodParameter;
-import org.springframework.core.annotation.AnnotatedElementUtils;
-import org.springframework.lang.Nullable;
-import org.springframework.util.StringUtils;
-import org.springframework.web.method.HandlerMethod;
-
-public class Func {
-    public Func() {
-    }
-
-    public static <T> T requireNotNull(T obj) {
-        return Objects.requireNonNull(obj);
-    }
-
-    public static <T> T requireNotNull(T obj, String message) {
-        return Objects.requireNonNull(obj, message);
-    }
-
-    public static <T> T requireNotNull(T obj, Supplier<String> messageSupplier) {
-        return Objects.requireNonNull(obj, messageSupplier);
-    }
-
-    public static boolean isNull(@Nullable Object obj) {
-        return Objects.isNull(obj);
-    }
-
-    public static boolean notNull(@Nullable Object obj) {
-        return Objects.nonNull(obj);
-    }
-
-    public static String firstCharToLower(String str) {
-        return StringUtil.lowerFirst(str);
-    }
-
-    public static String firstCharToUpper(String str) {
-        return StringUtil.upperFirst(str);
-    }
-
-    public static boolean isBlank(@Nullable final CharSequence cs) {
-        return StringUtil.isBlank(cs);
-    }
-
-    public static boolean isNotBlank(@Nullable final CharSequence cs) {
-        return StringUtil.isNotBlank(cs);
-    }
-
-    public static boolean isAnyBlank(final CharSequence... css) {
-        return StringUtil.isAnyBlank(css);
-    }
-
-    public static boolean isNoneBlank(final CharSequence... css) {
-        return StringUtil.isNoneBlank(css);
-    }
-
-    public static boolean isArray(@Nullable Object obj) {
-        return ObjectUtils.isArray(obj);
-    }
-
-    public static boolean isEmpty(@Nullable Object obj) {
-        return ObjectUtils.isEmpty(obj);
-    }
-
-    public static boolean isNotEmpty(@Nullable Object obj) {
-        return !ObjectUtils.isEmpty(obj);
-    }
-
-    public static boolean isEmpty(@Nullable Object[] array) {
-        return ObjectUtils.isEmpty(array);
-    }
-
-    public static boolean isNotEmpty(@Nullable Object[] array) {
-        return !ObjectUtils.isEmpty(array);
-    }
-
-    public static boolean hasEmpty(Object... os) {
-        Object[] var1 = os;
-        int var2 = os.length;
-
-        for(int var3 = 0; var3 < var2; ++var3) {
-            Object o = var1[var3];
-            if (isEmpty(o)) {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
-    public static boolean allEmpty(Object... os) {
-        Object[] var1 = os;
-        int var2 = os.length;
-
-        for(int var3 = 0; var3 < var2; ++var3) {
-            Object o = var1[var3];
-            if (!isEmpty(o)) {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-    public static boolean equals(Object obj1, Object obj2) {
-        return Objects.equals(obj1, obj2);
-    }
-
-    public static boolean equalsSafe(@Nullable Object o1, @Nullable Object o2) {
-        return ObjectUtils.nullSafeEquals(o1, o2);
-    }
-
-    public static <T> boolean contains(@Nullable T[] array, final T element) {
-        return CollectionUtil.contains(array, element);
-    }
-
-    public static boolean contains(@Nullable Iterator<?> iterator, Object element) {
-        return CollectionUtil.contains(iterator, element);
-    }
-
-    public static boolean contains(@Nullable Enumeration<?> enumeration, Object element) {
-        return CollectionUtil.contains(enumeration, element);
-    }
-
-    public static String toStr(Object str) {
-        return toStr(str, "");
-    }
-
-    public static String toStr(Object str, String defaultValue) {
-        return null == str ? defaultValue : String.valueOf(str);
-    }
-
-    public static String toStrWithEmpty(Object str, String defaultValue) {
-        return null != str && !str.equals("null") && !str.equals("") ? String.valueOf(str) : defaultValue;
-    }
-
-    public static boolean isNumeric(final CharSequence cs) {
-        return StringUtil.isNumeric(cs);
-    }
-
-    public static int toInt(final Object value) {
-        return NumberUtil.toInt(String.valueOf(value));
-    }
-
-    public static int toInt(final Object value, final int defaultValue) {
-        return NumberUtil.toInt(String.valueOf(value), defaultValue);
-    }
-
-    public static long toLong(final Object value) {
-        return NumberUtil.toLong(String.valueOf(value));
-    }
-
-    public static long toLong(final Object value, final long defaultValue) {
-        return NumberUtil.toLong(String.valueOf(value), defaultValue);
-    }
-
-    public static Double toDouble(Object value) {
-        return toDouble(String.valueOf(value), -1.0);
-    }
-
-    public static Double toDouble(Object value, Double defaultValue) {
-        return NumberUtil.toDouble(String.valueOf(value), defaultValue);
-    }
-
-    public static Float toFloat(Object value) {
-        return toFloat(String.valueOf(value), -1.0F);
-    }
-
-    public static Float toFloat(Object value, Float defaultValue) {
-        return NumberUtil.toFloat(String.valueOf(value), defaultValue);
-    }
-
-    public static Boolean toBoolean(Object value) {
-        return toBoolean(value, (Boolean)null);
-    }
-
-    public static Boolean toBoolean(Object value, Boolean defaultValue) {
-        if (value != null) {
-            String val = String.valueOf(value);
-            val = val.toLowerCase().trim();
-            return Boolean.parseBoolean(val);
-        } else {
-            return defaultValue;
-        }
-    }
-
-    public static Integer[] toIntArray(String str) {
-        return toIntArray(",", str);
-    }
-
-    public static Integer[] toIntArray(String split, String str) {
-        if (StringUtil.isEmpty(str)) {
-            return new Integer[0];
-        } else {
-            String[] arr = str.split(split);
-            Integer[] ints = new Integer[arr.length];
-
-            for(int i = 0; i < arr.length; ++i) {
-                Integer v = toInt(arr[i], 0);
-                ints[i] = v;
-            }
-
-            return ints;
-        }
-    }
-
-    public static List<Integer> toIntList(String str) {
-        return Arrays.asList(toIntArray(str));
-    }
-
-    public static List<Integer> toIntList(String split, String str) {
-        return Arrays.asList(toIntArray(split, str));
-    }
-
-    public static Long[] toLongArray(String str) {
-        return toLongArray(",", str);
-    }
-
-    public static Long[] toLongArray(String split, String str) {
-        if (StringUtil.isEmpty(str)) {
-            return new Long[0];
-        } else {
-            String[] arr = str.split(split);
-            Long[] longs = new Long[arr.length];
-
-            for(int i = 0; i < arr.length; ++i) {
-                Long v = toLong(arr[i], 0L);
-                longs[i] = v;
-            }
-
-            return longs;
-        }
-    }
-
-    public static List<Long> toLongList(String str) {
-        return Arrays.asList(toLongArray(str));
-    }
-
-    public static List<Long> toLongList(String split, String str) {
-        return Arrays.asList(toLongArray(split, str));
-    }
-
-    public static String[] toStrArray(String str) {
-        return toStrArray(",", str);
-    }
-
-    public static String[] toStrArray(String split, String str) {
-        return isBlank(str) ? new String[0] : str.split(split);
-    }
-
-    public static List<String> toStrList(String str) {
-        return Arrays.asList(toStrArray(str));
-    }
-
-    public static List<String> toStrList(String split, String str) {
-        return Arrays.asList(toStrArray(split, str));
-    }
-
-    public static String to62String(long num) {
-        return NumberUtil.to62String(num);
-    }
-
-    public static String join(Collection<?> coll) {
-        return StringUtil.join(coll);
-    }
-
-    public static String join(Collection<?> coll, String delim) {
-        return StringUtil.join(coll, delim);
-    }
-
-    public static String join(Object[] arr) {
-        return StringUtil.join(arr);
-    }
-
-    public static String join(Object[] arr, String delim) {
-        return StringUtil.join(arr, delim);
-    }
-
-    public static String randomUUID() {
-        return StringUtil.randomUUID();
-    }
-
-    public static String escapeHtml(String html) {
-        return StringUtil.escapeHtml(html);
-    }
-
-    public static String random(int count) {
-        return StringUtil.random(count);
-    }
-
-    public static String random(int count, RandomType randomType) {
-        return StringUtil.random(count, randomType);
-    }
-
-    public static String md5Hex(final String data) {
-        return DigestUtil.md5Hex(data);
-    }
-
-    public static String md5Hex(final byte[] bytes) {
-        return DigestUtil.md5Hex(bytes);
-    }
-
-    public static String sha1(String srcStr) {
-        return DigestUtil.sha1(srcStr);
-    }
-
-    public static String sha256(String srcStr) {
-        return DigestUtil.sha256(srcStr);
-    }
-
-    public static String sha384(String srcStr) {
-        return DigestUtil.sha384(srcStr);
-    }
-
-    public static String sha512(String srcStr) {
-        return DigestUtil.sha512(srcStr);
-    }
-
-    public static String encrypt(String data) {
-        return DigestUtil.encrypt(data);
-    }
-
-    public static String encodeBase64(String value) {
-        return Base64Util.encode(value);
-    }
-
-    public static String encodeBase64(String value, Charset charset) {
-        return Base64Util.encode(value, charset);
-    }
-
-    public static String encodeBase64UrlSafe(String value) {
-        return Base64Util.encodeUrlSafe(value);
-    }
-
-    public static String encodeBase64UrlSafe(String value, Charset charset) {
-        return Base64Util.encodeUrlSafe(value, charset);
-    }
-
-    public static String decodeBase64(String value) {
-        return Base64Util.decode(value);
-    }
-
-    public static String decodeBase64(String value, Charset charset) {
-        return Base64Util.decode(value, charset);
-    }
-
-    public static String decodeBase64UrlSafe(String value) {
-        return Base64Util.decodeUrlSafe(value);
-    }
-
-    public static String decodeBase64UrlSafe(String value, Charset charset) {
-        return Base64Util.decodeUrlSafe(value, charset);
-    }
-
-    public static void closeQuietly(@Nullable Closeable closeable) {
-        IoUtil.closeQuietly(closeable);
-    }
-
-    public static String toString(InputStream input) {
-        return IoUtil.toString(input);
-    }
-
-    public static String toString(@Nullable InputStream input, Charset charset) {
-        return IoUtil.toString(input, charset);
-    }
-
-    public static byte[] toByteArray(@Nullable InputStream input) {
-        return IoUtil.toByteArray(input);
-    }
-
-    public static String toJson(Object object) {
-        return JsonUtil.toJson(object);
-    }
-
-    public static byte[] toJsonAsBytes(Object object) {
-        return JsonUtil.toJsonAsBytes(object);
-    }
-
-    public static JsonNode readTree(String jsonString) {
-        return JsonUtil.readTree(jsonString);
-    }
-
-    public static JsonNode readTree(InputStream in) {
-        return JsonUtil.readTree(in);
-    }
-
-    public static JsonNode readTree(byte[] content) {
-        return JsonUtil.readTree(content);
-    }
-
-    public static JsonNode readTree(JsonParser jsonParser) {
-        return JsonUtil.readTree(jsonParser);
-    }
-
-    public static <T> T parse(byte[] bytes, Class<T> valueType) {
-        return JsonUtil.parse(bytes, valueType);
-    }
-
-    public static <T> T parse(String jsonString, Class<T> valueType) {
-        return JsonUtil.parse(jsonString, valueType);
-    }
-
-    public static <T> T parse(InputStream in, Class<T> valueType) {
-        return JsonUtil.parse(in, valueType);
-    }
-
-    public static <T> T parse(byte[] bytes, TypeReference<T> typeReference) {
-        return JsonUtil.parse(bytes, typeReference);
-    }
-
-    public static <T> T parse(String jsonString, TypeReference<T> typeReference) {
-        return JsonUtil.parse(jsonString, typeReference);
-    }
-
-    public static <T> T parse(InputStream in, TypeReference<T> typeReference) {
-        return JsonUtil.parse(in, typeReference);
-    }
-
-    public static String encode(String source) {
-        return UrlUtil.encode(source, Charsets.UTF_8);
-    }
-
-    public static String encode(String source, Charset charset) {
-        return UrlUtil.encode(source, charset);
-    }
-
-    public static String decode(String source) {
-        return StringUtils.uriDecode(source, Charsets.UTF_8);
-    }
-
-    public static String decode(String source, Charset charset) {
-        return StringUtils.uriDecode(source, charset);
-    }
-
-    public static String formatDateTime(Date date) {
-        return DateUtil.formatDateTime(date);
-    }
-
-    public static String formatDate(Date date) {
-        return DateUtil.formatDate(date);
-    }
-
-    public static String formatTime(Date date) {
-        return DateUtil.formatTime(date);
-    }
-
-    public static String format(Date date, String pattern) {
-        return DateUtil.format(date, pattern);
-    }
-
-    public static Date parseDate(String dateStr, String pattern) {
-        return DateUtil.parse(dateStr, pattern);
-    }
-
-    public static Date parse(String dateStr, ConcurrentDateFormat format) {
-        return DateUtil.parse(dateStr, format);
-    }
-
-    public static String formatDateTime(TemporalAccessor temporal) {
-        return DateTimeUtil.formatDateTime(temporal);
-    }
-
-    public static String formatDate(TemporalAccessor temporal) {
-        return DateTimeUtil.formatDate(temporal);
-    }
-
-    public static String formatTime(TemporalAccessor temporal) {
-        return DateTimeUtil.formatTime(temporal);
-    }
-
-    public static String format(TemporalAccessor temporal, String pattern) {
-        return DateTimeUtil.format(temporal, pattern);
-    }
-
-    public static TemporalAccessor parse(String dateStr, String pattern) {
-        return DateTimeUtil.parse(dateStr, pattern);
-    }
-
-    public static TemporalAccessor parse(String dateStr, DateTimeFormatter formatter) {
-        return DateTimeUtil.parse(dateStr, formatter);
-    }
-
-    public static Duration between(Temporal startInclusive, Temporal endExclusive) {
-        return Duration.between(startInclusive, endExclusive);
-    }
-
-    public static MethodParameter getMethodParameter(Constructor<?> constructor, int parameterIndex) {
-        return ClassUtil.getMethodParameter(constructor, parameterIndex);
-    }
-
-    public static MethodParameter getMethodParameter(Method method, int parameterIndex) {
-        return ClassUtil.getMethodParameter(method, parameterIndex);
-    }
-
-    @Nullable
-    public static <A extends Annotation> A getAnnotation(AnnotatedElement annotatedElement, Class<A> annotationType) {
-        return AnnotatedElementUtils.findMergedAnnotation(annotatedElement, annotationType);
-    }
-
-    @Nullable
-    public static <A extends Annotation> A getAnnotation(Method method, Class<A> annotationType) {
-        return ClassUtil.getAnnotation(method, annotationType);
-    }
-
-    @Nullable
-    public static <A extends Annotation> A getAnnotation(HandlerMethod handlerMethod, Class<A> annotationType) {
-        return ClassUtil.getAnnotation(handlerMethod, annotationType);
-    }
-
-    public static <T> T newInstance(Class<?> clazz) {
-        return (T)BeanUtil.instantiateClass(clazz);
-    }
-
-    public static <T> T newInstance(String clazzStr) {
-        return BeanUtil.newInstance(clazzStr);
-    }
-
-    public static Object getProperty(Object bean, String propertyName) {
-        return BeanUtil.getProperty(bean, propertyName);
-    }
-
-    public static void setProperty(Object bean, String propertyName, Object value) {
-        BeanUtil.setProperty(bean, propertyName, value);
-    }
-
-    public static <T> T clone(T source) {
-        return BeanUtil.clone(source);
-    }
-
-    public static <T> T copy(Object source, Class<T> clazz) {
-        return BeanUtil.copy(source, clazz);
-    }
-
-    public static void copy(Object source, Object targetBean) {
-        BeanUtil.copy(source, targetBean);
-    }
-
-    public static <T> T copyProperties(Object source, Class<T> clazz) throws BeansException {
-        return BeanUtil.copyProperties(source, clazz);
-    }
-
-    public static Map<String, Object> toMap(Object bean) {
-        return BeanUtil.toMap(bean);
-    }
-
-    public static <T> T toBean(Map<String, Object> beanMap, Class<T> valueType) {
-        return BeanUtil.toBean(beanMap, valueType);
-    }
-}

+ 0 - 99
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/HexUtil.java

@@ -1,99 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.nio.charset.Charset;
-import org.springframework.lang.Nullable;
-
-public class HexUtil {
-    public static final Charset DEFAULT_CHARSET;
-    private static final byte[] DIGITS_LOWER;
-    private static final byte[] DIGITS_UPPER;
-
-    public HexUtil() {
-    }
-
-    public static byte[] encode(byte[] data) {
-        return encode(data, true);
-    }
-
-    public static byte[] encode(byte[] data, boolean toLowerCase) {
-        return encode(data, toLowerCase ? DIGITS_LOWER : DIGITS_UPPER);
-    }
-
-    private static byte[] encode(byte[] data, byte[] digits) {
-        int len = data.length;
-        byte[] out = new byte[len << 1];
-        int i = 0;
-
-        for(int j = 0; i < len; ++i) {
-            out[j++] = digits[(240 & data[i]) >>> 4];
-            out[j++] = digits[15 & data[i]];
-        }
-
-        return out;
-    }
-
-    public static String encodeToString(byte[] data, boolean toLowerCase) {
-        return new String(encode(data, toLowerCase), DEFAULT_CHARSET);
-    }
-
-    public static String encodeToString(byte[] data) {
-        return new String(encode(data), DEFAULT_CHARSET);
-    }
-
-    @Nullable
-    public static String encodeToString(@Nullable String data) {
-        return StringUtil.isBlank(data) ? null : encodeToString(data.getBytes(DEFAULT_CHARSET));
-    }
-
-    @Nullable
-    public static byte[] decode(@Nullable String data) {
-        return StringUtil.isBlank(data) ? null : decode(data.getBytes(DEFAULT_CHARSET));
-    }
-
-    @Nullable
-    public static String decodeToString(@Nullable String data) {
-        byte[] decodeBytes = decode(data);
-        return decodeBytes == null ? null : new String(decodeBytes, DEFAULT_CHARSET);
-    }
-
-    public static byte[] decode(byte[] data) {
-        int len = data.length;
-        if ((len & 1) != 0) {
-            throw new IllegalArgumentException("hexBinary needs to be even-length: " + len);
-        } else {
-            byte[] out = new byte[len >> 1];
-            int i = 0;
-
-            for(int j = 0; j < len; ++i) {
-                int f = toDigit(data[j], j) << 4;
-                ++j;
-                f |= toDigit(data[j], j);
-                ++j;
-                out[i] = (byte)(f & 255);
-            }
-
-            return out;
-        }
-    }
-
-    private static int toDigit(byte b, int index) {
-        int digit = Character.digit(b, 16);
-        if (digit == -1) {
-            throw new IllegalArgumentException("Illegal hexadecimal byte " + b + " at index " + index);
-        } else {
-            return digit;
-        }
-    }
-
-    static {
-        DEFAULT_CHARSET = Charsets.UTF_8;
-        DIGITS_LOWER = new byte[]{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 97, 98, 99, 100, 101, 102};
-        DIGITS_UPPER = new byte[]{48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70};
-    }
-}

+ 11 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/IResultCode.java

@@ -0,0 +1,11 @@
+package org.zhongzheng.common.utils;
+
+
+
+import java.io.Serializable;
+
+public interface IResultCode extends Serializable {
+    String getMessage();
+
+    int getCode();
+}

+ 0 - 66
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/IoUtil.java

@@ -1,66 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.io.Closeable;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.nio.charset.Charset;
-import org.springframework.lang.Nullable;
-import org.springframework.util.StreamUtils;
-
-public class IoUtil extends StreamUtils {
-    public IoUtil() {
-    }
-
-    public static void closeQuietly(@Nullable Closeable closeable) {
-        try {
-            if (closeable != null) {
-                closeable.close();
-            }
-        } catch (IOException var2) {
-        }
-
-    }
-
-    public static String toString(InputStream input) {
-        return toString(input, Charsets.UTF_8);
-    }
-
-    public static String toString(@Nullable InputStream input, Charset charset) {
-        String var2;
-        try {
-            var2 = copyToString(input, charset);
-        } catch (IOException var6) {
-            throw Exceptions.unchecked(var6);
-        } finally {
-            closeQuietly(input);
-        }
-
-        return var2;
-    }
-
-    public static byte[] toByteArray(@Nullable InputStream input) {
-        byte[] var1;
-        try {
-            var1 = copyToByteArray(input);
-        } catch (IOException var5) {
-            throw Exceptions.unchecked(var5);
-        } finally {
-            closeQuietly(input);
-        }
-
-        return var1;
-    }
-
-    public static void write(@Nullable final String data, final OutputStream output, final Charset encoding) throws IOException {
-        if (data != null) {
-            output.write(data.getBytes(encoding));
-        }
-
-    }
-}

+ 0 - 312
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/JsonUtil.java

@@ -1,312 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import com.fasterxml.jackson.core.JsonParser;
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.core.JsonParser.Feature;
-import com.fasterxml.jackson.core.json.JsonReadFeature;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.fasterxml.jackson.databind.SerializationFeature;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.SimpleDateFormat;
-import java.time.ZoneId;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.TimeZone;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.util.ObjectUtils;
-import org.zhongzheng.common.utils.Exceptions;
-import org.xupeng.common.utils.StringUtil;
-import org.springframework.lang.Nullable;
-
-public class JsonUtil {
-    private static final Logger log = LoggerFactory.getLogger(JsonUtil.class);
-
-    public JsonUtil() {
-    }
-
-    public static <T> String toJson(T value) {
-        try {
-            return getInstance().writeValueAsString(value);
-        } catch (Exception var2) {
-            log.error(var2.getMessage(), var2);
-            return null;
-        }
-    }
-
-    public static byte[] toJsonAsBytes(Object object) {
-        try {
-            return getInstance().writeValueAsBytes(object);
-        } catch (JsonProcessingException var2) {
-            throw Exceptions.unchecked(var2);
-        }
-    }
-
-    public static <T> T parse(String content, Class<T> valueType) {
-        try {
-            return getInstance().readValue(content, valueType);
-        } catch (Exception var3) {
-            log.error(var3.getMessage(), var3);
-            return null;
-        }
-    }
-
-    public static <T> T parse(String content, TypeReference<T> typeReference) {
-        try {
-            return getInstance().readValue(content, typeReference);
-        } catch (IOException var3) {
-            throw Exceptions.unchecked(var3);
-        }
-    }
-
-    public static <T> T parse(byte[] bytes, Class<T> valueType) {
-        try {
-            return getInstance().readValue(bytes, valueType);
-        } catch (IOException var3) {
-            throw Exceptions.unchecked(var3);
-        }
-    }
-
-    public static <T> T parse(byte[] bytes, TypeReference<T> typeReference) {
-        try {
-            return getInstance().readValue(bytes, typeReference);
-        } catch (IOException var3) {
-            throw Exceptions.unchecked(var3);
-        }
-    }
-
-    public static <T> T parse(InputStream in, Class<T> valueType) {
-        try {
-            return getInstance().readValue(in, valueType);
-        } catch (IOException var3) {
-            throw Exceptions.unchecked(var3);
-        }
-    }
-
-    public static <T> T parse(InputStream in, TypeReference<T> typeReference) {
-        try {
-            return getInstance().readValue(in, typeReference);
-        } catch (IOException var3) {
-            throw Exceptions.unchecked(var3);
-        }
-    }
-
-    public static <T> List<T> parseArray(String content, Class<T> valueTypeRef) {
-        try {
-            if (!StringUtil.startsWithIgnoreCase(content, "[")) {
-                content = "[" + content + "]";
-            }
-
-            List<Map<String, Object>> list = (List)getInstance().readValue(content, new TypeReference<List<Map<String, Object>>>() {
-            });
-            List<T> result = new ArrayList();
-            Iterator var4 = list.iterator();
-
-            while(var4.hasNext()) {
-                Map<String, Object> map = (Map)var4.next();
-                result.add(toPojo(map, valueTypeRef));
-            }
-
-            return result;
-        } catch (IOException var6) {
-            log.error(var6.getMessage(), var6);
-            return null;
-        }
-    }
-
-    public static Map<String, Object> toMap(String content) {
-        try {
-            return (Map)getInstance().readValue(content, Map.class);
-        } catch (IOException var2) {
-            log.error(var2.getMessage(), var2);
-            return null;
-        }
-    }
-
-    public static <T> Map<String, T> toMap(String content, Class<T> valueTypeRef) {
-        try {
-            Map<String, Map<String, Object>> map = (Map)getInstance().readValue(content, new TypeReference<Map<String, Map<String, Object>>>() {
-            });
-            Map<String, T> result = new HashMap(16);
-            Iterator var4 = map.entrySet().iterator();
-
-            while(var4.hasNext()) {
-                Map.Entry<String, Map<String, Object>> entry = (Map.Entry)var4.next();
-                result.put(entry.getKey(), toPojo((Map)entry.getValue(), valueTypeRef));
-            }
-
-            return result;
-        } catch (IOException var6) {
-            log.error(var6.getMessage(), var6);
-            return null;
-        }
-    }
-
-    public static <T> T toPojo(Map fromValue, Class<T> toValueType) {
-        return getInstance().convertValue(fromValue, toValueType);
-    }
-
-    public static JsonNode readTree(String jsonString) {
-        try {
-            return getInstance().readTree(jsonString);
-        } catch (IOException var2) {
-            throw Exceptions.unchecked(var2);
-        }
-    }
-
-    public static JsonNode readTree(InputStream in) {
-        try {
-            return getInstance().readTree(in);
-        } catch (IOException var2) {
-            throw Exceptions.unchecked(var2);
-        }
-    }
-
-    public static JsonNode readTree(byte[] content) {
-        try {
-            return getInstance().readTree(content);
-        } catch (IOException var2) {
-            throw Exceptions.unchecked(var2);
-        }
-    }
-
-    @Nullable
-    public static <T> T readValue(@Nullable byte[] content, Class<T> valueType) {
-        if (ObjectUtils.isEmpty(content)) {
-            return null;
-        } else {
-            try {
-                return getInstance().readValue(content, valueType);
-            } catch (IOException var3) {
-                throw Exceptions.unchecked(var3);
-            }
-        }
-    }
-
-    @Nullable
-    public static <T> T readValue(@Nullable String jsonString, Class<T> valueType) {
-        if (StringUtil.isBlank(jsonString)) {
-            return null;
-        } else {
-            try {
-                return getInstance().readValue(jsonString, valueType);
-            } catch (IOException var3) {
-                throw Exceptions.unchecked(var3);
-            }
-        }
-    }
-
-    @Nullable
-    public static <T> T readValue(@Nullable InputStream in, Class<T> valueType) {
-        if (in == null) {
-            return null;
-        } else {
-            try {
-                return getInstance().readValue(in, valueType);
-            } catch (IOException var3) {
-                throw Exceptions.unchecked(var3);
-            }
-        }
-    }
-
-    @Nullable
-    public static <T> T readValue(@Nullable byte[] content, TypeReference<T> typeReference) {
-        if (ObjectUtils.isEmpty(content)) {
-            return null;
-        } else {
-            try {
-                return getInstance().readValue(content, typeReference);
-            } catch (IOException var3) {
-                throw Exceptions.unchecked(var3);
-            }
-        }
-    }
-
-    @Nullable
-    public static <T> T readValue(@Nullable String jsonString, TypeReference<T> typeReference) {
-        if (StringUtil.isBlank(jsonString)) {
-            return null;
-        } else {
-            try {
-                return getInstance().readValue(jsonString, typeReference);
-            } catch (IOException var3) {
-                throw Exceptions.unchecked(var3);
-            }
-        }
-    }
-
-    @Nullable
-    public static <T> T readValue(@Nullable InputStream in, TypeReference<T> typeReference) {
-        if (in == null) {
-            return null;
-        } else {
-            try {
-                return getInstance().readValue(in, typeReference);
-            } catch (IOException var3) {
-                throw Exceptions.unchecked(var3);
-            }
-        }
-    }
-
-    public static JsonNode readTree(JsonParser jsonParser) {
-        try {
-            return (JsonNode)getInstance().readTree(jsonParser);
-        } catch (IOException var2) {
-            throw Exceptions.unchecked(var2);
-        }
-    }
-
-    public static ObjectMapper getInstance() {
-        return JsonUtil.JacksonHolder.INSTANCE;
-    }
-
-    public static class JacksonObjectMapper extends ObjectMapper {
-        private static final long serialVersionUID = 4288193147502386170L;
-        private static final Locale CHINA;
-
-        public JacksonObjectMapper() {
-            super.setLocale(CHINA);
-            super.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
-            super.setTimeZone(TimeZone.getTimeZone(ZoneId.systemDefault()));
-            super.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.CHINA));
-            super.configure(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS.mappedFeature(), true);
-            super.configure(JsonReadFeature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER.mappedFeature(), true);
-            super.findAndRegisterModules();
-            super.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false);
-            super.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
-            super.configure(Feature.ALLOW_SINGLE_QUOTES, true);
-            super.getDeserializationConfig().withoutFeatures(new DeserializationFeature[]{DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES});
-            super.registerModule(new ZhongZhengJavaTimeModule());
-            super.findAndRegisterModules();
-        }
-
-        public ObjectMapper copy() {
-            return super.copy();
-        }
-
-        static {
-            CHINA = Locale.CHINA;
-        }
-    }
-
-    private static class JacksonHolder {
-        private static ObjectMapper INSTANCE = new JacksonObjectMapper();
-
-        private JacksonHolder() {
-        }
-    }
-}
-

+ 0 - 102
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Kv.java

@@ -1,102 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.sql.Time;
-import java.sql.Timestamp;
-import java.util.Date;
-import java.util.HashMap;
-import org.zhongzheng.common.utils.Func;
-import org.springframework.util.LinkedCaseInsensitiveMap;
-
-public class Kv extends LinkedCaseInsensitiveMap<Object> {
-    private Kv() {
-    }
-
-    public static Kv init() {
-        return new Kv();
-    }
-
-    public static Kv create() {
-        return new Kv();
-    }
-
-    public static <K, V> HashMap<K, V> newMap() {
-        return new HashMap(16);
-    }
-
-    public Kv set(String attr, Object value) {
-        this.put(attr, value);
-        return this;
-    }
-
-    public Kv setIgnoreNull(String attr, Object value) {
-        if (null != attr && null != value) {
-            this.set(attr, value);
-        }
-
-        return this;
-    }
-
-    public Object getObj(String key) {
-        return super.get(key);
-    }
-
-    public <T> T get(String attr, T defaultValue) {
-        Object result = this.get(attr);
-        return result != null ? (T)result : defaultValue;
-    }
-
-    public String getStr(String attr) {
-        return Func.toStr(this.get(attr), (String)null);
-    }
-
-    public Integer getInt(String attr) {
-        return Func.toInt(this.get(attr), -1);
-    }
-
-    public Long getLong(String attr) {
-        return Func.toLong(this.get(attr), -1L);
-    }
-
-    public Float getFloat(String attr) {
-        return Func.toFloat(this.get(attr), (Float)null);
-    }
-
-    public Double getDouble(String attr) {
-        return Func.toDouble(this.get(attr), (Double)null);
-    }
-
-    public Boolean getBool(String attr) {
-        return Func.toBoolean(this.get(attr), (Boolean)null);
-    }
-
-    public byte[] getBytes(String attr) {
-        return (byte[])this.get(attr, (Object)null);
-    }
-
-    public Date getDate(String attr) {
-        return (Date)this.get(attr, (Object)null);
-    }
-
-    public Time getTime(String attr) {
-        return (Time)this.get(attr, (Object)null);
-    }
-
-    public Timestamp getTimestamp(String attr) {
-        return (Timestamp)this.get(attr, (Object)null);
-    }
-
-    public Number getNumber(String attr) {
-        return (Number)this.get(attr, (Object)null);
-    }
-
-    public Kv clone() {
-        Kv clone = new Kv();
-        clone.putAll(this);
-        return clone;
-    }
-}

+ 158 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/R.java

@@ -0,0 +1,158 @@
+package org.zhongzheng.common.utils;
+
+//
+// Source code recreated from a .class file by IntelliJ IDEA
+// (powered by FernFlower decompiler)
+//
+
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import java.io.Serializable;
+import java.util.Optional;
+import org.springframework.util.ObjectUtils;
+import org.springframework.lang.Nullable;
+import org.zhongzheng.common.utils.impl.ResultCode;
+
+@ApiModel(
+        description = "返回信息"
+)
+public class R<T> implements Serializable {
+    private static final long serialVersionUID = 1L;
+    @ApiModelProperty(
+            value = "状态码",
+            required = true
+    )
+    private int code;
+    @ApiModelProperty(
+            value = "是否成功",
+            required = true
+    )
+    private boolean success;
+    @ApiModelProperty("承载数据")
+    private T data;
+    @ApiModelProperty(
+            value = "返回消息",
+            required = true
+    )
+    private String msg;
+
+    private R(IResultCode resultCode) {
+        this(resultCode.getCode(),  resultCode.getMessage());
+    }
+
+    private R(IResultCode resultCode, T data) {
+        this(resultCode, data, resultCode.getMessage());
+    }
+
+    private R(IResultCode resultCode, T data, String msg) {
+        this(resultCode.getCode(), data, msg);
+    }
+
+    private R(int code,  String msg) {
+        this.code = code;
+        this.data = null;
+        this.msg = msg;
+        this.success = ResultCode.SUCCESS.code == code;
+    }
+
+    private R(int code, T data, String msg) {
+        this.code = code;
+        this.data = data;
+        this.msg = msg;
+        this.success = ResultCode.SUCCESS.code == code;
+    }
+
+    public static boolean isSuccess(@Nullable R<?> result) {
+        return (Boolean)Optional.ofNullable(result).map((x) -> {
+            return ObjectUtils.nullSafeEquals(ResultCode.SUCCESS.code, x.code);
+        }).orElse(Boolean.FALSE);
+    }
+
+    public static boolean isNotSuccess(@Nullable R<?> result) {
+        return !isSuccess(result);
+    }
+
+    public static <T> R<T> data(T data) {
+        return data(data, "操作成功");
+    }
+
+    public static <T> R<T> data(T data, String msg) {
+        return data(200, data, msg);
+    }
+
+    public static <T> R<T> data(int code, T data, String msg) {
+        return new R(code, data, data == null ? "暂无承载数据" : msg);
+    }
+
+    public static <T> R<T> success(String msg) {
+        return new R(ResultCode.SUCCESS, msg);
+    }
+
+    public static <T> R<T> success(IResultCode resultCode) {
+        return new R(resultCode);
+    }
+
+    public static <T> R<T> success(IResultCode resultCode, String msg) {
+        return new R(resultCode, msg);
+    }
+
+    public static <T> R<T> fail(String msg) {
+        return new R(ResultCode.FAILURE, msg);
+    }
+
+    public static <T> R<T> fail(int code, String msg) {
+        return new R(code, (Object)null, msg);
+    }
+
+    public static <T> R<T> fail(IResultCode resultCode) {
+        return new R(resultCode);
+    }
+
+    public static <T> R<T> fail(IResultCode resultCode, String msg) {
+        return new R(resultCode, msg);
+    }
+
+    public static <T> R<T> status(boolean flag) {
+        return flag ? success("操作成功") : fail("操作失败");
+    }
+
+    public int getCode() {
+        return this.code;
+    }
+
+    public boolean isSuccess() {
+        return this.success;
+    }
+
+    public T getData() {
+        return this.data;
+    }
+
+    public String getMsg() {
+        return this.msg;
+    }
+
+    public void setCode(final int code) {
+        this.code = code;
+    }
+
+    public void setSuccess(final boolean success) {
+        this.success = success;
+    }
+
+    public void setData(final T data) {
+        this.data = data;
+    }
+
+    public void setMsg(final String msg) {
+        this.msg = msg;
+    }
+
+    public String toString() {
+        return "R(code=" + this.getCode() + ", success=" + this.isSuccess() + ", data=" + this.getData() + ", msg=" + this.getMsg() + ")";
+    }
+
+    public R() {
+    }
+}

+ 159 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/ServletUtils.java

@@ -0,0 +1,159 @@
+package org.zhongzheng.common.utils;
+
+import cn.hutool.core.convert.Convert;
+import cn.hutool.core.util.StrUtil;
+import org.springframework.web.context.request.RequestAttributes;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.IOException;
+
+/**
+ * 客户端工具类
+ *
+ * @author zhongzheng
+ */
+public class ServletUtils
+{
+    public static HttpServletRequest httpServletRequest;
+    /**
+     * 获取模块编码参数
+     */
+    public static String getEncoded(String tag)
+    {
+        String time = String.valueOf(System.currentTimeMillis());
+        return tag+Long.valueOf(time.substring(1));
+    }
+    //导入生成编号使用
+    public static String getImportEncoded(String tag)
+    {
+        String time = String.valueOf(System.currentTimeMillis()/1000);
+        return tag+Integer.valueOf(time.substring(2))+(int)((Math.random()*100));
+    }
+    /**
+     * 获取String参数
+     */
+    public static String getParameter(String name)
+    {
+        return getRequest().getParameter(name);
+    }
+
+    /**
+     * 获取String参数
+     */
+    public static String getParameter(String name, String defaultValue)
+    {
+        return Convert.toStr(getRequest().getParameter(name), defaultValue);
+    }
+
+    /**
+     * 获取Integer参数
+     */
+    public static Integer getParameterToInt(String name)
+    {
+        return Convert.toInt(getRequest().getParameter(name));
+    }
+
+    /**
+     * 获取Integer参数
+     */
+    public static Integer getParameterToInt(String name, Integer defaultValue)
+    {
+        return Convert.toInt(getRequest().getParameter(name), defaultValue);
+    }
+
+    /**
+     * 获取request
+     */
+    public static HttpServletRequest getRequest()
+    {
+        if(getRequestAttributes()!=null){
+            return getRequestAttributes().getRequest();
+        }else{
+            return httpServletRequest;
+        }
+
+    }
+
+
+    /**
+     * 获取response
+     */
+    public static HttpServletResponse getResponse()
+    {
+        return getRequestAttributes().getResponse();
+    }
+
+    /**
+     * 获取session
+     */
+    public static HttpSession getSession()
+    {
+        return getRequest().getSession();
+    }
+
+    public static ServletRequestAttributes getRequestAttributes()
+    {
+        RequestAttributes attributes = RequestContextHolder.getRequestAttributes();
+        return (ServletRequestAttributes) attributes;
+    }
+
+    /**
+     * 将字符串渲染到客户端
+     *
+     * @param response 渲染对象
+     * @param string 待渲染的字符串
+     * @return null
+     */
+    public static String renderString(HttpServletResponse response, String string)
+    {
+        try
+        {
+            response.setStatus(200);
+            response.setContentType("application/json");
+            response.setCharacterEncoding("utf-8");
+            response.getWriter().print(string);
+        }
+        catch (IOException e)
+        {
+            e.printStackTrace();
+        }
+        return null;
+    }
+
+    /**
+     * 是否是Ajax异步请求
+     *
+     * @param request
+     */
+    public static boolean isAjaxRequest(HttpServletRequest request)
+    {
+        String accept = request.getHeader("accept");
+        if (accept != null && accept.indexOf("application/json") != -1)
+        {
+            return true;
+        }
+
+        String xRequestedWith = request.getHeader("X-Requested-With");
+        if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1)
+        {
+            return true;
+        }
+
+        String uri = request.getRequestURI();
+        if (StrUtil.equalsAnyIgnoreCase(uri, ".json", ".xml"))
+        {
+            return true;
+        }
+
+        String ajax = request.getParameter("__ajax");
+        if (StrUtil.equalsAnyIgnoreCase(ajax, "json", "xml"))
+        {
+            return true;
+        }
+        return false;
+    }
+}

+ 128 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/SnowflakeIdUtils.java

@@ -0,0 +1,128 @@
+package org.zhongzheng.common.utils;
+
+public class SnowflakeIdUtils {
+    // ==============================Fields===========================================
+    /** 开始时间截 (2015-01-01) */
+    private final long twepoch = 1420041600000L;
+
+    /** 机器id所占的位数 */
+    private final long workerIdBits = 5L;
+
+    /** 数据标识id所占的位数 */
+    private final long datacenterIdBits = 5L;
+
+    /** 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数) */
+    private final long maxWorkerId = -1L ^ (-1L << workerIdBits);
+
+    /** 支持的最大数据标识id,结果是31 */
+    private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits);
+
+    /** 序列在id中占的位数 */
+    private final long sequenceBits = 12L;
+
+    /** 机器ID向左移12位 */
+    private final long workerIdShift = sequenceBits;
+
+    /** 数据标识id向左移17位(12+5) */
+    private final long datacenterIdShift = sequenceBits + workerIdBits;
+
+    /** 时间截向左移22位(5+5+12) */
+    private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits;
+
+    /** 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095) */
+    private final long sequenceMask = -1L ^ (-1L << sequenceBits);
+
+    /** 工作机器ID(0~31) */
+    private long workerId;
+
+    /** 数据中心ID(0~31) */
+    private long datacenterId;
+
+    /** 毫秒内序列(0~4095) */
+    private long sequence = 0L;
+
+    /** 上次生成ID的时间截 */
+    private long lastTimestamp = -1L;
+
+    //==============================Constructors=====================================
+    /**
+     * 构造函数
+     * @param workerId 工作ID (0~31)
+     * @param datacenterId 数据中心ID (0~31)
+     */
+    public SnowflakeIdUtils(long workerId, long datacenterId) {
+        if (workerId > maxWorkerId || workerId < 0) {
+            throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId));
+        }
+        if (datacenterId > maxDatacenterId || datacenterId < 0) {
+            throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId));
+        }
+        this.workerId = workerId;
+        this.datacenterId = datacenterId;
+    }
+
+    // ==============================Methods==========================================
+    /**
+     * 获得下一个ID (该方法是线程安全的)
+     * @return SnowflakeId
+     */
+    public synchronized long nextId() {
+        long timestamp = timeGen();
+
+        //如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常
+        if (timestamp < lastTimestamp) {
+            throw new RuntimeException(
+                    String.format("Clock moved backwards.  Refusing to generate id for %d milliseconds", lastTimestamp - timestamp));
+        }
+
+        //如果是同一时间生成的,则进行毫秒内序列
+        if (lastTimestamp == timestamp) {
+            sequence = (sequence + 1) & sequenceMask;
+            //毫秒内序列溢出
+            if (sequence == 0) {
+                //阻塞到下一个毫秒,获得新的时间戳
+                timestamp = tilNextMillis(lastTimestamp);
+            }
+        }
+        //时间戳改变,毫秒内序列重置
+        else {
+            sequence = 0L;
+        }
+
+        //上次生成ID的时间截
+        lastTimestamp = timestamp;
+
+        //移位并通过或运算拼到一起组成64位的ID
+        return ((timestamp - twepoch) << timestampLeftShift) //
+                | (datacenterId << datacenterIdShift) //
+                | (workerId << workerIdShift) //
+                | sequence;
+    }
+
+    /**
+     * 阻塞到下一个毫秒,直到获得新的时间戳
+     * @param lastTimestamp 上次生成ID的时间截
+     * @return 当前时间戳
+     */
+    protected long tilNextMillis(long lastTimestamp) {
+        long timestamp = timeGen();
+        while (timestamp <= lastTimestamp) {
+            timestamp = timeGen();
+        }
+        return timestamp;
+    }
+
+    /**
+     * 返回以毫秒为单位的当前时间
+     * @return 当前时间(毫秒)
+     */
+    protected long timeGen() {
+        return System.currentTimeMillis();
+    }
+
+
+
+
+
+
+}

+ 0 - 56
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/StrFormatter.java

@@ -1,56 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import org.zhongzheng.common.utils.Func;
-
-public class StrFormatter {
-    public StrFormatter() {
-    }
-
-    public static String format(final String strPattern, final Object... argArray) {
-        if (!Func.isBlank(strPattern) && !Func.isEmpty(argArray)) {
-            int strPatternLength = strPattern.length();
-            StringBuilder sbuf = new StringBuilder(strPatternLength + 50);
-            int handledPosition = 0;
-
-            for(int argIndex = 0; argIndex < argArray.length; ++argIndex) {
-                int delimIndex = strPattern.indexOf("{}", handledPosition);
-                if (delimIndex == -1) {
-                    if (handledPosition == 0) {
-                        return strPattern;
-                    }
-
-                    sbuf.append(strPattern, handledPosition, strPatternLength);
-                    return sbuf.toString();
-                }
-
-                if (delimIndex > 0 && strPattern.charAt(delimIndex - 1) == '\\') {
-                    if (delimIndex > 1 && strPattern.charAt(delimIndex - 2) == '\\') {
-                        sbuf.append(strPattern, handledPosition, delimIndex - 1);
-                        sbuf.append(Func.toStr(argArray[argIndex]));
-                        handledPosition = delimIndex + 2;
-                    } else {
-                        --argIndex;
-                        sbuf.append(strPattern, handledPosition, delimIndex - 1);
-                        sbuf.append("{");
-                        handledPosition = delimIndex + 1;
-                    }
-                } else {
-                    sbuf.append(strPattern, handledPosition, delimIndex);
-                    sbuf.append(Func.toStr(argArray[argIndex]));
-                    handledPosition = delimIndex + 2;
-                }
-            }
-
-            sbuf.append(strPattern, handledPosition, strPattern.length());
-            return sbuf.toString();
-        } else {
-            return strPattern;
-        }
-    }
-}

+ 0 - 238
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/StrSpliter.java

@@ -1,238 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.zhongzheng.common.utils.Func;
-import org.zhongzheng.common.utils.StringUtil;
-
-public class StrSpliter {
-    public StrSpliter() {
-    }
-
-    public static List<String> splitPath(String str) {
-        return splitPath(str, 0);
-    }
-
-    public static String[] splitPathToArray(String str) {
-        return toArray(splitPath(str));
-    }
-
-    public static List<String> splitPath(String str, int limit) {
-        return split(str, "/", limit, true, true);
-    }
-
-    public static String[] splitPathToArray(String str, int limit) {
-        return toArray(splitPath(str, limit));
-    }
-
-    public static List<String> splitTrim(String str, char separator, boolean ignoreEmpty) {
-        return split(str, separator, 0, true, ignoreEmpty);
-    }
-
-    public static List<String> split(String str, char separator, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, 0, isTrim, ignoreEmpty);
-    }
-
-    public static List<String> splitTrim(String str, char separator, int limit, boolean ignoreEmpty) {
-        return split(str, separator, limit, true, ignoreEmpty, false);
-    }
-
-    public static List<String> split(String str, char separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, limit, isTrim, ignoreEmpty, false);
-    }
-
-    public static List<String> splitIgnoreCase(String str, char separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, limit, isTrim, ignoreEmpty, true);
-    }
-
-    public static List<String> split(String str, char separator, int limit, boolean isTrim, boolean ignoreEmpty, boolean ignoreCase) {
-        if (StringUtil.isEmpty(str)) {
-            return new ArrayList(0);
-        } else if (limit == 1) {
-            return addToList(new ArrayList(1), str, isTrim, ignoreEmpty);
-        } else {
-            ArrayList<String> list = new ArrayList(limit > 0 ? limit : 16);
-            int len = str.length();
-            int start = 0;
-
-            for(int i = 0; i < len; ++i) {
-                if (Func.equals(separator, str.charAt(i))) {
-                    addToList(list, str.substring(start, i), isTrim, ignoreEmpty);
-                    start = i + 1;
-                    if (limit > 0 && list.size() > limit - 2) {
-                        break;
-                    }
-                }
-            }
-
-            return addToList(list, str.substring(start, len), isTrim, ignoreEmpty);
-        }
-    }
-
-    public static String[] splitToArray(String str, char separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return toArray(split(str, separator, limit, isTrim, ignoreEmpty));
-    }
-
-    public static List<String> split(String str, String separator, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, -1, isTrim, ignoreEmpty, false);
-    }
-
-    public static List<String> splitTrim(String str, String separator, boolean ignoreEmpty) {
-        return split(str, separator, true, ignoreEmpty);
-    }
-
-    public static List<String> split(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, limit, isTrim, ignoreEmpty, false);
-    }
-
-    public static List<String> splitTrim(String str, String separator, int limit, boolean ignoreEmpty) {
-        return split(str, separator, limit, true, ignoreEmpty);
-    }
-
-    public static List<String> splitIgnoreCase(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, limit, isTrim, ignoreEmpty, true);
-    }
-
-    public static List<String> splitTrimIgnoreCase(String str, String separator, int limit, boolean ignoreEmpty) {
-        return split(str, separator, limit, true, ignoreEmpty, true);
-    }
-
-    public static List<String> split(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty, boolean ignoreCase) {
-        if (StringUtil.isEmpty(str)) {
-            return new ArrayList(0);
-        } else if (limit == 1) {
-            return addToList(new ArrayList(1), str, isTrim, ignoreEmpty);
-        } else if (StringUtil.isEmpty(separator)) {
-            return split(str, limit);
-        } else if (separator.length() == 1) {
-            return split(str, separator.charAt(0), limit, isTrim, ignoreEmpty, ignoreCase);
-        } else {
-            ArrayList<String> list = new ArrayList();
-            int len = str.length();
-            int separatorLen = separator.length();
-            int start = 0;
-            int i = 0;
-
-            while(i < len) {
-                i = StringUtil.indexOf(str, separator, start, ignoreCase);
-                if (i <= -1) {
-                    break;
-                }
-
-                addToList(list, str.substring(start, i), isTrim, ignoreEmpty);
-                start = i + separatorLen;
-                if (limit > 0 && list.size() > limit - 2) {
-                    break;
-                }
-            }
-
-            return addToList(list, str.substring(start, len), isTrim, ignoreEmpty);
-        }
-    }
-
-    public static String[] splitToArray(String str, String separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return toArray(split(str, separator, limit, isTrim, ignoreEmpty));
-    }
-
-    public static List<String> split(String str, int limit) {
-        if (StringUtil.isEmpty(str)) {
-            return new ArrayList(0);
-        } else if (limit == 1) {
-            return addToList(new ArrayList(1), str, true, true);
-        } else {
-            ArrayList<String> list = new ArrayList();
-            int len = str.length();
-            int start = 0;
-
-            for(int i = 0; i < len; ++i) {
-                if (Func.isEmpty(str.charAt(i))) {
-                    addToList(list, str.substring(start, i), true, true);
-                    start = i + 1;
-                    if (limit > 0 && list.size() > limit - 2) {
-                        break;
-                    }
-                }
-            }
-
-            return addToList(list, str.substring(start, len), true, true);
-        }
-    }
-
-    public static String[] splitToArray(String str, int limit) {
-        return toArray(split(str, limit));
-    }
-
-    public static List<String> split(String str, Pattern separatorPattern, int limit, boolean isTrim, boolean ignoreEmpty) {
-        if (StringUtil.isEmpty(str)) {
-            return new ArrayList(0);
-        } else if (limit == 1) {
-            return addToList(new ArrayList(1), str, isTrim, ignoreEmpty);
-        } else if (null == separatorPattern) {
-            return split(str, limit);
-        } else {
-            Matcher matcher = separatorPattern.matcher(str);
-            ArrayList<String> list = new ArrayList();
-            int len = str.length();
-            int start = 0;
-
-            while(matcher.find()) {
-                addToList(list, str.substring(start, matcher.start()), isTrim, ignoreEmpty);
-                start = matcher.end();
-                if (limit > 0 && list.size() > limit - 2) {
-                    break;
-                }
-            }
-
-            return addToList(list, str.substring(start, len), isTrim, ignoreEmpty);
-        }
-    }
-
-    public static String[] splitToArray(String str, Pattern separatorPattern, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return toArray(split(str, separatorPattern, limit, isTrim, ignoreEmpty));
-    }
-
-    public static String[] splitByLength(String str, int len) {
-        int partCount = str.length() / len;
-        int lastPartCount = str.length() % len;
-        int fixPart = 0;
-        if (lastPartCount != 0) {
-            fixPart = 1;
-        }
-
-        String[] strs = new String[partCount + fixPart];
-
-        for(int i = 0; i < partCount + fixPart; ++i) {
-            if (i == partCount + fixPart - 1 && lastPartCount != 0) {
-                strs[i] = str.substring(i * len, i * len + lastPartCount);
-            } else {
-                strs[i] = str.substring(i * len, i * len + len);
-            }
-        }
-
-        return strs;
-    }
-
-    private static List<String> addToList(List<String> list, String part, boolean isTrim, boolean ignoreEmpty) {
-        part = part.toString();
-        if (isTrim) {
-            part = part.trim();
-        }
-
-        if (!ignoreEmpty || !part.isEmpty()) {
-            list.add(part);
-        }
-
-        return list;
-    }
-
-    private static String[] toArray(List<String> list) {
-        return (String[])list.toArray(new String[list.size()]);
-    }
-}

+ 0 - 741
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/StringUtil.java

@@ -1,741 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.UUID;
-import java.util.concurrent.ThreadLocalRandom;
-import java.util.stream.Stream;
-
-import org.springframework.util.ObjectUtils;
-import org.zhongzheng.common.utils.StrFormatter;
-import org.xupeng.common.utils.StrSpliter;
-import org.springframework.lang.Nullable;
-import org.springframework.util.Assert;
-import org.springframework.util.StringUtils;
-import org.springframework.web.util.HtmlUtils;
-
-public class StringUtil extends StringUtils {
-    public static final int INDEX_NOT_FOUND = -1;
-    private static final String S_INT = "0123456789";
-    private static final String S_STR = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-    private static final String S_ALL = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
-
-    public StringUtil() {
-    }
-
-    public static boolean isBlank(final CharSequence cs) {
-        return !hasText(cs);
-    }
-
-    public static boolean isNotBlank(final CharSequence cs) {
-        return hasText(cs);
-    }
-
-    public static boolean isAnyBlank(final CharSequence... css) {
-        return ObjectUtils.isEmpty(css) ? true : Stream.of(css).anyMatch(StringUtil::isBlank);
-    }
-
-    public static boolean isNoneBlank(final CharSequence... css) {
-        return ObjectUtils.isEmpty(css) ? false : Stream.of(css).allMatch(StringUtil::isNotBlank);
-    }
-
-    public static boolean isNumeric(final CharSequence cs) {
-        if (isBlank(cs)) {
-            return false;
-        } else {
-            int i = cs.length();
-
-            char chr;
-            do {
-                --i;
-                if (i < 0) {
-                    return true;
-                }
-
-                chr = cs.charAt(i);
-            } while(chr >= '0' && chr <= '9');
-
-            return false;
-        }
-    }
-
-    public static String join(Collection<?> coll) {
-        return collectionToCommaDelimitedString(coll);
-    }
-
-    public static String join(Collection<?> coll, String delim) {
-        return collectionToDelimitedString(coll, delim);
-    }
-
-    public static String join(Object[] arr) {
-        return arrayToCommaDelimitedString(arr);
-    }
-
-    public static String join(Object[] arr, String delim) {
-        return arrayToDelimitedString(arr, delim);
-    }
-
-    public static String randomUUID() {
-        ThreadLocalRandom random = ThreadLocalRandom.current();
-        return (new UUID(random.nextLong(), random.nextLong())).toString().replace("-", "");
-    }
-
-    public static String escapeHtml(String html) {
-        return isBlank(html) ? "" : HtmlUtils.htmlEscape(html);
-    }
-
-    public static String cleanChars(String txt) {
-        return txt.replaceAll("[  `·•�\u0001\\f\\t\\v\\s]", "");
-    }
-
-    public static String random(int count) {
-        return random(count, RandomType.ALL);
-    }
-
-    public static String random(int count, RandomType randomType) {
-        if (count == 0) {
-            return "";
-        } else {
-            Assert.isTrue(count > 0, "Requested random string length " + count + " is less than 0.");
-            ThreadLocalRandom random = ThreadLocalRandom.current();
-            char[] buffer = new char[count];
-
-            for(int i = 0; i < count; ++i) {
-                if (RandomType.INT == randomType) {
-                    buffer[i] = "0123456789".charAt(random.nextInt("0123456789".length()));
-                } else if (RandomType.STRING == randomType) {
-                    buffer[i] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".charAt(random.nextInt("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".length()));
-                } else {
-                    buffer[i] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".charAt(random.nextInt("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".length()));
-                }
-            }
-
-            return new String(buffer);
-        }
-    }
-
-    public static String format(CharSequence template, Object... params) {
-        if (null == template) {
-            return null;
-        } else {
-            return !Func.isEmpty(params) && !isBlank(template) ? StrFormatter.format(template.toString(), params) : template.toString();
-        }
-    }
-
-    public static String indexedFormat(CharSequence pattern, Object... arguments) {
-        return MessageFormat.format(pattern.toString(), arguments);
-    }
-
-    public static String format(CharSequence template, Map<?, ?> map) {
-        if (null == template) {
-            return null;
-        } else if (null != map && !map.isEmpty()) {
-            String template2 = template.toString();
-
-            Map.Entry entry;
-            for(Iterator var3 = map.entrySet().iterator(); var3.hasNext(); template2 = template2.replace("{" + entry.getKey() + "}", Func.toStr(entry.getValue()))) {
-                entry = (Map.Entry)var3.next();
-            }
-
-            return template2;
-        } else {
-            return template.toString();
-        }
-    }
-
-    @Nullable
-    public static String cleanIdentifier(@Nullable String param) {
-        if (param == null) {
-            return null;
-        } else {
-            StringBuilder paramBuilder = new StringBuilder();
-
-            for(int i = 0; i < param.length(); ++i) {
-                char c = param.charAt(i);
-                if (Character.isJavaIdentifierPart(c)) {
-                    paramBuilder.append(c);
-                }
-            }
-
-            return paramBuilder.toString();
-        }
-    }
-
-    public static List<String> split(CharSequence str, char separator, int limit) {
-        return split(str, separator, limit, false, false);
-    }
-
-    public static List<String> splitTrim(CharSequence str, char separator) {
-        return splitTrim(str, separator, -1);
-    }
-
-    public static List<String> splitTrim(CharSequence str, CharSequence separator) {
-        return splitTrim(str, separator, -1);
-    }
-
-    public static List<String> splitTrim(CharSequence str, char separator, int limit) {
-        return split(str, separator, limit, true, true);
-    }
-
-    public static List<String> splitTrim(CharSequence str, CharSequence separator, int limit) {
-        return split(str, separator, limit, true, true);
-    }
-
-    public static List<String> split(CharSequence str, char separator, boolean isTrim, boolean ignoreEmpty) {
-        return split(str, separator, 0, isTrim, ignoreEmpty);
-    }
-
-    public static List<String> split(CharSequence str, char separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        return (List)(null == str ? new ArrayList(0) : StrSpliter.split(str.toString(), separator, limit, isTrim, ignoreEmpty));
-    }
-
-    public static List<String> split(CharSequence str, CharSequence separator, int limit, boolean isTrim, boolean ignoreEmpty) {
-        if (null == str) {
-            return new ArrayList(0);
-        } else {
-            String separatorStr = null == separator ? null : separator.toString();
-            return StrSpliter.split(str.toString(), separatorStr, limit, isTrim, ignoreEmpty);
-        }
-    }
-
-    public static String[] split(CharSequence str, CharSequence separator) {
-        if (str == null) {
-            return new String[0];
-        } else {
-            String separatorStr = null == separator ? null : separator.toString();
-            return StrSpliter.splitToArray(str.toString(), separatorStr, 0, false, false);
-        }
-    }
-
-    public static String[] split(CharSequence str, int len) {
-        return null == str ? new String[0] : StrSpliter.splitByLength(str.toString(), len);
-    }
-
-    public static boolean contains(CharSequence str, char searchChar) {
-        return indexOf(str, searchChar) > -1;
-    }
-
-    public static boolean containsAny(CharSequence str, CharSequence... testStrs) {
-        return null != getContainsStr(str, testStrs);
-    }
-
-    public static String getContainsStr(CharSequence str, CharSequence... testStrs) {
-        if (!isEmpty(str) && !Func.isEmpty(testStrs)) {
-            CharSequence[] var2 = testStrs;
-            int var3 = testStrs.length;
-
-            for(int var4 = 0; var4 < var3; ++var4) {
-                CharSequence checkStr = var2[var4];
-                if (str.toString().contains(checkStr)) {
-                    return checkStr.toString();
-                }
-            }
-
-            return null;
-        } else {
-            return null;
-        }
-    }
-
-    public static boolean containsIgnoreCase(CharSequence str, CharSequence testStr) {
-        if (null == str) {
-            return null == testStr;
-        } else {
-            return str.toString().toLowerCase().contains(testStr.toString().toLowerCase());
-        }
-    }
-
-    public static boolean containsAnyIgnoreCase(CharSequence str, CharSequence... testStrs) {
-        return null != getContainsStrIgnoreCase(str, testStrs);
-    }
-
-    public static String getContainsStrIgnoreCase(CharSequence str, CharSequence... testStrs) {
-        if (!isEmpty(str) && !Func.isEmpty(testStrs)) {
-            CharSequence[] var2 = testStrs;
-            int var3 = testStrs.length;
-
-            for(int var4 = 0; var4 < var3; ++var4) {
-                CharSequence testStr = var2[var4];
-                if (containsIgnoreCase(str, testStr)) {
-                    return testStr.toString();
-                }
-            }
-
-            return null;
-        } else {
-            return null;
-        }
-    }
-
-    public static String sub(CharSequence str, int fromIndex, int toIndex) {
-        if (isEmpty(str)) {
-            return "";
-        } else {
-            int len = str.length();
-            if (fromIndex < 0) {
-                fromIndex += len;
-                if (fromIndex < 0) {
-                    fromIndex = 0;
-                }
-            } else if (fromIndex > len) {
-                fromIndex = len;
-            }
-
-            if (toIndex < 0) {
-                toIndex += len;
-                if (toIndex < 0) {
-                    toIndex = len;
-                }
-            } else if (toIndex > len) {
-                toIndex = len;
-            }
-
-            if (toIndex < fromIndex) {
-                int tmp = fromIndex;
-                fromIndex = toIndex;
-                toIndex = tmp;
-            }
-
-            return fromIndex == toIndex ? "" : str.toString().substring(fromIndex, toIndex);
-        }
-    }
-
-    public static String subBefore(CharSequence string, CharSequence separator, boolean isLastSeparator) {
-        if (!isEmpty(string) && separator != null) {
-            String str = string.toString();
-            String sep = separator.toString();
-            if (sep.isEmpty()) {
-                return "";
-            } else {
-                int pos = isLastSeparator ? str.lastIndexOf(sep) : str.indexOf(sep);
-                return pos == -1 ? str : str.substring(0, pos);
-            }
-        } else {
-            return null == string ? null : string.toString();
-        }
-    }
-
-    public static String subAfter(CharSequence string, CharSequence separator, boolean isLastSeparator) {
-        if (isEmpty(string)) {
-            return null == string ? null : string.toString();
-        } else if (separator == null) {
-            return "";
-        } else {
-            String str = string.toString();
-            String sep = separator.toString();
-            int pos = isLastSeparator ? str.lastIndexOf(sep) : str.indexOf(sep);
-            return pos == -1 ? "" : str.substring(pos + separator.length());
-        }
-    }
-
-    public static String subBetween(CharSequence str, CharSequence before, CharSequence after) {
-        if (str != null && before != null && after != null) {
-            String str2 = str.toString();
-            String before2 = before.toString();
-            String after2 = after.toString();
-            int start = str2.indexOf(before2);
-            if (start != -1) {
-                int end = str2.indexOf(after2, start + before2.length());
-                if (end != -1) {
-                    return str2.substring(start + before2.length(), end);
-                }
-            }
-
-            return null;
-        } else {
-            return null;
-        }
-    }
-
-    public static String subBetween(CharSequence str, CharSequence beforeAndAfter) {
-        return subBetween(str, beforeAndAfter, beforeAndAfter);
-    }
-
-    public static String removePrefix(CharSequence str, CharSequence prefix) {
-        if (!isEmpty(str) && !isEmpty(prefix)) {
-            String str2 = str.toString();
-            return str2.startsWith(prefix.toString()) ? subSuf(str2, prefix.length()) : str2;
-        } else {
-            return "";
-        }
-    }
-
-    public static String removePrefixIgnoreCase(CharSequence str, CharSequence prefix) {
-        if (!isEmpty(str) && !isEmpty(prefix)) {
-            String str2 = str.toString();
-            return str2.toLowerCase().startsWith(prefix.toString().toLowerCase()) ? subSuf(str2, prefix.length()) : str2;
-        } else {
-            return "";
-        }
-    }
-
-    public static String removeSuffix(CharSequence str, CharSequence suffix) {
-        if (!isEmpty(str) && !isEmpty(suffix)) {
-            String str2 = str.toString();
-            return str2.endsWith(suffix.toString()) ? subPre(str2, str2.length() - suffix.length()) : str2;
-        } else {
-            return "";
-        }
-    }
-
-    public static String removeSufAndLowerFirst(CharSequence str, CharSequence suffix) {
-        return lowerFirst(removeSuffix(str, suffix));
-    }
-
-    public static String removeSuffixIgnoreCase(CharSequence str, CharSequence suffix) {
-        if (!isEmpty(str) && !isEmpty(suffix)) {
-            String str2 = str.toString();
-            return str2.toLowerCase().endsWith(suffix.toString().toLowerCase()) ? subPre(str2, str2.length() - suffix.length()) : str2;
-        } else {
-            return "";
-        }
-    }
-
-    public static String lowerFirst(String str) {
-        char firstChar = str.charAt(0);
-        if (firstChar >= 'A' && firstChar <= 'Z') {
-            char[] arr = str.toCharArray();
-            arr[0] = (char)(arr[0] + 32);
-            return new String(arr);
-        } else {
-            return str;
-        }
-    }
-
-    public static String upperFirst(String str) {
-        char firstChar = str.charAt(0);
-        if (firstChar >= 'a' && firstChar <= 'z') {
-            char[] arr = str.toCharArray();
-            arr[0] = (char)(arr[0] - 32);
-            return new String(arr);
-        } else {
-            return str;
-        }
-    }
-
-    public static String subPre(CharSequence string, int toIndex) {
-        return sub(string, 0, toIndex);
-    }
-
-    public static String subSuf(CharSequence string, int fromIndex) {
-        return isEmpty(string) ? null : sub(string, fromIndex, string.length());
-    }
-
-    public static int indexOf(final CharSequence str, char searchChar) {
-        return indexOf(str, searchChar, 0);
-    }
-
-    public static int indexOf(final CharSequence str, char searchChar, int start) {
-        return str instanceof String ? ((String)str).indexOf(searchChar, start) : indexOf(str, searchChar, start, -1);
-    }
-
-    public static int indexOf(final CharSequence str, char searchChar, int start, int end) {
-        int len = str.length();
-        if (start < 0 || start > len) {
-            start = 0;
-        }
-
-        if (end > len || end < 0) {
-            end = len;
-        }
-
-        for(int i = start; i < end; ++i) {
-            if (str.charAt(i) == searchChar) {
-                return i;
-            }
-        }
-
-        return -1;
-    }
-
-    public static int indexOfIgnoreCase(final CharSequence str, final CharSequence searchStr) {
-        return indexOfIgnoreCase(str, searchStr, 0);
-    }
-
-    public static int indexOfIgnoreCase(final CharSequence str, final CharSequence searchStr, int fromIndex) {
-        return indexOf(str, searchStr, fromIndex, true);
-    }
-
-    public static int indexOf(final CharSequence str, CharSequence searchStr, int fromIndex, boolean ignoreCase) {
-        if (str != null && searchStr != null) {
-            if (fromIndex < 0) {
-                fromIndex = 0;
-            }
-
-            int endLimit = str.length() - searchStr.length() + 1;
-            if (fromIndex > endLimit) {
-                return -1;
-            } else if (searchStr.length() == 0) {
-                return fromIndex;
-            } else if (!ignoreCase) {
-                return str.toString().indexOf(searchStr.toString(), fromIndex);
-            } else {
-                for(int i = fromIndex; i < endLimit; ++i) {
-                    if (isSubEquals(str, i, searchStr, 0, searchStr.length(), true)) {
-                        return i;
-                    }
-                }
-
-                return -1;
-            }
-        } else {
-            return -1;
-        }
-    }
-
-    public static int lastIndexOfIgnoreCase(final CharSequence str, final CharSequence searchStr) {
-        return lastIndexOfIgnoreCase(str, searchStr, str.length());
-    }
-
-    public static int lastIndexOfIgnoreCase(final CharSequence str, final CharSequence searchStr, int fromIndex) {
-        return lastIndexOf(str, searchStr, fromIndex, true);
-    }
-
-    public static int lastIndexOf(final CharSequence str, final CharSequence searchStr, int fromIndex, boolean ignoreCase) {
-        if (str != null && searchStr != null) {
-            if (fromIndex < 0) {
-                fromIndex = 0;
-            }
-
-            fromIndex = Math.min(fromIndex, str.length());
-            if (searchStr.length() == 0) {
-                return fromIndex;
-            } else if (!ignoreCase) {
-                return str.toString().lastIndexOf(searchStr.toString(), fromIndex);
-            } else {
-                for(int i = fromIndex; i > 0; --i) {
-                    if (isSubEquals(str, i, searchStr, 0, searchStr.length(), true)) {
-                        return i;
-                    }
-                }
-
-                return -1;
-            }
-        } else {
-            return -1;
-        }
-    }
-
-    public static int ordinalIndexOf(String str, String searchStr, int ordinal) {
-        if (str != null && searchStr != null && ordinal > 0) {
-            if (searchStr.length() == 0) {
-                return 0;
-            } else {
-                int found = 0;
-                int index = -1;
-
-                do {
-                    index = str.indexOf(searchStr, index + 1);
-                    if (index < 0) {
-                        return index;
-                    }
-
-                    ++found;
-                } while(found < ordinal);
-
-                return index;
-            }
-        } else {
-            return -1;
-        }
-    }
-
-    public static boolean isSubEquals(CharSequence str1, int start1, CharSequence str2, int start2, int length, boolean ignoreCase) {
-        return null != str1 && null != str2 ? str1.toString().regionMatches(ignoreCase, start1, str2.toString(), start2, length) : false;
-    }
-
-    public static boolean equals(CharSequence str1, CharSequence str2) {
-        return equals(str1, str2, false);
-    }
-
-    public static boolean equalsIgnoreCase(CharSequence str1, CharSequence str2) {
-        return equals(str1, str2, true);
-    }
-
-    public static boolean equals(CharSequence str1, CharSequence str2, boolean ignoreCase) {
-        if (null == str1) {
-            return str2 == null;
-        } else if (null == str2) {
-            return false;
-        } else {
-            return ignoreCase ? str1.toString().equalsIgnoreCase(str2.toString()) : str1.equals(str2);
-        }
-    }
-
-    public static StringBuilder builder() {
-        return new StringBuilder();
-    }
-
-    public static StringBuilder builder(int capacity) {
-        return new StringBuilder(capacity);
-    }
-
-    public static StringBuilder builder(CharSequence... strs) {
-        StringBuilder sb = new StringBuilder();
-        CharSequence[] var2 = strs;
-        int var3 = strs.length;
-
-        for(int var4 = 0; var4 < var3; ++var4) {
-            CharSequence str = var2[var4];
-            sb.append(str);
-        }
-
-        return sb;
-    }
-
-    public static StringBuilder appendBuilder(StringBuilder sb, CharSequence... strs) {
-        CharSequence[] var2 = strs;
-        int var3 = strs.length;
-
-        for(int var4 = 0; var4 < var3; ++var4) {
-            CharSequence str = var2[var4];
-            sb.append(str);
-        }
-
-        return sb;
-    }
-
-    public static StringReader getReader(CharSequence str) {
-        return null == str ? null : new StringReader(str.toString());
-    }
-
-    public static StringWriter getWriter() {
-        return new StringWriter();
-    }
-
-    public static int count(CharSequence content, CharSequence strForSearch) {
-        if (!Func.hasEmpty(new Object[]{content, strForSearch}) && strForSearch.length() <= content.length()) {
-            int count = 0;
-            int idx = 0;
-            String content2 = content.toString();
-
-            for(String strForSearch2 = strForSearch.toString(); (idx = content2.indexOf(strForSearch2, idx)) > -1; idx += strForSearch.length()) {
-                ++count;
-            }
-
-            return count;
-        } else {
-            return 0;
-        }
-    }
-
-    public static int count(CharSequence content, char charForSearch) {
-        int count = 0;
-        if (isEmpty(content)) {
-            return 0;
-        } else {
-            int contentLength = content.length();
-
-            for(int i = 0; i < contentLength; ++i) {
-                if (charForSearch == content.charAt(i)) {
-                    ++count;
-                }
-            }
-
-            return count;
-        }
-    }
-
-    public static String underlineToHump(String para) {
-        StringBuilder result = new StringBuilder();
-        String[] a = para.split("_");
-        String[] var3 = a;
-        int var4 = a.length;
-
-        for(int var5 = 0; var5 < var4; ++var5) {
-            String s = var3[var5];
-            if (result.length() == 0) {
-                result.append(s.toLowerCase());
-            } else {
-                result.append(s.substring(0, 1).toUpperCase());
-                result.append(s.substring(1).toLowerCase());
-            }
-        }
-
-        return result.toString();
-    }
-
-    public static String humpToUnderline(String para) {
-        para = lowerFirst(para);
-        StringBuilder sb = new StringBuilder(para);
-        int temp = 0;
-
-        for(int i = 0; i < para.length(); ++i) {
-            if (Character.isUpperCase(para.charAt(i))) {
-                sb.insert(i + temp, "_");
-                ++temp;
-            }
-        }
-
-        return sb.toString().toLowerCase();
-    }
-
-    public static String lineToHump(String para) {
-        StringBuilder result = new StringBuilder();
-        String[] a = para.split("-");
-        String[] var3 = a;
-        int var4 = a.length;
-
-        for(int var5 = 0; var5 < var4; ++var5) {
-            String s = var3[var5];
-            if (result.length() == 0) {
-                result.append(s.toLowerCase());
-            } else {
-                result.append(s.substring(0, 1).toUpperCase());
-                result.append(s.substring(1).toLowerCase());
-            }
-        }
-
-        return result.toString();
-    }
-
-    public static String humpToLine(String para) {
-        para = lowerFirst(para);
-        StringBuilder sb = new StringBuilder(para);
-        int temp = 0;
-
-        for(int i = 0; i < para.length(); ++i) {
-            if (Character.isUpperCase(para.charAt(i))) {
-                sb.insert(i + temp, "-");
-                ++temp;
-            }
-        }
-
-        return sb.toString().toLowerCase();
-    }
-
-    public static String firstCharToLower(String str) {
-        char firstChar = str.charAt(0);
-        if (firstChar >= 'A' && firstChar <= 'Z') {
-            char[] arr = str.toCharArray();
-            arr[0] = (char)(arr[0] + 32);
-            return new String(arr);
-        } else {
-            return str;
-        }
-    }
-
-    public static String firstCharToUpper(String str) {
-        char firstChar = str.charAt(0);
-        if (firstChar >= 'a' && firstChar <= 'z') {
-            char[] arr = str.toCharArray();
-            arr[0] = (char)(arr[0] - 32);
-            return new String(arr);
-        } else {
-            return str;
-        }
-    }
-}
-

+ 73 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/TelPhoneUtils.java

@@ -0,0 +1,73 @@
+package org.zhongzheng.common.utils;
+
+import java.util.Random;
+
+/**
+ * 手机号码工具栏
+ *
+ * @author hjl
+ */
+public class TelPhoneUtils
+{
+    //中国移动
+    public static final String[] CHINA_MOBILE = {
+            "134", "135", "136", "137", "138", "139", "150", "151", "152", "157", "158", "159",
+            "182", "183", "184", "187", "188", "178", "147", "172", "198"
+    };
+    //中国联通
+    public static final String[] CHINA_UNICOM = {
+            "130", "131", "132", "145", "155", "156", "166", "171", "175", "176", "185", "186", "166"
+    };
+    //中国电信
+    public static final String[] CHINA_TELECOME = {
+            "133", "149", "153", "173", "177", "180", "181", "189", "199"
+    };
+
+    /**
+     * 生成手机号
+     */
+    public static String createMobile() {
+        StringBuilder sb = new StringBuilder();
+        Random random = new Random();
+        int op = random.nextInt(3);//随机运营商标志位
+        String mobileThree;//手机号前三位
+        int temp;
+        switch (op) {
+            case 0:
+                mobileThree = CHINA_MOBILE[random.nextInt(CHINA_MOBILE.length)];
+                break;
+            case 1:
+                mobileThree = CHINA_UNICOM[random.nextInt(CHINA_UNICOM.length)];
+                break;
+            case 2:
+                mobileThree = CHINA_TELECOME[random.nextInt(CHINA_TELECOME.length)];
+                break;
+            default:
+                mobileThree = "op标志位有误!";
+                break;
+        }
+        if (mobileThree.length() > 3) {
+            return mobileThree;
+        }
+        sb.append(mobileThree);
+        //生成手机号后8位
+        for (int i = 0; i < 8; i++) {
+            temp = random.nextInt(10);
+            sb.append(temp);
+        }
+        return sb.toString();
+    }
+
+
+
+    /**
+     * 隐藏手机号码
+     * @param tel
+     * @return
+     */
+    public static String hideTelPhone(String tel)
+    {
+        String phoneNumber = tel.replaceAll("(\\d{3})\\d{4}(\\d{4})","$1****$2");
+        return phoneNumber;
+    }
+}

+ 96 - 0
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/Threads.java

@@ -0,0 +1,96 @@
+package org.zhongzheng.common.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.concurrent.*;
+
+/**
+ * 线程相关工具类.
+ * 
+ * @author zhongzheng
+ */
+public class Threads
+{
+    private static final Logger logger = LoggerFactory.getLogger(Threads.class);
+
+    /**
+     * sleep等待,单位为毫秒
+     */
+    public static void sleep(long milliseconds)
+    {
+        try
+        {
+            Thread.sleep(milliseconds);
+        }
+        catch (InterruptedException e)
+        {
+            return;
+        }
+    }
+
+    /**
+     * 停止线程池
+     * 先使用shutdown, 停止接收新任务并尝试完成所有已存在任务.
+     * 如果超时, 则调用shutdownNow, 取消在workQueue中Pending的任务,并中断所有阻塞函数.
+     * 如果仍人超時,則強制退出.
+     * 另对在shutdown时线程本身被调用中断做了处理.
+     */
+    public static void shutdownAndAwaitTermination(ExecutorService pool)
+    {
+        if (pool != null && !pool.isShutdown())
+        {
+            pool.shutdown();
+            try
+            {
+                if (!pool.awaitTermination(120, TimeUnit.SECONDS))
+                {
+                    pool.shutdownNow();
+                    if (!pool.awaitTermination(120, TimeUnit.SECONDS))
+                    {
+                        logger.info("Pool did not terminate");
+                    }
+                }
+            }
+            catch (InterruptedException ie)
+            {
+                pool.shutdownNow();
+                Thread.currentThread().interrupt();
+            }
+        }
+    }
+
+    /**
+     * 打印线程异常信息
+     */
+    public static void printException(Runnable r, Throwable t)
+    {
+        if (t == null && r instanceof Future<?>)
+        {
+            try
+            {
+                Future<?> future = (Future<?>) r;
+                if (future.isDone())
+                {
+                    future.get();
+                }
+            }
+            catch (CancellationException ce)
+            {
+                t = ce;
+            }
+            catch (ExecutionException ee)
+            {
+                t = ee.getCause();
+            }
+            catch (InterruptedException ie)
+            {
+                Thread.currentThread().interrupt();
+            }
+        }
+        if (t != null)
+        {
+            logger.error(t.getMessage(), t);
+        }
+    }
+}

+ 0 - 269
zzbusiness-common/src/main/java/org/zhongzheng/common/utils/WebUtil.java

@@ -1,269 +0,0 @@
-package org.zhongzheng.common.utils;
-
-//
-// Source code recreated from a .class file by IntelliJ IDEA
-// (powered by FernFlower decompiler)
-//
-
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.nio.charset.StandardCharsets;
-import java.util.Enumeration;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.zhongzheng.common.utils.JsonUtil;
-import org.springframework.lang.Nullable;
-import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.ResponseBody;
-import org.springframework.web.context.request.RequestAttributes;
-import org.springframework.web.context.request.RequestContextHolder;
-import org.springframework.web.context.request.ServletRequestAttributes;
-import org.springframework.web.method.HandlerMethod;
-import org.springframework.web.util.WebUtils;
-
-public class WebUtil extends WebUtils {
-    private static final Logger log = LoggerFactory.getLogger(WebUtil.class);
-    public static final String USER_AGENT_HEADER = "user-agent";
-    public static final String UN_KNOWN = "unknown";
-
-    public WebUtil() {
-    }
-
-    public static boolean isBody(HandlerMethod handlerMethod) {
-        ResponseBody responseBody = (ResponseBody)ClassUtil.getAnnotation(handlerMethod, ResponseBody.class);
-        return responseBody != null;
-    }
-
-    @Nullable
-    public static String getCookieVal(String name) {
-        HttpServletRequest request = getRequest();
-        Assert.notNull(request, "request from RequestContextHolder is null");
-        return getCookieVal(request, name);
-    }
-
-    @Nullable
-    public static String getCookieVal(HttpServletRequest request, String name) {
-        Cookie cookie = getCookie(request, name);
-        return cookie != null ? cookie.getValue() : null;
-    }
-
-    public static void removeCookie(HttpServletResponse response, String key) {
-        setCookie(response, key, (String)null, 0);
-    }
-
-    public static void setCookie(HttpServletResponse response, String name, @Nullable String value, int maxAgeInSeconds) {
-        Cookie cookie = new Cookie(name, value);
-        cookie.setPath("/");
-        cookie.setMaxAge(maxAgeInSeconds);
-        cookie.setHttpOnly(true);
-        response.addCookie(cookie);
-    }
-
-    public static HttpServletRequest getRequest() {
-        RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
-        return requestAttributes == null ? null : ((ServletRequestAttributes)requestAttributes).getRequest();
-    }
-
-    public static void renderJson(HttpServletResponse response, Object result) {
-        renderJson(response, result, "application/json");
-    }
-
-    public static void renderJson(HttpServletResponse response, Object result, String contentType) {
-        response.setCharacterEncoding("UTF-8");
-        response.setContentType(contentType);
-
-        try {
-            PrintWriter out = response.getWriter();
-            Throwable var4 = null;
-
-            try {
-                out.append(JsonUtil.toJson(result));
-            } catch (Throwable var14) {
-                var4 = var14;
-                throw var14;
-            } finally {
-                if (out != null) {
-                    if (var4 != null) {
-                        try {
-                            out.close();
-                        } catch (Throwable var13) {
-                            var4.addSuppressed(var13);
-                        }
-                    } else {
-                        out.close();
-                    }
-                }
-
-            }
-        } catch (IOException var16) {
-            log.error(var16.getMessage(), var16);
-        }
-
-    }
-
-    public static String getIP() {
-        return getIP(getRequest());
-    }
-
-    @Nullable
-    public static String getIP(HttpServletRequest request) {
-        Assert.notNull(request, "HttpServletRequest is null");
-        String ip = request.getHeader("X-Requested-For");
-        if (StringUtil.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
-            ip = request.getHeader("X-Forwarded-For");
-        }
-
-        if (StringUtil.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
-            ip = request.getHeader("Proxy-Client-IP");
-        }
-
-        if (StringUtil.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
-            ip = request.getHeader("WL-Proxy-Client-IP");
-        }
-
-        if (StringUtil.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
-            ip = request.getHeader("HTTP_CLIENT_IP");
-        }
-
-        if (StringUtil.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
-            ip = request.getHeader("HTTP_X_FORWARDED_FOR");
-        }
-
-        if (StringUtil.isBlank(ip) || "unknown".equalsIgnoreCase(ip)) {
-            ip = request.getRemoteAddr();
-        }
-
-        return StringUtil.isBlank(ip) ? null : ip.split(",")[0];
-    }
-
-    public static String getRequestParamString(HttpServletRequest request) {
-        try {
-            return getRequestStr(request);
-        } catch (Exception var2) {
-            return "";
-        }
-    }
-
-    public static String getRequestStr(HttpServletRequest request) throws IOException {
-        String queryString = request.getQueryString();
-        return StringUtil.isNotBlank(queryString) ? (new String(queryString.getBytes(Charsets.ISO_8859_1), Charsets.UTF_8)).replaceAll("&amp;", "&").replaceAll("%22", "\"") : getRequestStr(request, getRequestBytes(request));
-    }
-
-    public static byte[] getRequestBytes(HttpServletRequest request) throws IOException {
-        int contentLength = request.getContentLength();
-        if (contentLength < 0) {
-            return null;
-        } else {
-            byte[] buffer = new byte[contentLength];
-
-            int readlen;
-            for(int i = 0; i < contentLength; i += readlen) {
-                readlen = request.getInputStream().read(buffer, i, contentLength - i);
-                if (readlen == -1) {
-                    break;
-                }
-            }
-
-            return buffer;
-        }
-    }
-
-    public static String getRequestStr(HttpServletRequest request, byte[] buffer) throws IOException {
-        String charEncoding = request.getCharacterEncoding();
-        if (charEncoding == null) {
-            charEncoding = "UTF-8";
-        }
-
-        String str = (new String(buffer, charEncoding)).trim();
-        if (StringUtil.isBlank(str)) {
-            StringBuilder sb = new StringBuilder();
-            Enumeration<String> parameterNames = request.getParameterNames();
-
-            while(parameterNames.hasMoreElements()) {
-                String key = (String)parameterNames.nextElement();
-                String value = request.getParameter(key);
-                StringUtil.appendBuilder(sb, new CharSequence[]{key, "=", value, "&"});
-            }
-
-            str = StringUtil.removeSuffix(sb.toString(), "&");
-        }
-
-        return str.replaceAll("&amp;", "&");
-    }
-
-    public static String getRequestBody(ServletInputStream servletInputStream) {
-        StringBuilder sb = new StringBuilder();
-        BufferedReader reader = null;
-
-        try {
-            reader = new BufferedReader(new InputStreamReader(servletInputStream, StandardCharsets.UTF_8));
-
-            String line;
-            while((line = reader.readLine()) != null) {
-                sb.append(line);
-            }
-        } catch (IOException var16) {
-            var16.printStackTrace();
-        } finally {
-            if (servletInputStream != null) {
-                try {
-                    servletInputStream.close();
-                } catch (IOException var15) {
-                    var15.printStackTrace();
-                }
-            }
-
-            if (reader != null) {
-                try {
-                    reader.close();
-                } catch (IOException var14) {
-                    var14.printStackTrace();
-                }
-            }
-
-        }
-
-        return sb.toString();
-    }
-
-    public static String getRequestContent(HttpServletRequest request) {
-        try {
-            String queryString = request.getQueryString();
-            if (StringUtil.isNotBlank(queryString)) {
-                return (new String(queryString.getBytes(Charsets.ISO_8859_1), Charsets.UTF_8)).replaceAll("&amp;", "&").replaceAll("%22", "\"");
-            } else {
-                String charEncoding = request.getCharacterEncoding();
-                if (charEncoding == null) {
-                    charEncoding = "UTF-8";
-                }
-
-                byte[] buffer = getRequestBody(request.getInputStream()).getBytes();
-                String str = (new String(buffer, charEncoding)).trim();
-                if (StringUtil.isBlank(str)) {
-                    StringBuilder sb = new StringBuilder();
-                    Enumeration<String> parameterNames = request.getParameterNames();
-
-                    while(parameterNames.hasMoreElements()) {
-                        String key = (String)parameterNames.nextElement();
-                        String value = request.getParameter(key);
-                        StringUtil.appendBuilder(sb, new CharSequence[]{key, "=", value, "&"});
-                    }
-
-                    str = StringUtil.removeSuffix(sb.toString(), "&");
-                }
-
-                return str.replaceAll("&amp;", "&");
-            }
-        } catch (Exception var9) {
-            var9.printStackTrace();
-            return "";
-        }
-    }
-}

+ 9 - 0
zzbusiness-info/pom.xml

@@ -49,6 +49,15 @@
             <groupId>org.mybatis</groupId>
             <artifactId>mybatis</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.poi</groupId>
+            <artifactId>poi-ooxml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>repository.cn.afterturn</groupId>
+            <artifactId>easypoi-annotation</artifactId>
+            <version>4.1.0</version>
+        </dependency>
     </dependencies>
 
     <packaging>jar</packaging>

+ 0 - 107
zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyCertificateController.java

@@ -1,107 +0,0 @@
-package org.zhongzheng.controller.company;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.annotation.Log;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.ExcelCompanyCertificateBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyCertificateService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyCertificateVo;
-
-import java.util.List;
-
-/**
- * 企业证书Controller
- * 
- * @author ruoyi
- * @date 2024-03-18
- */
-@Api(value = "企业证书控制器", tags = {"企业证书管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/certificate")
-public class CompanyCertificateController extends BaseController {
-
-    private final ICompanyCertificateService iCompanyCertificateService;
-
-    /**
-     * 查询企业证书列表
-     */
-    @ApiOperation("查询企业证书列表")
-    @GetMapping("/certificateList")
-    public TableDataInfo<CompanyCertificateVo> list(CompanyCertificateQueryBo bo) {
-        startPage();
-        List<CompanyCertificateVo> list = iCompanyCertificateService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出企业证书列表
-     */
-    @ApiOperation("导出企业证书列表")
-    @Log(title = "企业证书", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult<CompanyCertificateVo> export(CompanyCertificateQueryBo bo) {
-        List<CompanyCertificateVo> list = iCompanyCertificateService.queryList(bo);
-        ExcelUtil<CompanyCertificateVo> util = new ExcelUtil<CompanyCertificateVo>(CompanyCertificateVo.class);
-        return util.exportExcel(list, "企业证书");
-    }
-
-    /**
-     * 获取企业证书详细信息
-     */
-    @ApiOperation("获取企业证书详细信息")
-    @GetMapping("/{certificateId}")
-    public AjaxResult<CompanyCertificateVo> getInfo(@PathVariable("certificateId" ) Long certificateId) {
-        return AjaxResult.success(iCompanyCertificateService.queryById(certificateId));
-    }
-
-    /**
-     * 新增企业证书
-     */
-    @ApiOperation("新增企业证书")
-    @Log(title = "企业证书", businessType = BusinessType.INSERT)
-    @PostMapping("/addCertificate")
-    public AjaxResult<Void> add(@RequestBody CompanyCertificateAddBo bo) {
-        return toAjax(iCompanyCertificateService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改企业证书
-     */
-    @ApiOperation("修改企业证书")
-    @Log(title = "企业证书", businessType = BusinessType.UPDATE)
-    @PostMapping("/updateCertificate")
-    public AjaxResult<Void> edit(@RequestBody CompanyCertificateEditBo bo) {
-        return toAjax(iCompanyCertificateService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除企业证书
-     */
-    @ApiOperation("删除企业证书")
-    @Log(title = "企业证书" , businessType = BusinessType.DELETE)
-    @PostMapping("/deleteCertificate")
-    public AjaxResult<Void> remove(@RequestBody CompanyCertificateEditBo bo) {
-        return toAjax(iCompanyCertificateService.deleteWithValidByIds(bo) ? 1 : 0);
-    }
-    @ApiOperation("导入题目模板返回数组")
-    @PreAuthorize("@ss.hasPermi('system:question:import')")
-    @PostMapping("/importCertificateList")
-    public AjaxResult<Void> importDataBackList(ExcelCompanyCertificateBo bo) throws Exception
-    {
-        return toAjax(iCompanyCertificateService.importCertificateExcel(bo)? 1 : 0);
-    }
-}

+ 0 - 104
zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyController.java

@@ -1,104 +0,0 @@
-package org.zhongzheng.controller.company;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.annotation.Log;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyVo;
-
-import java.util.List;
-
-/**
- * 企业Controller
- * 
- * @author ruoyi
- * @date 2024-03-18
- */
-@Api(value = "企业控制器", tags = {"企业管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/company")
-public class CompanyController extends BaseController {
-
-    private final ICompanyService iCompanyService;
-
-    /**
-     * 查询企业列表
-     */
-    @ApiOperation("查询企业列表")
-    @GetMapping("/companyList")
-    public TableDataInfo<CompanyVo> list(CompanyQueryBo bo) {
-        startPage();
-        List<CompanyVo> list = iCompanyService.queryList(bo);
-        return getDataTable(list);
-    }
-    /**
-     * 查询企业列表
-     */
-    @ApiOperation("查询企业部门列表")
-    @GetMapping("/departmentList")
-    public TableDataInfo<CompanyVo> selectCompanyDept(CompanyQueryBo bo) {
-        startPage();
-        List<CompanyVo> list = iCompanyService.selectCompanyDepartment(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出企业列表
-     */
-    @ApiOperation("导出企业列表")
-    @GetMapping("/export")
-    public AjaxResult<CompanyVo> export(CompanyQueryBo bo) {
-        List<CompanyVo> list = iCompanyService.queryList(bo);
-        ExcelUtil<CompanyVo> util = new ExcelUtil<CompanyVo>(CompanyVo.class);
-        return util.exportExcel(list, "企业");
-    }
-
-    /**
-     * 获取企业详细信息
-     */
-    @ApiOperation("获取企业详细信息")
-    @GetMapping("/{companyId}")
-    public AjaxResult<CompanyVo> getInfo(@PathVariable("companyId" ) Long companyId) {
-        return AjaxResult.success(iCompanyService.queryById(companyId));
-    }
-
-    /**
-     * 新增企业
-     */
-    @ApiOperation("新增企业")
-    @PostMapping("/addCompany")
-    public AjaxResult<Void> add(@RequestBody CompanyAddBo bo) {
-        return toAjax(iCompanyService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改企业
-     */
-    @ApiOperation("修改企业")
-    @PostMapping("/updateCompany")
-    public AjaxResult<Void> edit(@RequestBody CompanyEditBo bo) {
-        return toAjax(iCompanyService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除企业
-     */
-    @ApiOperation("删除企业")
-    @PostMapping("/deleteCompany")
-    public AjaxResult<Void> remove(@RequestBody CompanyEditBo bo) {
-        return toAjax(iCompanyService.deleteWithValidByIds(bo) ? 1 : 0);
-    }
-}

+ 0 - 98
zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyDepartmentController.java

@@ -1,98 +0,0 @@
-package org.zhongzheng.controller.company;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.annotation.Log;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyDepartmentService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyDepartmentVo;
-
-import java.util.List;
-
-/**
- * 企业部门Controller
- * 
- * @author ruoyi
- * @date 2024-03-18
- */
-@Api(value = "企业部门控制器", tags = {"企业部门管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/department")
-public class CompanyDepartmentController extends BaseController {
-
-    private final ICompanyDepartmentService iCompanyDepartmentService;
-
-    /**
-     * 查询企业部门列表
-     */
-    @ApiOperation("查询企业部门列表")
-    @GetMapping("/departmentList")
-    public TableDataInfo<CompanyDepartmentVo> list(CompanyDepartmentQueryBo bo) {
-        startPage();
-        List<CompanyDepartmentVo> list = iCompanyDepartmentService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出企业部门列表
-     */
-    @ApiOperation("导出企业部门列表")
-    @Log(title = "企业部门", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult<CompanyDepartmentVo> export(CompanyDepartmentQueryBo bo) {
-        List<CompanyDepartmentVo> list = iCompanyDepartmentService.queryList(bo);
-        ExcelUtil<CompanyDepartmentVo> util = new ExcelUtil<CompanyDepartmentVo>(CompanyDepartmentVo.class);
-        return util.exportExcel(list, "企业部门");
-    }
-
-    /**
-     * 获取企业部门详细信息
-     */
-    @ApiOperation("获取企业部门详细信息")
-    @GetMapping("/{departmentId}")
-    public AjaxResult<CompanyDepartmentVo> getInfo(@PathVariable("departmentId" ) Long departmentId) {
-        return AjaxResult.success(iCompanyDepartmentService.queryById(departmentId));
-    }
-
-    /**
-     * 新增企业部门
-     */
-    @ApiOperation("新增企业部门")
-    @Log(title = "企业部门", businessType = BusinessType.INSERT)
-    @PostMapping("addDepartment")
-    public AjaxResult<Void> add(@RequestBody CompanyDepartmentAddBo bo) {
-        return toAjax(iCompanyDepartmentService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改企业部门
-     */
-    @ApiOperation("修改企业部门")
-    @Log(title = "企业部门", businessType = BusinessType.UPDATE)
-    @PostMapping("updateDepartment")
-    public AjaxResult<Void> edit(@RequestBody CompanyDepartmentEditBo bo) {
-        return toAjax(iCompanyDepartmentService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除企业部门
-     */
-    @ApiOperation("删除企业部门")
-    @Log(title = "企业部门" , businessType = BusinessType.DELETE)
-    @PostMapping("/deleteDepartment")
-    public AjaxResult<Void> remove(@RequestBody CompanyDepartmentEditBo bo) {
-        return toAjax(iCompanyDepartmentService.deleteWithValidByIds(bo) ? 1 : 0);
-    }
-}

+ 0 - 84
zzbusiness-info/src/main/java/org/zhongzheng/controller/company/CompanyUserController.java

@@ -1,84 +0,0 @@
-package org.zhongzheng.controller.company;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyUserAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyUserEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyUserQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyUserService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyUserVo;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * 企业用户Controller
- *
- * @author ruoyi
- * @date 2024-03-19
- */
-@Api(value = "企业用户控制器", tags = {"企业用户管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/user")
-public class CompanyUserController extends BaseController {
-
-    private final ICompanyUserService iCompanyUserService;
-
-    /**
-     * 查询企业用户列表
-     */
-    @ApiOperation("查询企业用户列表")
-    @GetMapping("/list")
-    public TableDataInfo<CompanyUserVo> list(CompanyUserQueryBo bo) {
-        startPage();
-        List<CompanyUserVo> list = iCompanyUserService.queryList(bo);
-        return getDataTable(list);
-    }
-
-
-
-    /**
-     * 获取企业用户详细信息
-     */
-    @ApiOperation("获取企业用户详细信息")
-    @GetMapping("/{userId}")
-    public AjaxResult<CompanyUserVo> getInfo(@PathVariable("userId" ) Long userId) {
-        return AjaxResult.success(iCompanyUserService.queryById(userId));
-    }
-
-    /**
-     * 新增企业用户
-     */
-    @ApiOperation("新增企业用户")
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody CompanyUserAddBo bo) {
-        return toAjax(iCompanyUserService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改企业用户
-     */
-    @ApiOperation("修改企业用户")
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody CompanyUserEditBo bo) {
-        return toAjax(iCompanyUserService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除企业用户
-     */
-    @ApiOperation("删除企业用户")
-    @DeleteMapping("/{userIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] userIds) {
-        return toAjax(iCompanyUserService.deleteWithValidByIds(Arrays.asList(userIds), true) ? 1 : 0);
-    }
-}

+ 0 - 95
zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffBankInfoController.java

@@ -1,95 +0,0 @@
-package org.zhongzheng.controller.staff;
-
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffBankInfoAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffBankInfoEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffBankInfoQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffBankInfoService;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.vo.StaffBankInfoVo;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * 员工银行信息Controller
- * 
- * @author ruoyi
- * @date 2024-03-21
- */
-@Api(value = "员工银行信息控制器", tags = {"员工银行信息管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/info")
-public class StaffBankInfoController extends BaseController {
-
-    private final IStaffBankInfoService iStaffBankInfoService;
-
-    /**
-     * 查询员工银行信息列表
-     */
-    @ApiOperation("查询员工银行信息列表")
-    @GetMapping("/list")
-    public TableDataInfo<StaffBankInfoVo> list(StaffBankInfoQueryBo bo) {
-        startPage();
-        List<StaffBankInfoVo> list = iStaffBankInfoService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出员工银行信息列表
-     */
-    @ApiOperation("导出员工银行信息列表")
-    @GetMapping("/export")
-    public AjaxResult<StaffBankInfoVo> export(StaffBankInfoQueryBo bo) {
-        List<StaffBankInfoVo> list = iStaffBankInfoService.queryList(bo);
-        ExcelUtil<StaffBankInfoVo> util = new ExcelUtil<StaffBankInfoVo>(StaffBankInfoVo.class);
-        return util.exportExcel(list, "员工银行信息");
-    }
-
-    /**
-     * 获取员工银行信息详细信息
-     */
-    @ApiOperation("获取员工银行信息详细信息")
-    @GetMapping("/{infoId}")
-    public AjaxResult<StaffBankInfoVo> getInfo(@PathVariable("infoId" ) Long infoId) {
-        return AjaxResult.success(iStaffBankInfoService.queryById(infoId));
-    }
-
-    /**
-     * 新增员工银行信息
-     */
-    @ApiOperation("新增员工银行信息")
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody StaffBankInfoAddBo bo) {
-        return toAjax(iStaffBankInfoService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改员工银行信息
-     */
-    @ApiOperation("修改员工银行信息")
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody StaffBankInfoEditBo bo) {
-        return toAjax(iStaffBankInfoService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除员工银行信息
-     */
-    @ApiOperation("删除员工银行信息")
-    @DeleteMapping("/{infoIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] infoIds) {
-        return toAjax(iStaffBankInfoService.deleteWithValidByIds(Arrays.asList(infoIds), true) ? 1 : 0);
-    }
-}

+ 0 - 102
zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffCertificateController.java

@@ -1,102 +0,0 @@
-package org.zhongzheng.controller.staff;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffCertificateAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffCertificateEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffCertificateQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffCertificateService;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.vo.StaffCertificateVo;
-
-import java.util.List;
-
-/**
- * 员工证书Controller
- * 
- * @author ruoyi
- * @date 2024-03-18
- */
-@Api(value = "员工证书控制器", tags = {"员工证书管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/staff/certificate")
-public class StaffCertificateController extends BaseController {
-
-    private final IStaffCertificateService iStaffCertificateService;
-
-    /**
-     * 查询员工证书列表
-     */
-    @ApiOperation("查询员工证书列表")
-    @GetMapping("/list")
-    public TableDataInfo<StaffCertificateVo> list(StaffCertificateQueryBo bo) {
-        startPage();
-        List<StaffCertificateVo> list = iStaffCertificateService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出员工证书列表
-     */
-    @ApiOperation("导出员工证书列表")
-    @GetMapping("/export")
-    public AjaxResult<StaffCertificateVo> export(StaffCertificateQueryBo bo) {
-        List<StaffCertificateVo> list = iStaffCertificateService.queryList(bo);
-        ExcelUtil<StaffCertificateVo> util = new ExcelUtil<StaffCertificateVo>(StaffCertificateVo.class);
-        return util.exportExcel(list, "员工证书");
-    }
-
-    /**
-     * 获取员工证书详细信息
-     */
-    @ApiOperation("获取员工证书详细信息")
-    @GetMapping("/{certificateId}")
-    public AjaxResult<StaffCertificateVo> getInfo(@PathVariable("certificateId" ) Long certificateId) {
-        return AjaxResult.success(iStaffCertificateService.queryById(certificateId));
-    }
-
-    /**
-     * 新增员工证书
-     */
-    @ApiOperation("新增员工证书")
-    @PostMapping("/add")
-    public AjaxResult<Void> add(@RequestBody StaffCertificateAddBo bo) {
-        return toAjax(iStaffCertificateService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改员工证书
-     */
-    @ApiOperation("修改员工证书")
-    @PostMapping("/update")
-    public AjaxResult<Void> edit(@RequestBody StaffCertificateEditBo bo) {
-        return toAjax(iStaffCertificateService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除员工证书
-     */
-    @ApiOperation("删除员工证书")
-    @PostMapping("/delete")
-    public AjaxResult<Void> remove(@RequestBody StaffCertificateEditBo bo) {
-        return toAjax(iStaffCertificateService.deleteWithValidByIds(bo) ? 1 : 0);
-    }
-    /**
-     * 导入部门员工证书excel
-     */
-    @ApiOperation("导入员工文档列表")
-    @PostMapping("/importStaffCertificateList")
-    public AjaxResult<Void> importStaffCertificateList( MultipartFile file ) {
-        return toAjax(iStaffCertificateService.importStaffCertificateList(file)?1:0);
-    }
-}

+ 0 - 94
zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffContractArchivesController.java

@@ -1,94 +0,0 @@
-package org.zhongzheng.controller.staff;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffContractArchivesAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffContractArchivesEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffContractArchivesQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffContractArchivesService;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.vo.StaffContractArchivesVo;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * 员工合同档案Controller
- * 
- * @author ruoyi
- * @date 2024-03-21
- */
-@Api(value = "员工合同档案控制器", tags = {"员工合同档案管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/archives")
-public class StaffContractArchivesController extends BaseController {
-
-    private final IStaffContractArchivesService iStaffContractArchivesService;
-
-    /**
-     * 查询员工合同档案列表
-     */
-    @ApiOperation("查询员工合同档案列表")
-    @GetMapping("/list")
-    public TableDataInfo<StaffContractArchivesVo> list(StaffContractArchivesQueryBo bo) {
-        startPage();
-        List<StaffContractArchivesVo> list = iStaffContractArchivesService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出员工合同档案列表
-     */
-    @ApiOperation("导出员工合同档案列表")
-    @GetMapping("/export")
-    public AjaxResult<StaffContractArchivesVo> export(StaffContractArchivesQueryBo bo) {
-        List<StaffContractArchivesVo> list = iStaffContractArchivesService.queryList(bo);
-        ExcelUtil<StaffContractArchivesVo> util = new ExcelUtil<StaffContractArchivesVo>(StaffContractArchivesVo.class);
-        return util.exportExcel(list, "员工合同档案");
-    }
-
-    /**
-     * 获取员工合同档案详细信息
-     */
-    @ApiOperation("获取员工合同档案详细信息")
-    @GetMapping("/{archivesId}")
-    public AjaxResult<StaffContractArchivesVo> getInfo(@PathVariable("archivesId" ) Long archivesId) {
-        return AjaxResult.success(iStaffContractArchivesService.queryById(archivesId));
-    }
-
-    /**
-     * 新增员工合同档案
-     */
-    @ApiOperation("新增员工合同档案")
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody StaffContractArchivesAddBo bo) {
-        return toAjax(iStaffContractArchivesService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改员工合同档案
-     */
-    @ApiOperation("修改员工合同档案")
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody StaffContractArchivesEditBo bo) {
-        return toAjax(iStaffContractArchivesService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除员工合同档案
-     */
-    @ApiOperation("删除员工合同档案")
-    @DeleteMapping("/{archivesIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] archivesIds) {
-        return toAjax(iStaffContractArchivesService.deleteWithValidByIds(Arrays.asList(archivesIds), true) ? 1 : 0);
-    }
-}

+ 0 - 101
zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffController.java

@@ -1,101 +0,0 @@
-package org.zhongzheng.controller.staff;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.springframework.web.multipart.MultipartFile;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffService;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.vo.StaffVo;
-
-import java.util.List;
-
-/**
- * 企业部门员工Controller
- * 
- * @author ruoyi
- * @date 2024-03-21
- */
-@Api(value = "企业部门员工控制器", tags = {"企业部门员工管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/staff")
-public class StaffController extends BaseController {
-
-    private final IStaffService iStaffService;
-
-    /**
-     * 查询企业部门员工列表
-     */
-    @ApiOperation("查询企业部门员工列表")
-    @GetMapping("/staffList")
-    public TableDataInfo<StaffVo> list(StaffQueryBo bo) {
-        startPage();
-        List<StaffVo> list = iStaffService.selectStaffList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出企业部门员工列表
-     */
-    @ApiOperation("导出企业部门员工列表")
-    @GetMapping("/export")
-    public AjaxResult<StaffVo> export(StaffQueryBo bo) {
-        List<StaffVo> list = iStaffService.queryList(bo);
-        ExcelUtil<StaffVo> util = new ExcelUtil<StaffVo>(StaffVo.class);
-        return util.exportExcel(list, "企业部门员工");
-    }
-
-    /**
-     * 获取企业部门员工详细信息
-     */
-    @ApiOperation("获取企业部门员工详细信息")
-    @GetMapping("/{staffId}")
-    public AjaxResult<StaffVo> getInfo(@PathVariable("staffId" ) Long staffId) {
-        return AjaxResult.success(iStaffService.queryById(staffId));
-    }
-
-    /**
-     * 新增企业部门员工
-     */
-    @ApiOperation("新增企业部门员工")
-    @PostMapping("/insertOrUpdateStaff")
-    public AjaxResult<Void> add(@RequestBody StaffAddBo bo) {
-        return toAjax(iStaffService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改企业部门员工
-     */
-    @ApiOperation("修改企业部门员工")
-    @PostMapping("/updateStaffRemarks")
-    public AjaxResult<Void> edit(@RequestBody StaffEditBo bo) {
-        return toAjax(iStaffService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除企业部门员工
-     */
-    @ApiOperation("删除企业部门员工")
-    @PostMapping("/deleteStaff")
-    public AjaxResult<Void> remove(@RequestBody StaffEditBo bo ) {
-        return toAjax(iStaffService.deleteWithValidByIds(bo)?1:0);
-    }
-    /**
-     * 导入部门员工excel
-     */
-    @ApiOperation("导入员工文档列表")
-    @PostMapping("/importStaffList")
-    public AjaxResult<Void> importStaffList( MultipartFile  file ) {
-        return toAjax(iStaffService.importExcelList(file)?1:0);
-    }
-}

+ 0 - 99
zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffEduBgController.java

@@ -1,99 +0,0 @@
-package org.zhongzheng.controller.staff;
-
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.annotation.Log;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEduBgAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEduBgEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEduBgQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffEduBgService;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.vo.StaffEduBgVo;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * 员工教育背景Controller
- * 
- * @author ruoyi
- * @date 2024-03-21
- */
-@Api(value = "员工教育背景控制器", tags = {"员工教育背景管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/bg")
-public class StaffEduBgController extends BaseController {
-
-    private final IStaffEduBgService iStaffEduBgService;
-
-    /**
-     * 查询员工教育背景列表
-     */
-    @ApiOperation("查询员工教育背景列表")
-    @GetMapping("/list")
-    public TableDataInfo<StaffEduBgVo> list(StaffEduBgQueryBo bo) {
-        startPage();
-        List<StaffEduBgVo> list = iStaffEduBgService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出员工教育背景列表
-     */
-    @ApiOperation("导出员工教育背景列表")
-    @Log(title = "员工教育背景", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult<StaffEduBgVo> export(StaffEduBgQueryBo bo) {
-        List<StaffEduBgVo> list = iStaffEduBgService.queryList(bo);
-        ExcelUtil<StaffEduBgVo> util = new ExcelUtil<StaffEduBgVo>(StaffEduBgVo.class);
-        return util.exportExcel(list, "员工教育背景");
-    }
-
-    /**
-     * 获取员工教育背景详细信息
-     */
-    @ApiOperation("获取员工教育背景详细信息")
-    @GetMapping("/{eduBgId}")
-    public AjaxResult<StaffEduBgVo> getInfo(@PathVariable("eduBgId" ) Long eduBgId) {
-        return AjaxResult.success(iStaffEduBgService.queryById(eduBgId));
-    }
-
-    /**
-     * 新增员工教育背景
-     */
-    @ApiOperation("新增员工教育背景")
-    @Log(title = "员工教育背景", businessType = BusinessType.INSERT)
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody StaffEduBgAddBo bo) {
-        return toAjax(iStaffEduBgService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改员工教育背景
-     */
-    @ApiOperation("修改员工教育背景")
-    @Log(title = "员工教育背景", businessType = BusinessType.UPDATE)
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody StaffEduBgEditBo bo) {
-        return toAjax(iStaffEduBgService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除员工教育背景
-     */
-    @ApiOperation("删除员工教育背景")
-    @Log(title = "员工教育背景" , businessType = BusinessType.DELETE)
-    @DeleteMapping("/{eduBgIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] eduBgIds) {
-        return toAjax(iStaffEduBgService.deleteWithValidByIds(Arrays.asList(eduBgIds), true) ? 1 : 0);
-    }
-}

+ 0 - 98
zzbusiness-info/src/main/java/org/zhongzheng/controller/staff/StaffEmergencyContactController.java

@@ -1,98 +0,0 @@
-package org.zhongzheng.controller.staff;
-
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.RequiredArgsConstructor;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
-import org.zhongzheng.common.annotation.Log;
-import org.zhongzheng.common.core.controller.BaseController;
-import org.zhongzheng.common.core.domain.AjaxResult;
-import org.zhongzheng.common.core.page.TableDataInfo;
-import org.zhongzheng.common.enums.BusinessType;
-import org.zhongzheng.common.utils.poi.ExcelUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEmergencyContactAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEmergencyContactEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.bo.StaffEmergencyContactQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffEmergencyContactService;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.vo.StaffEmergencyContactVo;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * 员工紧急联系人Controller
- * 
- * @author ruoyi
- * @date 2024-03-21
- */
-@Api(value = "员工紧急联系人控制器", tags = {"员工紧急联系人管理"})
-@RequiredArgsConstructor(onConstructor_ = @Autowired)
-@RestController
-@RequestMapping("/system/contact")
-public class StaffEmergencyContactController extends BaseController {
-
-    private final IStaffEmergencyContactService iStaffEmergencyContactService;
-
-    /**
-     * 查询员工紧急联系人列表
-     */
-    @ApiOperation("查询员工紧急联系人列表")
-    @GetMapping("/list")
-    public TableDataInfo<StaffEmergencyContactVo> list(StaffEmergencyContactQueryBo bo) {
-        startPage();
-        List<StaffEmergencyContactVo> list = iStaffEmergencyContactService.queryList(bo);
-        return getDataTable(list);
-    }
-
-    /**
-     * 导出员工紧急联系人列表
-     */
-    @ApiOperation("导出员工紧急联系人列表")
-    @Log(title = "员工紧急联系人", businessType = BusinessType.EXPORT)
-    @GetMapping("/export")
-    public AjaxResult<StaffEmergencyContactVo> export(StaffEmergencyContactQueryBo bo) {
-        List<StaffEmergencyContactVo> list = iStaffEmergencyContactService.queryList(bo);
-        ExcelUtil<StaffEmergencyContactVo> util = new ExcelUtil<StaffEmergencyContactVo>(StaffEmergencyContactVo.class);
-        return util.exportExcel(list, "员工紧急联系人");
-    }
-
-    /**
-     * 获取员工紧急联系人详细信息
-     */
-    @ApiOperation("获取员工紧急联系人详细信息")
-    @GetMapping("/{contactId}")
-    public AjaxResult<StaffEmergencyContactVo> getInfo(@PathVariable("contactId" ) Long contactId) {
-        return AjaxResult.success(iStaffEmergencyContactService.queryById(contactId));
-    }
-
-    /**
-     * 新增员工紧急联系人
-     */
-    @ApiOperation("新增员工紧急联系人")
-    @Log(title = "员工紧急联系人", businessType = BusinessType.INSERT)
-    @PostMapping()
-    public AjaxResult<Void> add(@RequestBody StaffEmergencyContactAddBo bo) {
-        return toAjax(iStaffEmergencyContactService.insertByAddBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 修改员工紧急联系人
-     */
-    @ApiOperation("修改员工紧急联系人")
-    @Log(title = "员工紧急联系人", businessType = BusinessType.UPDATE)
-    @PutMapping()
-    public AjaxResult<Void> edit(@RequestBody StaffEmergencyContactEditBo bo) {
-        return toAjax(iStaffEmergencyContactService.updateByEditBo(bo) ? 1 : 0);
-    }
-
-    /**
-     * 删除员工紧急联系人
-     */
-    @ApiOperation("删除员工紧急联系人")
-    @Log(title = "员工紧急联系人" , businessType = BusinessType.DELETE)
-    @DeleteMapping("/{contactIds}")
-    public AjaxResult<Void> remove(@PathVariable Long[] contactIds) {
-        return toAjax(iStaffEmergencyContactService.deleteWithValidByIds(Arrays.asList(contactIds), true) ? 1 : 0);
-    }
-}

+ 0 - 36
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyUserAddBo.java

@@ -1,36 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-
-/**
- * 企业用户添加对象 company_user
- *
- * @author ruoyi
- * @date 2024-03-19
- */
-@Data
-@ApiModel("企业用户添加对象")
-public class CompanyUserAddBo {
-
-    /** 公司id */
-    @ApiModelProperty("公司id")
-    private Long companyId;
-    /** 企业用户名 */
-    @ApiModelProperty("企业用户名")
-    private String username;
-    /** 密码 */
-    @ApiModelProperty("密码")
-    private String password;
-    /** 1有效 0无效 */
-    @ApiModelProperty("1有效 0无效")
-    private Integer status;
-    /** 创建时间 */
-    @ApiModelProperty("创建时间")
-    private Long createTime;
-    /** 更新时间 */
-    @ApiModelProperty("更新时间")
-    private Long updateTime;
-}

+ 0 - 43
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyUserEditBo.java

@@ -1,43 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-
-/**
- * 企业用户编辑对象 company_user
- *
- * @author ruoyi
- * @date 2024-03-19
- */
-@Data
-@ApiModel("企业用户编辑对象")
-public class CompanyUserEditBo {
-
-    /** $column.columnComment */
-    @ApiModelProperty("$column.columnComment")
-    private Long userId;
-
-
-    /** 公司id */
-    @ApiModelProperty("公司id")
-    private Long companyId;
-
-    /** 企业用户名 */
-    @ApiModelProperty("企业用户名")
-    private String username;
-
-    /** 密码 */
-    @ApiModelProperty("密码")
-    private String password;
-
-    /** 1有效 0无效 */
-    @ApiModelProperty("1有效 0无效")
-    private Integer status;
-
-    /** 更新时间 */
-    @ApiModelProperty("更新时间")
-    private Long updateTime;
-
-}

+ 0 - 46
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyUserQueryBo.java

@@ -1,46 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
-
-import org.zhongzheng.common.core.domain.BaseEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import lombok.EqualsAndHashCode;
-
-/**
- * 企业用户分页查询对象 company_user
- *
- * @author ruoyi
- * @date 2024-03-19
- */
-@Data
-@EqualsAndHashCode(callSuper = true)
-@ApiModel("企业用户分页查询对象")
-public class CompanyUserQueryBo extends BaseEntity {
-
-	/** 分页大小 */
-	@ApiModelProperty("分页大小")
-	private Integer pageSize;
-	/** 当前页数 */
-	@ApiModelProperty("当前页数")
-	private Integer pageNum;
-	/** 排序列 */
-	@ApiModelProperty("排序列")
-	private String orderByColumn;
-	/** 排序的方向desc或者asc */
-	@ApiModelProperty(value = "排序的方向", example = "asc,desc")
-	private String isAsc;
-
-
-	/** 公司id */
-	@ApiModelProperty("公司id")
-	private Long companyId;
-	/** 企业用户名 */
-	@ApiModelProperty("企业用户名")
-	private String username;
-	/** 密码 */
-	@ApiModelProperty("密码")
-	private String password;
-	/** 1有效 0无效 */
-	@ApiModelProperty("1有效 0无效")
-	private Integer status;
-}

+ 0 - 26
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/UserBsAccountLoginBo.java

@@ -1,26 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import javax.validation.constraints.NotNull;
-
-
-/**
- * 客户端用户编辑对象 user
- *
- * @author ruoyi
- * @date 2021-06-08
- */
-@Data
-@ApiModel("客户端用户账号登录对象")
-public class UserBsAccountLoginBo {
-    @ApiModelProperty("手机号/身份证")
-    @NotNull(message = "账号不能为空")
-    private String account;
-    @ApiModelProperty("密码")
-    @NotNull(message = "密码不能为空")
-    private String pwd;
-
-}

+ 0 - 19
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyCertificateMapper.java

@@ -1,19 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyCertificateVo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyCertificate;
-
-import java.util.List;
-
-/**
- * 企业证书Mapper接口
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-public interface CompanyCertificateMapper extends BaseMapper<CompanyCertificate> {
-    List<CompanyCertificateVo> selectCompanyCertificate(CompanyCertificateQueryBo bo);
-
-}

+ 0 - 15
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyDepartmentMapper.java

@@ -1,15 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyDepartment;
-
-
-/**
- * 企业部门Mapper接口
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-public interface CompanyDepartmentMapper extends BaseMapper<CompanyDepartment> {
-
-}

+ 0 - 14
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyMapper.java

@@ -1,14 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.Company;
-
-/**
- * 企业Mapper接口
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-public interface CompanyMapper extends BaseMapper<Company> {
-
-}

+ 0 - 14
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/mapper/CompanyUserMapper.java

@@ -1,14 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.mapper;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyUser;
-
-/**
- * 企业用户Mapper接口
- *
- * @author ruoyi
- * @date 2024-03-19
- */
-public interface CompanyUserMapper extends BaseMapper<CompanyUser> {
-
-}

+ 0 - 58
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyCertificateService.java

@@ -1,58 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyCertificateQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.ExcelCompanyCertificateBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyCertificate;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyCertificateVo;
-
-import java.util.List;
-
-/**
- * 企业证书Service接口
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-public interface ICompanyCertificateService extends IService<CompanyCertificate> {
-	/**
-	 * 查询单个
-	 * @return
-	 */
-	CompanyCertificateVo queryById(Long certificateId);
-
-	/**
-	 * 查询列表
-	 */
-	List<CompanyCertificateVo> queryList(CompanyCertificateQueryBo bo);
-
-	/**
-	 * 根据新增业务对象插入企业证书
-	 * @param bo 企业证书新增业务对象
-	 * @return
-	 */
-	Boolean insertByAddBo(CompanyCertificateAddBo bo);
-
-	/**
-	 * 根据编辑业务对象修改企业证书
-	 * @param bo 企业证书编辑业务对象
-	 * @return
-	 */
-	Boolean updateByEditBo(CompanyCertificateEditBo bo);
-
-	/**
-	 * 校验并删除数据
-	 * @param bo
-	 * @return
-	 */
-	Boolean deleteWithValidByIds(CompanyCertificateEditBo bo);
-
-	/**
-	 * 导入企业证书文件
-	 * @param file 主键集合
-	 * @return
-	 */
-	Boolean importCertificateExcel(ExcelCompanyCertificateBo bo);
-}

+ 0 - 58
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyDepartmentService.java

@@ -1,58 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyDepartment;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyDepartmentVo;
-
-import java.util.List;
-
-/**
- * 企业部门Service接口
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-public interface ICompanyDepartmentService extends IService<CompanyDepartment> {
-	/**
-	 * 查询单个
-	 * @return
-	 */
-	CompanyDepartmentVo queryById(Long departmentId);
-
-	/**
-	 * 查询列表
-	 */
-	List<CompanyDepartmentVo> queryList(CompanyDepartmentQueryBo bo);
-
-	/**
-	 * 根据新增业务对象插入企业部门
-	 * @param bo 企业部门新增业务对象
-	 * @return
-	 */
-	Boolean insertByAddBo(CompanyDepartmentAddBo bo);
-
-	/**
-	 * 根据编辑业务对象修改企业部门
-	 * @param bo 企业部门编辑业务对象
-	 * @return
-	 */
-	Boolean updateByEditBo(CompanyDepartmentEditBo bo);
-
-	/**
-	 * 校验并删除数据
-	 * @param ids 主键集合
-	 * @param isValid 是否校验,true-删除前校验,false-不校验
-	 * @return
-	 */
-	Boolean deleteWithValidByIds(CompanyDepartmentEditBo bo);
-	/**
-	 * 获取公司部门列表
-	 * @param   depts
-	 * @param
-	 * @return
-	 */
-	List<CompanyDepartment> buildDeptTree(List<CompanyDepartment> depts);
-}

+ 0 - 56
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyService.java

@@ -1,56 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.Company;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyVo;
-
-import java.util.List;
-
-/**
- * 企业Service接口
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-public interface ICompanyService extends IService<Company> {
-	/**
-	 * 查询单个
-	 * @return
-	 */
-	CompanyVo queryById(Long companyId);
-
-	/**
-	 * 查询列表
-	 */
-	List<CompanyVo> queryList(CompanyQueryBo bo);
-
-	/**
-	 * 根据新增业务对象插入企业
-	 * @param bo 企业新增业务对象
-	 * @return
-	 */
-	Boolean insertByAddBo(CompanyAddBo bo);
-
-	/**
-	 * 根据编辑业务对象修改企业
-	 * @param bo 企业编辑业务对象
-	 * @return
-	 */
-	Boolean updateByEditBo(CompanyEditBo bo);
-
-	/**
-	 * 校验并删除数据
-	 * @param bo 获取ids
-	 * @return
-	 */
-	Boolean deleteWithValidByIds(CompanyEditBo bo);
-	/**
-	 * 查询企业部门列表
-	 * @param bo
-	 * @return
-	 */
-	List<CompanyVo> selectCompanyDepartment(CompanyQueryBo bo);
-}

+ 0 - 56
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/ICompanyUserService.java

@@ -1,56 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service;
-
-import com.baomidou.mybatisplus.extension.service.IService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyUserAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyUserEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyUserQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.UserBsAccountLoginBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyUser;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyUserVo;
-
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-
-/**
- * 企业用户Service接口
- *
- * @author ruoyi
- * @date 2024-03-19
- */
-public interface ICompanyUserService extends IService<CompanyUser> {
-	/**
-	 * 查询单个
-	 * @return
-	 */
-	CompanyUserVo queryById(Long userId);
-
-	Map<String,Object> accountLogin(UserBsAccountLoginBo bo);
-
-	/**
-	 * 查询列表
-	 */
-	List<CompanyUserVo> queryList(CompanyUserQueryBo bo);
-
-	/**
-	 * 根据新增业务对象插入企业用户
-	 * @param bo 企业用户新增业务对象
-	 * @return
-	 */
-	Boolean insertByAddBo(CompanyUserAddBo bo);
-
-	/**
-	 * 根据编辑业务对象修改企业用户
-	 * @param bo 企业用户编辑业务对象
-	 * @return
-	 */
-	Boolean updateByEditBo(CompanyUserEditBo bo);
-
-	/**
-	 * 校验并删除数据
-	 * @param ids 主键集合
-	 * @param isValid 是否校验,true-删除前校验,false-不校验
-	 * @return
-	 */
-	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
-}

+ 0 - 435
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/impl/CompanyCertificateServiceImpl.java

@@ -1,435 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service.impl;
-
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.date.DateUnit;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.util.ObjectUtil;
-import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
-import com.github.pagehelper.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.zhongzheng.common.exception.CustomException;
-import org.zhongzheng.common.utils.DateUtils;
-import org.zhongzheng.common.utils.poi.EasyPoiUtil;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.*;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.Company;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyCertificate;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.mapper.CompanyCertificateMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyCertificateService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyCertificateVo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.ExcelCompanyCertificateVo;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-
-/**
- * 企业证书Service业务层处理
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-@Service
-public class CompanyCertificateServiceImpl extends ServiceImpl<CompanyCertificateMapper, CompanyCertificate> implements ICompanyCertificateService {
-    @Autowired
-    private ICompanyService iCompanyService;
-
-    @Override
-    public CompanyCertificateVo queryById(Long certificateId) {
-        CompanyCertificate db = this.baseMapper.selectById(certificateId);
-        return BeanUtil.toBean(db, CompanyCertificateVo.class);
-    }
-
-    @Override
-    public List<CompanyCertificateVo> queryList(CompanyCertificateQueryBo bo) {
-        List<CompanyCertificateVo> companyCertificateVos = baseMapper.selectCompanyCertificate(bo);
-        if (CollectionUtils.isEmpty(companyCertificateVos)) {
-            return new ArrayList<>();
-        }
-        companyCertificateVos.forEach(item -> {
-            if (ObjectUtil.isAllNotEmpty(item.getEffectiveDate(), item.getIssuanceDate())) {
-                Date effectivedate = new Date(item.getEffectiveDate() * 1000L);
-                if (effectivedate.compareTo(new Date()) > 0) {
-                    item.setExpirationTime(0L);
-                } else {
-                    //查询实时证书过期时间更新证书预警状态
-                    CompanyCertificate companyCertificate = new CompanyCertificate();
-                    companyCertificate.setUpdateTime(DateUtils.getNowTime());
-                    companyCertificate.setWarningStatus(2);
-                    companyCertificate.setCertificateId(item.getCertificateId());
-                    this.baseMapper.updateById(companyCertificate);
-                    long l = DateUtil.between(effectivedate, new Date(), DateUnit.DAY);
-                    item.setWarningStatus(2);
-                    item.setExpirationTime(l);
-                }
-            }
-        });
-        return companyCertificateVos;
-    }
-
-    /**
-     * 实体类转化成视图对象
-     *
-     * @param collection 实体类集合
-     * @return
-     */
-    private List<CompanyCertificateVo> entity2Vo(Collection<CompanyCertificate> collection) {
-        List<CompanyCertificateVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, CompanyCertificateVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<CompanyCertificate> page = (Page<CompanyCertificate>) collection;
-            Page<CompanyCertificateVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page, pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
-        }
-        return voList;
-    }
-
-    @Override
-    public Boolean insertByAddBo(CompanyCertificateAddBo bo) {
-        CompanyCertificate add = BeanUtil.toBean(bo, CompanyCertificate.class);
-        add.setCertificateId(bo.getCertificateId());
-        if (bo.getCertificateType().equals(2)) {
-            add.setText(JSONArray.toJSONString(bo.getInfoList()));
-        }
-        //证书有效时间判断
-        if (ObjectUtil.isNotEmpty(bo.getIssuanceDate()) && ObjectUtil.isNotEmpty(bo.getEffectiveDate())) {
-            if (bo.getEffectiveDate().equals(1L)) {
-                bo.setWarningStatus(1);
-            } else {
-                Date issuancedate = new Date(bo.getIssuanceDate() * 1000L);
-                Date effectivedate = new Date(bo.getEffectiveDate() * 1000L);
-                if (effectivedate.compareTo(issuancedate) < 0) {
-                    throw new CustomException("证书有效时间错误");
-                }
-                if (effectivedate.compareTo(new Date()) < 0) {
-                    add.setWarningStatus(1);
-                } else {
-                    add.setWarningStatus(2);
-                }
-            }
-        } else {
-            throw new CustomException("时间不能为空");
-        }
-        add.setCreateTime(DateUtils.getNowTime());
-        add.setUpdateTime(DateUtils.getNowTime());
-        return this.save(add);
-    }
-
-    @Override
-    public Boolean updateByEditBo(CompanyCertificateEditBo bo) {
-        CompanyCertificate update = BeanUtil.toBean(bo, CompanyCertificate.class);
-        if (ObjectUtil.isNotEmpty(bo.getInfoList())) {
-            update.setText(JSONArray.toJSONString(bo.getInfoList()));
-        }
-        if (ObjectUtil.isNotEmpty(bo.getIssuanceDate()) && ObjectUtil.isNotEmpty(bo.getEffectiveDate())) {
-            if (bo.getEffectiveDate().equals(1L)) {
-                bo.setWarningStatus(1);
-            } else {
-                Date issuancedate = new Date(bo.getIssuanceDate() * 1000L);
-                Date effectivedate = new Date(bo.getEffectiveDate() * 1000L);
-                if (effectivedate.compareTo(issuancedate) < 0) {
-                    throw new CustomException("证书有效时间错误");
-                }
-            }
-        }
-        update.setUpdateTime(DateUtils.getNowTime());
-        return this.updateById(update);
-    }
-
-
-    @Override
-    public Boolean deleteWithValidByIds(CompanyCertificateEditBo bo) {
-        if (ObjectUtil.isEmpty(bo.getCertificateIds())) {
-            throw new CustomException("请先勾选数据");
-        }
-        List<Long> certificateIds = bo.getCertificateIds();
-        certificateIds.forEach(item -> {
-            CompanyCertificate companyCertificate = this.baseMapper.selectById(item);
-            companyCertificate.setStatus(0);
-            this.baseMapper.updateById(companyCertificate);
-        });
-        return true;
-    }
-
-    public Integer getCompanyTypeByName(String companyTypeName) {
-        //公司类型判断
-        switch (companyTypeName) {
-            case "有限责任公司":
-                return 1;
-            case "国有企业":
-                return 2;
-            case "集体企业":
-                return 3;
-            case "股份合作企业":
-                return 4;
-            case "联营企业":
-                return 5;
-            case "私营企业":
-                return 6;
-            case "其他企业":
-                return 7;
-            case "合资经营企业 (港或澳、台资)":
-                return 8;
-            case "合作经营企业 (港或澳、台资)":
-                return 9;
-            case "港、澳、台商独资经营企业":
-                return 10;
-            case "港、澳、台商投资股份有限公司":
-                return 11;
-            case "其他港、澳、台商投资企业":
-                return 12;
-            case "中外合资经营企业":
-                return 13;
-            case "中外合作经营企业":
-                return 14;
-            case "外资企业":
-                return 15;
-            case "外商投资股份有限公司":
-                return 16;
-            case "其他外商投资企业":
-                return 17;
-        }
-        return null;
-    }
-
-    public Integer getDocumentTypeByName(String documentTypeName) {
-        //公司类型判断
-        switch (documentTypeName) {
-            case "正本":
-                return 1;
-            case "副本":
-                return 2;
-        }
-        return null;
-    }
-
-    public Integer getZzDocumentTypeByName(String documentTypeName) {
-        //公司类型判断
-        switch (documentTypeName) {
-            case "主项":
-                return 1;
-            case "增项":
-                return 2;
-        }
-        return null;
-    }
-
-    @Override
-    public Boolean importCertificateExcel(ExcelCompanyCertificateBo bo) {
-        if (bo.getCertificateType() == null) {
-            throw new CustomException("企业证书类型为空");
-        }
-        List<ExcelCompanyCertificateVo> companyCertificateVos = EasyPoiUtil.importExcel(bo.getFile(), 0, 1, ExcelCompanyCertificateVo.class);
-        if (ObjectUtil.isEmpty(companyCertificateVos)) {
-            throw new CustomException("文档数据为空");
-        }
-        //判断不同证书类型 1:营业执照 2:资质证书 3:安全生产许可证 4:其他证书
-        switch (bo.getCertificateType()) {
-            case 1:
-                companyCertificateVos.forEach(item -> {
-                    if (ObjectUtil.isAllNotEmpty(item.getCompanyName(), item.getDocumentTypeName())) {
-                        List<Company> companyList = iCompanyService.list(new LambdaQueryWrapper<Company>().eq(Company::getCompanyName, item.getCompanyName()).eq(Company::getStatus, 1));
-                        if (ObjectUtil.isNotEmpty(companyList)) {
-                            Company company = companyList.get(0);
-                            CompanyCertificate companyCertificate = new CompanyCertificate();
-                            companyCertificate.setCertificateType(bo.getCertificateType());
-                            companyCertificate.setCompanyId(company.getCompanyId());
-                            companyCertificate.setCompanyName(item.getCompanyName());
-                            Integer documentTypeByName = getDocumentTypeByName(item.getDocumentTypeName());
-                            companyCertificate.setDocumentType(documentTypeByName);
-                            Integer companyType = getCompanyTypeByName(item.getCompanyTypeName());
-                            companyCertificate.setCompanyType(Long.valueOf(companyType));
-                            if (ObjectUtil.isNotEmpty(item.getEstablishDateName())) {
-                                String establishDateName = item.getEstablishDateName();
-                                Long dateTimeSec = DateUtils.dateTimeSec("yyyy/MM/dd", establishDateName);
-                                companyCertificate.setEstablishDate(dateTimeSec);
-                            }
-                            if (ObjectUtil.isNotEmpty(item.getOperateDateName())) {
-                                if (item.getOperateDateName().equals("长期")) {
-                                    companyCertificate.setOperateDate(1L);
-                                } else {
-                                    String operateDateName = item.getOperateDateName();
-                                    Long operateDate = DateUtils.dateTimeSec("yyyy/MM/dd", operateDateName);
-                                    companyCertificate.setEstablishDate(operateDate);
-                                }
-                            }
-                            companyCertificate.setCreditCode(item.getCreditCode());
-                            companyCertificate.setRegisteredCapital(item.getRegisteredCapital());
-                            companyCertificate.setLegalRepresentative(item.getLegalRepresentative());
-                            companyCertificate.setCompanyAddress(item.getCompanyAddress());
-                            companyCertificate.setRegistrationAuthority(item.getRegistrationAuthority());
-                            companyCertificate.setExperienceScope(item.getExperienceScope());
-                            companyCertificate.setCreateTime(DateUtils.getNowTime());
-                            companyCertificate.setUpdateTime(DateUtils.getNowTime());
-                            this.baseMapper.insert(companyCertificate);
-                        }
-                    }
-                });
-                break;
-            case 2:
-                Map<String, List<ExcelCompanyCertificateVo>> collect = companyCertificateVos.stream().collect(Collectors.groupingBy(ExcelCompanyCertificateVo::getCertificateNumber));
-                List<ExcelCompanyCertificateVo> certificateVos = new ArrayList<>();
-                ArrayList<CompanyCertificateInfo> companyCertificateInfos = new ArrayList<>();
-                //根据证书编号分组获取证书列表
-                collect.forEach((k, v) -> {
-                    List<ExcelCompanyCertificateVo> excelCompanyCertificateVos = collect.get(k);
-                    ExcelCompanyCertificateVo excelCompanyCertificateVo = excelCompanyCertificateVos.get(0);
-                     excelCompanyCertificateVos.forEach(item -> {
-                        CompanyCertificateInfo companyCertificateInfo = new CompanyCertificateInfo();
-                        if (ObjectUtil.isNotEmpty(item.getDocumentTypeName())){
-                            Integer zzDocumentTypeByName = getZzDocumentTypeByName(item.getDocumentTypeName());
-                            companyCertificateInfo.setItemClass(Long.valueOf(zzDocumentTypeByName));
-                        }
-                        if (ObjectUtil.isNotEmpty(item.getGiveDate())) {
-                            String giveDate = item.getGiveDate();
-                            Long applicationDate = DateUtils.dateTimeSec("yyyy/MM/dd", giveDate);
-                            companyCertificateInfo.setApplicationDate(applicationDate);
-                        }
-                        companyCertificateInfo.setQualificationCategory(item.getZzSort());
-                        companyCertificateInfos.add(companyCertificateInfo);
-                    });
-                    excelCompanyCertificateVo.setText(JSONArray.toJSONString(companyCertificateInfos));
-                    certificateVos.add(excelCompanyCertificateVo);
-                    if (ObjectUtil.isNotEmpty(excelCompanyCertificateVo.getIssuanceDateName())) {
-                        String issuanceDateName = excelCompanyCertificateVo.getIssuanceDateName();
-                        Long dateTimeSec = DateUtils.dateTimeSec("yyyy/MM/dd", issuanceDateName);
-                        excelCompanyCertificateVo.setIssuanceDate(dateTimeSec);
-                    }
-                    if (ObjectUtil.isNotEmpty(excelCompanyCertificateVo.getEffectiveDateName())) {
-                        if (excelCompanyCertificateVo.getEffectiveDateName().equals("长期")) {
-                            excelCompanyCertificateVo.setEffectiveDate(1L);
-                        } else {
-                            String effectiveDateName = excelCompanyCertificateVo.getEffectiveDateName();
-                            Long operateDate = DateUtils.dateTimeSec("yyyy/MM/dd", effectiveDateName);
-                            excelCompanyCertificateVo.setEffectiveDate(operateDate);
-                        }
-                    }
-                });
-                //判断当前列表中企业名称是否存在company表中
-                ExcelCompanyCertificateVo excelCompanyCertificateVo = certificateVos.get(0);
-                if (ObjectUtil.isAllNotEmpty(excelCompanyCertificateVo.getCompanyName(), excelCompanyCertificateVo.getDocumentTypeName())) {
-                    List<Company> companyList = iCompanyService.list(new LambdaQueryWrapper<Company>().eq(Company::getCompanyName, excelCompanyCertificateVo.getCompanyName()).eq(Company::getStatus, 1));
-                    if (ObjectUtil.isNotEmpty(companyList)) {
-                        Company company = companyList.get(0);
-                        CompanyCertificate companyCertificate = new CompanyCertificate();
-                        companyCertificate.setCertificateType(bo.getCertificateType());
-                        companyCertificate.setCompanyId(company.getCompanyId());
-                        companyCertificate.setCompanyName(company.getCompanyName());
-                        companyCertificate.setCreditCode(company.getCreditCode());
-                        companyCertificate.setCompanyType(company.getCompanyType());
-                        companyCertificate.setRegisteredCapital(company.getRegisteredCapital());
-                        companyCertificate.setLegalRepresentative(company.getLegalRepresentative());
-                        companyCertificate.setCompanyAddress(company.getCompanyAddress());
-                        companyCertificate.setEstablishDate(company.getEstablishDate());
-                        companyCertificate.setOperateDate(company.getOperateDate());
-                        companyCertificate.setRegistrationAuthority(company.getRegistrationAuthority());
-                        companyCertificate.setExperienceScope(company.getExperienceScope());
-                        companyCertificate.setCertificateName(excelCompanyCertificateVo.getCertificateName());
-                        companyCertificate.setText(excelCompanyCertificateVo.getText());
-                        companyCertificate.setCertificateNumber(excelCompanyCertificateVo.getCertificateNumber());
-                        companyCertificate.setIssuanceDate(excelCompanyCertificateVo.getIssuanceDate());
-                        companyCertificate.setEffectiveDate(excelCompanyCertificateVo.getEffectiveDate());
-                        companyCertificate.setIssuingAuthority(excelCompanyCertificateVo.getIssuingAuthority());
-                        companyCertificate.setCreateTime(DateUtils.getNowTime());
-                        companyCertificate.setUpdateTime(DateUtils.getNowTime());
-                        this.baseMapper.insert(companyCertificate);
-                    }
-                }
-                break;
-            case 3:
-                companyCertificateVos.forEach(item -> {
-                    if (ObjectUtil.isAllNotEmpty(item.getCompanyName(), item.getCertificateNumber())) {
-                        List<Company> companyList = iCompanyService.list(new LambdaQueryWrapper<Company>().eq(Company::getCompanyName, item.getCompanyName()).eq(Company::getStatus, 1));
-                        if (ObjectUtil.isNotEmpty(companyList)) {
-                            Company company = companyList.get(0);
-                            CompanyCertificate companyCertificate = new CompanyCertificate();
-                            companyCertificate.setCertificateType(bo.getCertificateType());
-                            companyCertificate.setCompanyName(item.getCompanyName());
-                            companyCertificate.setCertificateNumber(item.getCertificateNumber());
-                            companyCertificate.setCompanyId(company.getCompanyId());
-                            companyCertificate.setCompanyName(company.getCompanyName());
-                            companyCertificate.setCreditCode(company.getCreditCode());
-                            companyCertificate.setCompanyType(company.getCompanyType());
-                            companyCertificate.setRegisteredCapital(company.getRegisteredCapital());
-                            companyCertificate.setLegalRepresentative(company.getLegalRepresentative());
-                            companyCertificate.setCompanyAddress(company.getCompanyAddress());
-                            companyCertificate.setEstablishDate(company.getEstablishDate());
-                            companyCertificate.setOperateDate(company.getOperateDate());
-                            companyCertificate.setRegistrationAuthority(company.getRegistrationAuthority());
-                            companyCertificate.setExperienceScope(company.getExperienceScope());
-                            if (ObjectUtil.isNotEmpty(item.getIssuanceDateName())) {
-                                String issuanceDateName = item.getIssuanceDateName();
-                                Long dateTimeSec = DateUtils.dateTimeSec("yyyy/MM/dd", issuanceDateName);
-                                companyCertificate.setIssuanceDate(dateTimeSec);
-                            }
-                            if (ObjectUtil.isNotEmpty(item.getEffectiveDateName())) {
-                                if (item.getEffectiveDateName().equals("长期")) {
-                                    companyCertificate.setEffectiveDate(1L);
-                                } else {
-                                    String effectiveDateName = item.getEffectiveDateName();
-                                    Long operateDate = DateUtils.dateTimeSec("yyyy/MM/dd", effectiveDateName);
-                                    companyCertificate.setEffectiveDate(operateDate);
-                                }
-                            }
-                            companyCertificate.setIssuingAuthority(item.getIssuingAuthority());
-                            companyCertificate.setCreateTime(DateUtils.getNowTime());
-                            companyCertificate.setUpdateTime(DateUtils.getNowTime());
-                            this.baseMapper.insert(companyCertificate);
-                        }
-                    }
-                });
-                break;
-            case 4:
-                companyCertificateVos.forEach(item -> {
-                    if (ObjectUtil.isAllNotEmpty(item.getCompanyName(), item.getCertificateNumber())) {
-                        List<Company> companyList = iCompanyService.list(new LambdaQueryWrapper<Company>().eq(Company::getCompanyName, item.getCompanyName()).eq(Company::getStatus, 1));
-                        if (ObjectUtil.isNotEmpty(companyList)) {
-                            Company company = companyList.get(0);
-                            CompanyCertificate companyCertificate = new CompanyCertificate();
-                            companyCertificate.setCertificateType(bo.getCertificateType());
-                            companyCertificate.setCompanyId(company.getCompanyId());
-                            companyCertificate.setCompanyName(company.getCompanyName());
-                            companyCertificate.setCreditCode(company.getCreditCode());
-                            companyCertificate.setCompanyType(company.getCompanyType());
-                            companyCertificate.setRegisteredCapital(company.getRegisteredCapital());
-                            companyCertificate.setLegalRepresentative(company.getLegalRepresentative());
-                            companyCertificate.setCompanyAddress(company.getCompanyAddress());
-                            companyCertificate.setEstablishDate(company.getEstablishDate());
-                            companyCertificate.setOperateDate(company.getOperateDate());
-                            companyCertificate.setRegistrationAuthority(company.getRegistrationAuthority());
-                            companyCertificate.setExperienceScope(company.getExperienceScope());
-                            companyCertificate.setCertificateName(item.getCertificateName());
-                            if (ObjectUtil.isNotEmpty(item.getIssuanceDateName())) {
-                                String issuanceDateName = item.getIssuanceDateName();
-                                Long dateTimeSec = DateUtils.dateTimeSec("yyyy/MM/dd", issuanceDateName);
-                                companyCertificate.setIssuanceDate(dateTimeSec);
-                            }
-                            if (ObjectUtil.isNotEmpty(item.getEffectiveDateName())) {
-                                if (item.getEffectiveDateName().equals("长期")) {
-                                    companyCertificate.setEffectiveDate(1L);
-                                } else {
-                                    String effectiveDateName = item.getEffectiveDateName();
-                                    Long operateDate = DateUtils.dateTimeSec("yyyy/MM/dd", effectiveDateName);
-                                    companyCertificate.setEffectiveDate(operateDate);
-                                }
-                            }
-                            companyCertificate.setIssuingAuthority(item.getIssuingAuthority());
-                            companyCertificate.setCreateTime(DateUtils.getNowTime());
-                            companyCertificate.setUpdateTime(DateUtils.getNowTime());
-                            this.baseMapper.insert(companyCertificate);
-                        }
-                    }
-                });
-                break;
-        }
-        return true;
-    }
-}

+ 0 - 209
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/impl/CompanyDepartmentServiceImpl.java

@@ -1,209 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.lang.Validator;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.stereotype.Service;
-import org.zhongzheng.common.exception.CustomException;
-import org.zhongzheng.common.utils.DateUtils;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyDepartmentQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyDepartment;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.mapper.CompanyDepartmentMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyDepartmentService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyDepartmentVo;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 企业部门Service业务层处理
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-@Service
-public class CompanyDepartmentServiceImpl extends ServiceImpl<CompanyDepartmentMapper, CompanyDepartment> implements ICompanyDepartmentService {
-
-    @Override
-    public CompanyDepartmentVo queryById(Long departmentId){
-        CompanyDepartment db = this.baseMapper.selectById(departmentId);
-        return BeanUtil.toBean(db, CompanyDepartmentVo.class);
-    }
-
-    @Override
-    public List<CompanyDepartmentVo> queryList(CompanyDepartmentQueryBo bo) {
-        LambdaQueryWrapper<CompanyDepartment> lqw = Wrappers.lambdaQuery();
-        lqw.eq(ObjectUtil.isNotEmpty(bo.getCompanyId()), CompanyDepartment::getCompanyId, bo.getCompanyId());
-        lqw.eq(StrUtil.isNotBlank(bo.getTenantId()), CompanyDepartment::getTenantId, bo.getTenantId());
-        lqw.eq(bo.getDepartmentType() != null, CompanyDepartment::getDepartmentType, bo.getDepartmentType());
-        lqw.eq(StrUtil.isNotBlank(bo.getRegisteredContacts()), CompanyDepartment::getRegisteredContacts, bo.getRegisteredContacts());
-        lqw.eq(StrUtil.isNotBlank(bo.getDepartmentPhone()), CompanyDepartment::getDepartmentPhone, bo.getDepartmentPhone());
-        lqw.eq(bo.getDepartmentNum() != null, CompanyDepartment::getDepartmentNum, bo.getDepartmentNum());
-        lqw.eq(StrUtil.isNotBlank(bo.getDepartmentRemarks()), CompanyDepartment::getDepartmentRemarks, bo.getDepartmentRemarks());
-        lqw.eq(ObjectUtil.isNotEmpty(bo.getDepartmentFartherId()), CompanyDepartment::getDepartmentFartherId, bo.getDepartmentFartherId());
-        lqw.eq(bo.getDepartmentLevel() != null, CompanyDepartment::getDepartmentLevel, bo.getDepartmentLevel());
-        lqw.eq(bo.getStatus() != null, CompanyDepartment::getStatus, 1);
-       return entity2Vo(this.list(lqw));
-    }
-
-    /**
-    * 实体类转化成视图对象
-    *
-    * @param collection 实体类集合
-    * @return
-    */
-    private List<CompanyDepartmentVo> entity2Vo(Collection<CompanyDepartment> collection) {
-        List<CompanyDepartmentVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, CompanyDepartmentVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<CompanyDepartment> page = (Page<CompanyDepartment>)collection;
-            Page<CompanyDepartmentVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page,pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
-        }
-        return voList;
-    }
-
-    @Override
-    public List<CompanyDepartment> buildDeptTree(List<CompanyDepartment> depts) {
-        List<CompanyDepartment> returnList = new ArrayList<CompanyDepartment>();
-        List<Long> tempList = new ArrayList<Long>();
-        for (CompanyDepartment dept : depts) {
-            tempList.add(dept.getDepartmentId());
-        }
-        for (Iterator<CompanyDepartment> iterator = depts.iterator(); iterator.hasNext(); ) {
-            CompanyDepartment dept = (CompanyDepartment) iterator.next();
-            // 如果是顶级节点, 遍历该父节点的所有子节点
-            if (!tempList.contains(dept.getDepartmentFartherId())) {
-                recursionFn(depts, dept);
-                returnList.add(dept);
-            }
-        }
-        if (returnList.isEmpty()) {
-            returnList = depts;
-        }
-        returnList=returnList.stream().filter(s->s.getDepartmentLevel()==1).collect(Collectors.toList());
-        return returnList;
-    }
-
-    /**
-     * 递归列表
-     */
-    private void recursionFn(List<CompanyDepartment> list, CompanyDepartment t) {
-        // 得到子节点列表
-        List<CompanyDepartment> childList = getChildList(list, t);
-        t.setChildren(childList);
-        for (CompanyDepartment tChild : childList) {
-            if (hasChild(list, tChild)) {
-                recursionFn(list, tChild);
-            }
-        }
-    }
-
-    private boolean hasChild(List<CompanyDepartment> list, CompanyDepartment t) {
-        return getChildList(list, t).size() > 0 ? true : false;
-    }
-
-    /**
-     * 得到子节点列表
-     */
-    private List<CompanyDepartment> getChildList(List<CompanyDepartment> list, CompanyDepartment t) {
-        List<CompanyDepartment> tlist = new ArrayList<CompanyDepartment>();
-        Iterator<CompanyDepartment> it = list.iterator();
-        while (it.hasNext()) {
-            CompanyDepartment n = (CompanyDepartment) it.next();
-                if (Validator.isNotNull(n.getDepartmentFartherId()) && n.getDepartmentFartherId().equals(t.getDepartmentId())) {
-                    tlist.add(n);
-            }
-        }
-        return tlist;
-    }
-
-
-    @Override
-    public Boolean insertByAddBo(CompanyDepartmentAddBo bo) {
-        CompanyDepartment add = BeanUtil.toBean(bo, CompanyDepartment.class);
-        validEntityBeforeSave(add);
-        if (ObjectUtil.isEmpty(add.getCompanyId())){
-            throw new CustomException("未选择企业");
-        }
-        if (ObjectUtil.isNotEmpty(add.getDepartmentId())){
-            CompanyDepartment companyDepartment = this.baseMapper.selectById(add.getDepartmentId());
-            if (ObjectUtil.isNotEmpty(companyDepartment)&&companyDepartment.getStatus().equals(1)){
-                add.setDepartmentFartherId(companyDepartment.getDepartmentId());
-                add.setDepartmentLevel(companyDepartment.getDepartmentLevel()+1L);
-            }
-            else {
-                throw new CustomException("父级部门不存在");
-            }
-        }else {
-            add.setDepartmentLevel(1L);
-        }
-        add.setCreateTime(DateUtils.getNowTime());
-        add.setUpdateTime(DateUtils.getNowTime());
-        return this.save(add);
-    }
-
-    @Override
-    public Boolean updateByEditBo(CompanyDepartmentEditBo bo) {
-        CompanyDepartment update = BeanUtil.toBean(bo, CompanyDepartment.class);
-        validEntityBeforeSave(update);
-        update.setUpdateTime(DateUtils.getNowTime());
-        return this.updateById(update);
-    }
-
-    /**
-     * 保存前的数据校验
-     *
-     * @param entity 实体类数据
-     */
-    private void validEntityBeforeSave(CompanyDepartment entity){
-        //TODO 做一些数据校验,如唯一约束
-    }
-    /**
-     * 获取当前部门所有子级部门列表集合
-     *
-     * @param departmentId 实体类数据
-     */
-    public List<CompanyDepartment> selectListByFartherId(Long departmentId){
-        ArrayList<CompanyDepartment> sonCompanyDepartmentList = new ArrayList<>();
-        List<CompanyDepartment> companyDepartments = this.baseMapper.selectList(new LambdaQueryWrapper<CompanyDepartment>().eq(CompanyDepartment::getDepartmentFartherId, departmentId).eq(CompanyDepartment::getStatus, 1));
-        if (ObjectUtil.isNotEmpty(companyDepartments)){
-            sonCompanyDepartmentList.addAll(companyDepartments);
-            companyDepartments.forEach(item->{
-                List<CompanyDepartment> companyDepartmentList = this.selectListByFartherId(item.getDepartmentId());
-                sonCompanyDepartmentList.addAll(companyDepartmentList);
-            });
-        }
-        return sonCompanyDepartmentList;
-    }
-    /**
-     * 删除当前部门及子级列表集合
-     *
-     * @param bo 实体类数据
-     */
-    @Override
-    public Boolean deleteWithValidByIds(CompanyDepartmentEditBo bo) {
-        CompanyDepartment companyDepartment = this.baseMapper.selectById(bo.getDepartmentId());
-        List<CompanyDepartment> companyDepartments = this.selectListByFartherId(bo.getDepartmentId());
-        companyDepartments.add(companyDepartment);
-        companyDepartments.forEach(item->{
-            item.setStatus(0);
-            this.baseMapper.updateById(item);
-        });
-        return true;
-    }
-
-}

+ 0 - 207
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/service/impl/CompanyServiceImpl.java

@@ -1,207 +0,0 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.service.impl;
-
-import cn.hutool.core.bean.BeanUtil;
-import cn.hutool.core.util.ObjectUtil;
-import cn.hutool.core.util.StrUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.github.pagehelper.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.zhongzheng.common.exception.CustomException;
-import org.zhongzheng.common.utils.DateUtils;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyAddBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyEditBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.bo.CompanyQueryBo;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.Company;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyCertificate;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyDepartment;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.mapper.CompanyMapper;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyCertificateService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyDepartmentService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.service.ICompanyService;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.vo.CompanyVo;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.domain.Staff;
-import org.zhongzheng.feignclient.zzbusinessinfo.staff.service.IStaffService;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * 企业Service业务层处理
- *
- * @author ruoyi
- * @date 2024-03-18
- */
-@Service
-public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> implements ICompanyService {
-    @Autowired
-    private ICompanyDepartmentService iCompanyDepartmentService;
-    @Autowired
-    private ICompanyCertificateService iCompanyCertificateService;
-    @Autowired
-    private IStaffService iStaffService;
-
-    @Override
-    public CompanyVo queryById(Long companyId) {
-        Company db = this.baseMapper.selectById(companyId);
-        return BeanUtil.toBean(db, CompanyVo.class);
-    }
-
-    @Override
-    public List<CompanyVo> queryList(CompanyQueryBo bo) {
-        LambdaQueryWrapper<Company> lqw = Wrappers.lambdaQuery();
-        lqw.like(StrUtil.isNotBlank(bo.getCompanyName()), Company::getCompanyName, bo.getCompanyName());
-        lqw.eq(StrUtil.isNotBlank(bo.getCreditCode()), Company::getCreditCode, bo.getCreditCode());
-        lqw.eq(bo.getCompanyType() != null, Company::getCompanyType, bo.getCompanyType());
-        lqw.eq(bo.getRegisteredCapital() != null, Company::getRegisteredCapital, bo.getRegisteredCapital());
-        lqw.eq(StrUtil.isNotBlank(bo.getLegalRepresentative()), Company::getLegalRepresentative, bo.getLegalRepresentative());
-        lqw.eq(StrUtil.isNotBlank(bo.getCompanyAddress()), Company::getCompanyAddress, bo.getCompanyAddress());
-        lqw.eq(bo.getEstablishDate() != null, Company::getEstablishDate, bo.getEstablishDate());
-        lqw.eq(bo.getOperateDate() != null, Company::getOperateDate, bo.getOperateDate());
-        lqw.eq(StrUtil.isNotBlank(bo.getRegistrationAuthority()), Company::getRegistrationAuthority, bo.getRegistrationAuthority());
-        lqw.eq(StrUtil.isNotBlank(bo.getExperienceScope()), Company::getExperienceScope, bo.getExperienceScope());
-        lqw.eq(StrUtil.isNotBlank(bo.getCompanyContacts()), Company::getCompanyContacts, bo.getCompanyContacts());
-        lqw.eq(StrUtil.isNotBlank(bo.getContactPhone()), Company::getContactPhone, bo.getContactPhone());
-        lqw.eq(StrUtil.isNotBlank(bo.getDepartment()), Company::getDepartment, bo.getDepartment());
-        lqw.eq(StrUtil.isNotBlank(bo.getPosition()), Company::getPosition, bo.getPosition());
-        lqw.eq(StrUtil.isNotBlank(bo.getCompanyRemarks()), Company::getCompanyRemarks, bo.getCompanyRemarks());
-        lqw.eq(bo.getCompanyLevel() != null, Company::getCompanyLevel, bo.getCompanyLevel());
-        lqw.eq(ObjectUtil.isNotEmpty(bo.getFatherId()), Company::getFatherId, bo.getFatherId());
-        lqw.eq(bo.getStatus() != null, Company::getStatus, 1);
-        return entity2Vo(this.list(lqw));
-
-    }
-
-    /**
-     * 实体类转化成视图对象
-     *
-     * @param collection 实体类集合
-     * @return
-     */
-    private List<CompanyVo> entity2Vo(Collection<Company> collection) {
-        List<CompanyVo> voList = collection.stream()
-                .map(any -> BeanUtil.toBean(any, CompanyVo.class))
-                .collect(Collectors.toList());
-        if (collection instanceof Page) {
-            Page<Company> page = (Page<Company>) collection;
-            Page<CompanyVo> pageVo = new Page<>();
-            BeanUtil.copyProperties(page, pageVo);
-            pageVo.addAll(voList);
-            voList = pageVo;
-        }
-        return voList;
-    }
-
-    @Override
-    public Boolean insertByAddBo(CompanyAddBo bo) {
-        Company add = BeanUtil.toBean(bo, Company.class);
-        validEntityBeforeSave(add);
-        Date issuancedate = new Date(bo.getEstablishDate() * 1000L);
-        Date effectivedate = new Date(bo.getOperateDate() * 1000L);
-        if (effectivedate.compareTo(issuancedate) < 0) {
-            throw new CustomException("营业时间错误");
-        }
-        if (ObjectUtil.isNotEmpty(add.getCompanyId())) {
-            Company company = this.baseMapper.selectById(add.getCompanyId());
-            if (ObjectUtil.isEmpty(company) && company.getStatus().equals(1)) {
-                throw new CustomException("总公司不存在");
-            }
-            add.setFatherId(add.getCompanyId());
-            Long companyLevel = company.getCompanyLevel();
-            add.setCompanyLevel(companyLevel + 1L);
-        } else {
-            add.setCompanyLevel(1L);
-        }
-        add.setCreateTime(DateUtils.getNowTime());
-        add.setUpdateTime(DateUtils.getNowTime());
-        return this.save(add);
-    }
-
-    @Override
-    public Boolean updateByEditBo(CompanyEditBo bo) {
-        Company update = BeanUtil.toBean(bo, Company.class);
-        if (ObjectUtil.isAllNotEmpty(bo.getEstablishDate(), bo.getOperateDate())) {
-            Date issuancedate = new Date(bo.getEstablishDate() * 1000L);
-            Date effectivedate = new Date(bo.getOperateDate() * 1000L);
-            if (effectivedate.compareTo(issuancedate) < 0) {
-                throw new CustomException("营业时间错误");
-            }
-        }
-        validEntityBeforeSave(update);
-        update.setUpdateTime(DateUtils.getNowTime());
-        return this.updateById(update);
-    }
-
-    /**
-     * 保存前的数据校验
-     *
-     * @param entity 实体类数据
-     */
-    private void validEntityBeforeSave(Company entity) {
-        //TODO 做一些数据校验,如唯一约束
-    }
-
-    @Override
-    public Boolean deleteWithValidByIds(CompanyEditBo bo) {
-        Company company = this.baseMapper.selectById(bo.getCompanyId());
-        if (ObjectUtil.isEmpty(company)) {
-            throw new CustomException("当前企业不存在");
-        }
-        company.setStatus(0);
-        this.baseMapper.updateById(company);
-        return true;
-    }
-
-    /**
-     * 查询企业部门列表
-     *
-     * @param bo 实体类数据
-     */
-    @Override
-    public List<CompanyVo> selectCompanyDepartment(CompanyQueryBo bo) {
-        List<CompanyVo> companyVos = this.queryList(bo);
-        if (ObjectUtil.isNotEmpty(companyVos)) {
-            companyVos.forEach(item -> {
-                //判断当前企业是否关联企业证书和员工信息
-                List<CompanyCertificate> companyCertificates = iCompanyCertificateService.list(new LambdaQueryWrapper<CompanyCertificate>().eq(CompanyCertificate::getCompanyId, item.getCompanyId()).eq(CompanyCertificate::getStatus, 1));
-                List<Staff> staffList = iStaffService.list(new LambdaQueryWrapper<Staff>().eq(Staff::getCompanyId, item.getCompanyId()).eq(Staff::getStatus, 1));
-                if (ObjectUtil.isNotEmpty(companyCertificates) || ObjectUtil.isNotEmpty(staffList)) {
-                    item.setDeleteStatus(2);
-                } else {
-                    item.setDeleteStatus(1);
-                }
-                List<CompanyDepartment> list = iCompanyDepartmentService.list(new LambdaQueryWrapper<CompanyDepartment>().eq(CompanyDepartment::getCompanyId, item.getCompanyId())
-                        .eq(CompanyDepartment::getStatus, 1));
-                list = iCompanyDepartmentService.buildDeptTree(list);
-                if (ObjectUtil.isNotEmpty(list)) {
-                    item.setCompanyDepartmentList(list);
-                }
-            });
-        }
-        //根据公司以及部门联系人筛选
-        ArrayList<Long> companyIdList = new ArrayList<>();
-        if (ObjectUtil.isNotEmpty(bo.getAllTypeName())) {
-            List<CompanyDepartment> departmentContacts = iCompanyDepartmentService.list(new LambdaQueryWrapper<CompanyDepartment>().eq(CompanyDepartment::getRegisteredContacts, bo.getAllTypeName()).eq(CompanyDepartment::getStatus, 1));
-            CompanyQueryBo companyQueryBo = new CompanyQueryBo();
-            companyQueryBo.setCompanyName(bo.getAllTypeName());
-            List<CompanyVo> companyVos1 = this.queryList(companyQueryBo);
-            List<Long> companyIds = companyVos1.stream().map(CompanyVo::getCompanyId).collect(Collectors.toList());
-            companyIds.addAll(companyIds);
-            for (CompanyDepartment companyDepartment : departmentContacts) {
-                Long companyId = companyDepartment.getCompanyId();
-                companyIdList.add(companyId);
-            }
-            //筛选公司以及部门中包含参数姓名
-            List<CompanyVo> filteredCompanyVos = companyVos.stream()
-                    .filter(companyVo -> companyIdList.contains(companyVo.getCompanyId()))
-                    .collect(Collectors.toList());
-            return filteredCompanyVos;
-        }
-        return companyVos;
-    }
-}

+ 46 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/controller/ICompanyCertificateClientFallback.java

@@ -0,0 +1,46 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.controller;
+import org.springframework.stereotype.Component;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyCertificateAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyCertificateEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyCertificateQueryBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.ExcelCompanyCertificateBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.service.ICompanyCertificateClient;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo.CompanyCertificateVo;
+
+import java.util.List;
+
+/**
+ * 企业证书Controller
+ * 
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+public class ICompanyCertificateClientFallback implements ICompanyCertificateClient {
+
+    @Override
+    public R<CompanyCertificateVo> queryList(CompanyCertificateQueryBo bo) {
+        return R.fail("查询企业证书失败");
+    }
+
+    @Override
+    public R<Boolean> insertByAddBo(CompanyCertificateAddBo bo) {
+        return R.fail("新增企业证书失败");
+    }
+
+    @Override
+    public R<Boolean> updateByEditBo(CompanyCertificateEditBo bo) {
+        return R.fail("修改企业证书失败");
+    }
+
+    @Override
+    public R<Boolean> deleteWithValidByIds(CompanyCertificateEditBo bo) {
+        return R.fail("删除企业证书失败");
+    }
+
+    @Override
+    public R<Boolean> importCertificateExcel(ExcelCompanyCertificateBo bo) {
+        return R.fail("导入企业证书失败");
+    }
+}

+ 41 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/controller/ICompanyClientFallback.java

@@ -0,0 +1,41 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.controller;
+import org.springframework.stereotype.Component;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyQueryBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.service.ICompanyClient;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo.CompanyVo;
+/**
+ * 企业Controller
+ * 
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+public class ICompanyClientFallback implements ICompanyClient{
+    @Override
+    public R<CompanyVo> queryList(CompanyQueryBo bo) {
+        return R.fail("查询企业证书列表失败");
+    }
+
+    @Override
+    public R<Boolean> insertByAddBo(CompanyAddBo bo) {
+        return R.fail("新增企业信息失败");
+    }
+
+    @Override
+    public R<Boolean> updateByEditBo(CompanyEditBo bo) {
+        return R.fail("修改企业信息失败");
+    }
+
+    @Override
+    public R<Boolean> deleteWithValidByIds(CompanyEditBo bo) {
+        return R.fail("删除企业信息失败");
+    }
+
+    @Override
+    public R<CompanyVo> selectCompanyDepartment(CompanyQueryBo bo) {
+        return R.fail("查询企业部门信息失败");
+    }
+}

+ 32 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/controller/ICompanyDepartmentClientFallback.java

@@ -0,0 +1,32 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.controller;
+
+
+import org.springframework.stereotype.Component;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyDepartmentAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyDepartmentEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.service.ICompanyDepartmentClient;
+
+/**
+ * 企业部门Controller
+ * 
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+public class ICompanyDepartmentClientFallback implements ICompanyDepartmentClient {
+    @Override
+    public R<Boolean> insertByAddBo(CompanyDepartmentAddBo bo) {
+        return R.fail("新增企业部门信息失败");
+    }
+
+    @Override
+    public R<Boolean> updateByEditBo(CompanyDepartmentEditBo bo) {
+        return R.fail("修改企业部门信息失败");
+    }
+
+    @Override
+    public R<Boolean> deleteWithValidByIds(CompanyDepartmentEditBo bo) {
+        return R.fail("删除企业部门失败");
+    }
+}

+ 5 - 2
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyAddBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyAddBo.java

@@ -1,9 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
+
 
 /**
  * 企业添加对象 company
@@ -13,7 +15,8 @@ import lombok.Data;
  */
 @Data
 @ApiModel("企业添加对象")
-public class CompanyAddBo {
+public class CompanyAddBo implements Serializable {
+    private static final long serialVersionUID = 1L;
 
     /** 企业名称 */
     @ApiModelProperty("企业名称")

+ 4 - 3
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyCertificateAddBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateAddBo.java

@@ -1,9 +1,10 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
 import java.util.List;
 
 
@@ -15,8 +16,8 @@ import java.util.List;
  */
 @Data
 @ApiModel("企业证书添加对象")
-public class CompanyCertificateAddBo {
-
+public class CompanyCertificateAddBo implements Serializable {
+    private static final long serialVersionUID = 1L;
     /** 公司id */
     @ApiModelProperty("公司id")
     private Long companyId;

+ 4 - 2
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyCertificateEditBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateEditBo.java

@@ -1,9 +1,10 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
 import java.util.List;
 
 
@@ -15,7 +16,8 @@ import java.util.List;
  */
 @Data
 @ApiModel("企业证书编辑对象")
-public class CompanyCertificateEditBo {
+public class CompanyCertificateEditBo implements Serializable {
+    private static final long serialVersionUID = 1L;
 
     /** $column.columnComment */
     @ApiModelProperty("$column.columnComment")

+ 5 - 3
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyCertificateInfo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateInfo.java

@@ -1,9 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
+
 
 /**
  * 企业证书添加对象 company_certificate
@@ -13,8 +15,8 @@ import lombok.Data;
  */
 @Data
 @ApiModel("企业证书添加对象")
-public class CompanyCertificateInfo {
-
+public class CompanyCertificateInfo implements Serializable {
+    private static final long serialVersionUID = 1L;
     /** 申请日期 */
     @ApiModelProperty("申请日期")
     private Long applicationDate;

+ 6 - 5
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyCertificateQueryBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyCertificateQueryBo.java

@@ -1,11 +1,13 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 
+import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
-import org.zhongzheng.common.core.domain.BaseEntity;
+
+import java.io.Serializable;
 
 /**
  * 企业证书分页查询对象 company_certificate
@@ -14,10 +16,9 @@ import org.zhongzheng.common.core.domain.BaseEntity;
  * @date 2024-03-18
  */
 @Data
-@EqualsAndHashCode(callSuper = true)
+@TableName("zhongzheng_user")
 @ApiModel("企业证书分页查询对象")
-public class CompanyCertificateQueryBo extends BaseEntity {
-
+public class CompanyCertificateQueryBo implements Serializable {
 	/** 分页大小 */
 	@ApiModelProperty("分页大小")
 	private Integer pageSize;

+ 5 - 2
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyDepartmentAddBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyDepartmentAddBo.java

@@ -1,9 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
+
 
 /**
  * 企业部门添加对象 company_department
@@ -13,7 +15,8 @@ import lombok.Data;
  */
 @Data
 @ApiModel("企业部门添加对象")
-public class CompanyDepartmentAddBo {
+public class CompanyDepartmentAddBo implements Serializable {
+    private static final long serialVersionUID = 1L;
     @ApiModelProperty("机构名称")
     private String tenantId;
     /** 公司id */

+ 5 - 2
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyDepartmentEditBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyDepartmentEditBo.java

@@ -1,9 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
+
 
 /**
  * 企业部门编辑对象 company_department
@@ -13,7 +15,8 @@ import lombok.Data;
  */
 @Data
 @ApiModel("企业部门编辑对象")
-public class CompanyDepartmentEditBo {
+public class CompanyDepartmentEditBo implements Serializable {
+    private static final long serialVersionUID = 1L;
 
     /** $column.columnComment */
     @ApiModelProperty("$column.columnComment")

+ 6 - 5
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyDepartmentQueryBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyDepartmentQueryBo.java

@@ -1,10 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.zhongzheng.common.core.domain.BaseEntity;
+
+
+import java.io.Serializable;
 
 /**
  * 企业部门分页查询对象 company_department
@@ -13,9 +14,9 @@ import org.zhongzheng.common.core.domain.BaseEntity;
  * @date 2024-03-18
  */
 @Data
-@EqualsAndHashCode(callSuper = true)
 @ApiModel("企业部门分页查询对象")
-public class CompanyDepartmentQueryBo extends BaseEntity {
+public class CompanyDepartmentQueryBo implements Serializable {
+	private static final long serialVersionUID = 1L;
 
 	/** 分页大小 */
 	@ApiModelProperty("分页大小")

+ 5 - 2
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyEditBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyEditBo.java

@@ -1,9 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
+
 
 /**
  * 企业编辑对象 company
@@ -13,7 +15,8 @@ import lombok.Data;
  */
 @Data
 @ApiModel("企业编辑对象")
-public class CompanyEditBo {
+public class CompanyEditBo implements Serializable {
+    private static final long serialVersionUID = 1L;
 
     /** $column.columnComment */
     @ApiModelProperty("$column.columnComment")

+ 7 - 5
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/CompanyQueryBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/CompanyQueryBo.java

@@ -1,10 +1,12 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import lombok.EqualsAndHashCode;
-import org.zhongzheng.common.core.domain.BaseEntity;
+
+
+import java.io.Serializable;
+
 /**
  * 企业分页查询对象 company
  *
@@ -12,9 +14,9 @@ import org.zhongzheng.common.core.domain.BaseEntity;
  * @date 2024-03-18
  */
 @Data
-@EqualsAndHashCode(callSuper = true)
 @ApiModel("企业分页查询对象")
-public class CompanyQueryBo extends BaseEntity {
+public class CompanyQueryBo implements Serializable {
+	private static final long serialVersionUID = 1L;
 
 	/** 分页大小 */
 	@ApiModelProperty("分页大小")

+ 5 - 2
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/bo/ExcelCompanyCertificateBo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/bo/ExcelCompanyCertificateBo.java

@@ -1,9 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.bo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo;
 
 import io.swagger.annotations.ApiModel;
 import lombok.Data;
 import org.springframework.web.multipart.MultipartFile;
 
+import java.io.Serializable;
+
 
 /**
  * 企业证书文档列表添加对象 company
@@ -13,7 +15,8 @@ import org.springframework.web.multipart.MultipartFile;
  */
 @Data
 @ApiModel("企业添加对象")
-public class ExcelCompanyCertificateBo {
+public class ExcelCompanyCertificateBo implements Serializable {
+   private static final long serialVersionUID = 1L;
 
    private MultipartFile file;
    private Integer certificateType;

+ 1 - 1
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/domain/Company.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/Company.java

@@ -1,4 +1,4 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.domain;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.domain;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;

+ 1 - 1
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/domain/CompanyCertificate.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/CompanyCertificate.java

@@ -1,4 +1,4 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.domain;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.domain;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;

+ 1 - 1
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/domain/CompanyDepartment.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/CompanyDepartment.java

@@ -1,4 +1,4 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.domain;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.domain;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;

+ 1 - 1
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/domain/CompanyUser.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/domain/CompanyUser.java

@@ -1,4 +1,4 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.domain;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.domain;
 
 import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;

+ 67 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/service/ICompanyCertificateClient.java

@@ -0,0 +1,67 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.service;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.controller.ICompanyCertificateClientFallback;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyCertificateAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyCertificateEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyCertificateQueryBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.ExcelCompanyCertificateBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo.CompanyCertificateVo;
+
+/**
+ * 企业证书Service接口
+ *
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+@FeignClient(
+		value = "SERVER-INfO",
+		fallback = ICompanyCertificateClientFallback.class
+)
+public interface ICompanyCertificateClient{
+
+	String API_PREFIX = "/system/certificate";
+
+
+	/**
+	 * 查询列表
+	 */
+	@GetMapping(API_PREFIX + "/certificateList")
+	R<CompanyCertificateVo> queryList(CompanyCertificateQueryBo bo);
+
+	/**
+	 * 根据新增业务对象插入企业证书
+	 * @param bo 企业证书新增业务对象
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/addCertificate")
+	R<Boolean> insertByAddBo(CompanyCertificateAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改企业证书
+	 * @param bo 企业证书编辑业务对象
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/updateCertificate")
+	R<Boolean> updateByEditBo(CompanyCertificateEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param bo
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/deleteCertificate")
+	R<Boolean> deleteWithValidByIds(CompanyCertificateEditBo bo);
+
+	/**
+	 * 导入企业证书文件
+	 * @param bo 主键集合
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/importCertificateList")
+	R<Boolean> importCertificateExcel(ExcelCompanyCertificateBo bo);
+}

+ 65 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/service/ICompanyClient.java

@@ -0,0 +1,65 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.service;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.controller.ICompanyClientFallback;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyQueryBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo.CompanyVo;
+
+
+/**
+ * 企业Service接口
+ *
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+@FeignClient(
+		value = "SERVER-INfO",
+		fallback = ICompanyClientFallback.class
+)
+public interface ICompanyClient{
+	String API_PREFIX = "/system/company";
+
+
+	/**
+	 * 查询列表
+	 */
+	@GetMapping(API_PREFIX + "/companyList")
+	R<CompanyVo> queryList(CompanyQueryBo bo);
+
+	/**
+	 * 根据新增业务对象插入企业
+	 * @param bo 企业新增业务对象
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/addCompany")
+	R<Boolean> insertByAddBo(CompanyAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改企业
+	 * @param bo 企业编辑业务对象
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/updateCompany")
+	R<Boolean> updateByEditBo(CompanyEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param bo 获取ids
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/deleteCompany")
+	R<Boolean> deleteWithValidByIds(CompanyEditBo bo);
+	/**
+	 * 查询企业部门列表
+	 * @param bo
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/departmentList")
+	R<CompanyVo> selectCompanyDepartment(CompanyQueryBo bo);
+}

+ 49 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/service/ICompanyDepartmentClient.java

@@ -0,0 +1,49 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.service;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.controller.ICompanyDepartmentClientFallback;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyDepartmentAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.bo.CompanyDepartmentEditBo;
+
+/**
+ * 企业部门Service接口
+ *
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+@FeignClient(
+		value = "SERVER-INfO",
+		fallback = ICompanyDepartmentClientFallback.class
+)
+public interface ICompanyDepartmentClient{
+
+	String API_PREFIX = "/system/department";
+
+
+	/**
+	 * 根据新增业务对象插入企业部门
+	 * @param bo 企业部门新增业务对象
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/addDepartment")
+	R<Boolean> insertByAddBo(CompanyDepartmentAddBo bo);
+
+	/**
+	 * 根据编辑业务对象修改企业部门
+	 * @param bo 企业部门编辑业务对象
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/updateDepartment")
+	R<Boolean> updateByEditBo(CompanyDepartmentEditBo bo);
+
+	/**
+	 * 校验并删除数据
+	 * @param bo 是否校验,true-删除前校验,false-不校验
+	 * @return
+	 */
+	@PostMapping(API_PREFIX + "/deleteDepartment")
+	R<Boolean> deleteWithValidByIds(CompanyDepartmentEditBo bo);
+}

+ 4 - 3
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/vo/CompanyCertificateVo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyCertificateVo.java

@@ -1,10 +1,11 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.vo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo;
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.zhongzheng.common.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.Excel;
 
+import java.io.Serializable;
 
 /**
  * 企业证书视图对象 mall_package
@@ -14,7 +15,7 @@ import org.zhongzheng.common.annotation.Excel;
  */
 @Data
 @ApiModel("企业证书视图对象")
-public class CompanyCertificateVo {
+public class CompanyCertificateVo implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/** $pkColumn.columnComment */

+ 4 - 3
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/vo/CompanyDepartmentVo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyDepartmentVo.java

@@ -1,11 +1,12 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.vo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo;
 
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.zhongzheng.common.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.Excel;
 
+import java.io.Serializable;
 import java.util.List;
 
 
@@ -17,7 +18,7 @@ import java.util.List;
  */
 @Data
 @ApiModel("企业部门视图对象")
-public class CompanyDepartmentVo {
+public class CompanyDepartmentVo implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/** $pkColumn.columnComment */

+ 4 - 3
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/vo/CompanyUserVo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyUserVo.java

@@ -1,11 +1,12 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.vo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo;
 
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.zhongzheng.common.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.Excel;
 
+import java.io.Serializable;
 
 /**
  * 企业用户视图对象 mall_package
@@ -15,7 +16,7 @@ import org.zhongzheng.common.annotation.Excel;
  */
 @Data
 @ApiModel("企业用户视图对象")
-public class CompanyUserVo {
+public class CompanyUserVo implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/** $pkColumn.columnComment */

+ 6 - 5
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/vo/CompanyVo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/CompanyVo.java

@@ -1,12 +1,13 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.vo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo;
 
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.zhongzheng.common.annotation.Excel;
-import org.zhongzheng.feignclient.zzbusinessinfo.company.domain.CompanyDepartment;
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.domain.CompanyDepartment;
 
+import java.io.Serializable;
 import java.util.List;
 
 
@@ -18,7 +19,7 @@ import java.util.List;
  */
 @Data
 @ApiModel("企业视图对象")
-public class CompanyVo {
+public class CompanyVo implements Serializable {
 	private static final long serialVersionUID = 1L;
 
 	/** $pkColumn.columnComment */
@@ -37,7 +38,7 @@ public class CompanyVo {
 	@ApiModelProperty("企业信用代码")
 	private String creditCode;
 	/** 企业类型 1:有限责任公司 2:国有企业 3:集体企业 4:股份合作企业 5:联营企业 6:私营企业 7:其他企业 8 合资经营企业(港或澳、台资) 9:合作经营企业(港或澳、台资) 10:港、澳、台商独资经营企业 11:港、澳、台商投资股份有限公司 12:其他港澳台商投资企业 13:中外合资经营企业 14:中外合作经营企业 15:外资企业 16:外商投资股份有限公司 17:其他外商投资企业 */
-	@Excel(name = "企业类型 1:有限责任公司 2:国有企业 3:集体企业 4:股份合作企业 5:联营企业 6:私营企业 7:其他企业 8 合资经营企业" , readConverterExp = "港=或澳、台资")
+	@Excel(name = "企业类型 1:有限责任公司 2:国有企业 3:集体企业 4:股份合作企业 5:联营企业 6:私营企业 7:其他企业 8 合资经营企业")
 	@ApiModelProperty("企业类型 1:有限责任公司 2:国有企业 3:集体企业 4:股份合作企业 5:联营企业 6:私营企业 7:其他企业 8 合资经营企业(港或澳、台资) 9:合作经营企业(港或澳、台资) 10:港、澳、台商独资经营企业 11:港、澳、台商投资股份有限公司 12:其他港澳台商投资企业 13:中外合资经营企业 14:中外合作经营企业 15:外资企业 16:外商投资股份有限公司 17:其他外商投资企业")
 	private Long companyType;
 	/** 注册资本 */

+ 5 - 3
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/company/vo/ExcelCompanyCertificateVo.java → zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/company/entity/vo/ExcelCompanyCertificateVo.java

@@ -1,11 +1,12 @@
-package org.zhongzheng.feignclient.zzbusinessinfo.company.vo;
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.company.entity.vo;
 
 
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
-import org.zhongzheng.common.annotation.Excel;
+import cn.afterturn.easypoi.excel.annotation.Excel;
 
+import java.io.Serializable;
 
 /**
  * 企业证书表格导入视图对象 mall_package
@@ -15,7 +16,8 @@ import org.zhongzheng.common.annotation.Excel;
  */
 @Data
 @ApiModel("企业证书视图对象")
-public class ExcelCompanyCertificateVo {
+public class ExcelCompanyCertificateVo implements Serializable {
+	private static final long serialVersionUID = 1L;
 	/** 机构名称 */
 	@Excel(name = "机构名称")
 	@ApiModelProperty("机构名称")

+ 15 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/staff/controller/IStaffBankInfoClientFallback.java

@@ -0,0 +1,15 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.controller;
+
+import org.springframework.stereotype.Component;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.service.IStaffBankInfoClient;
+
+/**
+ * 员工银行信息Controller
+ * 
+ * @author ruoyi
+ * @date 2024-03-21
+ */
+@Component
+public class IStaffBankInfoClientFallback implements IStaffBankInfoClient {
+
+}

+ 43 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/staff/controller/IStaffCertificateClientFallback.java

@@ -0,0 +1,43 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.controller;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.bo.StaffCertificateAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.bo.StaffCertificateEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.bo.StaffCertificateQueryBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.service.IStaffCertificateClient;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.vo.StaffCertificateVo;
+/**
+ * 员工证书Controller
+ * 
+ * @author ruoyi
+ * @date 2024-03-18
+ */
+@Component
+public class IStaffCertificateClientFallback implements IStaffCertificateClient {
+    @Override
+    public R<StaffCertificateVo> queryList(StaffCertificateQueryBo bo) {
+        return R.fail("查询员工列表失败");
+    }
+
+    @Override
+    public R<Boolean> insertByAddBo(StaffCertificateAddBo bo) {
+        return R.fail("新增员工证书失败");
+    }
+
+    @Override
+    public R<Boolean> updateByEditBo(StaffCertificateEditBo bo) {
+        return R.fail("修改员工证书失败");
+    }
+
+    @Override
+    public R<Boolean> deleteWithValidByIds(StaffCertificateEditBo bo) {
+        return R.fail("删除员工证书失败");
+    }
+
+    @Override
+    public R<Boolean> importStaffCertificateList(MultipartFile file) {
+        return R.fail("员工证书表格导入失败");
+    }
+
+}

+ 48 - 0
zzbusiness-info/src/main/java/org/zhongzheng/feignclient/zzbusinessinfo/controller/staff/controller/IStaffClientFallback.java

@@ -0,0 +1,48 @@
+package org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.controller;
+
+
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+import org.zhongzheng.common.utils.R;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.bo.StaffAddBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.bo.StaffEditBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.bo.StaffQueryBo;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.service.IStaffClient;
+import org.zhongzheng.feignclient.zzbusinessinfo.controller.staff.entity.vo.StaffVo;
+
+import java.util.List;
+
+/**
+ * 企业部门员工Controller
+ * 
+ * @author ruoyi
+ * @date 2024-03-21
+ */
+@Component
+public class IStaffClientFallback implements IStaffClient {
+
+    @Override
+    public R<Boolean> insertByAddBo(StaffAddBo bo) {
+        return R.fail("新增/修改员工信息失败");
+    }
+
+    @Override
+    public R<Boolean> updateByEditBo(StaffEditBo bo) {
+        return R.fail("修改员工信息失败");
+    }
+
+    @Override
+    public R<Boolean> deleteWithValidByIds(StaffEditBo bo) {
+        return R.fail("删除员工信息失败");
+    }
+
+    @Override
+    public R<StaffVo> selectStaffList(StaffQueryBo bo) {
+        return R.fail("查询员工信息失败");
+    }
+
+    @Override
+    public R<Boolean> importExcelList(MultipartFile file) {
+        return R.fail("导入员工信息失败");
+    }
+}

Някои файлове не бяха показани, защото твърде много файлове са промени