孔向阳 6 months ago
commit
071fd28540
100 changed files with 9494 additions and 0 deletions
  1. 183 0
      uacrd-manager-server/pom.xml
  2. 27 0
      uacrd-manager-server/src/main/java/com/crm/manager/ManagerApplication.java
  3. 52 0
      uacrd-manager-server/src/main/java/com/crm/manager/configuration/FeignConfiguration.java
  4. 66 0
      uacrd-manager-server/src/main/java/com/crm/manager/configuration/FeignMultipartSpringFormEncoder.java
  5. 37 0
      uacrd-manager-server/src/main/java/com/crm/manager/configuration/FeignMultipartSupportConfig.java
  6. 70 0
      uacrd-manager-server/src/main/java/com/crm/manager/configuration/InterceptorRoleConfiguration.java
  7. 33 0
      uacrd-manager-server/src/main/java/com/crm/manager/configuration/ThreadPoolConfig.java
  8. 80 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountApplyController.java
  9. 66 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountBelongChangeController.java
  10. 95 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountController.java
  11. 107 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountDealPasswordChangeController.java
  12. 110 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountDealPasswordResetController.java
  13. 107 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountInvestorPasswordChangeController.java
  14. 98 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountLeverageChangeController.java
  15. 72 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountTradingActivityController.java
  16. 74 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountTypeController.java
  17. 73 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/ActivityBaiduController.java
  18. 99 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/ActivityDubaiExhibitionController.java
  19. 56 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/ActivityRequiteRebateController.java
  20. 60 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentActivityCustomLoginController.java
  21. 61 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentActivityEnrollController.java
  22. 30 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentActivityStatisticsController.java
  23. 39 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentApplyController.java
  24. 97 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceCommissionTransferController.java
  25. 30 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceFrozenController.java
  26. 92 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceRecordController.java
  27. 116 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceTransferController.java
  28. 65 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBelongChangeController.java
  29. 51 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentPcExcludeController.java
  30. 31 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentPointController.java
  31. 120 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/AuthorityController.java
  32. 91 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/BusinessEmailController.java
  33. 56 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CommonController.java
  34. 239 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/ControlPanelController.java
  35. 152 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CooperativePartnerController.java
  36. 132 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityApplyController.java
  37. 53 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityDepositGiveController.java
  38. 263 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityDepositRaffleController.java
  39. 55 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityExceptionalManageController.java
  40. 95 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityExceptionalManagerReasonController.java
  41. 53 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityGiveController.java
  42. 143 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredAgentController.java
  43. 143 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredAgentVipController.java
  44. 186 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredController.java
  45. 143 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredEliteAgentVipController.java
  46. 55 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityMidyearTenPercentGiveAgentController.java
  47. 53 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityMidyearTenPercentGiveController.java
  48. 131 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityNoWorriesController.java
  49. 57 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityPercentageGiveController.java
  50. 117 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityRequiteApplyController.java
  51. 52 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivitySurplusExcludeController.java
  52. 95 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivitySurplusGiveController.java
  53. 55 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityTwoPercentGiveAgentController.java
  54. 53 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityTwoPercentGiveController.java
  55. 101 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityUcoindRewardController.java
  56. 62 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomAllocationRosterAreaController.java
  57. 313 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomAllocationRosterController.java
  58. 63 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomAllocationRosterScheduledController.java
  59. 60 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomBankController.java
  60. 42 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomCommissionApplyController.java
  61. 39 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomCommunicationPreferenceController.java
  62. 55 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomEmailSubscribeRecordController.java
  63. 80 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomFileController.java
  64. 86 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupController.java
  65. 71 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupDemoController.java
  66. 60 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupInterestFreeController.java
  67. 69 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupTypeController.java
  68. 536 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomInfoController.java
  69. 42 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomKycApproveController.java
  70. 100 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginCompletionController.java
  71. 227 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginController.java
  72. 37 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDeleteController.java
  73. 60 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDeleteExcludeController.java
  74. 106 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDeleteRecordController.java
  75. 99 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDemoController.java
  76. 49 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginGroupHistoryController.java
  77. 83 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginHistoryController.java
  78. 52 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginSpecialCalcController.java
  79. 94 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomNewsController.java
  80. 33 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomNoticeController.java
  81. 46 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomRemarkController.java
  82. 59 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomReportController.java
  83. 81 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomWalletHistoryController.java
  84. 122 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/DepartmentController.java
  85. 57 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/EmailUnsubscribeController.java
  86. 123 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceAgentTransferController.java
  87. 224 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceAgentWithdrawController.java
  88. 53 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceCustomTransferController.java
  89. 154 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceDepositController.java
  90. 87 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceDepositGiveController.java
  91. 51 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceFollowTransferController.java
  92. 198 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceRateController.java
  93. 106 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceSynonymTransferController.java
  94. 86 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceTradeInterestController.java
  95. 136 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceTransferController.java
  96. 68 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceTransferRiskRemindController.java
  97. 309 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceWithdrawController.java
  98. 50 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FollowCommissionConfigController.java
  99. 44 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FollowCptController.java
  100. 52 0
      uacrd-manager-server/src/main/java/com/crm/manager/controller/FollowCptInfoController.java

+ 183 - 0
uacrd-manager-server/pom.xml

@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>com.ucard.manager</groupId>
+  <artifactId>com-ucard-manager</artifactId>
+  <version>1.0.0</version>
+  <packaging>jar</packaging>
+
+  <name>com_ucard_manager</name>
+  <description>crm ucard manager module for eman</description>
+
+  <parent>
+    <groupId>org.springframework.boot</groupId>
+    <artifactId>spring-boot-starter-parent</artifactId>
+    <version>1.5.8.RELEASE</version>
+
+    <relativePath/> <!-- lookup parent fromAccount repository -->
+  </parent>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+    <java.version>1.8</java.version>
+    <spring-cloud.version>Dalston.SR5</spring-cloud.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.boot</groupId>
+      <artifactId>spring-boot-starter-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.crm.login.backend</groupId>
+      <artifactId>crm-login-backend</artifactId>
+      <version>1.0.0</version>
+    </dependency>
+
+    <dependency>
+      <groupId>mysql</groupId>
+      <artifactId>mysql-connector-java</artifactId>
+    </dependency>
+
+    <!--mybatis-->
+    <dependency>
+      <groupId>org.mybatis.spring.boot</groupId>
+      <artifactId>mybatis-spring-boot-starter</artifactId>
+      <version>1.3.1</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-eureka</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-starter-feign</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>io.github.openfeign.form</groupId>
+      <artifactId>feign-form</artifactId>
+      <version>3.3.0</version>
+    </dependency>
+    <dependency>
+      <groupId>io.github.openfeign.form</groupId>
+      <artifactId>feign-form-spring</artifactId>
+      <version>3.3.0</version>
+    </dependency>
+
+    <!-- 导出 -->
+    <dependency>
+      <groupId>org.apache.poi</groupId>
+      <artifactId>poi</artifactId>
+      <version>3.17</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.poi</groupId>
+      <artifactId>poi-ooxml</artifactId>
+      <version>3.17</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.alibaba</groupId>
+      <artifactId>easyexcel</artifactId>
+      <version>1.1.1</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jetbrains</groupId>
+      <artifactId>annotations</artifactId>
+      <version>RELEASE</version>
+      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>com.belerweb</groupId>
+      <artifactId>pinyin4j</artifactId>
+      <version>2.5.1</version>
+    </dependency>
+
+  </dependencies>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>org.springframework.cloud</groupId>
+        <artifactId>spring-cloud-dependencies</artifactId>
+        <version>${spring-cloud.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-maven-plugin</artifactId>
+        <configuration>
+          <outputDirectory>
+            ${project.build.directory}/../../lib
+          </outputDirectory>
+          <layout>ZIP</layout>
+          <includes>
+            <include>
+              <groupId>com.ucard.manager</groupId>
+              <artifactId>com-ucard-manager</artifactId>
+            </include>
+          </includes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.mybatis.generator</groupId>
+        <artifactId>mybatis-generator-maven-plugin</artifactId>
+        <version>1.3.5</version>
+      </plugin>
+    </plugins>
+  </build>
+
+  <repositories>
+    <repository>
+      <id>spring-snapshots</id>
+      <name>Spring Snapshots</name>
+      <url>https://repo.spring.io/snapshot</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>spring-milestones</id>
+      <name>Spring Milestones</name>
+      <url>https://repo.spring.io/milestone</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <pluginRepositories>
+    <pluginRepository>
+      <id>spring-snapshots</id>
+      <name>Spring Snapshots</name>
+      <url>https://repo.spring.io/snapshot</url>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </pluginRepository>
+    <pluginRepository>
+      <id>spring-milestones</id>
+      <name>Spring Milestones</name>
+      <url>https://repo.spring.io/milestone</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+  </pluginRepositories>
+
+
+</project>

+ 27 - 0
uacrd-manager-server/src/main/java/com/crm/manager/ManagerApplication.java

@@ -0,0 +1,27 @@
+package com.crm.manager;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.autoconfigure.domain.EntityScan;
+import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
+import org.springframework.cloud.netflix.feign.EnableFeignClients;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+import java.sql.Time;
+import java.util.Date;
+
+/**
+ * @author houn
+ */
+@SpringBootApplication
+@EnableEurekaClient
+@EnableFeignClients
+@EnableScheduling
+@MapperScan("com.crm.manager.dao.mapper")
+@EntityScan("com.crm.rely.backend.core.pojo.table")
+public class ManagerApplication {
+    public static void main(String[] args) {
+        SpringApplication.run(ManagerApplication.class, args);
+    }
+}

+ 52 - 0
uacrd-manager-server/src/main/java/com/crm/manager/configuration/FeignConfiguration.java

@@ -0,0 +1,52 @@
+package com.crm.manager.configuration;
+
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.service.RedisService;
+import com.crm.rely.backend.util.UUIDUtil;
+import com.google.common.base.Strings;
+import feign.RequestInterceptor;
+import feign.RequestTemplate;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+
+/**
+ * Created by max on 2020/6/17.
+ */
+@Configuration
+public class FeignConfiguration implements RequestInterceptor {
+
+    @Autowired
+    private RedisService redisService;
+    
+    @Override
+    public void apply(RequestTemplate requestTemplate) {
+        ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
+        String token = null;
+        String language = null;
+        if (null != attributes) {
+            HttpServletRequest request = attributes.getRequest();
+            token = request.getHeader(Constants.ACCESS_TOKEN);
+            language = request.getHeader(Constants.Language);
+        }
+
+        String feignToken = UUIDUtil.getUUID();
+        if (Strings.isNullOrEmpty(token)) {
+            token = feignToken;
+        }
+        requestTemplate.header(Constants.ACCESS_TOKEN, token);
+        requestTemplate.header(Constants.Feign_Token, feignToken);
+        requestTemplate.header(Constants.Language, language);
+
+        try {
+            redisService.saveObject(feignToken, token, Constants.Feign_Token_TIME);
+        } catch (ServiceException e) {
+            e.printStackTrace();
+        }
+    }
+}

+ 66 - 0
uacrd-manager-server/src/main/java/com/crm/manager/configuration/FeignMultipartSpringFormEncoder.java

@@ -0,0 +1,66 @@
+package com.crm.manager.configuration;
+
+import feign.RequestTemplate;
+import feign.codec.EncodeException;
+import feign.codec.Encoder;
+import feign.form.FormEncoder;
+import feign.form.MultipartFormContentProcessor;
+import feign.form.spring.SpringManyMultipartFilesWriter;
+import feign.form.spring.SpringSingleMultipartFileWriter;
+import lombok.val;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.lang.reflect.Type;
+
+import static feign.form.ContentType.MULTIPART;
+import static java.util.Collections.singletonMap;
+
+/**
+ * @Author: houn
+ * @Date: 2020/9/4 21:22
+ * @Description:
+ */
+public class FeignMultipartSpringFormEncoder extends FormEncoder {
+
+    /**
+     * Constructor with the default Feign's encoder as a delegate.
+     */
+    public FeignMultipartSpringFormEncoder() {
+        this(new Default());
+    }
+
+    /**
+     * Constructor with specified delegate encoder.
+     *
+     * @param delegate delegate encoder, if this encoder couldn't encode object.
+     */
+    public FeignMultipartSpringFormEncoder(Encoder delegate) {
+        super(delegate);
+
+        val processor = (MultipartFormContentProcessor) getContentProcessor(MULTIPART);
+        processor.addWriter(new SpringSingleMultipartFileWriter());
+        processor.addWriter(new SpringManyMultipartFilesWriter());
+    }
+
+    @Override
+    public void encode(Object object, Type bodyType, RequestTemplate template) throws EncodeException {
+        if (bodyType.equals(MultipartFile.class)) {
+            // 单MultipartFile判断
+            val file = (MultipartFile) object;
+            val data = singletonMap(file.getName(), object);
+            super.encode(data, MAP_STRING_WILDCARD, template);
+            return;
+
+        } else if (bodyType.equals(MultipartFile[].class)) {
+            // MultipartFile数组处理
+            val file = (MultipartFile[]) object;
+            if (file != null) {
+                val data = singletonMap(file.length == 0 ? "" : file[0].getName(), object);
+                super.encode(data, MAP_STRING_WILDCARD, template);
+                return;
+            }
+        }
+        // 其他类型调用父类默认处理方法
+        super.encode(object, bodyType, template);
+    }
+}

+ 37 - 0
uacrd-manager-server/src/main/java/com/crm/manager/configuration/FeignMultipartSupportConfig.java

@@ -0,0 +1,37 @@
+package com.crm.manager.configuration;
+
+import org.springframework.beans.factory.ObjectFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.web.HttpMessageConverters;
+import org.springframework.cloud.netflix.feign.support.SpringEncoder;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Primary;
+import org.springframework.context.annotation.Scope;
+
+import feign.codec.Encoder;
+import feign.form.spring.SpringFormEncoder;
+
+/**
+ * @Author: houn
+ * @Date: 2020/9/4 18:20
+ * @Description:
+ */
+@Configuration
+public class FeignMultipartSupportConfig {
+    @Autowired
+    private ObjectFactory<HttpMessageConverters> messageConverters;
+
+    @Bean
+    @Primary
+    @Scope("prototype")
+    public Encoder multipartFormEncoder() {
+        // 为Encoder注入messageConverters
+        return new FeignMultipartSpringFormEncoder (new SpringEncoder(messageConverters));
+    }
+
+    @Bean
+    public feign.Logger.Level multipartLoggerLevel() {
+        return feign.Logger.Level.FULL;
+    }
+}

+ 70 - 0
uacrd-manager-server/src/main/java/com/crm/manager/configuration/InterceptorRoleConfiguration.java

@@ -0,0 +1,70 @@
+package com.crm.manager.configuration;
+
+import com.crm.login.rely.backend.property.LoginConfigureProperty;
+import com.crm.manager.interceptor.RoleInterceptor;
+import com.crm.manager.property.RoleConfigureProperty;
+import com.crm.manager.service.UserRoleService;
+import com.crm.rely.backend.aspect.ControllerAop;
+import com.crm.rely.backend.service.RedisService;
+import com.google.common.base.Strings;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.Order;
+import org.springframework.web.servlet.config.annotation.CorsRegistry;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Configuration
+@Order(3)
+public class InterceptorRoleConfiguration extends WebMvcConfigurerAdapter {
+
+    @Autowired
+    LoginConfigureProperty loginConfigureProperty;
+    @Autowired
+    RoleConfigureProperty roleConfigureProperty;
+
+    @Autowired
+    private RedisService redisService;
+    @Autowired
+    private UserRoleService roleInfoService;
+
+    @Autowired
+    private ControllerAop controllerAop;
+    @Value("${role.googleVerified:false}")
+    private boolean googleVerified;
+
+    @Bean
+    RoleInterceptor loginInterceptor() {
+        return new RoleInterceptor(redisService, roleInfoService, controllerAop, googleVerified);
+    }
+
+    @Override
+    public void addInterceptors(InterceptorRegistry registry) {
+        List<String> stringList = new ArrayList<String>();
+        for (String value : loginConfigureProperty.getExcludePathPatterns()) {
+            stringList.add(value);
+        }
+        for (String value : roleConfigureProperty.getExcludePathPatterns()) {
+            if (!Strings.isNullOrEmpty(value)) {
+                stringList.add(value);
+            }
+        }
+        String[] excludeList = new String[stringList.size()];
+
+        stringList.toArray(excludeList);
+
+        registry.addInterceptor(new RoleInterceptor(redisService, roleInfoService, controllerAop, googleVerified)).addPathPatterns("/**").excludePathPatterns(excludeList);
+        super.addInterceptors(registry);
+    }
+
+    @Override
+    public void addCorsMappings(CorsRegistry registry) {
+        registry.addMapping("/**").allowedOrigins("*").allowCredentials(true).allowedMethods("POST").maxAge(3600);
+        super.addCorsMappings(registry);
+    }
+}

+ 33 - 0
uacrd-manager-server/src/main/java/com/crm/manager/configuration/ThreadPoolConfig.java

@@ -0,0 +1,33 @@
+package com.crm.manager.configuration;
+
+import com.google.common.util.concurrent.ListeningExecutorService;
+import com.google.common.util.concurrent.MoreExecutors;
+import org.springframework.context.annotation.Bean;
+import org.springframework.stereotype.Component;
+
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+/**
+ * Created by max on 2020/6/18.
+ */
+@Component
+public class ThreadPoolConfig {
+
+
+    /**
+     * 更新交易账户使用的信号量
+     */
+    public static final Semaphore LOGIN_VALID_SEMAPHORE = new Semaphore(1);
+
+    @Bean
+    public ListeningExecutorService listeningExecutorService() {
+        ThreadPoolExecutor threadPoolExecutor =
+                new ThreadPoolExecutor(4, 8, 0L, TimeUnit.SECONDS, new LinkedBlockingDeque<>());
+
+        return MoreExecutors.listeningDecorator(threadPoolExecutor);
+    }
+
+}

+ 80 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountApplyController.java

@@ -0,0 +1,80 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.AccountApplyFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.account.apply.AccountApplyDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.account.apply.AccountApplyApproveEntity;
+import com.crm.rely.backend.core.entity.account.apply.AccountApplySearchListEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by max on 2020/7/14.
+ */
+@RestController
+@RequestMapping("/account/apply")
+public class AccountApplyController {
+
+    @Autowired
+    private AccountApplyFeignService accountApplyFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated AccountApplyApproveEntity entity) throws Exception {
+
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+//        if (Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+//            entity.setAccountStatus(Constants.MANAGER_PENDING_STATUS);
+//        } else {
+//            entity.setAccountStatus(Constants.MANAGER_COMPLETED_STATUS);
+//        }
+//        if (Constants.PASSED_STATUS.equals(entity.getStatus()) && entity.getLogin() == null) {
+//            return BaseResultDto.error(Constants.LOGIN_NOT_NULL_ERROR);
+//        }
+//        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+
+        return accountApplyFeignService.approve(entity);
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultDto accountList(@RequestBody AccountApplySearchListEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+//        entity.setStatus(1);
+        return accountApplyFeignService.searchPageList(entity);
+    }
+
+    /**
+     * 获取单个信息
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/single")
+    public BaseResultDto managerSearchSingle(@RequestBody SingleLongEntity entity, InfoEntity infoEntity) throws Exception {
+
+        AccountApplyDto accountApplyDto = accountApplyFeignService.single(entity);
+        return BaseResultDto.success(accountApplyDto);
+    }
+
+}

+ 66 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountBelongChangeController.java

@@ -0,0 +1,66 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountBelongChangeService;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.account.belong.AccountBelongChangeDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.entity.account.belong.AccountBelongChangeAddEntity;
+import com.crm.rely.backend.core.entity.account.belong.AccountBelongChangeListEntity;
+import com.crm.rely.backend.core.entity.base.BaseApproveEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.CustomInfoUpdateAgentEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by max on 2020/8/4.
+ */
+@RestController
+@RequestMapping("/account/belong/change")
+public class AccountBelongChangeController {
+
+    @Autowired
+    private AccountBelongChangeService accountBelongChangeService;
+
+
+    @PostMapping("/search/list")
+    BaseResultWithPagerDto<List<AccountBelongChangeDto>> searchList(@RequestBody AccountBelongChangeListEntity entity, InfoEntity infoEntity) throws Exception {
+        return accountBelongChangeService.searchList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<AccountBelongChangeDto> searchSingle(@RequestBody SingleLongEntity entity, InfoEntity infoEntity) throws Exception {
+
+        return accountBelongChangeService.searchSingle(entity);
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto<Object> approve(@RequestBody BaseApproveEntity entity, InfoEntity infoEntity) throws Exception {
+        return accountBelongChangeService.approve(entity);
+    }
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody AccountBelongChangeAddEntity entity, InfoEntity infoEntity) throws Exception {
+        return accountBelongChangeService.add(entity);
+    }
+
+    @PostMapping("/batch/add")
+    public BaseResultDto<List<BaseResultDto>> batchAdd(@RequestBody List<AccountBelongChangeAddEntity> entities, InfoEntity infoEntity) throws Exception {
+        BaseResultDto<List<BaseResultDto>> resultDto = BaseResultDto.success();
+        resultDto.setData(Lists.newArrayList());
+        for (AccountBelongChangeAddEntity entity : entities) {
+            resultDto.getData().add(accountBelongChangeService.add(entity));
+        }
+        return resultDto;
+    }
+
+
+}

+ 95 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountController.java

@@ -0,0 +1,95 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountInfoFeignService;
+import com.crm.manager.service.CustomInfoService;
+import com.crm.manager.service.DataRoleService;
+import com.crm.manager.service.activity.AccountApplyFeignService;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.custom.CustomInfoDto;
+import com.crm.rely.backend.core.dto.ib.account.AccountInfoDto;
+import com.crm.rely.backend.core.dto.ib.account.AccountInfoSumDto;
+import com.crm.rely.backend.core.entity.account.info.AccountFullInfoDto;
+import com.crm.rely.backend.core.entity.account.info.AccountInfoSingleEntity;
+import com.crm.rely.backend.core.entity.custom.info.IbInfoEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.account.AccountInfoListEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by max on 2020/6/17.
+ */
+@RestController
+@RequestMapping("/account")
+public class AccountController {
+
+    @Autowired
+    private AccountInfoFeignService accountInfoFeignService;
+    @Autowired
+    private CustomInfoService customInfoService;
+    @Autowired
+    private DataRoleService dataRoleService;
+
+    @Autowired
+    private AccountApplyFeignService accountApplyFeignService;
+
+
+    @PostMapping("/list")
+    public BaseReportResultDto<List<AccountInfoDto>, AccountInfoSumDto> accountList(@RequestBody AccountInfoListEntity entity, InfoEntity infoEntity) throws Exception {
+
+        IbInfoEntity ibInfoEntity = infoEntity.getIbInfo();
+
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setStamp(ibInfoEntity.getStamp());
+        }
+        entity.setGroupId(ibInfoEntity.getGroupId());
+
+        return accountInfoFeignService.manageAccountList(entity);
+    }
+
+
+    /**
+     * 查询单个交易账户信息
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/single")
+    public BaseResultDto<AccountFullInfoDto> accountInfo(@RequestBody AccountInfoSingleEntity entity,
+                                                         InfoEntity infoEntity) throws Exception {
+
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            dataRoleService.validateByLoginAndStamp(entity.getLogin(), infoEntity.getIbInfo().getStamp());
+        }
+
+        /*
+            获取客户信息
+         */
+        CustomInfoDto customInfoDto = customInfoService.getSingleCustomByLogin(entity.getLogin());
+        /*
+            获取交易账户信息
+         */
+        BaseResultDto<AccountInfoDto> accountInfoDtoBaseResultDto = accountInfoFeignService.managerSearchSingle(entity);
+        if (accountInfoDtoBaseResultDto.getCode() != 200) {
+            BaseResultDto.error(accountInfoDtoBaseResultDto.getMsg());
+        }
+        AccountInfoDto accountInfoDto = accountInfoDtoBaseResultDto.getData();
+
+        //返回数据
+        AccountFullInfoDto accountFullInfoDto = new AccountFullInfoDto();
+        accountFullInfoDto.setAccount(accountInfoDto);
+        accountFullInfoDto.setCustom(customInfoDto);
+
+        return BaseResultDto.success(accountFullInfoDto);
+    }
+
+}

+ 107 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountDealPasswordChangeController.java

@@ -0,0 +1,107 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountDealPasswordChangeService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.account.deal.change.AccountDealPasswordChangeDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.account.deal.change.AccountDealPasswordChangeApproveEntity;
+import com.crm.rely.backend.core.entity.account.deal.change.AccountDealPasswordChangeApproveManagerEntity;
+import com.crm.rely.backend.core.entity.account.deal.change.AccountDealPasswordChangeDeleteEntity;
+import com.crm.rely.backend.core.entity.account.deal.change.AccountDealPasswordChangeSearchEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @description: 账号密码修改申请
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/account/deal/password/change")
+public class AccountDealPasswordChangeController {
+
+    @Autowired
+    private AccountDealPasswordChangeService accountDealPasswordChangeService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated AccountDealPasswordChangeApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        entity.setDealChangeStatus(Constants.MANAGER_PROCESSING_STATUS);
+        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+        accountDealPasswordChangeService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/approve/manager")
+    public BaseResultDto approveByManager(@RequestBody @Validated AccountDealPasswordChangeApproveManagerEntity entity) throws Exception {
+        if (!Constants.MANAGER_COMPLETED_STATUS.equals(entity.getDealChangeStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        accountDealPasswordChangeService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated AccountDealPasswordChangeDeleteEntity entity) throws Exception {
+        accountDealPasswordChangeService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated AccountDealPasswordChangeSearchEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        ResultWithPagerDto<AccountDealPasswordChangeDto> resultWithPagerDto = accountDealPasswordChangeService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/custom/searcher/list")
+    @FeignClientAnnotation
+    public BaseResultDto searcherCustomList(@RequestBody @Validated AccountDealPasswordChangeSearchEntity entity) throws Exception {
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        ResultWithPagerDto<AccountDealPasswordChangeDto> resultWithPagerDto = accountDealPasswordChangeService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        AccountDealPasswordChangeDto accountDealPasswordChangeDto = accountDealPasswordChangeService.searchSingle(entity.getId());
+        return BaseResultDto.success(accountDealPasswordChangeDto);
+    }
+
+}

+ 110 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountDealPasswordResetController.java

@@ -0,0 +1,110 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountDealPasswordResetService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.account.deal.change.AccountDealPasswordChangeDto;
+import com.crm.rely.backend.core.dto.account.deal.reset.AccountDealPasswordResetDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.account.deal.change.AccountDealPasswordChangeSearchEntity;
+import com.crm.rely.backend.core.entity.account.deal.reset.AccountDealPasswordResetApproveEntity;
+import com.crm.rely.backend.core.entity.account.deal.reset.AccountDealPasswordResetApproveManagerEntity;
+import com.crm.rely.backend.core.entity.account.deal.reset.AccountDealPasswordResetDeleteEntity;
+import com.crm.rely.backend.core.entity.account.deal.reset.AccountDealPasswordResetSearchEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @description: 账号密码修改申请
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/account/deal/password/reset")
+public class AccountDealPasswordResetController {
+
+    @Autowired
+    private AccountDealPasswordResetService accountDealPasswordResetService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated AccountDealPasswordResetApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        entity.setDealResetStatus(Constants.MANAGER_PROCESSING_STATUS);
+        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+        accountDealPasswordResetService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/approve/manager")
+    public BaseResultDto approveByManager(@RequestBody @Validated AccountDealPasswordResetApproveManagerEntity entity) throws Exception {
+        if (!Constants.MANAGER_COMPLETED_STATUS.equals(entity.getDealResetStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        accountDealPasswordResetService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated AccountDealPasswordResetDeleteEntity entity) throws Exception {
+        accountDealPasswordResetService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated AccountDealPasswordResetSearchEntity entity, InfoEntity infoEntity) throws Exception {
+
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        ResultWithPagerDto<AccountDealPasswordResetDto> resultWithPagerDto = accountDealPasswordResetService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/custom/searcher/list")
+    @FeignClientAnnotation
+    public BaseResultDto searcherCustomList(@RequestBody @Validated AccountDealPasswordResetSearchEntity entity) throws Exception {
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        ResultWithPagerDto<AccountDealPasswordResetDto> resultWithPagerDto = accountDealPasswordResetService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        AccountDealPasswordResetDto accountDealPasswordResetDto = accountDealPasswordResetService.searchSingle(entity.getId());
+        return BaseResultDto.success(accountDealPasswordResetDto);
+    }
+
+}

+ 107 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountInvestorPasswordChangeController.java

@@ -0,0 +1,107 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountInvestorPasswordChangeService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.account.deal.reset.AccountDealPasswordResetDto;
+import com.crm.rely.backend.core.dto.account.investor.AccountInvestorPasswordChangeDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.account.deal.reset.AccountDealPasswordResetSearchEntity;
+import com.crm.rely.backend.core.entity.account.investor.AccountInvestorPasswordChangeApproveEntity;
+import com.crm.rely.backend.core.entity.account.investor.AccountInvestorPasswordChangeApproveManagerEntity;
+import com.crm.rely.backend.core.entity.account.investor.AccountInvestorPasswordChangeDeleteEntity;
+import com.crm.rely.backend.core.entity.account.investor.AccountInvestorPasswordChangeSearchEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @description: 投资人账号密码修改申请
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/account/investor/password/change")
+public class AccountInvestorPasswordChangeController {
+
+    @Autowired
+    private AccountInvestorPasswordChangeService accountInvestorPasswordChangeService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated AccountInvestorPasswordChangeApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        entity.setInvestorStatus(Constants.MANAGER_PROCESSING_STATUS);
+        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+        accountInvestorPasswordChangeService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/approve/manager")
+    public BaseResultDto approveByManager(@RequestBody @Validated AccountInvestorPasswordChangeApproveManagerEntity entity) throws Exception {
+        if (!Constants.MANAGER_COMPLETED_STATUS.equals(entity.getInvestorStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        accountInvestorPasswordChangeService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated AccountInvestorPasswordChangeDeleteEntity entity) throws Exception {
+        accountInvestorPasswordChangeService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated AccountInvestorPasswordChangeSearchEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        ResultWithPagerDto<AccountInvestorPasswordChangeDto> resultWithPagerDto = accountInvestorPasswordChangeService.searchList(entity);
+        return resultWithPagerDto;
+    }
+    @PostMapping("/custom/searcher/list")
+    @FeignClientAnnotation
+    public BaseResultDto searcherCustomList(@RequestBody @Validated AccountInvestorPasswordChangeSearchEntity entity) throws Exception {
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        ResultWithPagerDto<AccountInvestorPasswordChangeDto> resultWithPagerDto = accountInvestorPasswordChangeService.searchList(entity);
+        return resultWithPagerDto;
+    }
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        AccountInvestorPasswordChangeDto accountInvestorPasswordChangeDto = accountInvestorPasswordChangeService.searchSingle(entity.getId());
+        return BaseResultDto.success(accountInvestorPasswordChangeDto);
+    }
+
+}

+ 98 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountLeverageChangeController.java

@@ -0,0 +1,98 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountLeverageChangeService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.account.leverage.AccountLeverageSearchListDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.account.leverage.AccountLeverageChangeApproveEntity;
+import com.crm.rely.backend.core.entity.account.leverage.AccountLeverageChangeDeleteEntity;
+import com.crm.rely.backend.core.entity.account.leverage.AccountLeverageChangeSearchEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @description: 账号杠杆申请管理
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/account/leverage")
+public class AccountLeverageChangeController {
+
+    @Autowired
+    private AccountLeverageChangeService accountLeverageChangeService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated AccountLeverageChangeApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        if (Constants.PASSED_STATUS.equals(entity.getStatus())) {
+            entity.setLeverageStatus(Constants.MANAGER_COMPLETED_STATUS);
+        } else {
+            entity.setLeverageStatus(null);
+        }
+        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+        accountLeverageChangeService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+//    @PostMapping("/approve/manager")
+//    public BaseResultDto approveByManager(@RequestBody @Validated AccountLeverageChangeApproveManagerEntity entity) throws Exception {
+//        if (!Constants.MANAGER_COMPLETED_STATUS.equals(entity.getLeverageStatus())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+//        accountLeverageChangeService.approve(entity);
+//        return BaseResultDto.success();
+//    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated AccountLeverageChangeDeleteEntity entity) throws Exception {
+        accountLeverageChangeService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated AccountLeverageChangeSearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<AccountLeverageSearchListDto> resultWithPagerDto = accountLeverageChangeService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/custom/searcher/list")
+    @FeignClientAnnotation
+    public BaseResultDto searcherCustomList(@RequestBody @Validated AccountLeverageChangeSearchEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+
+        ResultWithPagerDto<AccountLeverageSearchListDto> resultWithPagerDto = accountLeverageChangeService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        AccountLeverageSearchListDto accountLeverageDto = accountLeverageChangeService.searchSingle(entity.getId());
+        return BaseResultDto.success(accountLeverageDto);
+    }
+
+}

+ 72 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountTradingActivityController.java

@@ -0,0 +1,72 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.AccountTradingActivityExportDto;
+import com.crm.manager.service.ib.AccountTradingActivityFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.account.trading.AccountTradingActivityDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.entity.account.trading.AccountTradingActivityListEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * Created by max on 2020/12/15.
+ */
+@RestController
+@RequestMapping("/account/trading/activity")
+public class AccountTradingActivityController {
+
+    @Autowired
+    private AccountTradingActivityFeignService accountTradingActivityFeignService;
+
+    @PostMapping("/list")
+    public BaseResultWithPagerDto<List<AccountTradingActivityDto>> getList(@RequestBody AccountTradingActivityListEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setStamp(infoEntity.getIbInfo().getStamp());
+        return accountTradingActivityFeignService.getList(entity);
+    }
+
+    @GetMapping("/export")
+    public void export(@RequestParam(name = "login") Long login,
+                       @RequestParam(name = "ibNo") String ibNo,
+                       @RequestParam(name = "ticketTimeStartDate") String ticketTimeStartDate,
+                       @RequestParam(name = "ticketTimeEndDate") String ticketTimeEndDate,
+                       @RequestParam(name = "depositTimeStartDate") String depositTimeStartDate,
+                       @RequestParam(name = "depositTimeEndDate") String depositTimeEndDate, InfoEntity infoEntity, HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        AccountTradingActivityListEntity entity = new AccountTradingActivityListEntity();
+        entity.setStamp(infoEntity.getIbInfo().getStamp());
+        entity.setLogin(login);
+        entity.setIbNo(ibNo);
+        entity.setTicketTimeStartDate(StringUtils.isEmpty(ticketTimeStartDate) ? null : simpleDateFormat.parse(ticketTimeStartDate));
+        entity.setTicketTimeEndDate(StringUtils.isEmpty(ticketTimeEndDate) ? null : simpleDateFormat.parse(ticketTimeEndDate));
+        entity.setDepositTimeStartDate(StringUtils.isEmpty(depositTimeStartDate) ? null : simpleDateFormat.parse(depositTimeStartDate));
+        entity.setDepositTimeEndDate(StringUtils.isEmpty(depositTimeEndDate) ? null : simpleDateFormat.parse(depositTimeEndDate));
+
+        BaseResultDto<List<AccountTradingActivityDto>> resultDto = accountTradingActivityFeignService.export(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<AccountTradingActivityExportDto> exportDtos = Lists.newArrayList();
+            for (AccountTradingActivityDto dto : resultDto.getData()) {
+                AccountTradingActivityExportDto exportDto = new AccountTradingActivityExportDto();
+                BeanUtils.copyProperties(dto,exportDto);
+                exportDtos.add(exportDto);
+            }
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("ACCOUNT_TRADING_ACTIVITY"), exportDtos, AccountTradingActivityExportDto.class, response);
+        }
+
+
+    }
+
+
+
+}

+ 74 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AccountTypeController.java

@@ -0,0 +1,74 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AccountTypeService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.account.type.AccountTypeListDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.account.type.AccountTypeUpdateEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.system.config.SendUpdateEmailCodeEntity;
+import com.crm.rely.backend.service.EmailService;
+import com.crm.rely.backend.util.GetIpAndMac;
+import com.crm.rely.backend.util.GoogleAuthenticatorUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by max on 2020/8/18.
+ */
+@RestController
+@RequestMapping("/config/account/type")
+public class AccountTypeController {
+
+    @Autowired
+    private AccountTypeService accountTypeService;
+    @Autowired
+    private EmailService emailService;
+
+    @PostMapping("/list")
+    public BaseResultDto<List<AccountTypeListDto>> getList() throws Exception {
+        return BaseResultDto.success(accountTypeService.getList());
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto<Object> update(@RequestBody @Validated AccountTypeUpdateEntity entity, InfoEntity infoEntity) throws Exception {
+
+//        String emailCode = entity.getEmailCode();
+        if (!GoogleAuthenticatorUtil.verifyCode(infoEntity.getSecretKey(), entity.getGaCode())) {
+            return BaseResultDto.error(Constants.GOOGLE_CAPTCHA_ERROR);
+        }
+//        String email = infoEntity.getIbInfo().getEmail();
+//        emailService.validateCode(email, emailCode);
+
+        return accountTypeService.updateList(entity.getData());
+    }
+
+    @PostMapping("/update/send/code")
+    public BaseResultDto updateChannelSendEmailCode(InfoEntity infoEntity) throws Exception {
+        return sendEmailCode(infoEntity);
+    }
+
+
+    public BaseResultDto sendEmailCode(InfoEntity infoEntity) throws Exception {
+        if (infoEntity == null || infoEntity.getIbInfo() == null) {
+            return BaseResultDto.error(Constants.SYSTEM_ERROR);
+        }
+        SendUpdateEmailCodeEntity emailCodeEntity = new SendUpdateEmailCodeEntity();
+
+        emailCodeEntity.setEmail(infoEntity.getIbInfo().getEmail());
+        emailCodeEntity.setTime(new Date());
+        emailCodeEntity.setUser(infoEntity.getIbInfo().getId());
+        emailCodeEntity.setIp(GetIpAndMac.getIp());
+
+        accountTypeService.sendEmailCode(emailCodeEntity);
+        return BaseResultDto.success(Constants.SEND_SUCCESS);
+    }
+
+}

+ 73 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/ActivityBaiduController.java

@@ -0,0 +1,73 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.ActivityBaidu202406ExportDto;
+import com.crm.manager.service.activity.ActivityBaiduFeignService;
+import com.crm.rely.backend.core.dto.activity.baidu.ActivityBaidu202406Dto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.entity.activity.baidu.ActivityBaidu202406ListSearchEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+@RestController
+@RequestMapping("/activity/baidu")
+public class ActivityBaiduController {
+
+    @Autowired
+    private ActivityBaiduFeignService feignService;
+
+    @PostMapping("/2020406/search/list")
+    public BaseResultWithPagerDto<List<ActivityBaidu202406Dto>> searchList(@RequestBody ActivityBaidu202406ListSearchEntity entity) throws ServiceException {
+        return feignService.searchPageList(entity);
+    }
+
+    @GetMapping("/2020406/export")
+    public void tradeCommissionConcludeExport(@RequestParam(name = "name") String name,
+                                              @RequestParam(name = "email") String email,
+                                              @RequestParam(name = "wechat") String wechat,
+                                              @RequestParam(name = "startDate", required = false) String startDate,
+                                              @RequestParam(name = "endDate", required = false) String endDate,
+                                              HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        ActivityBaidu202406ListSearchEntity entity = new ActivityBaidu202406ListSearchEntity();
+        entity.setName(name);
+        entity.setEmail(email);
+        entity.setWechat(wechat);
+        entity.setStartDate(startDate == null ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? null : simpleDateFormat.parse(endDate));
+        entity.setPage(null);
+        List<ActivityBaidu202406Dto> resultDto =
+                feignService.searchList(entity);
+
+            List<ActivityBaidu202406ExportDto> dtos = Lists.newArrayList();
+            resultDto.forEach((item) -> {
+                ActivityBaidu202406ExportDto dto = new ActivityBaidu202406ExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(genFileName("ACTIVITYBAIDU"), dtos,
+                    ActivityBaidu202406ExportDto.class, response);
+
+
+    }
+
+    private String genFileName(String fileNamePrefix) {
+        StringBuffer stringBuffer = new StringBuffer();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        stringBuffer.append(fileNamePrefix);
+        stringBuffer.append("_");
+        stringBuffer.append(sdf.format(new Date()));
+        stringBuffer.append(".xlsx");
+        String fileName = stringBuffer.toString();
+        return fileName;
+    }
+
+}

+ 99 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/ActivityDubaiExhibitionController.java

@@ -0,0 +1,99 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.ActivityDubaiExhibitionExportDto;
+import com.crm.manager.service.activity.ActivityDubaiExhibitionFeignService;
+import com.crm.rely.backend.core.dto.activity.ActivityDubaiExhibitionCountryConfigDto;
+import com.crm.rely.backend.core.dto.activity.ActivityDubaiExhibitionDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.entity.activity.ActivityDubaiExhibitionListSearchEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.QRCodeImgeUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.imageio.ImageIO;
+import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
+import java.io.OutputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+@RestController
+@RequestMapping("/activity/dubai/exhibition")
+public class ActivityDubaiExhibitionController {
+
+    @Autowired
+    private ActivityDubaiExhibitionFeignService activityDubaiExhibitionFeignService;
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<ActivityDubaiExhibitionDto>> searchList(@RequestBody ActivityDubaiExhibitionListSearchEntity entity,InfoEntity infoEntity) throws ServiceException {
+        entity.setUserEmail(infoEntity.getIbInfo().getEmail());
+        return activityDubaiExhibitionFeignService.searchList(entity);
+    }
+
+    @GetMapping("/export")
+    public void export(@RequestParam(name = "name") String name,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "number") String number,
+                       @RequestParam(name = "referrer") String referrer,
+                       @RequestParam(name = "countryCode") String countryCode,
+                       @RequestParam(name = "startDate", required = false) String startDate,
+                       @RequestParam(name = "endDate", required = false) String endDate,
+                       InfoEntity infoEntity, HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        ActivityDubaiExhibitionListSearchEntity entity = new ActivityDubaiExhibitionListSearchEntity();
+        entity.setName(name);
+        entity.setEmail(email);
+        entity.setNumber(number);
+        entity.setReferrer(referrer);
+        entity.setCountryCode(countryCode);
+        entity.setStartDate(startDate == null ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? null : simpleDateFormat.parse(endDate));
+        entity.setPage(null);
+        BaseResultWithPagerDto<List<ActivityDubaiExhibitionDto>> resultDto = activityDubaiExhibitionFeignService.searchList(entity);
+        if (resultDto.getCode() == 200) {
+            List<ActivityDubaiExhibitionExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                ActivityDubaiExhibitionExportDto dto = new ActivityDubaiExhibitionExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(genFileName("DUBAI_EXHIBITION"), dtos, ActivityDubaiExhibitionExportDto.class, response);
+
+        }
+    }
+
+    @PostMapping("/countries")
+    BaseResultDto<List<ActivityDubaiExhibitionCountryConfigDto>> countryConfig() throws ServiceException {
+        return activityDubaiExhibitionFeignService.countryConfig();
+    }
+
+    @PostMapping("/qrCode")
+    public BaseResultDto<Object> qrCode(@RequestBody ActivityDubaiExhibitionListSearchEntity entity,
+                       InfoEntity infoEntity, HttpServletResponse response) throws Exception {
+
+        StringBuffer stringBuffer = new StringBuffer();
+        stringBuffer.append("?referrer=").append(infoEntity.getIbInfo().getIbNo()).append("&countryCode=").append(entity.getCountryCode());
+
+        return BaseResultDto.success((Object) stringBuffer.toString());
+    }
+
+
+    private String genFileName(String fileNamePrefix) {
+        StringBuffer stringBuffer = new StringBuffer();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        stringBuffer.append(fileNamePrefix);
+        stringBuffer.append("_");
+        stringBuffer.append(sdf.format(new Date()));
+        stringBuffer.append(".xlsx");
+        String fileName = stringBuffer.toString();
+        return fileName;
+    }
+
+}

+ 56 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/ActivityRequiteRebateController.java

@@ -0,0 +1,56 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ActivityRequiteRebateService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.activity.requite.ActivityRequiteRebateDto;
+import com.crm.rely.backend.core.entity.activity.requite.ActivityRequiteRebateAddEntity;
+import com.crm.rely.backend.core.entity.activity.requite.ActivityRequiteRebateDeleteEntitys;
+import com.crm.rely.backend.core.entity.activity.requite.ActivityRequiteRebateSearchEntity;
+import com.crm.rely.backend.core.entity.activity.requite.ActivityRequiteRebateUpdateEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/activity/requite/rebate")
+public class ActivityRequiteRebateController {
+
+    @Autowired
+    private ActivityRequiteRebateService sysActivityRebateService;
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated ActivityRequiteRebateAddEntity entity) throws Exception {
+        sysActivityRebateService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated ActivityRequiteRebateDeleteEntitys entitys) throws Exception {
+
+        sysActivityRebateService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated ActivityRequiteRebateUpdateEntity entity) throws Exception {
+        sysActivityRebateService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<ActivityRequiteRebateDto> pageList(@RequestBody ActivityRequiteRebateSearchEntity entity) throws Exception {
+
+        return sysActivityRebateService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        ActivityRequiteRebateDto result = sysActivityRebateService.searchSingle(entity);
+        return BaseResultDto.success(result);
+    }
+
+}

+ 60 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentActivityCustomLoginController.java

@@ -0,0 +1,60 @@
+package com.crm.manager.controller;
+
+import com.crm.login.rely.backend.controller.BaseLoginController;
+import com.crm.manager.service.agent.AgentActivityCustomLoginFeignService;
+import com.crm.rely.backend.core.dto.agent.activity.custom.login.AgentActivityCustomLoginDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.agent.activity.custom.login.AgentActivityCustomLoginAddEntity;
+import com.crm.rely.backend.core.entity.agent.activity.custom.login.AgentActivityCustomLoginDeleteEntity;
+import com.crm.rely.backend.core.entity.agent.activity.custom.login.AgentActivityCustomLoginSearchEntity;
+import com.crm.rely.backend.core.entity.agent.activity.custom.login.AgentActivityCustomLoginUpdateEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/agent/activity/custom/login")
+public class AgentActivityCustomLoginController extends BaseLoginController {
+
+    @Autowired
+    private AgentActivityCustomLoginFeignService service;
+    
+    @PostMapping("/add")
+    public BaseResultDto addManager(@RequestBody @Validated AgentActivityCustomLoginAddEntity entity) throws Exception {
+
+        return service.addManager(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto deleteManager(@RequestBody @Validated AgentActivityCustomLoginDeleteEntity entity) throws Exception {
+
+        return service.deleteManager(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto updateManager(@RequestBody @Validated AgentActivityCustomLoginUpdateEntity entity) throws Exception {
+
+        return service.updateManager(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<AgentActivityCustomLoginDto> searchListManager(@RequestBody @Validated AgentActivityCustomLoginSearchEntity entity) throws Exception {
+
+        return service.searchListManager(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingleManager(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searchSingleManager(entity);
+    }
+
+}

+ 61 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentActivityEnrollController.java

@@ -0,0 +1,61 @@
+package com.crm.manager.controller;
+
+import com.crm.login.rely.backend.controller.BaseLoginController;
+import com.crm.manager.service.activity.AgentActivityEnrollFeignService;
+import com.crm.rely.backend.core.dto.agent.activity.enroll.AgentActivityEnrollDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.agent.activity.enroll.AgentActivityEnrollAddEntity;
+import com.crm.rely.backend.core.entity.agent.activity.enroll.AgentActivityEnrollDeleteEntity;
+import com.crm.rely.backend.core.entity.agent.activity.enroll.AgentActivityEnrollSearchEntity;
+import com.crm.rely.backend.core.entity.agent.activity.enroll.AgentActivityEnrollUpdateEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/agent/activity/enroll")
+public class AgentActivityEnrollController extends BaseLoginController {
+
+    @Autowired
+    private AgentActivityEnrollFeignService service;
+
+    @PostMapping("/add")
+    public BaseResultDto addManager(@RequestBody @Validated AgentActivityEnrollAddEntity entity) throws Exception {
+
+        return service.addManager(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto deleteManager(@RequestBody @Validated AgentActivityEnrollDeleteEntity entity) throws Exception {
+
+        return service.deleteManager(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto updateManager(@RequestBody @Validated AgentActivityEnrollUpdateEntity entity) throws Exception {
+
+        return service.updateManager(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<AgentActivityEnrollDto> searchListManager(@RequestBody @Validated AgentActivityEnrollSearchEntity entity) throws Exception {
+
+        return service.searchListManager(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingleManager(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searchSingleManager(entity);
+    }
+
+
+}

+ 30 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentActivityStatisticsController.java

@@ -0,0 +1,30 @@
+package com.crm.manager.controller;
+
+import com.crm.login.rely.backend.controller.BaseLoginController;
+import com.crm.manager.service.agent.AgentActivityStatisticsFeignService;
+import com.crm.rely.backend.core.dto.agent.activity.statistics.AgentActivityStatisticsDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/agent/activity/statistics")
+public class AgentActivityStatisticsController extends BaseLoginController {
+
+    @Autowired
+    private AgentActivityStatisticsFeignService service;
+
+
+    @PostMapping("/get")
+    public BaseResultDto<AgentActivityStatisticsDto> getStatistics() throws Exception {
+
+        return service.getStatistics();
+    }
+
+
+}

+ 39 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentApplyController.java

@@ -0,0 +1,39 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.AgentApplyFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.apply.AgentApplyDto;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.apply.AgentApplyApproveEntity;
+import com.crm.rely.backend.core.entity.ib.apply.AgentApplyListEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by max on 2020/8/27.
+ */
+@RestController
+@RequestMapping("/agent/apply")
+public class AgentApplyController {
+
+    @Autowired
+    private AgentApplyFeignService agentApplyFeignService;
+
+    @PostMapping("/list")
+    public BaseResultWithPagerDto<List<AgentApplyDto>> add(@RequestBody AgentApplyListEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentApplyFeignService.getList(entity);
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto<Object> approve(@RequestBody @Validated AgentApplyApproveEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentApplyFeignService.approve(entity);
+    }
+
+}

+ 97 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceCommissionTransferController.java

@@ -0,0 +1,97 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.AgentBalanceCommissionTransferExportDto;
+import com.crm.manager.dto.export.AgentBalanceTransferExportDto;
+import com.crm.manager.service.ib.AgentBalanceCommissionTransferService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceCommissionTransferDto;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceCommissionTransferListEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 佣金操作controller
+ */
+@RestController
+@RequestMapping("/agent/balance/commission")
+public class AgentBalanceCommissionTransferController {
+
+    private final Logger logger = LoggerFactory.getLogger(AgentBalanceCommissionTransferController.class);
+
+    @Autowired
+    private AgentBalanceCommissionTransferService agentBalanceTransferService;
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<AgentBalanceCommissionTransferDto>> searchList(@RequestBody AgentBalanceCommissionTransferListEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentBalanceTransferService.searchList(entity);
+    }
+
+    @GetMapping("/search/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "withdrawIbNo") String withdrawIbNo,
+                                   @RequestParam(name = "depositIbNo") String depositIbNo,
+                                   HttpServletResponse response) throws Exception {
+
+        AgentBalanceCommissionTransferListEntity entity = new AgentBalanceCommissionTransferListEntity();
+        entity.setCId(cId);
+        entity.setWithdrawIbNo(withdrawIbNo);
+        entity.setDepositIbNo(depositIbNo);
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }
+        entity.setPage(null);
+
+        BaseResultDto<List<AgentBalanceCommissionTransferDto>> resultDto = agentBalanceTransferService.export(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<AgentBalanceCommissionTransferDto> dtos = resultDto.getData();
+            List<AgentBalanceCommissionTransferExportDto> exportDtos = Lists.newArrayList();
+            dtos.forEach((item) -> {
+                AgentBalanceCommissionTransferExportDto exportDto = new AgentBalanceCommissionTransferExportDto();
+                BeanUtils.copyProperties(item, exportDto);
+                exportDto.setCID(item.getCId());
+                exportDto.setPIBNO(item.getPIbNo());
+                exportDto.setIbNo(item.getWithdrawIbNo());
+                exportDto.setName(item.getName());
+                exportDto.setWithdrawAmount(item.getWithdrawAmount().floatValue() * -1F);
+                exportDto.setDepositIbNo(item.getDepositIbNo());
+                exportDto.setDepositAmount(item.getDepositAmount());
+                exportDto.setAddTime(item.getAddTime());
+                exportDto.setSerial(item.getSerial());
+                exportDtos.add(exportDto);
+            });
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("AGENT_BALANCE_COMMISSION_TRANSFER_EXPORT"), exportDtos,
+                    AgentBalanceCommissionTransferExportDto.class, response);
+        }
+    }
+
+}

+ 30 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceFrozenController.java

@@ -0,0 +1,30 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.AgentBalanceFrozenFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceFrozenAddEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Created by max on 2020/11/20.
+ */
+@RestController
+@RequestMapping("/agent/balance/frozen")
+public class AgentBalanceFrozenController {
+
+    @Autowired
+    private AgentBalanceFrozenFeignService agentBalanceFrozenFeignService;
+
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody @Validated AgentBalanceFrozenAddEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentBalanceFrozenFeignService.add(entity);
+    }
+
+}

+ 92 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceRecordController.java

@@ -0,0 +1,92 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.AgentBalanceRecordService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceRecordDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceRecordAddEntity;
+import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceRecordListEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by max on 2020/7/14.
+ */
+@RestController
+@RequestMapping("/agent/balance")
+public class AgentBalanceRecordController {
+
+    @Autowired
+    private AgentBalanceRecordService agentBalanceRecordService;
+
+    /**
+     * 新增余额修改记录
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody AgentBalanceRecordAddEntity entity, InfoEntity infoEntity) throws Exception {
+
+//        agentBalanceRecordService.add(entity);
+
+        return agentBalanceRecordService.add(entity);
+    }
+
+    /**
+     * 根据ID获取信息
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/single")
+    public BaseResultDto<AgentBalanceRecordDto> searchSingle(@RequestBody SingleLongEntity entity) throws Exception {
+        return agentBalanceRecordService.getById(entity.getId());
+    }
+
+    /**
+     * 获取列表
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<AgentBalanceRecordDto>> searchList(@RequestBody AgentBalanceRecordListEntity entity, InfoEntity infoEntity) throws Exception {
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        entity.setLang(infoEntity.getLang());
+        return agentBalanceRecordService.getList(entity);
+    }
+
+    /**
+     * 根据ID删除信息
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/delete/single")
+    public BaseResultDto<Object> deleteSingle(@RequestBody SingleLongEntity entity) throws Exception {
+        return agentBalanceRecordService.deleteById(entity.getId());
+    }
+
+
+}

+ 116 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBalanceTransferController.java

@@ -0,0 +1,116 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.AgentBalanceTransferExportDto;
+import com.crm.manager.service.ib.AgentBalanceTransferService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.balance.AgentBalanceTransferDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceTransferApproveEntity;
+import com.crm.rely.backend.core.entity.ib.balance.AgentBalanceTransferListEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by max on 2020/8/4.
+ */
+@RestController
+@RequestMapping("/agent/balance/transfer")
+public class AgentBalanceTransferController {
+
+    @Autowired
+    private AgentBalanceTransferService agentBalanceTransferService;
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<AgentBalanceTransferDto>> searchList(@RequestBody AgentBalanceTransferListEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentBalanceTransferService.searchList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<AgentBalanceTransferDto> searchSingle(@RequestBody SingleLongEntity entity, InfoEntity infoEntity) throws Exception {
+
+        return BaseResultDto.success(agentBalanceTransferService.searchSingle(entity));
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto<Object> approve(@RequestBody AgentBalanceTransferApproveEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentBalanceTransferService.approve(entity);
+    }
+
+
+    @GetMapping("/searcher/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "status") Integer status,
+                                   @RequestParam(name = "to") Long to,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "ibNo") String ibNo,
+                                   HttpServletResponse response) throws Exception {
+
+        AgentBalanceTransferListEntity entity = new AgentBalanceTransferListEntity();
+        entity.setStatus(status);
+        entity.setTo(to);
+        entity.setCId(cId);
+        entity.setIbNo(ibNo);
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }
+        entity.setPage(null);
+        if (StringUtils.isEmpty(entity.getStatus())) {
+            entity.setStatus(null);
+        }
+
+
+        BaseResultDto<List<AgentBalanceTransferDto>> resultDto = agentBalanceTransferService.export(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<AgentBalanceTransferDto> dtos = resultDto.getData();
+            List<AgentBalanceTransferExportDto> exportDtos = Lists.newArrayList();
+            dtos.forEach((item) -> {
+                AgentBalanceTransferExportDto exportDto = new AgentBalanceTransferExportDto();
+                BeanUtils.copyProperties(item, exportDto);
+                exportDto.setCID(item.getCId());
+                exportDto.setPIBNO(item.getPIbNo());
+                exportDto.setIbNo(item.getIbNo());
+                exportDto.setWithdrawName(item.getName());
+                exportDto.setWithdrawIbNo(item.getIbNo());
+                exportDto.setAmount(item.getAmount() * -1F);
+                exportDto.setDepositLogin(item.getTo());
+                exportDto.setDepositAmount(item.getDepositAmount());
+                exportDto.setAddTime(item.getAddTime());
+                exportDto.setWithdrawSalesNo(item.getWithdrawSalesNo());
+                exportDto.setDepositName(item.getDepositName());
+                exportDto.setDepositSalesNo(item.getDepositSalesNo());
+                exportDto.setDepositPlatform(item.getPlatform());
+                exportDto.setSerial(item.getSerial());
+                exportDtos.add(exportDto);
+            });
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("AGENT_BALANCE_TRANSFER_EXPORT"), exportDtos,
+                    AgentBalanceTransferExportDto.class, response);
+        }
+    }
+
+}

+ 65 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentBelongChangeController.java

@@ -0,0 +1,65 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.AgentBelongChangeFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.belong.AgentBelongChangeDto;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.belong.AgentBelongChangeAddEntity;
+import com.crm.rely.backend.core.entity.ib.belong.AgentBelongChangeListEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by max on 2020/11/4.
+ */
+@RestController
+@RequestMapping("/agent/belong/change")
+public class AgentBelongChangeController {
+
+    @Autowired
+    private AgentBelongChangeFeignService agentBelongChangeFeignService;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody AgentBelongChangeAddEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentBelongChangeFeignService.add(entity);
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<AgentBelongChangeDto>> searchList(@RequestBody AgentBelongChangeListEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentBelongChangeFeignService.searchList(entity);
+    }
+
+    @PostMapping("/batch/add")
+    public BaseResultDto<List<BaseResultDto>> batchAdd(@RequestBody List<AgentBelongChangeAddEntity> entities, InfoEntity infoEntity) throws Exception {
+        if (PrefixEnum.PREFIX_ADMIN.equals(infoEntity.getPrefix()) || PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            return agentBelongChangeFeignService.batchAdd(entities);
+        } else {
+            return BaseResultDto.error();
+        }
+    }
+
+    @PostMapping("/batch/add/v2")
+    public BaseResultDto<BaseResultDto> batchAddV2(@RequestBody List<AgentBelongChangeAddEntity> entities, InfoEntity infoEntity) throws Exception {
+        if (PrefixEnum.PREFIX_ADMIN.equals(infoEntity.getPrefix()) || PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            BaseResultDto<List<BaseResultDto>> resultDto = agentBelongChangeFeignService.batchAdd(entities);
+            for (BaseResultDto dto : resultDto.getData()) {
+                if (Constants.SUCCESS_CODE != dto.getCode()) {
+                    return BaseResultDto.success("Partially successful");
+                }
+            }
+            return BaseResultDto.success();
+
+        } else {
+            return BaseResultDto.error();
+        }
+    }
+
+}

+ 51 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentPcExcludeController.java

@@ -0,0 +1,51 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.AgentPcExcludeFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.exclude.AgentPcExcludeDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.ib.exclude.AgentPcExcludeAddEntity;
+import com.crm.rely.backend.core.entity.ib.exclude.AgentPcExcludeListEntity;
+import com.crm.rely.backend.core.entity.ib.exclude.AgentPcExcludeUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/agent/pc/exclude")
+public class AgentPcExcludeController {
+
+    @Autowired
+    private AgentPcExcludeFeignService agentPcExcludeFeignService;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody AgentPcExcludeAddEntity entity) throws Exception {
+        return agentPcExcludeFeignService.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto<Object> delete(@RequestBody SingleLongEntity entity) throws Exception {
+        return agentPcExcludeFeignService.delete(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto<Object> update(@RequestBody AgentPcExcludeUpdateEntity entity) throws Exception {
+        return agentPcExcludeFeignService.update(entity);
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<AgentPcExcludeDto>> searchList(@RequestBody AgentPcExcludeListEntity entity) throws Exception {
+        return agentPcExcludeFeignService.searchList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<AgentPcExcludeDto> searchSingle(@RequestBody SingleLongEntity entity) throws Exception {
+        return agentPcExcludeFeignService.searchSinglet(entity);
+    }
+
+}

+ 31 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AgentPointController.java

@@ -0,0 +1,31 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.AgentPointFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.ib.point.AgentPointRecordDto;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.ib.point.AgentPointRecordListEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * Created by max on 2020/8/31.
+ */
+@RestController
+@RequestMapping("/agent/point/change")
+public class AgentPointController {
+
+    @Autowired
+    private AgentPointFeignService agentPointFeignService;
+
+    @PostMapping("/list")
+    public BaseResultWithPagerDto<List<AgentPointRecordDto>> getList(@RequestBody AgentPointRecordListEntity entity, InfoEntity infoEntity) throws Exception {
+        return agentPointFeignService.getList(entity);
+    }
+
+}

+ 120 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/AuthorityController.java

@@ -0,0 +1,120 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.AuthorityService;
+import com.crm.manager.service.UserRoleService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.user.role.UserNodeDisplayDto;
+import com.crm.rely.backend.core.entity.system.action.SysActionAddEntity;
+import com.crm.rely.backend.core.entity.system.action.SysActionDeleteEntity;
+import com.crm.rely.backend.core.entity.system.action.SysActionUpdateEntity;
+import com.crm.rely.backend.core.entity.system.node.SysNodeAddEntity;
+import com.crm.rely.backend.core.entity.system.node.SysNodeDeleteEntity;
+import com.crm.rely.backend.core.entity.system.node.SysNodeUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 权限
+ *
+ * @author houn
+ */
+@RestController
+@RequestMapping("/authority")
+public class AuthorityController {
+
+    @Autowired
+    private AuthorityService authorityService;
+
+    @Autowired
+    private UserRoleService roleInfoService;
+
+    /**
+     * 添加节点
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/node/add")
+    public BaseResultDto nodeAdd(@RequestBody @Validated SysNodeAddEntity entity) throws Exception {
+        authorityService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 删除节点
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/node/delete")
+    public BaseResultDto nodeDelete(@RequestBody @Validated SysNodeDeleteEntity entity) throws Exception {
+        authorityService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 修改节点
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/node/update")
+    public BaseResultDto nodeUpdate(@RequestBody @Validated SysNodeUpdateEntity entity) throws Exception {
+        authorityService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 添加按钮
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/action/add")
+    public BaseResultDto actionAdd(@RequestBody @Validated SysActionAddEntity entity) throws Exception {
+        authorityService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 删除按钮
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/action/delete")
+    public BaseResultDto actionDelete(@RequestBody @Validated SysActionDeleteEntity entity) throws Exception {
+        authorityService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 修改按钮
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/action/update")
+    public BaseResultDto actionUpdate(@RequestBody @Validated SysActionUpdateEntity entity) throws Exception {
+        authorityService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/info")
+    public BaseResultDto info() throws Exception {
+        List<UserNodeDisplayDto> userNodeDisplayDtos = roleInfoService.getUserNodeDisplay(0L);
+        return BaseResultDto.success(userNodeDisplayDtos);
+    }
+}

+ 91 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/BusinessEmailController.java

@@ -0,0 +1,91 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.BusinessEmailReceiveRecordService;
+import com.crm.manager.service.BusinessEmailSentRecordService;
+import com.crm.manager.service.CommonService;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.business.email.receive.BusinessEmailReceiveRecordDto;
+import com.crm.rely.backend.core.dto.business.email.sent.BusinessEmailSentRecordDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.business.email.receive.BusinessEmailReceiveRecordSearchEntity;
+import com.crm.rely.backend.core.entity.business.email.sent.BusinessEmailSentRecordAddEntity;
+import com.crm.rely.backend.core.entity.business.email.sent.BusinessEmailSentRecordSearchEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @author houn
+ */
+@RestController
+@RequestMapping("/business/email")
+public class BusinessEmailController {
+
+    @Autowired
+    private BusinessEmailReceiveRecordService receiveRecordService;
+
+    @Autowired
+    private BusinessEmailSentRecordService sentRecordService;
+
+    @Autowired
+    private CommonService commonService;
+
+    @PostMapping("/sent")
+    public BaseResultDto addRate(@RequestBody @Validated BusinessEmailSentRecordAddEntity entity,
+                                 InfoEntity infoEntity) throws Exception {
+        entity.setAgentId(infoEntity.getIbInfo().getId());
+        sentRecordService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/sent/list")
+    public BaseResultDto searcherListRate(@RequestBody @Validated BusinessEmailSentRecordSearchEntity entity,
+                                          InfoEntity infoEntity) throws Exception {
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        BaseResultDto resultDto = sentRecordService.searchList(entity);
+        return resultDto;
+    }
+
+    @PostMapping("/search/receive/list")
+    public BaseResultDto searcherListRate(@RequestBody @Validated BusinessEmailReceiveRecordSearchEntity entity,
+                                          InfoEntity infoEntity) throws Exception {
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        BaseResultDto resultDto = receiveRecordService.searchList(entity);
+        return resultDto;
+    }
+
+    @PostMapping("/search/sent/single")
+    public BaseResultDto searcherSentSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BusinessEmailSentRecordDto dto = sentRecordService.searchSingle(entity.getId());
+        return BaseResultDto.success(dto);
+    }
+
+    @PostMapping("/search/receive/single")
+    public BaseResultDto searcherReceiveSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BusinessEmailReceiveRecordDto dto = receiveRecordService.searchSingle(entity.getId());
+        return BaseResultDto.success(dto);
+    }
+
+    @PostMapping("/sent/upload")
+    public BaseResultDto upload(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
+
+
+        String middlePath = "/business/email/" + DateUtil.formatDate();
+        String path = commonService.uploadFile(middlePath, file);
+
+        return BaseResultDto.success(path);
+    }
+
+}

+ 56 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CommonController.java

@@ -0,0 +1,56 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.*;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.CustomGetEmailDto;
+import com.crm.rely.backend.core.dto.market.MarketEmailStatusNumberDto;
+import com.crm.rely.backend.core.dto.market.promo.code.email.MarketPromoCodeEmailListDto;
+import com.crm.rely.backend.core.dto.market.promo.code.email.record.MarketPromoCodeEmailRecordListDto;
+import com.crm.rely.backend.core.dto.market.upload.email.MarketUploadEmailListDto;
+import com.crm.rely.backend.core.dto.system.email.template.SysEmailTemplateSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.CustomSearchGetEmailEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.market.email.upload.MarketUploadEmailSearchPageEntity;
+import com.crm.rely.backend.core.entity.market.email.upload.detail.MarketUploadEmailDetailSearchGetEmailEntity;
+import com.crm.rely.backend.core.entity.market.promo.code.email.MarketPromoCodeEmailAddEntity;
+import com.crm.rely.backend.core.entity.market.promo.code.email.MarketPromoCodeEmailSearchPageEntity;
+import com.crm.rely.backend.core.entity.market.promo.code.email.record.MarketPromoCodeEmailRecordSearchPageEntity;
+import com.crm.rely.backend.core.entity.market.promo.code.email.record.MarketPromoCodeEmailRecordSendEntity;
+import com.crm.rely.backend.core.entity.market.promo.code.email.record.MarketPromoCodeEmailRecordStatusNumberEntity;
+import com.crm.rely.backend.core.entity.market.promo.code.email.record.MarketPromoCodeRecordSupplementSendEntity;
+import com.crm.rely.backend.core.entity.system.email.template.SysEmailTemplateSearchEntity;
+import com.crm.rely.backend.core.pojo.table.MarketPromoCodeEmailTable;
+import com.crm.rely.backend.exception.ControllerException;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ *
+ *
+ * @author houn
+ */
+@RestController
+@RequestMapping("/common")
+public class CommonController {
+
+    @Autowired
+    private CommonService commonService;
+
+
+    @PostMapping("/upload")
+    public BaseResultDto upload(@RequestParam(value = "file", required = false) MultipartFile file) throws Exception {
+
+        commonService.validated(file);
+        String path = commonService.uploadFile(file);
+        return BaseResultDto.success(Constants.SUCCESS, path);
+    }
+}

+ 239 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/ControlPanelController.java

@@ -0,0 +1,239 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ControlPanelService;
+import com.crm.manager.service.CustomNewsService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.control.panel.statistics.*;
+import com.crm.rely.backend.core.entity.base.PageEntity;
+import com.crm.rely.backend.core.entity.control.panel.statistics.ControlPanelStatisticsEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.news.CustomNewsSearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/control/panel")
+public class ControlPanelController {
+
+    @Autowired
+    private ControlPanelService controlPanelService;
+
+    @Autowired
+    private CustomNewsService customNewsService;
+
+    /**
+     * 客户动态
+     *
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/custom/dynamic")
+    public BaseResultDto customDynamic(InfoEntity infoEntity) throws Exception {
+        CustomNewsSearchEntity entity = new CustomNewsSearchEntity();
+        PageEntity page = new PageEntity();
+        page.setCurrent(1);
+        page.setRow(5);
+        entity.setPage(page);
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        int dId;
+        if (infoEntity.getIbInfo().getDepartmentId() == null) {
+            dId = -1;
+        } else {
+            dId = infoEntity.getIbInfo().getDepartmentId().intValue();
+        }
+        List<Integer> types = new ArrayList<>(7);
+        switch (dId) {
+            case 1:
+            case 4:
+                types.add(1);
+                types.add(4);
+                types.add(3);
+                types.add(5);
+                types.add(7);
+                types.add(6);
+                break;
+            case 2:
+                types.add(6);
+                types.add(3);
+                types.add(4);
+                break;
+            case 3:
+                types.add(7);
+                break;
+            case 5:
+                types = null;
+                break;
+            default:
+                if (PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+                    types = null;
+                } else {
+
+                    types.add(-1);
+                }
+                break;
+        }
+        entity.setTypes(types);
+        List<Integer> status = new ArrayList<>(2);
+        status.add(1);
+        status.add(2);
+        entity.setStatus(status);
+        return customNewsService.searchPageList(entity);
+    }
+
+    /**
+     * 财务存取款 内转 佣金统计
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/finance/statistics")
+    public BaseResultDto financeStatistics(InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_FINANCE.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+        List<FinanceStatisticsDto> financeStatisticsDtos = controlPanelService.financeStatistics();
+        return BaseResultDto.success(financeStatisticsDtos);
+    }
+
+    /**
+     * 销售统计
+     * <p>
+     * 今日客户量
+     * 今日交易量
+     * 今日存款数
+     * 今日取款数
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/sale/statistics")
+    public BaseResultDto saleStatistics(InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+        SaleStatisticsDto saleStatisticsDto = controlPanelService.saleStatistics();
+        return BaseResultDto.success(saleStatisticsDto);
+    }
+
+    /**
+     * 法务统计
+     * <p>
+     * 用户数
+     * 未激活客户数
+     * 待核验用户
+     * 待审批账户
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/legal/affairs/statistics")
+    public BaseResultDto legalAffairsStatistics(InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_LEGAL_AFFAIRS.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+        LegalAffairsStatisticsDto legalAffairsStatisticsDto = controlPanelService.legalAffairsStatistics();
+        return BaseResultDto.success(legalAffairsStatisticsDto);
+    }
+
+    /**
+     * 市场统计
+     * 今日新增注册
+     * 今日新增模拟
+     * 客户活动参与
+     * 代理活动参与
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/market/statistics")
+    public BaseResultDto marketStatistics(InfoEntity infoEntity) throws Exception {
+
+//        if (!PrefixEnum.PREFIX_MARKET.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+        MarketStatisticsDto marketStatisticsDto = controlPanelService.marketStatistics();
+        return BaseResultDto.success(marketStatisticsDto);
+    }
+
+    /**
+     * 管理员统计
+     * <p>
+     * 存款申请
+     * 活动申请
+     * 待核验用户
+     * 待审批账户
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/manager/statistics")
+    public BaseResultDto managerStatistics(InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_ADMIN.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+
+        ManagerStatisticsDto statisticsDto = controlPanelService.managerStatistics();
+        return BaseResultDto.success(statisticsDto);
+    }
+
+    /**
+     * 财务存取款待处理数量
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/finance/balance/pending")
+    public BaseResultDto financeBalancePending(InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_FINANCE.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+        FinanceBalancePendingStatisticsDto statisticsDto = controlPanelService.financeBalancePendingStatistics();
+        return BaseResultDto.success(statisticsDto);
+    }
+
+    /**
+     * 财务 根据时间 存取款 内转 外佣数量
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/finance/date/balance")
+    public BaseResultDto financeDateBalance(@RequestBody ControlPanelStatisticsEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_FINANCE.equals(infoEntity.getPrefix()) || !PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+        FinanceStatisticsDto financeStatisticsDto = controlPanelService.financeStatistics(entity);
+        return BaseResultDto.success(financeStatisticsDto);
+    }
+
+
+}

+ 152 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CooperativePartnerController.java

@@ -0,0 +1,152 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CooperativePartnerService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.cooperative.partner.agent.CooperativePartnerAgentDto;
+import com.crm.rely.backend.core.dto.cooperative.partner.subset.CooperativePartnerSubsetDto;
+import com.crm.rely.backend.core.dto.cooperative.partner.us.CooperativePartnerUsDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.cooperative.partner.agent.*;
+import com.crm.rely.backend.core.entity.cooperative.partner.subset.*;
+import com.crm.rely.backend.core.entity.cooperative.partner.us.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ *
+ */
+@RestController
+@RequestMapping("/cooperative/partner")
+public class CooperativePartnerController {
+
+    @Autowired
+    private CooperativePartnerService cooperativePartnerService;
+
+    @PostMapping("/agent/add")
+    public BaseResultDto addAgent(@RequestBody @Validated CooperativePartnerAgentAddEntity entity) throws Exception {
+        entity.setType(1);
+        cooperativePartnerService.addAgent(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/agent/update")
+    public BaseResultDto updateAgent(@RequestBody @Validated CooperativePartnerAgentUpdateEntity entity) throws Exception {
+
+        cooperativePartnerService.updateAgent(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/agent/approve")
+    public BaseResultDto approveAgent(@RequestBody @Validated CooperativePartnerAgentApproveEntity entity) throws Exception {
+
+        cooperativePartnerService.approveAgent(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/agent/delete")
+    public BaseResultDto deleteAgent(@RequestBody @Validated CooperativePartnerAgentDeleteEntity entity) throws Exception {
+
+        cooperativePartnerService.deleteAgent(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/agent/search/list")
+    public ResultWithPagerDto<CooperativePartnerAgentDto> searchAgentList(@RequestBody @Validated CooperativePartnerAgentSearchEntity entity) throws Exception {
+
+        entity.setType(1);
+        return cooperativePartnerService.searchAgentPageList(entity);
+    }
+
+    @PostMapping("/agent/search/single")
+    public BaseResultDto<CooperativePartnerAgentDto> searchAgentSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CooperativePartnerAgentDto dto = cooperativePartnerService.searchAgentSingle(entity);
+        return BaseResultDto.success(dto);
+    }
+
+    @PostMapping("/subset/add")
+    public BaseResultDto addSubset(@RequestBody @Validated CooperativePartnerSubsetAddEntity entity) throws Exception {
+        entity.setType(2);
+        cooperativePartnerService.addSubset(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/subset/update")
+    public BaseResultDto updateSubset(@RequestBody @Validated CooperativePartnerSubsetUpdateEntity entity) throws Exception {
+
+        cooperativePartnerService.updateSubset(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/subset/approve")
+    public BaseResultDto approveSubset(@RequestBody @Validated CooperativePartnerSubsetApproveEntity entity) throws Exception {
+
+        cooperativePartnerService.approveSubset(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/subset/delete")
+    public BaseResultDto deleteSubset(@RequestBody @Validated CooperativePartnerSubsetDeleteEntity entity) throws Exception {
+
+        cooperativePartnerService.deleteSubset(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/subset/search/list")
+    public ResultWithPagerDto<CooperativePartnerSubsetDto> searchSubsetList(@RequestBody @Validated CooperativePartnerSubsetSearchEntity entity) throws Exception {
+        entity.setType(2);
+        return cooperativePartnerService.searchSubsetPageList(entity);
+    }
+
+    @PostMapping("/subset/search/single")
+    public BaseResultDto<CooperativePartnerSubsetDto> searchSubsetSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CooperativePartnerSubsetDto dto = cooperativePartnerService.searchSubsetSingle(entity);
+        return BaseResultDto.success(dto);
+    }
+
+    @PostMapping("/us/add")
+    public BaseResultDto addUs(@RequestBody @Validated CooperativePartnerUsAddEntity entity) throws Exception {
+        entity.setType(3);
+        cooperativePartnerService.addUs(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/us/update")
+    public BaseResultDto updateUs(@RequestBody @Validated CooperativePartnerUsUpdateEntity entity) throws Exception {
+
+        cooperativePartnerService.updateUs(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/us/approve")
+    public BaseResultDto approveUs(@RequestBody @Validated CooperativePartnerUsApproveEntity entity) throws Exception {
+
+        cooperativePartnerService.approveUs(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/us/delete")
+    public BaseResultDto deleteUs(@RequestBody @Validated CooperativePartnerUsDeleteEntity entity) throws Exception {
+
+        cooperativePartnerService.deleteUs(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/us/search/list")
+    public ResultWithPagerDto<CooperativePartnerUsDto> searchUsList(@RequestBody @Validated CooperativePartnerUsSearchEntity entity) throws Exception {
+
+        entity.setType(3);
+        return cooperativePartnerService.searchUsPageList(entity);
+    }
+
+    @PostMapping("/us/search/single")
+    public BaseResultDto<CooperativePartnerUsDto> searchUsSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CooperativePartnerUsDto dto = cooperativePartnerService.searchUsSingle(entity);
+        return BaseResultDto.success(dto);
+    }
+
+}

+ 132 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityApplyController.java

@@ -0,0 +1,132 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityApplyExportDto;
+import com.crm.manager.service.activity.CustomActivityApplyFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.CustomActivityApplySearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.CustomActivityApplyApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.CustomActivityApplyDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.CustomActivityApplySearchEntity;
+import com.crm.rely.backend.core.entity.custom.activity.CustomActivityApplyUpdateEntity;
+import com.crm.rely.backend.core.pojo.view.CustomActivityApplyExportView;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @description: 客户活动控制器
+ * @author: houn
+ * @create: 2020-06-13 18:01
+ **/
+@RestController
+@RequestMapping("/custom/activity")
+public class CustomActivityApplyController {
+
+    @Autowired
+    private CustomActivityApplyFeignService customActivityApplyFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated CustomActivityApplyApproveEntity entity) throws Exception {
+        return customActivityApplyFeignService.approve(entity);
+    }
+
+    @PostMapping("/de/complete")
+    public BaseResultDto deComplete(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return customActivityApplyFeignService.deComplete(entity);
+    }
+
+    @PostMapping("/complete")
+    public BaseResultDto complete(@RequestBody @Validated CustomActivityApplyApproveEntity entity) throws Exception {
+
+        return customActivityApplyFeignService.complete(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityApplyDeleteEntity entity) throws Exception {
+
+        return customActivityApplyFeignService.delete(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomActivityApplyUpdateEntity entity) throws Exception {
+
+        return customActivityApplyFeignService.update(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated CustomActivityApplySearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<CustomActivityApplySearchDto> resultWithPagerDto =
+                customActivityApplyFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/passed/list")
+    public BaseResultDto searcherPassedList(@RequestBody @Validated CustomActivityApplySearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<CustomActivityApplySearchDto> resultWithPagerDto =
+                customActivityApplyFeignService.searcherPassedList(entity);
+        return resultWithPagerDto;
+    }
+
+    @GetMapping(value = {"/export", "/passed/export"})
+    public void exportList(@RequestParam(name = "login") Long login,
+                           @RequestParam(name = "cId") Long cId,
+                           @RequestParam(name = "startDate") String startDate,
+                           @RequestParam(name = "endDate") String endDate,
+                           @RequestParam(name = "status") Integer status,
+                           @RequestParam(name = "completeStatus") Integer completeStatus,
+                           HttpServletRequest request,
+                           HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityApplySearchEntity entity = new CustomActivityApplySearchEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setStatus(status);
+        entity.setCompleteStatus(completeStatus);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        BaseResultDto<List<CustomActivityApplyExportView>> resultDto = null;
+        switch (request.getRequestURI()) {
+            case "/custom/activity/export":
+                resultDto = customActivityApplyFeignService.exportList(entity);
+                break;
+            case "/custom/activity/passed/export":
+                resultDto = customActivityApplyFeignService.exportPassedList(entity);
+                break;
+        }
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityApplyExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityApplyExportDto dto = new CustomActivityApplyExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY", true), dtos,
+                    CustomActivityApplyExportDto.class, response);
+        }
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomActivityApplySearchDto customActivityApplySearchDto =
+                customActivityApplyFeignService.searcherSingle(entity);
+        return BaseResultDto.success(customActivityApplySearchDto);
+    }
+
+}

+ 53 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityDepositGiveController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityDepositGiveFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.deposit.CustomActivityDepositGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.CustomActivityDepositGiveDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.CustomActivityDepositGiveSearchEntity;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/deposit/give")
+public class CustomActivityDepositGiveController {
+
+    @Autowired
+    private CustomActivityDepositGiveFeignService feignService;
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityDepositGiveDeleteEntity entity) throws Exception {
+
+        return feignService.delete(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto cancelActivity(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.cancelActivity(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityDepositGiveDto> searcherList(@RequestBody @Validated CustomActivityDepositGiveSearchEntity entity) throws Exception {
+
+        return feignService.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.searcherSingle(entity);
+    }
+}

+ 263 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityDepositRaffleController.java

@@ -0,0 +1,263 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityDepositRaffleExportDto;
+import com.crm.manager.dto.export.CustomActivityDepositRaffleNumberRecordExportDto;
+import com.crm.manager.dto.export.CustomActivityDepositRaffleRecordExportDto;
+import com.crm.manager.service.activity.CustomActivityDepositRaffleFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.deposit.raffle.CustomActivityDepositRaffleDto;
+import com.crm.rely.backend.core.dto.custom.activity.deposit.raffle.CustomActivityDepositRaffleNumberRecordDto;
+import com.crm.rely.backend.core.dto.custom.activity.deposit.raffle.CustomActivityDepositRaffleRecordDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.CustomActivityDepositRaffleSearchEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.CustomActivityDepositRaffleUpdateConfigWeekRaffleEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.CustomActivityDepositRaffleUpdateNumberEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.raffle.CustomActivityDepositRaffleRecordSearchEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.raffle.number.CustomActivityDepositRaffleNumberRecordSearchEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.raffle.week.CustomActivityDepositRaffleWeekApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.deposit.raffle.week.CustomActivityDepositRaffleWeekSearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/deposit/raffle")
+public class CustomActivityDepositRaffleController {
+
+    @Autowired
+    private CustomActivityDepositRaffleFeignService service;
+
+    @PostMapping("/update/number")
+    public BaseResultDto updateNumber(@RequestBody @Validated CustomActivityDepositRaffleUpdateNumberEntity entity) throws Exception {
+
+        return service.updateNumber(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityDepositRaffleDto> searcherList(@RequestBody @Validated CustomActivityDepositRaffleSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searcherSingle(entity);
+    }
+
+    @RequestMapping("/export")
+    public void export(
+            @RequestParam(name =
+                    "cId") Long cId,
+            @RequestParam(name =
+                    "email") String email,
+            @RequestParam(name =
+                    "startDate") String startDate,
+            @RequestParam(name =
+                    "endDate") String endDate,
+            HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityDepositRaffleSearchEntity entity =
+                new CustomActivityDepositRaffleSearchEntity();
+
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityDepositRaffleDto>> resultDto =
+                service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityDepositRaffleExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityDepositRaffleExportDto dto = new CustomActivityDepositRaffleExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_DEPOSIT_RAFFLE",
+                            true), dtos,
+                    CustomActivityDepositRaffleExportDto.class, response);
+
+        }
+    }
+
+    @PostMapping("/record/search/list")
+    public ResultWithPagerDto<CustomActivityDepositRaffleRecordDto> searcherRecordList(@RequestBody @Validated CustomActivityDepositRaffleRecordSearchEntity entity) throws Exception {
+
+        return service.searcherRecordList(entity);
+    }
+
+    @PostMapping("/record/search/single")
+    public BaseResultDto searcherRecordSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searcherRecordSingle(entity);
+    }
+
+    @RequestMapping("/record/export")
+    public void exportRecord(
+            @RequestParam(name =
+                    "cId") Long cId,
+            @RequestParam(name =
+                    "email") String email,
+            @RequestParam(name =
+                    "raffleId") Long raffleId,
+            @RequestParam(name =
+                    "startDate") String startDate,
+            @RequestParam(name =
+                    "endDate") String endDate,
+            HttpServletResponse response) throws Exception {
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityDepositRaffleRecordSearchEntity entity =
+                new CustomActivityDepositRaffleRecordSearchEntity();
+
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setRaffleId(raffleId);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityDepositRaffleRecordDto>> resultDto =
+                service.exportRecord(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityDepositRaffleRecordExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityDepositRaffleRecordExportDto dto = new CustomActivityDepositRaffleRecordExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_DEPOSIT_RAFFLE_RECORD",
+                            true), dtos,
+                    CustomActivityDepositRaffleRecordExportDto.class, response);
+
+        }
+    }
+
+    @PostMapping("/number/record/search/list")
+    public ResultWithPagerDto<CustomActivityDepositRaffleNumberRecordDto> searcherNumberRecordList(@RequestBody @Validated CustomActivityDepositRaffleNumberRecordSearchEntity entity) throws Exception {
+
+        return service.searcherNumberRecordList(entity);
+    }
+
+    @PostMapping("/number/record/search/single")
+    public BaseResultDto searcherNumberRecordSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searcherNumberRecordSingle(entity);
+    }
+
+    @PostMapping("/number/record/export")
+    public void exportNumberRecord(
+            @RequestParam(name =
+                    "cId") Long cId,
+            @RequestParam(name =
+                    "email") String email,
+            @RequestParam(name =
+                    "startDate") String startDate,
+            @RequestParam(name =
+                    "endDate") String endDate,
+            HttpServletResponse response) throws Exception {
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityDepositRaffleNumberRecordSearchEntity entity =
+                new CustomActivityDepositRaffleNumberRecordSearchEntity();
+
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityDepositRaffleNumberRecordDto>> resultDto =
+                service.exportNumberRecord(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityDepositRaffleNumberRecordExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityDepositRaffleNumberRecordExportDto dto =
+                        new CustomActivityDepositRaffleNumberRecordExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_DEPOSIT_RAFFLE_NUMBER_RECORD",
+                            true), dtos,
+                    CustomActivityDepositRaffleNumberRecordExportDto.class, response);
+
+        }
+    }
+
+    @PostMapping("/week/markets/search/list")
+    public BaseResultDto marketsWeekSearchList(@RequestBody @Validated CustomActivityDepositRaffleWeekSearchEntity entity) throws Exception {
+        entity.setStatus(2);
+        return service.managerWeekSearchList(entity);
+    }
+
+    @PostMapping("/week/manager/search/list")
+    public BaseResultDto managerWeekSearchList(@RequestBody @Validated CustomActivityDepositRaffleWeekSearchEntity entity) throws Exception {
+        return service.managerWeekSearchList(entity);
+    }
+
+    @PostMapping("/markets/week/approve")
+    public BaseResultDto marketsApprove(@RequestBody @Validated CustomActivityDepositRaffleWeekApproveEntity entity) throws Exception {
+
+
+        return service.marketsApprove(entity);
+    }
+
+    @PostMapping("/week/approve")
+    public BaseResultDto managerApprove(@RequestBody @Validated CustomActivityDepositRaffleWeekApproveEntity entity) throws Exception {
+
+        return service.managerApprove(entity);
+    }
+
+    @PostMapping("/manager/week/search/single")
+    public BaseResultDto managerSearchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.managerWeekSearchSingle(entity);
+    }
+
+    @RequestMapping("/get/config/week/raffle")
+    public BaseResultDto getConfigWeekRaffle() throws Exception {
+
+        return service.getConfigWeekRaffle();
+    }
+
+    @PostMapping("/update/config/week/raffle")
+    public BaseResultDto updateConfigWeekRaffle(@RequestBody @Validated CustomActivityDepositRaffleUpdateConfigWeekRaffleEntity entity) throws Exception {
+
+        return service.updateConfigWeekRaffle(entity);
+    }
+
+    @PostMapping("/week")
+    public BaseResultDto managerWeek() throws Exception {
+        return service.managerWeek();
+    }
+
+}

+ 55 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityExceptionalManageController.java

@@ -0,0 +1,55 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityExceptionalManageFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.exceptional.manager.CustomActivityExceptionalManagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.CustomActivityExceptionalManagerAddEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.CustomActivityExceptionalManagerSearchEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.CustomActivityExceptionalManagerUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/custom/activity/exceptional/manager")
+public class CustomActivityExceptionalManageController {
+
+    @Autowired
+    private CustomActivityExceptionalManageFeignService service;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody @Validated CustomActivityExceptionalManagerAddEntity entity) throws ServiceException {
+
+        return service.add(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomActivityExceptionalManagerDto> single(@RequestBody SingleLongEntity entity) throws ServiceException {
+
+        return service.single(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityExceptionalManagerDto> searchPageList(@RequestBody CustomActivityExceptionalManagerSearchEntity entity) throws ServiceException {
+        return service.searchPageList(entity);
+
+    }
+
+    @PostMapping("/close")
+    public BaseResultDto close(@RequestBody CustomActivityExceptionalManagerUpdateEntity entity) throws ServiceException {
+
+        return service.close(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody CustomActivityExceptionalManagerUpdateEntity entity) throws ServiceException {
+
+        return service.update(entity);
+    }
+}

+ 95 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityExceptionalManagerReasonController.java

@@ -0,0 +1,95 @@
+package com.crm.manager.controller;
+
+import com.crm.login.rely.backend.controller.BaseLoginController;
+import com.crm.manager.service.activity.CustomActivityExceptionalManagerReasonFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.exceptional.manager.reason.CustomActivityExceptionalManagerReasonDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonAddEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonSearchListEntity;
+import com.crm.rely.backend.core.entity.custom.exceptional.manager.reason.CustomActivityExceptionalManagerReasonUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/exceptional/manager/reason")
+public class CustomActivityExceptionalManagerReasonController extends BaseLoginController {
+
+    @Autowired
+    private CustomActivityExceptionalManagerReasonFeignService service;
+
+    /**
+     * 添加
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomActivityExceptionalManagerReasonAddEntity entity) throws Exception {
+
+
+        return service.add(entity);
+    }
+
+    /**
+     * 删除
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityExceptionalManagerReasonDeleteEntity entity) throws Exception {
+
+
+        return service.delete(entity);
+    }
+
+    /**
+     * 修改
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomActivityExceptionalManagerReasonUpdateEntity entity) throws Exception {
+
+        return service.update(entity);
+    }
+
+    /**
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityExceptionalManagerReasonDto> pageSearchList(@RequestBody @Validated CustomActivityExceptionalManagerReasonSearchListEntity entity) throws Exception {
+        return service.pageSearchList(entity);
+    }
+
+    @PostMapping("/all")
+    public BaseResultDto<List<CustomActivityExceptionalManagerReasonDto>> allReason() throws Exception {
+
+        return BaseResultDto.success(service.allReason());
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomActivityExceptionalManagerReasonDto> single(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.single(entity);
+    }
+
+}

+ 53 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityGiveController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityGiveFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.give.CustomActivityGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.give.CustomActivityGiveDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.give.CustomActivityGiveSearchEntity;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/give")
+public class CustomActivityGiveController {
+
+    @Autowired
+    private CustomActivityGiveFeignService feignService;
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityGiveDeleteEntity entity) throws Exception {
+
+        return feignService.delete(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto cancelActivity(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.cancelActivity(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityGiveDto> searcherList(@RequestBody @Validated CustomActivityGiveSearchEntity entity) throws Exception {
+
+        return feignService.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.searcherSingle(entity);
+    }
+}

+ 143 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredAgentController.java

@@ -0,0 +1,143 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityHundredAgentExportDto;
+import com.crm.manager.service.activity.CustomActivityHundredAgentFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.hundred.agent.CustomActivityHundredAgentDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.agent.CustomActivityHundredAgentApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.agent.CustomActivityHundredAgentDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.agent.CustomActivityHundredAgentSearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/hundred/agent")
+public class CustomActivityHundredAgentController {
+
+    @Autowired
+    private CustomActivityHundredAgentFeignService service;
+
+
+    /**
+     * 销售审核
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/sales/approve")
+    public BaseResultDto salesApprove(@RequestBody @Validated CustomActivityHundredAgentApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.salesApprove(entity);
+    }
+
+    @PostMapping("/realization/approve")
+    public BaseResultDto realizationApprove(@RequestBody @Validated CustomActivityHundredAgentApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.realizationApprove(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityHundredAgentDeleteEntity entity) throws Exception {
+
+        return service.delete(entity);
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityHundredAgentDto> searcherList(@RequestBody @Validated
+                                                                          CustomActivityHundredAgentSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.searcherSingle(entity);
+    }
+
+
+    @RequestMapping("/export")
+    public void export(@RequestParam(name = "login") Long login,
+                       @RequestParam(name = "cId") Long cId,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "status") Integer status,
+                       @RequestParam(name = "realizationStatus") Integer realizationStatus,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate,
+                       HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityHundredAgentSearchEntity entity = new CustomActivityHundredAgentSearchEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStatus(status);
+        entity.setRealizationStatus(realizationStatus);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityHundredAgentDto>> resultDto = service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityHundredAgentExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityHundredAgentExportDto dto = new CustomActivityHundredAgentExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                if (item.getStatus() == null || item.getStatus().equals(0)) {
+                    dto.setStatus("未申请");
+                } else if (item.getStatus().equals(1)) {
+                    dto.setStatus("申请中");
+                } else if (item.getStatus().equals(2)) {
+                    dto.setStatus("通过");
+                } else if (item.getStatus().equals(3)) {
+                    dto.setStatus("拒绝");
+                }
+                if (item.getRealizationStatus() == null || item.getRealizationStatus().equals(0)) {
+                    dto.setRealizationStatus("未申请");
+                } else if (item.getRealizationStatus().equals(1)) {
+                    dto.setRealizationStatus("申请中");
+                } else if (item.getRealizationStatus().equals(2)) {
+                    dto.setRealizationStatus("通过");
+                } else if (item.getRealizationStatus().equals(3)) {
+                    dto.setRealizationStatus("拒绝");
+                }
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_HUNDRED_AGENT", true), dtos,
+                    CustomActivityHundredAgentExportDto.class, response);
+        }
+    }
+
+}

+ 143 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredAgentVipController.java

@@ -0,0 +1,143 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityHundredAgentExportDto;
+import com.crm.manager.service.activity.CustomActivityHundredAgentVipFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.hundred.agent.CustomActivityHundredAgentDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.agent.CustomActivityHundredAgentApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.agent.CustomActivityHundredAgentDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.agent.CustomActivityHundredAgentSearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/hundred/agent/vip")
+public class CustomActivityHundredAgentVipController {
+
+    @Autowired
+    private CustomActivityHundredAgentVipFeignService service;
+
+
+    /**
+     * 销售审核
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/sales/approve")
+    public BaseResultDto salesApprove(@RequestBody @Validated CustomActivityHundredAgentApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.salesApprove(entity);
+    }
+
+    @PostMapping("/realization/approve")
+    public BaseResultDto realizationApprove(@RequestBody @Validated CustomActivityHundredAgentApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.realizationApprove(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityHundredAgentDeleteEntity entity) throws Exception {
+
+        return service.delete(entity);
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityHundredAgentDto> searcherList(@RequestBody @Validated
+                                                                          CustomActivityHundredAgentSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.searcherSingle(entity);
+    }
+
+
+    @RequestMapping("/export")
+    public void export(@RequestParam(name = "login") Long login,
+                       @RequestParam(name = "cId") Long cId,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "status") Integer status,
+                       @RequestParam(name = "realizationStatus") Integer realizationStatus,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate,
+                       HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityHundredAgentSearchEntity entity = new CustomActivityHundredAgentSearchEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStatus(status);
+        entity.setRealizationStatus(realizationStatus);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityHundredAgentDto>> resultDto = service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityHundredAgentExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityHundredAgentExportDto dto = new CustomActivityHundredAgentExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                if (item.getStatus() == null || item.getStatus().equals(0)) {
+                    dto.setStatus("未申请");
+                } else if (item.getStatus().equals(1)) {
+                    dto.setStatus("申请中");
+                } else if (item.getStatus().equals(2)) {
+                    dto.setStatus("通过");
+                } else if (item.getStatus().equals(3)) {
+                    dto.setStatus("拒绝");
+                }
+                if (item.getRealizationStatus() == null || item.getRealizationStatus().equals(0)) {
+                    dto.setRealizationStatus("未申请");
+                } else if (item.getRealizationStatus().equals(1)) {
+                    dto.setRealizationStatus("申请中");
+                } else if (item.getRealizationStatus().equals(2)) {
+                    dto.setRealizationStatus("通过");
+                } else if (item.getRealizationStatus().equals(3)) {
+                    dto.setRealizationStatus("拒绝");
+                }
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_HUNDRED_AGENT", true), dtos,
+                    CustomActivityHundredAgentExportDto.class, response);
+        }
+    }
+
+}

+ 186 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredController.java

@@ -0,0 +1,186 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityHundredExportDto;
+import com.crm.manager.service.activity.CustomActivityHundredFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.hundred.CustomActivityHundredDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.CustomActivityHundredApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.CustomActivityHundredDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.CustomActivityHundredSearchEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.comment.CustomActivityHundredCommentAddEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.comment.CustomActivityHundredCommentSearchEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/hundred")
+public class CustomActivityHundredController {
+
+    @Autowired
+    private CustomActivityHundredFeignService service;
+
+
+    /**
+     * 销售审核
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/sales/approve")
+    public BaseResultDto salesApprove(@RequestBody @Validated CustomActivityHundredApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.salesApprove(entity);
+    }
+
+    @PostMapping("/transform/approve")
+    public BaseResultDto transformApprove(@RequestBody @Validated CustomActivityHundredApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.transformApprove(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityHundredDeleteEntity entity) throws Exception {
+        service.delete(entity);
+        return BaseResultDto.success();
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityHundredDto> searcherList(@RequestBody @Validated
+                                                                     CustomActivityHundredSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.searcherSingle(entity);
+    }
+
+    /**
+     * 添加备注
+     *
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/comment")
+    public BaseResultDto addComment(@RequestBody @Validated CustomActivityHundredCommentAddEntity entity) throws
+            ServiceException {
+
+        return service.addComment(entity);
+    }
+
+    /**
+     * 查看备注
+     *
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/search/list/comment")
+    public BaseResultDto searchComment(@RequestBody @Validated CustomActivityHundredCommentSearchEntity entity)
+            throws ServiceException {
+
+        return service.searchComment(entity);
+    }
+
+    @RequestMapping("/export")
+    public void export(@RequestParam(name = "login") Long login,
+                       @RequestParam(name = "cId") Long cId,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "status") Integer status,
+                       @RequestParam(name = "activityStatus") Integer activityStatus,
+                       @RequestParam(name = "realizationStatus") Integer realizationStatus,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate,
+                       HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityHundredSearchEntity entity = new CustomActivityHundredSearchEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStatus(status);
+        entity.setActivityStatus(activityStatus);
+        entity.setRealizationStatus(realizationStatus);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityHundredDto>> resultDto = service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityHundredExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityHundredExportDto dto = new CustomActivityHundredExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                if (item.getStatus() == null || item.getStatus().equals(0)) {
+                    dto.setStatus("未申请");
+                } else if (item.getStatus().equals(1)) {
+                    dto.setStatus("申请中");
+                } else if (item.getStatus().equals(2)) {
+                    dto.setStatus("通过");
+                } else if (item.getStatus().equals(3)) {
+                    dto.setStatus("拒绝");
+                }
+
+                if (item.getActivityStatus() == null || item.getActivityStatus().equals(0)) {
+                    dto.setActivityStatus("未申请");
+                } else if (item.getActivityStatus().equals(1)) {
+                    dto.setActivityStatus("申请中");
+                } else if (item.getActivityStatus().equals(2)) {
+                    dto.setActivityStatus("通过");
+                } else if (item.getActivityStatus().equals(3)) {
+                    dto.setActivityStatus("拒绝");
+                }
+
+                if (item.getRealizationStatus() == null || item.getRealizationStatus().equals(0)) {
+                    dto.setRealizationStatus("未申请");
+                } else if (item.getRealizationStatus().equals(1)) {
+                    dto.setRealizationStatus("申请中");
+                } else if (item.getRealizationStatus().equals(2)) {
+                    dto.setRealizationStatus("通过");
+                } else if (item.getRealizationStatus().equals(3)) {
+                    dto.setRealizationStatus("拒绝");
+                }
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_HUNDRED", true), dtos,
+                    CustomActivityHundredExportDto.class, response);
+        }
+    }
+
+}

+ 143 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityHundredEliteAgentVipController.java

@@ -0,0 +1,143 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityHundredAgentExportDto;
+import com.crm.manager.service.activity.CustomActivityHundredEliteAgentVipFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.hundred.elite.agent.CustomActivityHundredEliteAgentDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.elite.agent.CustomActivityHundredEliteAgentApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.elite.agent.CustomActivityHundredEliteAgentDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.hundred.elite.agent.CustomActivityHundredEliteAgentSearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/hundred/elite/agent/vip")
+public class CustomActivityHundredEliteAgentVipController {
+
+    @Autowired
+    private CustomActivityHundredEliteAgentVipFeignService service;
+
+
+    /**
+     * 销售审核
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/sales/approve")
+    public BaseResultDto salesApprove(@RequestBody @Validated CustomActivityHundredEliteAgentApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.salesApprove(entity);
+    }
+
+    @PostMapping("/realization/approve")
+    public BaseResultDto realizationApprove(@RequestBody @Validated CustomActivityHundredEliteAgentApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.realizationApprove(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityHundredEliteAgentDeleteEntity entity) throws Exception {
+
+        return service.delete(entity);
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityHundredEliteAgentDto> searcherList(@RequestBody @Validated
+                                                                               CustomActivityHundredEliteAgentSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.searcherSingle(entity);
+    }
+
+
+    @RequestMapping("/export")
+    public void export(@RequestParam(name = "login") Long login,
+                       @RequestParam(name = "cId") Long cId,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "status") Integer status,
+                       @RequestParam(name = "realizationStatus") Integer realizationStatus,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate,
+                       HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityHundredEliteAgentSearchEntity entity = new CustomActivityHundredEliteAgentSearchEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStatus(status);
+        entity.setRealizationStatus(realizationStatus);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityHundredEliteAgentDto>> resultDto = service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityHundredAgentExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityHundredAgentExportDto dto = new CustomActivityHundredAgentExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                if (item.getStatus() == null || item.getStatus().equals(0)) {
+                    dto.setStatus("未申请");
+                } else if (item.getStatus().equals(1)) {
+                    dto.setStatus("申请中");
+                } else if (item.getStatus().equals(2)) {
+                    dto.setStatus("通过");
+                } else if (item.getStatus().equals(3)) {
+                    dto.setStatus("拒绝");
+                }
+                if (item.getRealizationStatus() == null || item.getRealizationStatus().equals(0)) {
+                    dto.setRealizationStatus("未申请");
+                } else if (item.getRealizationStatus().equals(1)) {
+                    dto.setRealizationStatus("申请中");
+                } else if (item.getRealizationStatus().equals(2)) {
+                    dto.setRealizationStatus("通过");
+                } else if (item.getRealizationStatus().equals(3)) {
+                    dto.setRealizationStatus("拒绝");
+                }
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_HUNDRED_AGENT", true), dtos,
+                    CustomActivityHundredAgentExportDto.class, response);
+        }
+    }
+
+}

+ 55 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityMidyearTenPercentGiveAgentController.java

@@ -0,0 +1,55 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityMidyearTenPercentGiveAgentFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.midyear.ten.percent.give.agent.CustomActivityMidyearTenPercentGiveAgentDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.agent.CustomActivityMidyearTenPercentGiveAgentAddEntity;
+import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.agent.CustomActivityMidyearTenPercentGiveAgentDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.agent.CustomActivityMidyearTenPercentGiveAgentSearchEntity;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/midyear/ten/percent/give/agent")
+public class CustomActivityMidyearTenPercentGiveAgentController {
+
+    @Autowired
+    private CustomActivityMidyearTenPercentGiveAgentFeignService service;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomActivityMidyearTenPercentGiveAgentAddEntity entity) throws Exception {
+        
+        return service.add(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityMidyearTenPercentGiveAgentDeleteEntity entity) throws Exception {
+
+        return service.delete(entity);
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityMidyearTenPercentGiveAgentDto> searcherList(@RequestBody @Validated CustomActivityMidyearTenPercentGiveAgentSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searcherSingle(entity);
+    }
+}

+ 53 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityMidyearTenPercentGiveController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityMidyearTenPercentGiveFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.midyear.ten.percent.give.CustomActivityMidyearTenPercentGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.CustomActivityMidyearTenPercentGiveDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.midyear.ten.percent.give.CustomActivityMidyearTenPercentGiveSearchEntity;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/midyear/ten/percent/give")
+public class CustomActivityMidyearTenPercentGiveController {
+
+    @Autowired
+    private CustomActivityMidyearTenPercentGiveFeignService feignService;
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityMidyearTenPercentGiveDeleteEntity entity) throws Exception {
+
+        return feignService.delete(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto cancelActivity(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.cancelActivity(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityMidyearTenPercentGiveDto> searcherList(@RequestBody @Validated CustomActivityMidyearTenPercentGiveSearchEntity entity) throws Exception {
+
+        return feignService.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.searcherSingle(entity);
+    }
+}

+ 131 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityNoWorriesController.java

@@ -0,0 +1,131 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityNoWorriesExportDto;
+import com.crm.manager.service.activity.CustomActivityNoWorriesFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.no.worries.CustomActivityNoWorriesDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.no.worries.CustomActivityNoWorriesApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.no.worries.CustomActivityNoWorriesDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.no.worries.CustomActivityNoWorriesSearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/no/worries")
+public class CustomActivityNoWorriesController {
+
+    @Autowired
+    private CustomActivityNoWorriesFeignService service;
+
+
+    @PostMapping("/realization/approve")
+    public BaseResultDto realizationApprove(@RequestBody @Validated CustomActivityNoWorriesApproveEntity entity) throws
+            Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity
+                .getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return service.realizationApprove(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityNoWorriesDeleteEntity entity) throws Exception {
+        service.delete(entity);
+        return BaseResultDto.success();
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityNoWorriesDto> searcherList(@RequestBody @Validated
+                                                                       CustomActivityNoWorriesSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.searcherSingle(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto cancel(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.cancel(entity);
+    }
+
+
+    @RequestMapping("/export")
+    public void export(@RequestParam(name = "login") Long login,
+                       @RequestParam(name = "cId") Long cId,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "status") Integer status,
+                       @RequestParam(name = "activityStatus") Integer activityStatus,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate,
+                       HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomActivityNoWorriesSearchEntity entity = new CustomActivityNoWorriesSearchEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setStatus(status);
+        entity.setActivityStatus(activityStatus);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomActivityNoWorriesDto>> resultDto = service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomActivityNoWorriesExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomActivityNoWorriesExportDto dto = new CustomActivityNoWorriesExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                if (item.getStatus() == null || item.getStatus().equals(0)) {
+                    dto.setStatus("未申请");
+                } else if (item.getStatus().equals(1)) {
+                    dto.setStatus("申请中");
+                } else if (item.getStatus().equals(2)) {
+                    dto.setStatus("通过");
+                } else if (item.getStatus().equals(3)) {
+                    dto.setStatus("拒绝");
+                }
+                if (item.getActivityStatus().equals(1)) {
+                    dto.setActivityStatus("活动中");
+                } else if (item.getActivityStatus().equals(2)) {
+                    dto.setActivityStatus("活动完成");
+                } else if (item.getActivityStatus().equals(3)) {
+                    dto.setActivityStatus("活动取消");
+                } else if (item.getActivityStatus().equals(5)) {
+                    dto.setActivityStatus("活动完成");
+                }
+
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_ACTIVITY_NO_WORRIES", true), dtos,
+                    CustomActivityNoWorriesExportDto.class, response);
+        }
+    }
+
+}

+ 57 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityPercentageGiveController.java

@@ -0,0 +1,57 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityPercentageGiveFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.percentage.give.CustomActivityPercentageGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.percentage.give.CustomActivityPercentageGiveApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.percentage.give.CustomActivityPercentageGiveDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.percentage.give.CustomActivityPercentageGiveSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/activity/percentage/give")
+public class CustomActivityPercentageGiveController {
+
+    @Autowired
+    private CustomActivityPercentageGiveFeignService feignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated CustomActivityPercentageGiveApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        feignService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityPercentageGiveDeleteEntity entity) throws Exception {
+        feignService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityPercentageGiveDto> searcherList(@RequestBody @Validated CustomActivityPercentageGiveSearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<CustomActivityPercentageGiveDto> resultWithPagerDto = feignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return feignService.searcherSingle(entity);
+    }
+
+}

+ 117 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityRequiteApplyController.java

@@ -0,0 +1,117 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityRequiteApplyExportDto;
+import com.crm.manager.service.activity.CustomActivityRequiteApplyFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.requite.CustomActivityRequiteApplyDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.requite.CustomActivityRequiteApplyApproveEntity;
+import com.crm.rely.backend.core.entity.custom.activity.requite.CustomActivityRequiteApplyDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.requite.CustomActivityRequiteApplySearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/requite/apply")
+public class CustomActivityRequiteApplyController {
+
+    @Autowired
+    private CustomActivityRequiteApplyFeignService feignService;
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityRequiteApplyDto> searcherList(@RequestBody @Validated CustomActivityRequiteApplySearchEntity entity) throws Exception {
+
+        return feignService.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.searcherSingle(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityRequiteApplyDeleteEntity entity) throws Exception {
+
+        return feignService.delete(entity);
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated CustomActivityRequiteApplyApproveEntity entity) throws Exception {
+
+        return feignService.approve(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto cancel(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.cancel(entity);
+    }
+
+    @GetMapping("/search/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "status") Integer status,
+                                   @RequestParam(name = "endStatus") Integer endStatus,
+                                   HttpServletResponse response) throws Exception {
+
+        CustomActivityRequiteApplySearchEntity entity = new CustomActivityRequiteApplySearchEntity();
+        entity.setCId(cId);
+        entity.setLogin(login);
+        entity.setStatus(status);
+        entity.setEndStatus(endStatus);
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        if (!StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+        if (!StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(sdf.parse(endDate));
+        }
+
+        List<CustomActivityRequiteApplyDto> resultDto = feignService.searcherListExport(entity);
+        List<CustomActivityRequiteApplyExportDto> exportDtos = Lists.newArrayList();
+        resultDto.forEach((item) -> {
+            CustomActivityRequiteApplyExportDto exportDto = new CustomActivityRequiteApplyExportDto();
+            BeanUtils.copyProperties(item, exportDto);
+            exportDto.setCID(item.getCId());
+            exportDto.setInitTime(DateUtil.formatTime(item.getInitTime()));
+            if(1 == item.getStatus()){
+                exportDto.setStatus("待处理");
+            }else if(2 == item.getStatus()){
+                exportDto.setStatus("已通过");
+            }else{
+                exportDto.setStatus("已拒绝");
+            }
+            if (0 == item.getEndStatus()) {
+                exportDto.setEndStatus("未开始");
+            } else if (1 == item.getEndStatus()) {
+                exportDto.setEndStatus("活动中");
+            } else if (2 == item.getEndStatus()) {
+                exportDto.setEndStatus("已结束");
+            } else {
+                exportDto.setEndStatus("已取消");
+            }
+            exportDtos.add(exportDto);
+        });
+        ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_ACTIVITY_REQUITE"), exportDtos, CustomActivityRequiteApplyExportDto.class, response);
+
+    }
+
+}

+ 52 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivitySurplusExcludeController.java

@@ -0,0 +1,52 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivitySurplusExcludeFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.surplus.CustomActivitySurplusExcludeDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.surplus.CustomActivitySurplusExcludeAddEntity;
+import com.crm.rely.backend.core.entity.custom.activity.surplus.CustomActivitySurplusExcludeDeleteEntitys;
+import com.crm.rely.backend.core.entity.custom.activity.surplus.CustomActivitySurplusExcludeSearchEntity;
+import com.crm.rely.backend.core.entity.custom.activity.surplus.CustomActivitySurplusExcludeUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/custom/activity/surplus/exclude")
+public class CustomActivitySurplusExcludeController {
+
+    @Autowired
+    private CustomActivitySurplusExcludeFeignService surplusExcludeFeignServic;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomActivitySurplusExcludeAddEntity entity) throws Exception {
+        return surplusExcludeFeignServic.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivitySurplusExcludeDeleteEntitys entitys) throws Exception {
+        return surplusExcludeFeignServic.delete(entitys);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomActivitySurplusExcludeUpdateEntity entity) throws Exception {
+
+        return surplusExcludeFeignServic.update(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivitySurplusExcludeDto> pageList(@RequestBody CustomActivitySurplusExcludeSearchEntity entity) throws Exception {
+
+        return surplusExcludeFeignServic.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return surplusExcludeFeignServic.searchSingle(entity);
+    }
+}

+ 95 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivitySurplusGiveController.java

@@ -0,0 +1,95 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivitySurplusGiveExportDto;
+import com.crm.manager.service.activity.CustomActivitySurplusGiveFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.surplus.CustomActivitySurplusGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.surplus.CustomActivitySurplusGiveSearcherEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/custom/activity/surplus")
+public class CustomActivitySurplusGiveController {
+
+    @Autowired
+    private CustomActivitySurplusGiveFeignService feignService;
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivitySurplusGiveDto> customSearcherList(@RequestBody @Validated CustomActivitySurplusGiveSearcherEntity entity) throws Exception {
+        return feignService.pageList(entity);
+    }
+
+    @PostMapping("/recover/creadit")
+    public BaseResultDto managerRecoverCreadit(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return feignService.managerRecoverCreadit(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto managerCancel(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return feignService.managerCancel(entity);
+    }
+
+    @PostMapping("/complete")
+    public BaseResultDto managerComplete(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return feignService.managerComplete(entity);
+    }
+
+    @GetMapping("/search/list/export")
+    public void searcherListExport(@RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "status") Integer status,
+                                   HttpServletResponse response) throws Exception {
+
+        CustomActivitySurplusGiveSearcherEntity entity = new CustomActivitySurplusGiveSearcherEntity();
+        entity.setCId(cId);
+        entity.setLogin(login);
+        entity.setStatus(status);
+        /*SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }*/
+
+        List<CustomActivitySurplusGiveDto> resultDto = feignService.searcherListExport(entity);
+        List<CustomActivitySurplusGiveExportDto> exportDtos = Lists.newArrayList();
+        resultDto.forEach((item) -> {
+            CustomActivitySurplusGiveExportDto exportDto = new CustomActivitySurplusGiveExportDto();
+            BeanUtils.copyProperties(item, exportDto);
+            exportDto.setCID(item.getCId());
+            exportDto.setAddtime(DateUtil.formatTime(item.getAddTime()));
+            if(1 == item.getStatus()){
+                exportDto.setStatus("任务中");
+            }else if(2 == item.getStatus()){
+                exportDto.setStatus("完成任务");
+            }else if(3 == item.getStatus()){
+                exportDto.setStatus("已取消");
+            }else{
+                exportDto.setStatus("已结束");
+            }
+            exportDtos.add(exportDto);
+        });
+        ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_ACTIVITY_SURPLUS"), exportDtos, CustomActivitySurplusGiveExportDto.class, response);
+
+    }
+
+}

+ 55 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityTwoPercentGiveAgentController.java

@@ -0,0 +1,55 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityTwoPercentGiveAgentFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.two.percent.give.agent.CustomActivityTwoPercentGiveAgentDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.two.percent.give.agent.CustomActivityTwoPercentGiveAgentAddEntity;
+import com.crm.rely.backend.core.entity.custom.activity.two.percent.give.agent.CustomActivityTwoPercentGiveAgentDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.two.percent.give.agent.CustomActivityTwoPercentGiveAgentSearchEntity;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/two/percent/give/agent")
+public class CustomActivityTwoPercentGiveAgentController {
+
+    @Autowired
+    private CustomActivityTwoPercentGiveAgentFeignService service;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomActivityTwoPercentGiveAgentAddEntity entity) throws Exception {
+
+        return service.add(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityTwoPercentGiveAgentDeleteEntity entity) throws Exception {
+
+        return service.delete(entity);
+    }
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityTwoPercentGiveAgentDto> searcherList(@RequestBody @Validated CustomActivityTwoPercentGiveAgentSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searcherSingle(entity);
+    }
+}

+ 53 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityTwoPercentGiveController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.activity.CustomActivityTwoPercentGiveFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.activity.two.percent.give.CustomActivityTwoPercentGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.two.percent.give.CustomActivityTwoPercentGiveDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.activity.two.percent.give.CustomActivityTwoPercentGiveSearchEntity;
+import lombok.extern.log4j.Log4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author: houn
+ */
+@Log4j
+@RestController
+@RequestMapping("/custom/activity/two/percent/give")
+public class CustomActivityTwoPercentGiveController {
+
+    @Autowired
+    private CustomActivityTwoPercentGiveFeignService feignService;
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomActivityTwoPercentGiveDeleteEntity entity) throws Exception {
+
+        return feignService.delete(entity);
+    }
+
+    @PostMapping("/cancel")
+    public BaseResultDto cancelActivity(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.cancelActivity(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityTwoPercentGiveDto> searcherList(@RequestBody @Validated CustomActivityTwoPercentGiveSearchEntity entity) throws Exception {
+
+        return feignService.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return feignService.searcherSingle(entity);
+    }
+}

+ 101 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomActivityUcoindRewardController.java

@@ -0,0 +1,101 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomActivityUcoinRewardExportDto;
+import com.crm.manager.service.activity.CustomActivityUcoinRewardFeignService;
+import com.crm.rely.backend.core.dto.activity.ucoin.CustomActivityUcoinRewardDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.activity.ucoin.CustomActivityUcoinRewardSearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/custom/activity/ucoin")
+public class CustomActivityUcoindRewardController {
+
+    @Autowired
+    private CustomActivityUcoinRewardFeignService feignService;
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomActivityUcoinRewardDto> searcherList(@RequestBody @Validated CustomActivityUcoinRewardSearchEntity entity) throws Exception {
+        ResultWithPagerDto<CustomActivityUcoinRewardDto> resultWithPagerDto = feignService.pageList(entity);
+        return resultWithPagerDto;
+    }
+
+    /**
+     * 完成任务
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/complete")
+    public BaseResultDto complete(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return feignService.complete(entity);
+    }
+
+    /**
+     * 取消
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/cancel")
+    public BaseResultDto cancel(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return feignService.cancel(entity);
+    }
+
+    @GetMapping("/search/list/export")
+    public void searcherListExport(@RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "status") Integer status,
+                                   HttpServletResponse response) throws Exception {
+
+        CustomActivityUcoinRewardSearchEntity entity = new CustomActivityUcoinRewardSearchEntity();
+        entity.setCId(cId);
+        entity.setLogin(login);
+        entity.setStatus(status);
+        /*SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }*/
+
+        List<CustomActivityUcoinRewardDto> resultDto = feignService.searcherListExport(entity);
+        List<CustomActivityUcoinRewardExportDto> exportDtos = Lists.newArrayList();
+        resultDto.forEach((item) -> {
+            CustomActivityUcoinRewardExportDto exportDto = new CustomActivityUcoinRewardExportDto();
+            BeanUtils.copyProperties(item, exportDto);
+            exportDto.setCID(item.getCId());
+            if(1 == item.getStatus()){
+                exportDto.setStatus("任务中");
+            }else if(2 == item.getStatus()){
+                exportDto.setStatus("完成任务");
+            }else if(3 == item.getStatus()){
+                exportDto.setStatus("已取消");
+            }else{
+                exportDto.setStatus("已结束");
+            }
+            exportDtos.add(exportDto);
+        });
+        ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_ACTIVITY_UCOIN_REWARD"), exportDtos, CustomActivityUcoinRewardExportDto.class, response);
+
+    }
+
+}

+ 62 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomAllocationRosterAreaController.java

@@ -0,0 +1,62 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomAllocationRosterAreaService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.allocation.roster.area.CustomAllocationRosterAreaListDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.area.CustomAllocationRosterAreaAddEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.area.CustomAllocationRosterAreaDeleteEntitys;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.area.CustomAllocationRosterAreaSearchEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.area.CustomAllocationRosterAreaUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/custom/allocation/roster/area")
+public class CustomAllocationRosterAreaController {
+
+    @Autowired
+    private CustomAllocationRosterAreaService customAllocationRosterAreaService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomAllocationRosterAreaAddEntity entity) throws Exception {
+        customAllocationRosterAreaService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomAllocationRosterAreaDeleteEntitys entitys) throws Exception {
+
+        customAllocationRosterAreaService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomAllocationRosterAreaUpdateEntity entity) throws Exception {
+        customAllocationRosterAreaService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomAllocationRosterAreaListDto> pageList(@RequestBody CustomAllocationRosterAreaSearchEntity entity) throws Exception {
+
+        return customAllocationRosterAreaService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomAllocationRosterAreaListDto result = customAllocationRosterAreaService.searchSingle(entity);
+        return BaseResultDto.success(result);
+    }
+
+    @PostMapping("/all/list")
+    public BaseResultDto getAllList(@RequestBody CustomAllocationRosterAreaSearchEntity entity) throws Exception {
+        return BaseResultDto.success(customAllocationRosterAreaService.getAllList(entity));
+    }
+
+}

+ 313 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomAllocationRosterController.java

@@ -0,0 +1,313 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomAllocationExportCsvDto;
+import com.crm.manager.service.CustomAllocationRosterCommentService;
+import com.crm.manager.service.CustomAllocationRosterRecordService;
+import com.crm.manager.service.CustomAllocationRosterService;
+import com.crm.manager.service.UserInfoService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ExportCsvDto;
+import com.crm.rely.backend.core.dto.custom.allocation.roster.CustomAllocationRosterCsvDto;
+import com.crm.rely.backend.core.dto.custom.allocation.roster.comment.CustomAllocationRosterCommentDto;
+import com.crm.rely.backend.core.dto.custom.allocation.roster.record.CustomAllocationRosterRecordDto;
+import com.crm.rely.backend.core.dto.user.info.SalesInfoDropdownDto;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.CustomAllocationRosterClickEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.CustomAllocationRosterSearchEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.CustomAllocationRosterUpdateEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.comment.CustomAllocationRosterCommentAddEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.comment.CustomAllocationRosterCommentSearchEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.record.CustomAllocationRosterRecordSearchEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.StringUtil;
+import com.crm.rely.backend.util.ToCsvFile;
+import com.google.common.base.Strings;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author houn
+ * @Date 2023/2/20 17:04
+ * @PackageName:com.crm.manager.controller
+ * @ClassName: CustomAllocationRosterController
+ * @Description: TODO
+ */
+@RestController
+@RequestMapping("/custom/allocation/roster")
+public class CustomAllocationRosterController {
+    @Autowired
+    private CustomAllocationRosterService customAllocationRosterService;
+
+    @Autowired
+    private UserInfoService userInfoService;
+
+    @Autowired
+    private CustomAllocationRosterCommentService customAllocationRosterCommentService;
+
+    @Autowired
+    private CustomAllocationRosterRecordService customAllocationRosterRecordService;
+
+
+    /**
+     * 待分配
+     *
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/allocated/search/list")
+    public BaseResultDto searchAllocated(@RequestBody @Validated CustomAllocationRosterSearchEntity entity,
+                                         InfoEntity infoEntity) throws ServiceException {
+
+//        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+//            entity.setAllocationAgentId(infoEntity.getIbInfo().getId());
+//        }
+
+        entity.setStatus(0);
+        return customAllocationRosterService.selectPageList(entity);
+    }
+
+    /**
+     * 已分配
+     *
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/assigned/search/list")
+    public BaseResultDto searchAssigned(@RequestBody @Validated CustomAllocationRosterSearchEntity entity,
+                                        InfoEntity infoEntity) throws ServiceException {
+
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix()) && !infoEntity.getIbInfo().getRoleId().equals(1035L)) {
+            entity.setAllocationAgentId(infoEntity.getIbInfo().getId());
+        }
+        entity.setStatus(1);
+        return customAllocationRosterService.selectPageList(entity);
+    }
+
+    /**
+     * 已完成名单
+     *
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/complete/search/list")
+    public BaseResultDto searchComplete(@RequestBody @Validated CustomAllocationRosterSearchEntity entity,
+                                        InfoEntity infoEntity) throws ServiceException {
+
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix()) && !infoEntity.getIbInfo().getRoleId().equals(1035L)) {
+            entity.setAllocationAgentId(infoEntity.getIbInfo().getId());
+        }
+        entity.setStatus(2);
+        return customAllocationRosterService.selectPageList(entity);
+    }
+
+    /**
+     * 不分配 无感名单
+     *
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/insensibility/search/list")
+    public BaseResultDto searchInsensibility(@RequestBody @Validated CustomAllocationRosterSearchEntity entity,
+                                             InfoEntity infoEntity) throws ServiceException {
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setAllocationAgentId(infoEntity.getIbInfo().getId());
+        }
+        entity.setStatus(3);
+        return customAllocationRosterService.selectPageList(entity);
+    }
+
+    /**
+     * 客户分配
+     *
+     * @param method
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/{method}/allocation")
+    public BaseResultDto allocation(@PathVariable("method") String method,
+                                    @RequestBody @Validated CustomAllocationRosterUpdateEntity entity,
+                                    InfoEntity infoEntity) throws ServiceException {
+        if (!method.equals("allocated") && !method.equals("assigned") && !method.equals("insensibility")) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        //如果非销售 则可以回收0 分配1 完成2 和无感4
+        //如果是销售 则只能是分配 不能回收
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix()) && !infoEntity.getIbInfo().getRoleId().equals(1035L)) {
+            if (!entity.getStatus().equals(1) && !entity.getStatus().equals(3)) {
+                return BaseResultDto.error(Constants.PARAMETER_ERROR);
+            }
+            entity.setAllocationId(infoEntity.getIbInfo().getId());
+            //entity.setStatus(1);
+        }
+
+        if (!entity.getStatus().equals(1)) {
+            entity.setAllocationAgentId(null);
+        } else {
+            if (entity.getAllocationAgentId() == null) {
+                return BaseResultDto.error(Constants.PARAMETER_ERROR);
+            }
+        }
+
+        customAllocationRosterService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 添加备注
+     *
+     * @param method
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/{method}/comment")
+    public BaseResultDto addComment(@PathVariable("method") String method,
+                                    @RequestBody @Validated CustomAllocationRosterCommentAddEntity entity) throws ServiceException {
+        if (!method.equals("allocated") && !method.equals("assigned") && !method.equals("insensibility")) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        customAllocationRosterCommentService.add(entity);
+
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 查看备注
+     *
+     * @param method
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/{method}/search/list/comment")
+    public BaseResultDto searchComment(@PathVariable("method") String method,
+                                       @RequestBody @Validated CustomAllocationRosterCommentSearchEntity entity) throws ServiceException {
+        if (!method.equals("allocated") && !method.equals("assigned") && !method.equals("complete") && !method.equals("insensibility")) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        List<CustomAllocationRosterCommentDto> dtos = customAllocationRosterCommentService.selectList(entity);
+        return BaseResultDto.success(dtos);
+    }
+
+    /**
+     * 查看分配记录
+     *
+     * @param method
+     * @param entity
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/{method}/search/list/record")
+    public BaseResultDto searchRecord(@PathVariable("method") String method,
+                                      @RequestBody @Validated CustomAllocationRosterRecordSearchEntity entity) throws ServiceException {
+        if (!method.equals("allocated") && !method.equals("assigned") && !method.equals("complete") && !method.equals("insensibility")) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        List<CustomAllocationRosterRecordDto> dtos = customAllocationRosterRecordService.selectList(entity);
+        return BaseResultDto.success(dtos);
+    }
+
+    @GetMapping("/{method}/export")
+    public void export(@PathVariable("method") String method,
+                       @RequestParam(name = "areaId") Long areaId,
+                       @RequestParam(name = "sourceCode") String sourceCode,
+                       @RequestParam(name = "country") String country,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "allocationPibNo") String allocationPibNo,
+                       @RequestParam(name = "allocationSalesIbNo") String allocationSalesIbNo,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate, HttpServletResponse response) throws Exception {
+
+        CustomAllocationRosterSearchEntity entity = new CustomAllocationRosterSearchEntity();
+
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setAgentId(areaId);
+        entity.setSourceCode(sourceCode);
+        entity.setCountry(country);
+        entity.setEmail(email);
+        entity.setAllocationPibNo(allocationPibNo);
+        entity.setAllocationSalesIbNo(allocationSalesIbNo);
+
+        if (!method.equals("allocated") && !method.equals("assigned") && !method.equals("complete") && !method.equals("insensibility")) {
+            throw ServiceException.exception(Constants.NOT_PERMIT);
+        }
+        if (method.equals("allocated")) {
+            entity.setStatus(0);
+        }
+        if (method.equals("assigned")) {
+            entity.setStatus(1);
+        }
+        if (method.equals("complete")) {
+            entity.setStatus(2);
+        }
+        if (method.equals("insensibility")) {
+            entity.setStatus(3);
+        }
+
+
+        List<CustomAllocationRosterCsvDto> dtos = customAllocationRosterService.selectCsvList(entity);
+
+
+        String[] headArr = new String[]{"first name", "last name", "email", "company", "phone"};
+        List<ExportCsvDto> exportCsvDtoList = new ArrayList<>();
+        for (CustomAllocationRosterCsvDto dto : dtos) {
+
+            CustomAllocationExportCsvDto customAllocationExportCsvDto = new CustomAllocationExportCsvDto();
+            customAllocationExportCsvDto.setCompany(Strings.isNullOrEmpty(dto.getAllocationPibEmail()) ? "Company" :
+                    dto.getAllocationPibEmail());
+            customAllocationExportCsvDto.setFirstName(Strings.isNullOrEmpty(dto.getFirstName()) ? "--" :
+                    dto.getFirstName().replace(",", "").replace("\"", ""));
+            customAllocationExportCsvDto.setLastName(Strings.isNullOrEmpty(dto.getLastName()) ? "--" :
+                    dto.getLastName().replace(",", "").replace("\"", ""));
+            customAllocationExportCsvDto.setEmail(dto.getEmail());
+            customAllocationExportCsvDto.setPhone("+" + dto.getAreaCode() + dto.getPhone());
+            exportCsvDtoList.add(customAllocationExportCsvDto);
+        }
+
+
+        ToCsvFile.toCsvFile(StringUtil.getCsvFileName("", false), headArr, exportCsvDtoList, response);
+
+    }
+
+    /**
+     * 代理销售信息
+     *
+     * @return
+     * @throws ServiceException
+     */
+    @PostMapping("/sales")
+    public BaseResultDto<List<SalesInfoDropdownDto>> sales(InfoEntity infoEntity) throws Exception {
+
+        if (infoEntity.getIbInfo().getRoleId() != null && infoEntity.getIbInfo().getRoleId().equals(1035L)) {
+            return userInfoService.getSalesLeaderInfoDropdown();
+        }
+        Long pid = null;
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            pid = infoEntity.getIbInfo().getId();
+        }
+        return userInfoService.getSalesInfoDropdown(pid);
+    }
+
+    @PostMapping("/click/allocation/roster")
+    public BaseResultDto clickAllocationRoster(@RequestBody @Validated CustomAllocationRosterClickEntity entity) throws Exception {
+        customAllocationRosterService.clickAllocationRoster(entity);
+        return BaseResultDto.success();
+    }
+}

+ 63 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomAllocationRosterScheduledController.java

@@ -0,0 +1,63 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomAllocationRosterScheduledService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.allocation.roster.scheduled.CustomAllocationRosterScheduledDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.scheduled.CustomAllocationRosterScheduledAddEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.scheduled.CustomAllocationRosterScheduledDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.scheduled.CustomAllocationRosterScheduledSearchEntity;
+import com.crm.rely.backend.core.entity.custom.allocation.roster.scheduled.CustomAllocationRosterScheduledUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author houn
+ */
+@RestController
+@RequestMapping("/custom/allocation/roster/scheduled")
+public class CustomAllocationRosterScheduledController {
+
+    @Autowired
+    private CustomAllocationRosterScheduledService service;
+
+    /**
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomAllocationRosterScheduledAddEntity entity) throws Exception {
+        service.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomAllocationRosterScheduledUpdateEntity entity) throws Exception {
+        service.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomAllocationRosterScheduledDeleteEntity entity) throws Exception {
+        service.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomAllocationRosterScheduledDto> pageList(@RequestBody @Validated CustomAllocationRosterScheduledSearchEntity entity) throws Exception {
+        ResultWithPagerDto<CustomAllocationRosterScheduledDto> result = service.searchPageList(entity);
+        return result;
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomAllocationRosterScheduledDto> single(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomAllocationRosterScheduledDto dto = service.searchSingle(entity);
+        return BaseResultDto.success(dto);
+    }
+}

+ 60 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomBankController.java

@@ -0,0 +1,60 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.custom.CustomBankFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.custom.bank.CustomBankAddEntity;
+import com.crm.rely.backend.core.entity.custom.bank.CustomBankAllEntity;
+import com.crm.rely.backend.core.entity.custom.bank.CustomBankDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.bank.CustomBankUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @description: 客户银行卡信息控制
+ * @author: houn
+ * @create: 2020-06-13 17:52
+ **/
+@RestController
+@RequestMapping("/custom/bank")
+public class CustomBankController {
+
+    @Autowired
+    private CustomBankFeignService customBankFeignService;
+
+    @PostMapping("/search/list")
+    public BaseResultDto searchCustomList(@RequestBody @Validated CustomBankAllEntity entity) throws ServiceException {
+
+        return customBankFeignService.searchCustomList(entity);
+    }
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomBankAddEntity entity) throws Exception {
+        return customBankFeignService.add(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomBankUpdateEntity entity) throws Exception {
+        return customBankFeignService.update(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomBankDeleteEntity entity) throws Exception {
+        return customBankFeignService.delete(entity);
+    }
+
+    @PostMapping("/upload")
+    public BaseResultDto upload(@RequestParam(value = "file", required = false) MultipartFile file,
+                                @RequestParam(value = "customId", required = false) Long customId) throws Exception {
+        return customBankFeignService.managerUpload(file, customId);
+    }
+
+    @PostMapping("/verify")
+    public BaseResultDto manageVerify(@RequestBody @Validated CustomBankUpdateEntity entity) throws Exception {
+
+        return customBankFeignService.verify(entity);
+    }
+
+}

+ 42 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomCommissionApplyController.java

@@ -0,0 +1,42 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ib.CustomCommissionApplyFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.commission.CustomCommissionApplyDto;
+import com.crm.rely.backend.core.entity.custom.commission.CustomCommissionApplyApproveEntity;
+import com.crm.rely.backend.core.entity.custom.commission.CustomCommissionApplyListEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by max on 2020/8/25.
+ */
+@RestController
+@RequestMapping("/custom/commission/apply")
+public class CustomCommissionApplyController {
+
+    @Autowired
+    private CustomCommissionApplyFeignService customCommissionApplyFeignService;
+
+    @PostMapping("/list")
+    public BaseResultWithPagerDto<List<CustomCommissionApplyDto>> getList(@RequestBody CustomCommissionApplyListEntity entity, InfoEntity infoEntity) throws Exception {
+        return customCommissionApplyFeignService.getList(entity);
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto<Object> approve(@RequestBody @Validated CustomCommissionApplyApproveEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setApproveTime(new Date());
+        entity.setApproveUser(infoEntity.getIbInfo().getId());
+        return customCommissionApplyFeignService.approve(entity);
+    }
+
+}

+ 39 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomCommunicationPreferenceController.java

@@ -0,0 +1,39 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomCommunicationPreferenceService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.custom.communication.preference.CustomCommunicationPreferenceDto;
+import com.crm.rely.backend.core.entity.custom.activity.CustomActivityApplyApproveEntity;
+import com.crm.rely.backend.core.entity.custom.communication.preference.CustomCommunicationPreferenceSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @description: 客户通讯偏好设置
+ * @author: houn
+ * @create: 2020-06-13 18:00
+ **/
+@RestController
+@RequestMapping("/custom/communication/preference")
+public class CustomCommunicationPreferenceController {
+
+    @Autowired
+    private CustomCommunicationPreferenceService customCommunicationPreferenceService;
+
+    @PostMapping("/search/custom/list")
+    public BaseResultDto searcherCustom(@RequestBody @Validated CustomCommunicationPreferenceSearchEntity entity) throws Exception {
+
+        List<CustomCommunicationPreferenceDto> customCommunicationPreferenceDtos = customCommunicationPreferenceService.searchCustom(entity);
+
+        return BaseResultDto.success(customCommunicationPreferenceDtos);
+    }
+
+
+}

+ 55 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomEmailSubscribeRecordController.java

@@ -0,0 +1,55 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomEmailSubscribeRecordExportDto;
+import com.crm.manager.service.CustomEmailSubscribeRecordService;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.entity.custom.email.subscribe.record.CustomEmailSubscribeRecordSearchEntity;
+import com.crm.rely.backend.core.pojo.view.CustomEmailSubscribeRecordView;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+
+/**
+ * 邮件订阅记录
+ *
+ * @author gao
+ * @date 2025/7/21 14:35
+ */
+@RestController
+@RequestMapping("/custom/email/subscribe/record")
+public class CustomEmailSubscribeRecordController {
+
+    @Autowired
+    private CustomEmailSubscribeRecordService customEmailSubscribeRecordService;
+
+
+    /**
+     * 列表
+     *
+     * @param entity: page
+     * @return ResultWithPagerDto<CustomEmailSubscribeRecordDto>
+     */
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomEmailSubscribeRecordView> pageList(@RequestBody CustomEmailSubscribeRecordSearchEntity entity) throws ServiceException {
+
+        return customEmailSubscribeRecordService.searchPageList(entity);
+    }
+
+    /**
+     * 导出
+     *
+     * @param response:
+     * @return void
+     */
+    @RequestMapping("/export")
+    public void export(CustomEmailSubscribeRecordSearchEntity entity, HttpServletResponse response) throws Exception {
+        List<CustomEmailSubscribeRecordExportDto> exportDtos = customEmailSubscribeRecordService.export(entity);
+        ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("EMAIL_SUBSCRIBE_RECORD"), exportDtos, CustomEmailSubscribeRecordExportDto.class, response);
+    }
+
+}

+ 80 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomFileController.java

@@ -0,0 +1,80 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.custom.CustomFileFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.custom.file.CustomFileAllEntity;
+import com.crm.rely.backend.core.entity.custom.file.CustomFileApproveEntity;
+import com.crm.rely.backend.core.entity.custom.file.CustomFileDeleteEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+/**
+ * @description: 客户文件控制器
+ * @author: houn
+ * @create: 2020-06-13 17:58
+ **/
+@RestController
+@RequestMapping("/custom/file")
+public class CustomFileController {
+
+    @Autowired
+    private CustomFileFeignService customFileFeignService;
+
+    @PostMapping("/search/custom/list")
+    public BaseResultDto searcherList(@RequestBody CustomFileAllEntity entity) throws Exception {
+
+        return customFileFeignService.searchCustomList(entity);
+    }
+
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated CustomFileApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return customFileFeignService.approve(entity);
+    }
+
+    /**
+     * 反审核
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/de/approve")
+    public BaseResultDto deApprove(@RequestBody @Validated CustomFileApproveEntity entity) throws Exception {
+
+        //判断标记是否为反审核 不是则提示没有权限
+        if (!Constants.UPLOAD_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return customFileFeignService.approve(entity);
+    }
+
+    @PostMapping("/upload/{customId}/{type}")
+    public BaseResultDto mangerUpload(@RequestParam(value = "file", required = false) MultipartFile file, @PathVariable("customId") Long customId, @PathVariable("type") Integer type) throws Exception {
+
+
+        return customFileFeignService.mangerUpload(file, customId, type);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto managerDelete(@RequestBody @Validated CustomFileDeleteEntity entity) throws Exception {
+
+        customFileFeignService.managerDelete(entity);
+
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/upload/{customId}/{type}/{id}")
+    public BaseResultDto mangerUpload(@RequestParam(value = "file", required = false) MultipartFile file, @PathVariable("customId") Long customId, @PathVariable("type") Integer type, @PathVariable("id") Long id) throws Exception {
+
+        return customFileFeignService.mangerUpload(file, customId, type, id);
+    }
+}

+ 86 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupController.java

@@ -0,0 +1,86 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomGroupService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.group.CustomGroupDto;
+import com.crm.rely.backend.core.dto.custom.group.CustomGroupStaticDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.group.CustomGroupAddEntity;
+import com.crm.rely.backend.core.entity.custom.group.CustomGroupListEntity;
+import com.crm.rely.backend.core.entity.custom.group.CustomGroupPlatformListEntity;
+import com.crm.rely.backend.core.entity.custom.group.CustomGroupUpdateEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.google.common.base.Strings;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by max on 2020/7/8.
+ */
+@RestController
+@RequestMapping("/custom/group")
+public class CustomGroupController {
+
+    @Autowired
+    private CustomGroupService customGroupService;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody CustomGroupAddEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setCode(entity.getCode().trim());
+        customGroupService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto<Object> update(@RequestBody CustomGroupUpdateEntity entity, InfoEntity infoEntity) throws Exception {
+        customGroupService.updateById(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto<Object> delete(@RequestBody SingleLongEntity entity) throws Exception {
+        customGroupService.deleteById(entity.getId());
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomGroupDto> searchSingle(@RequestBody SingleLongEntity entity) throws Exception {
+
+        return BaseResultDto.success(customGroupService.getById(entity.getId()));
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomGroupDto>> searchList(@RequestBody CustomGroupListEntity entity) throws Exception {
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (!Strings.isNullOrEmpty(entity.getCode())) {
+            entity.setCode(entity.getCode().replace("\\", "\\\\"));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        return customGroupService.getList(entity);
+    }
+
+    @PostMapping("/list")
+    public BaseResultDto<List<String>> list(@RequestBody CustomGroupPlatformListEntity customGroupPlatformListEntity) throws Exception {
+
+        return customGroupService.getList(customGroupPlatformListEntity);
+    }
+
+    @PostMapping("/search/info")
+    public CustomGroupStaticDto info() throws Exception {
+        return customGroupService.getStaticData();
+    }
+
+}

+ 71 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupDemoController.java

@@ -0,0 +1,71 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomGroupDemoService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.group.CustomGroupDto;
+import com.crm.rely.backend.core.dto.custom.group.CustomGroupStaticDto;
+import com.crm.rely.backend.core.dto.custom.group.demo.CustomGroupDemoDto;
+import com.crm.rely.backend.core.dto.custom.group.demo.CustomGroupDemoStaticDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.group.demo.CustomGroupDemoAddEntity;
+import com.crm.rely.backend.core.entity.custom.group.demo.CustomGroupDemoListEntity;
+import com.crm.rely.backend.core.entity.custom.group.demo.CustomGroupDemoUpdateEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/custom/group/demo")
+public class CustomGroupDemoController {
+
+    @Autowired
+    private CustomGroupDemoService customGroupDemoService;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody CustomGroupDemoAddEntity entity) throws Exception {
+        customGroupDemoService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto<Object> update(@RequestBody CustomGroupDemoUpdateEntity entity) throws Exception {
+        customGroupDemoService.updateById(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto<Object> delete(@RequestBody SingleLongEntity entity) throws Exception {
+        customGroupDemoService.deleteById(entity.getId());
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomGroupDemoDto> searchSingle(@RequestBody SingleLongEntity entity) throws Exception {
+
+        return BaseResultDto.success(customGroupDemoService.getById(entity.getId()));
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomGroupDemoDto>> searchList(@RequestBody CustomGroupDemoListEntity entity) throws Exception {
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        return customGroupDemoService.getList(entity);
+    }
+    @PostMapping("/search/info")
+    public CustomGroupDemoStaticDto info() throws Exception {
+        return customGroupDemoService.getStaticData();
+    }
+}

+ 60 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupInterestFreeController.java

@@ -0,0 +1,60 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomGroupInterestFreeService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.free.CustomGroupInterestFreeListDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.group.free.CustomGroupInterestFreeAddEntity;
+import com.crm.rely.backend.core.entity.custom.group.free.CustomGroupInterestFreeDeleteEntitys;
+import com.crm.rely.backend.core.entity.custom.group.free.CustomGroupInterestFreeSearchEntity;
+import com.crm.rely.backend.core.entity.custom.group.free.CustomGroupInterestFreeUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 外佣暗点 加点管理
+ */
+@RestController
+@RequestMapping("/custom/group/free")
+public class CustomGroupInterestFreeController {
+
+    @Autowired
+    private CustomGroupInterestFreeService CustomGroupInterestFreeService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomGroupInterestFreeAddEntity entity) throws Exception {
+        CustomGroupInterestFreeService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomGroupInterestFreeDeleteEntitys entitys) throws Exception {
+
+        CustomGroupInterestFreeService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomGroupInterestFreeUpdateEntity entity) throws Exception {
+        CustomGroupInterestFreeService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomGroupInterestFreeListDto> pageList(@RequestBody CustomGroupInterestFreeSearchEntity entity) throws Exception {
+
+        return CustomGroupInterestFreeService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomGroupInterestFreeListDto result = CustomGroupInterestFreeService.searchSingle(entity);
+        return BaseResultDto.success(result);
+    }
+
+}

+ 69 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomGroupTypeController.java

@@ -0,0 +1,69 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomGroupTypeService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.group.type.CustomGroupTypeDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.group.type.CustomGroupTypeAddEntity;
+import com.crm.rely.backend.core.entity.custom.group.type.CustomGroupTypeDeleteEntity;
+import com.crm.rely.backend.core.entity.custom.group.type.CustomGroupTypeSearchEntity;
+import com.crm.rely.backend.core.entity.custom.group.type.CustomGroupTypeUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/custom/group/type")
+public class CustomGroupTypeController {
+
+    @Autowired
+    private CustomGroupTypeService customGroupTypeService;
+
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomGroupTypeAddEntity entity) throws Exception {
+        customGroupTypeService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomGroupTypeUpdateEntity entity) throws Exception {
+
+        customGroupTypeService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomGroupTypeDeleteEntity entity) throws Exception {
+
+        customGroupTypeService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomGroupTypeDto> searchList(@RequestBody @Validated CustomGroupTypeSearchEntity entity) throws Exception {
+
+        return customGroupTypeService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomGroupTypeDto> searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return customGroupTypeService.searchSingle(entity);
+    }
+
+
+    @PostMapping("/list")
+    public BaseResultDto<List<CustomGroupTypeDto>> list() throws Exception {
+
+        return customGroupTypeService.getList();
+    }
+
+
+}

+ 536 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomInfoController.java

@@ -0,0 +1,536 @@
+package com.crm.manager.controller;
+
+import com.crm.login.rely.backend.controller.BaseLoginController;
+import com.crm.manager.dto.export.CustomListExportDto;
+import com.crm.manager.service.CustomInfoService;
+import com.crm.manager.service.custom.CustomInfoFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.CustomWalletSourceEnum;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.CustomInfoDto;
+import com.crm.rely.backend.core.dto.custom.potential.CustomListDto;
+import com.crm.rely.backend.core.entity.base.LongEntitys;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.*;
+import com.crm.rely.backend.core.entity.custom.login.CustomLoginDayWithdrawLimitUpdateEntity;
+import com.crm.rely.backend.exception.ControllerException;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.service.BlackListLoginService;
+import com.crm.rely.backend.service.RedisService;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.MD5Util;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @description: 客户控制器
+ * @author: houn
+ * @create: 2020-06-13 17:52
+ **/
+@RestController
+@RequestMapping("/custom")
+public class CustomInfoController extends BaseLoginController {
+
+    @Autowired
+    private CustomInfoService customInfoService;
+
+    @Autowired
+    private CustomInfoFeignService customInfoFeignService;
+
+    @Autowired
+    private BlackListLoginService blackListLoginService;
+    @Autowired
+    private RedisService redisService;
+
+//    @PostMapping("/{method}/add")
+//    public BaseResultDto add(@PathVariable("method") String method, @RequestBody CustomInfoUpdateEntity entity,
+//    InfoEntity infoEntity) {
+//        if (!"potential".equals(method) && !"real".equals(method) && !"approve".equals(method)) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+//
+//    }
+
+    /**
+     * 删除客户信息
+     *
+     * @param entitys
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/{method}/delete")
+    public BaseResultDto delete(@PathVariable("method") String method, @RequestBody LongEntitys entitys) throws Exception {
+        if (!"potential".equals(method) && !"real".equals(method) && !"approve".equals(method)) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        return customInfoFeignService.manageDeleteBatch(entitys);
+
+    }
+
+    @PostMapping("/{method}/update")
+    public BaseResultDto update(@PathVariable("method") String method, @RequestBody CustomInfoUpdateEntity entity) throws Exception {
+        if (!"potential".equals(method) && !"real".equals(method) && !"approve".equals(method)) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+
+        BaseResultDto resultDto = customInfoFeignService.manageUpdate(entity);
+
+        return resultDto;
+    }
+
+    @PostMapping("/apply/real")
+    public BaseResultDto applyReal(@RequestBody CustomInfoUpdateAndApplyEntity entity) throws Exception {
+
+        return customInfoFeignService.managerApplyReal(entity);
+    }
+
+    @PostMapping("/approve/real")
+    public BaseResultDto approveReal(@RequestBody CustomApproveEntity entity) throws Exception {
+
+        if (entity.getStatus() == null || (!Constants.REJECTED_STATUS.equals(entity.getStatus()) && !Constants.PASSED_STATUS.equals(entity.getStatus()))) {
+            return BaseResultDto.error(Constants.PARAMETER_ERROR);
+        }
+
+        if (Constants.REJECTED_STATUS.equals(entity.getStatus()) && Strings.isNullOrEmpty(entity.getApproveDesc())) {
+            return BaseResultDto.error(Constants.INPUT_REJECT_REASON);
+        }
+        if (Constants.PASSED_STATUS.equals(entity.getStatus())) {
+            entity.setApplyRealStatus(Constants.PASSED_STATUS);
+        } else {
+            entity.setApplyRealStatus(Constants.REJECTED_STATUS);
+        }
+
+        customInfoService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/de/approve")
+    public BaseResultDto deApprove(@RequestBody SingleLongEntity SingleLongEntity) throws Exception {
+        CustomApproveEntity entity = new CustomApproveEntity();
+        entity.setId(SingleLongEntity.getId());
+        entity.setApplyRealStatus(Constants.APPLY_REAL_STATUS);
+        entity.setStatus(Constants.APPLY_STATUS);
+        customInfoService.approve(entity);
+
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update/info")
+    public BaseResultDto update(@RequestBody @Validated CustomInfoUpdateEntity entity) throws Exception {
+
+        return customInfoFeignService.manageUpdate(entity);
+    }
+
+    @PostMapping("/update/pay/comment/valid")
+    public BaseResultDto manageUpdatePayCommentValid(@RequestBody @Validated CustomInfoUpdatePayCommentValidEntity entity) throws Exception {
+
+        return customInfoFeignService.manageUpdatePayCommentValid(entity);
+    }
+
+    @PostMapping("/update/agent")
+    public BaseResultDto manageUpdateAgentId(@RequestBody @Validated CustomInfoUpdateAgentEntity entity) throws Exception {
+
+        return customInfoFeignService.manageUpdateAgentId(entity);
+    }
+
+    @PostMapping("/batch/update/agent")
+    public BaseResultDto<List<BaseResultDto>> manageBatchUpdateAgentId(@RequestBody @Validated List<CustomInfoUpdateAgentEntity> entities) throws Exception {
+        BaseResultDto<List<BaseResultDto>> resultDto = BaseResultDto.success();
+        resultDto.setData(Lists.newArrayList());
+        for (CustomInfoUpdateAgentEntity entity : entities) {
+            resultDto.getData().add(customInfoFeignService.manageUpdateAgentId(entity));
+        }
+        return resultDto;
+    }
+
+    @PostMapping("/batch/update/agent/v2")
+    public BaseResultDto<BaseResultDto> manageBatchUpdateAgentIdV2(@RequestBody @Validated List<CustomInfoBatchUpdateAgentEntity> entities, InfoEntity infoEntity) throws Exception {
+        if (PrefixEnum.PREFIX_ADMIN.equals(infoEntity.getPrefix()) || PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            BaseResultDto<List<BaseResultDto>> resultDto = BaseResultDto.success();
+            resultDto.setData(Lists.newArrayList());
+            for (CustomInfoBatchUpdateAgentEntity entity : entities) {
+                CustomInfoUpdateAgentEntity customInfoUpdateAgentEntity = new CustomInfoUpdateAgentEntity();
+                customInfoUpdateAgentEntity.setId(entity.getCustomId());
+                customInfoUpdateAgentEntity.setAgentId(entity.getNewAgentId());
+                customInfoUpdateAgentEntity.setModifyTime(entity.getModifyTime());
+                customInfoUpdateAgentEntity.setModifyUser(entity.getModifyUser());
+                customInfoUpdateAgentEntity.setModifyIp(entity.getModifyIp());
+                resultDto.getData().add(customInfoFeignService.manageUpdateAgentId(customInfoUpdateAgentEntity));
+            }
+
+            for (BaseResultDto dto : resultDto.getData()) {
+                if (Constants.SUCCESS_CODE != dto.getCode()) {
+                    return BaseResultDto.success("Partially successful");
+                }
+            }
+            return BaseResultDto.success();
+        } else {
+            return BaseResultDto.error();
+        }
+    }
+
+    @PostMapping("/update/balance")
+    public BaseResultDto manageUpdateBalance(@RequestBody @Validated CustomInfoUpdateBalanceEntity entity) throws Exception {
+
+        entity.setSource(CustomWalletSourceEnum.MANAGER);
+        return customInfoFeignService.manageUpdateBalance(entity);
+    }
+
+    @PostMapping("/potential/update/agent")
+    public BaseResultDto managePotentialUpdateAgentId(@RequestBody @Validated CustomInfoUpdateAgentEntity entity) throws Exception {
+
+        return customInfoFeignService.manageUpdateAgentId(entity);
+    }
+
+    /**
+     * 修改外佣和暗点
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/update/point")
+    public BaseResultDto manageUpdateComPoint(@RequestBody @Validated CustomUpdateComPointEntity entity) throws Exception {
+
+        return customInfoFeignService.manageUpdateComPoint(entity);
+    }
+
+    /**
+     * 修改等级
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/update/level")
+    public BaseResultDto manageUpdateLevel(@RequestBody @Validated CustomUpdateLevelEntity entity) throws Exception {
+
+        return customInfoFeignService.manageUpdateLevel(entity);
+    }
+
+
+    @PostMapping("/update/password")
+    public BaseResultDto updatePassword(@RequestBody @Validated CustomUpdatePasswordByManagerEntity entity) throws Exception {
+
+        entity.setPassword(MD5Util.getMD5(entity.getPassword()));
+        customInfoService.updatePassword(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update/day/withdraw/limit")
+    public BaseResultDto updateDayWithdrawLimit(@RequestBody @Validated CustomLoginDayWithdrawLimitUpdateEntity entity) throws Exception {
+
+        customInfoService.updateDayWithdrawLimit(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/upload/head/picture/{customId}")
+    public BaseResultDto managerUpload(@RequestParam(value = "file", required = false) MultipartFile file,
+                                       @PathVariable("customId") Long customId) throws Exception {
+
+        return customInfoFeignService.managerUpload(file, customId);
+    }
+
+    /**
+     * 根据cid获取客户
+     *
+     * @param method
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/{method}/single")
+    public BaseResultDto<CustomInfoDto> searcherSingleByCId(@PathVariable("method") String method,
+                                                            @RequestBody SingleLongEntity entity) throws Exception {
+
+        if (!"potential".equals(method) && !"real".equals(method) && !"approve".equals(method)) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        return BaseResultDto.success(customInfoService.getSingleCustomInfoByCId(entity.getId()));
+    }
+
+    /**
+     * 潜在客户列表
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/potential")
+    public BaseResultWithPagerDto<List<CustomListDto>> potentialList(@RequestBody CustomSearchEntity entity,
+                                                                     InfoEntity infoEntity) throws Exception {
+
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setAgentId(infoEntity.getIbInfo().getId());
+        }
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+
+
+        entity.setStatus(0);
+
+        return customInfoService.getPageList(entity);
+    }
+
+    @PostMapping("/search/approve")
+    public BaseResultDto approveList(@RequestBody CustomSearchEntity entity, InfoEntity infoEntity) throws Exception {
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setAgentId(infoEntity.getIbInfo().getId());
+        }
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+
+        entity.setStatus(Constants.APPLY_STATUS);
+        return customInfoService.getPageList(entity);
+    }
+
+    /**
+     * 真实客户
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/real")
+    public BaseResultDto realList(@RequestBody CustomSearchEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setStatus(Constants.PASSED_STATUS);
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setAgentId(infoEntity.getIbInfo().getId());
+        }
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        return customInfoService.getPageList(entity);
+    }
+
+
+    @PostMapping("/search/retrieve")
+    public BaseResultDto list(@RequestBody CustomSearchEntity entity, InfoEntity infoEntity) throws Exception {
+
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setAgentId(infoEntity.getIbInfo().getId());
+        }
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        return customInfoService.getPageList(entity);
+    }
+
+    /**
+     * 真实客户
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/account/search/real")
+    public BaseResultDto customRealList(@RequestBody CustomSearchEntity entity, InfoEntity infoEntity) throws Exception {
+
+        if (entity.getCId() == null && Strings.isNullOrEmpty(entity.getEmail())) {
+            throw ServiceException.exception(Constants.PARAMETER_ERROR);
+        }
+        entity.setStatus(Constants.PASSED_STATUS);
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setAgentId(infoEntity.getIbInfo().getId());
+        }
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        return customInfoService.getPageList(entity);
+    }
+
+    @PostMapping("/update/ibInvalid")
+    public BaseResultDto<Object> updateIBInvalid(@RequestBody @Validated CustomIbInvalidUpdateEntity entity,
+                                                 InfoEntity infoEntity) throws Exception {
+        entity.setUserId(infoEntity.getIbInfo().getId());
+        return customInfoFeignService.updateIBInvalid(entity);
+    }
+
+    @GetMapping(value = {"/{method}/export"})
+    public void exportList(@PathVariable("method") String method, @RequestParam(name = "cId") Long cId,
+                           @RequestParam(name = "email") String email,
+                           @RequestParam(name = "identity") String identity, @RequestParam(name = "ibNo") String ibNo
+            , @RequestParam(name = "sourceCode") String sourceCode,
+                           @RequestParam(name = "startDate") String startDate,
+                           @RequestParam(name = "endDate") String endDate,
+                           @RequestParam(name = "status") Integer status,
+                           @RequestParam(name = "potentialStatus") Integer potentialStatus,
+                           HttpServletResponse response, InfoEntity infoEntity) throws Exception {
+        if (!"potential".equals(method) && !"real".equals(method) && !"approve".equals(method)) {
+            throw new ControllerException(Constants.NOT_PERMIT);
+        }
+        CustomSearchEntity entity = new CustomSearchEntity();
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setAgentId(infoEntity.getIbInfo().getId());
+        }
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        //
+        switch (method) {
+            case "potential":
+                entity.setStatus(0);
+                break;
+            case "approve":
+                entity.setStatus(Constants.APPLY_STATUS);
+                break;
+            case "real":
+                entity.setStatus(Constants.PASSED_STATUS);
+            default:
+                break;
+        }
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        entity.setPotentialStatus(potentialStatus);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setIdentity(identity);
+        entity.setIbNo(ibNo);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+//        entity.setStatus(status);
+        entity.setSourceCode(sourceCode);
+
+        List<CustomListDto> customListDtos = customInfoService.getList(entity, false);
+
+        List<CustomListExportDto> dtos = Lists.newArrayList();
+        customListDtos.forEach((item) -> {
+            CustomListExportDto dto = new CustomListExportDto();
+            BeanUtils.copyProperties(item, dto);
+            dto.setCID(item.getCId());
+            dto.setPIBNO(item.getPIbNo());
+            dtos.add(dto);
+        });
+        ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM", true), dtos, CustomListExportDto.class,
+                response);
+
+    }
+
+    /**
+     * 账号解封
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/unseal")
+    public BaseResultDto unseal(@RequestBody @Validated CustomInfoUnsealEntity entity) throws Exception {
+        blackListLoginService.removeFromList(PrefixEnum.PREFIX_CUSTOM.getCode() + entity.getLoginName(),
+                PrefixEnum.PREFIX_CUSTOM.getCode());
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 检查账号是否被封
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/check/seal")
+    public BaseResultDto checkSeal(@RequestBody @Validated CustomInfoCheckSealEntity entity) throws Exception {
+        boolean checkSealBool =
+                blackListLoginService.checkSeal(PrefixEnum.PREFIX_CUSTOM.getCode() + entity.getLoginName());
+        return BaseResultDto.success(checkSealBool);
+    }
+
+    @PostMapping("/manager/login/custom")
+    public BaseResultDto login(@RequestBody SingleLongEntity entity) throws Exception {
+
+        return customInfoFeignService.manageLogin(entity);
+
+    }
+
+    @PostMapping("/verify/real")
+    public BaseResultDto verifyRealAgain(@RequestBody SingleLongEntity entity) throws Exception {
+        customInfoService.verifyRealAgain(entity);
+        return BaseResultDto.success(Constants.SUCCESS);
+
+    }
+
+    @PostMapping("/update/show/login/type")
+    public BaseResultDto updateExcludeShowLoginType(@RequestBody @Validated CustomUpdateExcludeShowLoginTypeEntity entity) throws Exception {
+        customInfoFeignService.managerUpdateExcludeShowLoginType(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/ucard")
+    public BaseResultDto getUcardCustomList(@RequestBody CustomSearchEntity entity) throws Exception {
+        if (Strings.isNullOrEmpty(entity.getEmail())) {
+            return BaseResultDto.success();
+        }
+        List<CustomListDto> list = customInfoService.getUcardCustomList(entity);
+        return BaseResultDto.success(list);
+    }
+
+    @PostMapping("/update/cent/number/limit")
+    public BaseResultDto updateCentNumberLimit(@RequestBody @Validated CustomUpdateCentNumberLimitEntity entity) throws Exception {
+        customInfoFeignService.updateCentNumberLimit(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update/email/real")
+    public BaseResultDto updateEmailReal(@RequestBody @Validated CustomUpdateEmailEntity entity) throws Exception {
+        customInfoFeignService.updateEmailReal(entity);
+        return BaseResultDto.success();
+    }
+
+}

+ 42 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomKycApproveController.java

@@ -0,0 +1,42 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomKycApproveService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.CustomKycApproveListDto;
+import com.crm.rely.backend.core.entity.base.BaseApproveEntity;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.kyc.CustomKycApproveSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/custom/kyc")
+public class CustomKycApproveController {
+
+    @Autowired
+    private CustomKycApproveService customKycApproveService;
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomKycApproveListDto> pageList(@RequestBody CustomKycApproveSearchEntity entity) throws Exception {
+
+        return customKycApproveService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomKycApproveListDto result = customKycApproveService.searchSingle(entity);
+        return BaseResultDto.success(result);
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated BaseApproveEntity entity) throws Exception {
+        customKycApproveService.approve(entity);
+        return BaseResultDto.success();
+    }
+
+}

+ 100 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginCompletionController.java

@@ -0,0 +1,100 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomLoginCompletionExportDto;
+import com.crm.manager.entity.excel.CustomLoginCompletionExcelEntity;
+import com.crm.manager.entity.excel.WebActivityOcExcelEntity;
+import com.crm.manager.service.CustomLoginCompletionService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.login.completion.CustomLoginCompletionListDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.login.completion.CustomLoginCompletionAddEntity;
+import com.crm.rely.backend.core.entity.custom.login.completion.CustomLoginCompletionDeleteEntitys;
+import com.crm.rely.backend.core.entity.custom.login.completion.CustomLoginCompletionSearchEntity;
+import com.crm.rely.backend.core.entity.custom.login.completion.CustomLoginCompletionUpdateEntity;
+import com.crm.rely.backend.core.entity.web.activity.oc.WebActivityOcAddEntity;
+import com.crm.rely.backend.util.EasyExcelUti;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.List;
+
+@RestController
+@RequestMapping("/custom/login/completion")
+public class CustomLoginCompletionController {
+
+    @Autowired
+    private CustomLoginCompletionService customLoginCompletionService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomLoginCompletionAddEntity entity) throws Exception {
+        customLoginCompletionService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomLoginCompletionDeleteEntitys entitys) throws Exception {
+
+        customLoginCompletionService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomLoginCompletionUpdateEntity entity) throws Exception {
+        customLoginCompletionService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomLoginCompletionListDto> pageList(@RequestBody CustomLoginCompletionSearchEntity entity) throws Exception {
+
+        return customLoginCompletionService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomLoginCompletionListDto result = customLoginCompletionService.searchSingle(entity);
+        return BaseResultDto.success(result);
+    }
+
+    @GetMapping("/template/export")
+    public void templateExport(HttpServletResponse response) throws Exception {
+        List<CustomLoginCompletionExportDto> dtos = Lists.newArrayList();
+
+        ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_LOGIN_COMPLETION", false), dtos,
+                CustomLoginCompletionExportDto.class, response);
+    }
+
+    @PostMapping("/import/excel")
+    public BaseResultDto importExcel(@RequestParam("file") MultipartFile file) throws Exception {
+
+        List<CustomLoginCompletionExcelEntity> entities = EasyExcelUti.readExcel(file,
+                new CustomLoginCompletionExcelEntity(), 1, CustomLoginCompletionExcelEntity.class);
+
+        if (entities == null || entities.size() <= 0) {
+            return BaseResultDto.success();
+        }
+
+        List<CustomLoginCompletionAddEntity> addEntities = new ArrayList<>();
+        for (CustomLoginCompletionExcelEntity customLoginCompletionExcelEntity : entities) {
+            CustomLoginCompletionAddEntity entity = new CustomLoginCompletionAddEntity();
+            entity.setPlatform(customLoginCompletionExcelEntity.getPlatform());
+            entity.setLogin(Long.valueOf(customLoginCompletionExcelEntity.getLogin()));
+            addEntities.add(entity);
+        }
+
+        customLoginCompletionService.adds(addEntities);
+
+        return BaseResultDto.success();
+    }
+
+}

+ 227 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginController.java

@@ -0,0 +1,227 @@
+package com.crm.manager.controller;
+
+
+import com.crm.manager.dto.export.CustomAccountExportDto;
+import com.crm.manager.service.CustomGroupService;
+import com.crm.manager.service.DataRoleService;
+import com.crm.manager.service.custom.CustomLoginFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseReportResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.account.CustomAccountDto;
+import com.crm.rely.backend.core.dto.custom.group.CustomGroupStaticDto;
+import com.crm.rely.backend.core.dto.custom.login.CustomLoginCloseReasonDto;
+import com.crm.rely.backend.core.dto.custom.login.CustomLoginFloatSumDto;
+import com.crm.rely.backend.core.dto.custom.login.operate.CustomLoginOperateRecordDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.IbInfoEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.login.*;
+import com.crm.rely.backend.core.entity.custom.login.operate.CustomLoginOperateRecordSearchEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description: 客户交易账户控制器
+ * @author: houn
+ * @create: 2020-06-13 18:02
+ **/
+@RestController
+@RequestMapping("/custom/login")
+public class CustomLoginController {
+
+    @Autowired
+    private CustomGroupService customGroupService;
+    @Autowired
+    private CustomLoginFeignService customLoginFeignService;
+
+    @Autowired
+    private DataRoleService dataRoleService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomLoginAddEntity entity) throws Exception {
+
+        if (entity.getCustomId() == null) {
+            return BaseResultDto.error(Constants.PARAMETER_ERROR);
+        }
+        entity.setLoginStatus(Constants.MANAGER_PENDING_STATUS);
+        return customLoginFeignService.managerAdd(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomLoginDeleteEntity entity) throws Exception {
+
+        return customLoginFeignService.managerDelete(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomLoginUpdateEntity entity) throws Exception {
+
+        entity.setLoginStatus(Constants.MANAGER_PENDING_STATUS);
+        return customLoginFeignService.managerUpdate(entity);
+    }
+
+    @PostMapping("/update/reset/status")
+    public BaseResultDto updateLoginStatus(@RequestBody @Validated CustomLoginUpdateRestStatusEntity entity) throws Exception {
+
+        return customLoginFeignService.managerUpdateResetStatus(entity);
+    }
+
+    @PostMapping("/search/info")
+    public CustomGroupStaticDto info() throws Exception {
+        return customGroupService.getStaticData();
+    }
+
+    /**
+     * 查看单个客户列表(customId不为空)
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/custom/list")
+    public BaseResultDto<List<CustomAccountDto>> searcherList(@RequestBody @Validated CustomLoginSearchListByCustomEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getCustomId() == null && entity.getCId() == null) {
+            return BaseResultDto.error(Constants.PARAMETER_ERROR);
+        }
+
+        IbInfoEntity ibInfoEntity = infoEntity.getIbInfo();
+
+        entity.setGroupId(ibInfoEntity.getGroupId());
+        return customLoginFeignService.searchCustomList(entity);
+    }
+
+    @PostMapping("/search/custom/single")
+    public BaseResultDto<CustomAccountDto> searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return customLoginFeignService.manageSearchSingle(entity);
+    }
+
+    /**
+     * 查看客户交易账户
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomAccountDto>> searcherCustomList(@RequestBody @Validated CustomLoginSearchListEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        return customLoginFeignService.searchList(entity);
+    }
+
+    @PostMapping("/account/search/list")
+    public BaseResultWithPagerDto<List<CustomAccountDto>> searchList(@RequestBody @Validated CustomLoginSearchListEntity entity, InfoEntity infoEntity) throws Exception {
+
+        if (entity.getLogin() == null && entity.getCId() == null && Strings.isNullOrEmpty(entity.getEmail())) {
+            throw ServiceException.exception(Constants.PARAMETER_ERROR);
+        }
+
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        return customLoginFeignService.searchList(entity);
+    }
+
+
+    @GetMapping(value = {"/export"})
+    public void exportList(@RequestParam(name = "login") Long login,
+                           @RequestParam(name = "cId") Long cId,
+                           @RequestParam(name = "email") String email,
+                           @RequestParam(name = "loginType") Integer loginType,
+                           @RequestParam(name = "pIbNo") String pIbNo,
+                           @RequestParam(name = "platform") String platform,
+                           @RequestParam(name = "startDate") String startDate,
+                           @RequestParam(name = "endDate") String endDate,
+                           @RequestParam(name = "status") Integer status,
+                           HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+
+        CustomLoginExportListEntity entity = new CustomLoginExportListEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setLoginType(loginType);
+        entity.setPIbNo(pIbNo);
+        entity.setPlatform(platform);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setStatus(status);
+
+        BaseResultDto<List<com.crm.rely.backend.core.dto.custom.account.CustomAccountExportDto>> resultDto =
+                customLoginFeignService.exportList(entity);
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomAccountExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomAccountExportDto dto = new CustomAccountExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_LOGIN", true), dtos,
+                    CustomAccountExportDto.class, response);
+        }
+    }
+
+    @PostMapping("/reean/search/list")
+    public ResultWithPagerDto<CustomLoginCloseReasonDto> resonPageList(@RequestBody CustomLoginCloseReasonSearchEntity entity) throws Exception {
+        return customLoginFeignService.reasonPageList(entity);
+    }
+
+    @PostMapping("/operate/search/list")
+    public BaseReportResultDto<List<CustomLoginOperateRecordDto>, CustomLoginFloatSumDto> operateRecordSearcherList(@RequestBody @Validated CustomLoginOperateRecordSearchEntity entity) throws Exception {
+        return customLoginFeignService.operateRecordSearcherList(entity);
+    }
+}

+ 37 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDeleteController.java

@@ -0,0 +1,37 @@
+package com.crm.manager.controller;
+
+
+import com.crm.manager.service.custom.CustomLoginDeleteFeignService;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.login.CustomLoginDeleteDto;
+import com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 账户删除
+ * @author gao
+ * @date 2025/7/28 17:38
+ */
+@RestController
+@RequestMapping("/custom/login/delete")
+public class CustomLoginDeleteController {
+
+    @Autowired
+    private CustomLoginDeleteFeignService customLoginDeleteFeignService;
+
+    /**
+     * 账户删除
+     * @param entity:
+     * @return BaseResultWithPagerDto<CustomLoginDeleteDto>
+     */
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomLoginDeleteDto>> searchCustomList(@RequestBody CustomLoginDeleteSearchEntity entity) throws Exception {
+        BaseResultWithPagerDto<List<CustomLoginDeleteDto>> result = customLoginDeleteFeignService.manageSearchList(entity);
+        return result;
+    }
+
+}

+ 60 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDeleteExcludeController.java

@@ -0,0 +1,60 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomLoginDeleteExcludeService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.login.CustomLoginDeleteExcludeListDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteExcludeAddEntity;
+import com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteExcludeDeleteEntitys;
+import com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteExcludeSearchEntity;
+import com.crm.rely.backend.core.entity.custom.login.delete.CustomLoginDeleteExcludeUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 排序删除账户
+ */
+@RestController
+@RequestMapping("/custom/login/delete/exclude")
+public class CustomLoginDeleteExcludeController {
+
+    @Autowired
+    private CustomLoginDeleteExcludeService customLoginDeleteExcludeService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomLoginDeleteExcludeAddEntity entity) throws Exception {
+        customLoginDeleteExcludeService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated CustomLoginDeleteExcludeDeleteEntitys entitys) throws Exception {
+
+        customLoginDeleteExcludeService.delete(entitys);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated CustomLoginDeleteExcludeUpdateEntity entity) throws Exception {
+        customLoginDeleteExcludeService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomLoginDeleteExcludeListDto> pageList(@RequestBody CustomLoginDeleteExcludeSearchEntity entity) throws Exception {
+
+        return customLoginDeleteExcludeService.searchPageList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        CustomLoginDeleteExcludeListDto result = customLoginDeleteExcludeService.searchSingle(entity);
+        return BaseResultDto.success(result);
+    }
+
+}

+ 106 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDeleteRecordController.java

@@ -0,0 +1,106 @@
+package com.crm.manager.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.crm.manager.service.CustomLoginDeleteRecordService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.custom.login.delete.record.CustomLoginDeleteRecordAddEntity;
+import com.crm.rely.backend.core.pojo.table.CustomLoginDeleteRecordTable;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.annotation.JmsListener;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@Slf4j
+@RestController
+@RequestMapping("/custom/login/delete/record")
+public class CustomLoginDeleteRecordController {
+
+    @Autowired
+    private CustomLoginDeleteRecordService service;
+
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomLoginDeleteRecordAddEntity entity) throws Exception {
+        service.save(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/adds")
+    public BaseResultDto adds(@RequestBody @Validated List<CustomLoginDeleteRecordAddEntity> entities) throws Exception {
+        service.save(entities);
+        return BaseResultDto.success();
+    }
+
+    @JmsListener(destination = Constants.CUSTOM_LOGIN_DELETE_INFO)
+    @Transactional(rollbackFor = Exception.class)
+    public void add(String content) throws Exception {
+
+        log.info(String.format("CUSTOM_LOGIN_DELETE_INFO," +
+                "content:%s", content));
+        CustomLoginDeleteRecordAddEntity entity = JSON.parseObject(content,
+                CustomLoginDeleteRecordAddEntity.class);
+
+        if (entity == null) {
+            log.error("CUSTOM_LOGIN_DELETE_INFO," +
+                    "entity is null");
+            return;
+        }
+        service.save(entity);
+    }
+
+    @JmsListener(destination = Constants.CUSTOM_LOGIN_DELETE_INFOS)
+    @Transactional(rollbackFor = Exception.class)
+    public void adds(String content) throws Exception {
+
+        log.info(String.format("CUSTOM_LOGIN_DELETE_INFOS," +
+                "content:%s", content));
+        List<CustomLoginDeleteRecordAddEntity> entities = JSON.parseArray(content,
+                CustomLoginDeleteRecordAddEntity.class);
+
+        if (entities == null || entities.isEmpty()) {
+            log.error("CUSTOM_LOGIN_DELETE_INFOS," +
+                    "entity is null");
+            return;
+        }
+        service.save(entities);
+    }
+
+    @JmsListener(destination = Constants.CUSTOM_LOGIN_MARK_DELETE)
+    @Transactional(rollbackFor = Exception.class)
+    public void delCustomLogin(String content) throws Exception {
+
+        log.info(String.format("CUSTOM_LOGIN_MARK_DELETE,content:%s", content));
+        CustomLoginDeleteRecordTable table = JSON.parseObject(content,
+                CustomLoginDeleteRecordTable.class);
+
+        if (table == null) {
+            log.error("CUSTOM_LOGIN_MARK_DELETE, entity is null");
+            return;
+        }
+        service.delCustomLogin(table);
+    }
+
+    @Transactional(rollbackFor = Exception.class)
+    @Scheduled(cron = "0 14 11 * *  ?")
+    public void customLoginMarkDeleteTask() throws Exception {
+        try {
+            log.info("标记需要删除的账户开始 ---------------");
+            service.customLoginMarkDeleteTask();
+            log.info("标记需要删除的账户结束 ---------------");
+        } catch (Exception e) {
+            log.error(e.getMessage(), e);
+            throw e;
+        }
+
+    }
+
+}

+ 99 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginDemoController.java

@@ -0,0 +1,99 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.DataRoleService;
+import com.crm.manager.service.custom.CustomLoginDemoFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.account.CustomAccountDemoDto;
+import com.crm.rely.backend.core.entity.custom.info.IbInfoEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.login.demo.CustomLoginDemoSearchListByCustomEntity;
+import com.crm.rely.backend.core.entity.custom.login.demo.CustomLoginDemoSearchListEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description: 客户demo交易账户控制器
+ * @author: houn
+ * @create: 2020-07-31 23:02
+ **/
+@RestController
+@RequestMapping("/custom/login/demo")
+public class CustomLoginDemoController {
+
+
+    @Autowired
+    private CustomLoginDemoFeignService customLoginDemoFeignService;
+
+    @Autowired
+    private DataRoleService dataRoleService;
+
+    /**
+     * 查看单个客户列表(customId不为空)
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/custom/list")
+    public BaseResultDto<List<CustomAccountDemoDto>> searcherList(@RequestBody @Validated CustomLoginDemoSearchListByCustomEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getCustomId() == null) {
+            return BaseResultDto.error(Constants.PARAMETER_ERROR);
+        }
+        IbInfoEntity ibInfoEntity = infoEntity.getIbInfo();
+        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+            entity.setStamp(ibInfoEntity.getStamp());
+        }
+        entity.setGroupId(ibInfoEntity.getGroupId());
+        return customLoginDemoFeignService.searchCustomList(entity);
+    }
+
+    /**
+     * 查看客户交易账户
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomAccountDemoDto>> searcherCustomList(@RequestBody @Validated CustomLoginDemoSearchListEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        return customLoginDemoFeignService.searchList(entity);
+    }
+}

+ 49 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginGroupHistoryController.java

@@ -0,0 +1,49 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomLoginGroupHistoryService;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.login.group.CustomLoginGroupHistoryDto;
+import com.crm.rely.backend.core.entity.custom.login.group.CustomLoginGroupHistorySearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * Created by max on 2020/7/8.
+ */
+@RestController
+@RequestMapping("/custom/login/group/history")
+public class CustomLoginGroupHistoryController {
+
+    @Autowired
+    private CustomLoginGroupHistoryService customLoginGroupHistoryService;
+
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomLoginGroupHistoryDto>> searchList(@RequestBody CustomLoginGroupHistorySearchEntity entity) throws Exception {
+
+//
+//        if (!Strings.isNullOrEmpty(entity.getNewGroup())) {
+//            entity.setNewGroup(entity.getNewGroup().replace("\\", "\\\\"));
+//        }
+//        if (!Strings.isNullOrEmpty(entity.getOldGroup())) {
+//            entity.setOldGroup(entity.getOldGroup().replace("\\", "\\\\"));
+//        }
+
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        return customLoginGroupHistoryService.searchPageList(entity);
+    }
+
+}

+ 83 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginHistoryController.java

@@ -0,0 +1,83 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.*;
+import com.crm.manager.service.CustomLoginHistoryFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.user.info.CustomLoginHistoryDto;
+import com.crm.rely.backend.core.entity.user.info.CustomHistoryListSearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description: 客户登录历史控制器
+ * @author: houn
+ * @create: 2020-06-13 18:04
+ **/
+@RestController
+@RequestMapping("/custom/login/history")
+public class CustomLoginHistoryController {
+
+    @Autowired
+    private CustomLoginHistoryFeignService customLoginHistoryFeignService;
+
+    @PostMapping("/searcher/list")
+    public ResultWithPagerDto searcherList(@RequestBody @Validated CustomHistoryListSearchEntity entity) throws Exception {
+
+        return customLoginHistoryFeignService.searcherList(entity);
+    }
+
+    @GetMapping("/searcher/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "ibNo") String ibNo,
+                                   HttpServletResponse response) throws Exception {
+
+        CustomHistoryListSearchEntity entity = new CustomHistoryListSearchEntity();
+        entity.setCId(cId);
+        entity.setIbNo(ibNo);
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }
+
+        List<CustomLoginHistoryDto> resultDto = customLoginHistoryFeignService.export(entity);
+        List<CustomLoginHistoryExportDto> exportDtos = Lists.newArrayList();
+        resultDto.forEach((item) -> {
+            CustomLoginHistoryExportDto exportDto = new CustomLoginHistoryExportDto();
+            BeanUtils.copyProperties(item, exportDto);
+            exportDto.setCID(item.getCId());
+            exportDto.setLoginTime(DateUtil.formatTime(item.getLoginTime()));
+            exportDtos.add(exportDto);
+        });
+        ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_LOGIN_HISTORY"), exportDtos, CustomLoginHistoryExportDto.class, response);
+
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle() {
+        return null;
+    }
+}

+ 52 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomLoginSpecialCalcController.java

@@ -0,0 +1,52 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomLoginSpecialCalcService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.login.special.CustomLoginSpecialCalcDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.login.special.CustomLoginSpecialCalcAddEntity;
+import com.crm.rely.backend.core.entity.custom.login.special.CustomLoginSpecialCalcListEntity;
+import com.crm.rely.backend.core.entity.custom.login.special.CustomLoginSpecialCalcUpdateEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/custom/login/special/calc")
+public class CustomLoginSpecialCalcController {
+
+    @Autowired
+    private CustomLoginSpecialCalcService customLoginSpecialCalcService;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody CustomLoginSpecialCalcAddEntity entity, InfoEntity infoEntity) throws ServiceException {
+        return customLoginSpecialCalcService.add(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto<Object> update(@RequestBody CustomLoginSpecialCalcUpdateEntity entity, InfoEntity infoEntity) throws ServiceException {
+        return customLoginSpecialCalcService.updateById(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto<Object> delete(@RequestBody SingleLongEntity entity, InfoEntity infoEntity) throws ServiceException {
+        return customLoginSpecialCalcService.deleteById(entity.getId());
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<CustomLoginSpecialCalcDto> searchSingle(@RequestBody SingleLongEntity entity, InfoEntity infoEntity) throws ServiceException {
+        return customLoginSpecialCalcService.searchSingle(entity.getId());
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<CustomLoginSpecialCalcDto>> searchList(@RequestBody CustomLoginSpecialCalcListEntity entity, InfoEntity infoEntity) throws ServiceException {
+        return customLoginSpecialCalcService.searchList(entity);
+    }
+}

+ 94 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomNewsController.java

@@ -0,0 +1,94 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.ControlPanelService;
+import com.crm.manager.service.CustomNewsService;
+import com.crm.rely.backend.core.constant.PrefixEnum;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.control.panel.statistics.*;
+import com.crm.rely.backend.core.entity.control.panel.statistics.ControlPanelStatisticsEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.news.CustomNewsSearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+
+@RestController
+@RequestMapping("/custom/news")
+public class CustomNewsController {
+
+    @Autowired
+    private CustomNewsService customNewsService;
+
+    /**
+     * 客户动态
+     *
+     * @param entity
+     * @param infoEntity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/list")
+    public BaseResultDto customDynamic(@RequestBody @Validated CustomNewsSearchEntity entity, InfoEntity infoEntity) throws Exception {
+//        if (!PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+//            entity.setStamp(infoEntity.getIbInfo().getStamp());
+//        }else {
+//            entity.setStamp(null);
+//        }
+        if (PrefixEnum.PREFIX_SALE.equals(infoEntity.getPrefix())) {
+            entity.setStamp(infoEntity.getIbInfo().getStamp());
+        } else {
+            entity.setStamp(null);
+        }
+        if (entity.getStartDate() != null) {
+            entity.setStartDate(DateUtil.parseDate(entity.getStartDate()));
+        }
+        if (entity.getEndDate() != null) {
+            Date endDate = DateUtil.operationDay(entity.getEndDate(), 1);
+            entity.setEndDate(DateUtil.parseDate(endDate));
+        }
+        long dId = infoEntity.getIbInfo().getDepartmentId() == null ? -1 : infoEntity.getIbInfo().getDepartmentId().longValue();
+        List<Integer> types = new ArrayList<>(7);
+        switch ((int) dId) {
+            case 1:
+            case 4:
+                types.add(1);
+                types.add(4);
+                types.add(3);
+                types.add(5);
+                types.add(7);
+                types.add(6);
+                break;
+            case 2:
+                types.add(6);
+                types.add(3);
+                types.add(4);
+                break;
+            case 3:
+                types.add(7);
+                break;
+            case 5:
+                types = null;
+                break;
+            default:
+                if (PrefixEnum.PREFIX_SYSTEM.equals(infoEntity.getPrefix())) {
+                    types = null;
+                } else {
+                    types.add(-1);
+                }
+                break;
+        }
+        entity.setTypes(types);
+        return customNewsService.searchPageList(entity);
+    }
+
+
+}

+ 33 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomNoticeController.java

@@ -0,0 +1,33 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomNoticeFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.entity.custom.notice.CustomNoticeAllByCustomIdEntity;
+import com.crm.rely.backend.exception.ServiceException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @description: 客户通知
+ * @author: houn
+ * @create: 2020-06-13 17:52
+ **/
+@RestController
+@RequestMapping("/custom/notice")
+public class CustomNoticeController {
+
+    @Autowired
+    private CustomNoticeFeignService customNoticeFeignService;
+
+    @PostMapping("/search/custom/list")
+    public BaseResultDto searchCustomList(@RequestBody @Validated CustomNoticeAllByCustomIdEntity entity) throws ServiceException {
+
+        return customNoticeFeignService.searchCustomList(entity);
+    }
+
+
+}

+ 46 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomRemarkController.java

@@ -0,0 +1,46 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.CustomRemarkService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.remark.CustomRemarkSearchListDto;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.custom.remark.CustomRemarkAddEntity;
+import com.crm.rely.backend.core.entity.custom.remark.CustomRemarkSearchListEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @description: 客户备注控制器
+ * @author: houn
+ * @create: 2020-06-13 17:52
+ **/
+@RestController
+@RequestMapping("/custom/remark")
+public class CustomRemarkController {
+
+    @Autowired
+    private CustomRemarkService customRemarkService;
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated CustomRemarkAddEntity entity, InfoEntity infoEntity) throws Exception {
+        entity.setUserId(infoEntity.getIbInfo().getId());
+        customRemarkService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultDto searcherList(@RequestBody @Validated CustomRemarkSearchListEntity entity, InfoEntity infoEntity) throws Exception {
+
+        if (entity.getOwn() != null && entity.getOwn().equals(1)) {
+            entity.setUserId(infoEntity.getIbInfo().getId());
+        }
+        ResultWithPagerDto<CustomRemarkSearchListDto> remarkSearchListDtoResultWithPagerDto = customRemarkService.searchList(entity);
+
+        return remarkSearchListDtoResultWithPagerDto;
+    }
+}

+ 59 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomReportController.java

@@ -0,0 +1,59 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomFollowUpExportDto;
+import com.crm.manager.service.CustomReportFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.report.CustomFollowUpListDto;
+import com.crm.rely.backend.core.entity.base.BaseIbReportListEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @ClassName CustomReportController
+ * @Description
+ * @Author y
+ * @Date 2022/10/12 10:56
+ */
+@RestController
+@RequestMapping("/custom/report")
+public class CustomReportController {
+
+    @Autowired
+    private CustomReportFeignService customReportFeignService;
+
+    @PostMapping("/follow/up")
+    public BaseResultWithPagerDto<List<CustomFollowUpListDto>> followUp(@RequestBody BaseIbReportListEntity entity) throws Exception {
+        return customReportFeignService.followUp(entity);
+    }
+
+    @GetMapping("/follow/up/export")
+    public void tradeHistoryExport(
+            @RequestParam(name = "startDate") String startDate,
+            @RequestParam(name = "endDate") String endDate, HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        BaseIbReportListEntity entity = new BaseIbReportListEntity();
+        entity.setStartDate(startDate == null ? new Date() : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? new Date() : simpleDateFormat.parse(endDate));
+
+        List<CustomFollowUpListDto> listDtos = customReportFeignService.followUpExport(entity);
+        if (!CollectionUtils.isEmpty(listDtos)) {
+            List<CustomFollowUpExportDto> exportDtos = Lists.newArrayList();
+            for (CustomFollowUpListDto listDto : listDtos) {
+                CustomFollowUpExportDto exportDto = new CustomFollowUpExportDto();
+                BeanUtils.copyProperties(listDto, exportDto);
+                exportDto.setCID(listDto.getCId());
+                exportDtos.add(exportDto);
+            }
+            ExportUtil.transferToResponse("CUSTOM_FOLLOW_UP_"+System.currentTimeMillis()+".xls", exportDtos, CustomFollowUpExportDto.class, response);
+        }
+    }
+
+}

+ 81 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/CustomWalletHistoryController.java

@@ -0,0 +1,81 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.CustomWalletHistoryExportDto;
+import com.crm.manager.service.custom.CustomWalletHistoryFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.custom.wallet.CustomWalletHistoryDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.wallet.history.CustomWalletHistorySearchEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @author: houn
+ */
+@RestController
+@RequestMapping("/custom/wallet/history")
+public class CustomWalletHistoryController {
+
+    @Autowired
+    private CustomWalletHistoryFeignService service;
+
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<CustomWalletHistoryDto> managerSearcherList(@RequestBody @Validated
+                                                                          CustomWalletHistorySearchEntity entity) throws Exception {
+        ResultWithPagerDto<CustomWalletHistoryDto> resultWithPagerDto = service.managerSearcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto managerSearcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.managerSearcherSingle(entity);
+    }
+
+    @RequestMapping("/export")
+    public void export(@RequestParam(name = "cId") Long cId,
+                       @RequestParam(name = "email") String email,
+                       @RequestParam(name = "source") String source,
+                       @RequestParam(name = "startDate") String startDate,
+                       @RequestParam(name = "endDate") String endDate,
+                       HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        CustomWalletHistorySearchEntity entity = new CustomWalletHistorySearchEntity();
+
+        entity.setCId(cId);
+        entity.setEmail(email);
+        entity.setSource(source);
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? null : simpleDateFormat.parse(endDate));
+        entity.setExport(1);
+
+        BaseResultDto<List<CustomWalletHistoryDto>> resultDto = service.export(entity);
+
+        if (resultDto != null && resultDto.getCode() == 200) {
+            List<CustomWalletHistoryExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                CustomWalletHistoryExportDto dto = new CustomWalletHistoryExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("CUSTOM_WALLET", true), dtos,
+                    CustomWalletHistoryExportDto.class, response);
+        }
+    }
+
+}

+ 122 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/DepartmentController.java

@@ -0,0 +1,122 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.UserDepartmentService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.dto.user.department.UserDepartmentSearchDto;
+import com.crm.rely.backend.core.entity.user.department.UserDepartmentAddEntity;
+import com.crm.rely.backend.core.entity.user.department.UserDepartmentDeleteEntity;
+import com.crm.rely.backend.core.entity.user.department.UserDepartmentSearchEntity;
+import com.crm.rely.backend.core.entity.user.department.UserDepartmentUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @program: crm-backend
+ * @description:
+ * @author: houn
+ * @create: 2019-07-25 15:10
+ */
+@RestController
+@RequestMapping("/department")
+public class DepartmentController {
+
+    @Autowired
+    private UserDepartmentService userDepartmentService;
+
+    /**
+     * 添加部门
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated UserDepartmentAddEntity entity) throws Exception {
+
+        if (entity.getSubIndex() == null || entity.getSubIndex() < 0) {
+            entity.setSubIndex(0);
+        }
+
+        userDepartmentService.add(entity);
+
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 删除部门
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated UserDepartmentDeleteEntity entity) throws Exception {
+
+        userDepartmentService.delete(entity);
+
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 修改部门
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/update")
+    public BaseResultDto update(@RequestBody @Validated UserDepartmentUpdateEntity entity) throws Exception {
+
+        if (entity.getSubIndex() == null || entity.getSubIndex() < 0) {
+            entity.setSubIndex(0);
+        }
+
+        userDepartmentService.update(entity);
+
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 查询部门 page
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/page")
+    public BaseResultDto searchPage(@RequestBody @Validated UserDepartmentSearchEntity entity) throws Exception {
+
+        BaseResultWithPagerDto result = userDepartmentService.searchPage(entity);
+
+        return result;
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultDto searchList() throws Exception {
+
+        BaseResultDto result = userDepartmentService.searchList();
+
+        return result;
+    }
+
+    /**
+     * 单个查询
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        UserDepartmentSearchDto userDepartmentSearchDto = userDepartmentService.searchSingle(entity.getId());
+
+        return BaseResultDto.success(userDepartmentSearchDto);
+    }
+}

+ 57 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/EmailUnsubscribeController.java

@@ -0,0 +1,57 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.emial.SysEmailUnsubscribeFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.system.email.unsubscribe.SysEmailUnsubscribeSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.system.email.unsubscribe.SysEmailUnsubscribeAddEntity;
+import com.crm.rely.backend.core.entity.system.email.unsubscribe.SysEmailUnsubscribeDeleteEntity;
+import com.crm.rely.backend.core.entity.system.email.unsubscribe.SysEmailUnsubscribeSearchListEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+
+@RestController
+@RequestMapping("/email/unsubscribe")
+public class EmailUnsubscribeController {
+
+    @Resource
+    private SysEmailUnsubscribeFeignService sysEmailUnsubscribeService;
+
+    /**
+     * 添加退订
+     *
+     * @param entity
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody SysEmailUnsubscribeAddEntity entity) throws Exception {
+
+        return sysEmailUnsubscribeService.add(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody SysEmailUnsubscribeDeleteEntity entity) throws Exception {
+
+        return sysEmailUnsubscribeService.delete(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<SysEmailUnsubscribeSearchDto> searchList(@RequestBody @Validated SysEmailUnsubscribeSearchListEntity entity) throws Exception {
+
+        return sysEmailUnsubscribeService.searchList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<SysEmailUnsubscribeSearchDto> searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return sysEmailUnsubscribeService.searchSingle(entity);
+    }
+
+}
+

+ 123 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceAgentTransferController.java

@@ -0,0 +1,123 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceAgentTransferExportDto;
+import com.crm.manager.dto.export.FinanceTransferExportDto;
+import com.crm.manager.service.finance.FinanceAgentTransferFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.agent.transfer.FinanceAgentTransferSearchDto;
+import com.crm.rely.backend.core.dto.finance.transfer.FinanceTransferSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.agent.transfer.FinanceAgentTransferApproveEntity;
+import com.crm.rely.backend.core.entity.finance.agent.transfer.FinanceAgentTransferDeleteEntity;
+import com.crm.rely.backend.core.entity.finance.agent.transfer.FinanceAgentTransferSearchEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.FinanceTransferSearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description: 内转
+ * @author: houn
+ * @create: 2021-06-24 18:01
+ **/
+@RestController
+@RequestMapping("/finance/agent/transfer")
+public class FinanceAgentTransferController {
+
+    @Autowired
+    private FinanceAgentTransferFeignService financeTransferFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceAgentTransferApproveEntity entity) throws Exception {
+
+        return financeTransferFeignService.approve(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceAgentTransferDeleteEntity entity) throws Exception {
+
+        return financeTransferFeignService.delete(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public ResultWithPagerDto<FinanceAgentTransferSearchDto> searcherList(@RequestBody @Validated FinanceAgentTransferSearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<FinanceAgentTransferSearchDto> resultWithPagerDto =
+                financeTransferFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceAgentTransferSearchDto> resultDto = financeTransferFeignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+    @GetMapping("/searcher/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "withdrawCId") Long withdrawCId,
+                                   @RequestParam(name = "status") String status,
+                                   @RequestParam(name = "fromLogin") Long fromLogin,
+                                   @RequestParam(name = "toLogin") Long toLogin,
+                                   @RequestParam(name = "ibNo") String ibNo,
+                                   HttpServletResponse response) throws Exception {
+
+        FinanceAgentTransferSearchEntity entity = new FinanceAgentTransferSearchEntity();
+        entity.setWithdrawCId(withdrawCId);
+        entity.setStatus(status);
+        entity.setFromLogin(fromLogin);
+        entity.setToLogin(toLogin);
+        entity.setIbNo(ibNo);
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }
+        entity.setPage(null);
+        if (StringUtils.isEmpty(entity.getStatus())) entity.setStatus(null);
+
+
+        BaseResultDto<List<FinanceAgentTransferSearchDto>> resultDto = financeTransferFeignService.export(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<FinanceAgentTransferSearchDto> dtos = resultDto.getData();
+            List<FinanceAgentTransferExportDto> exportDtos = Lists.newArrayList();
+            dtos.forEach((item) -> {
+                FinanceAgentTransferExportDto exportDto = new FinanceAgentTransferExportDto();
+                BeanUtils.copyProperties(item, exportDto);
+                exportDto.setWithdrawCID(item.getWithdrawCId());
+                exportDto.setDepositCID(item.getDepositCId());
+                exportDto.setAmount(item.getAmount().multiply(new BigDecimal(-1)));
+                exportDto.setPIBNO(item.getPIbNo());
+                exportDtos.add(exportDto);
+            });
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("FINANCE_AGENT_TRANSFER_EXPORT"), exportDtos,
+                    FinanceAgentTransferExportDto.class, response);
+        }
+    }
+
+}

+ 224 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceAgentWithdrawController.java

@@ -0,0 +1,224 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceAgentWithdrawExportDto;
+import com.crm.manager.service.finance.FinanceAgentWithdrawFeignService;
+import com.crm.manager.service.finance.FinanceWithdrawApiFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.finance.withdraw.FinanceAgentWithdrawDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.withdraw.*;
+import com.crm.rely.backend.core.entity.finance.withdraw.automatic.FinanceWithdrawInfoEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Created by max on 2020/9/4.
+ */
+@RestController
+@RequestMapping("/finance/agent/withdraw")
+public class FinanceAgentWithdrawController {
+
+    @Autowired
+    private FinanceAgentWithdrawFeignService financeAgentWithdrawFeignService;
+
+    @Autowired
+    private FinanceWithdrawApiFeignService financeWithdrawApiFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceWithdrawApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        if (Constants.PASSED_STATUS.equals(entity.getStatus())) {
+            entity.setWithdrawStatus(Constants.MANAGER_PROCESSING_STATUS);
+        } else {
+            entity.setWithdrawStatus(Constants.MANAGER_PENDING_STATUS);
+        }
+        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+
+        return financeAgentWithdrawFeignService.approve(entity);
+    }
+
+    @PostMapping("/sales/approve")
+    public BaseResultDto approveBySales(@RequestBody @Validated FinanceWithdrawApproveSalesEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        return financeAgentWithdrawFeignService.approveBySales(entity);
+    }
+
+
+    @PostMapping("/approve/submit/channel")
+    public BaseResultDto approveByChannelSubmits(@RequestBody @Validated FinanceWithdrawApproveChannelSubmitEntity entity) throws Exception {
+
+
+        return financeAgentWithdrawFeignService.approveBySubmit(entity);
+    }
+
+    @PostMapping("/channel")
+    public BaseResultDto<Object> channel(@RequestBody @Validated FinanceWithdrawApproveChannelEntity entity) throws Exception {
+        return financeAgentWithdrawFeignService.channel(entity);
+    }
+
+
+    @PostMapping("/approves")
+    public BaseResultDto<Object> approves(@RequestBody FinanceWithdrawApprovesEntity entity) throws Exception {
+        return financeAgentWithdrawFeignService.approves(entity);
+    }
+
+    @PostMapping("/approve/submits/channel")
+    public BaseResultDto approveBySubmits(@RequestBody @Validated FinanceWithdrawApproveChannelSubmitsEntity entity) throws Exception {
+        return financeAgentWithdrawFeignService.approveBySubmits(entity);
+    }
+
+    @PostMapping("/channels")
+    public BaseResultDto<Object> channels(@RequestBody @Validated FinanceWithdrawApproveChannelsEntity entity) throws Exception {
+
+        return financeAgentWithdrawFeignService.channels(entity);
+
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultDto<List<FinanceAgentWithdrawDto>> searcherList(@RequestBody @Validated FinanceAgentWithdrawSearchListEntity entity) throws Exception {
+
+        return financeAgentWithdrawFeignService.searchList(entity);
+    }
+
+    @GetMapping("search/list/export")
+    public void searcherListExport(@RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "serial") String serial,
+                                   @RequestParam(name = "status") Integer status,
+                                   @RequestParam(name = "submitStatus") Integer submitStatus,
+                                   @RequestParam(name = "startSubmitDate") String startSubmitDate,
+                                   @RequestParam(name = "endSubmitDate") String endSubmitDate,
+                                   @RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "ibNo") String ibNo,
+                                   @RequestParam(name = "channelCodes") String channelCodes,
+                                   @RequestParam(name = "country") String country,
+                                   @RequestParam(name = "pIbNo" , required = false) String pIbNo,
+                                   HttpServletResponse response) throws Exception {
+
+
+        FinanceAgentWithdrawSearchListEntity entity = new FinanceAgentWithdrawSearchListEntity();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        entity.setCId(cId);
+        entity.setSerial(serial);
+        entity.setStartDate(startDate == null ? new Date() : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? new Date() : simpleDateFormat.parse(endDate));
+        entity.setStatus(status);
+        entity.setIbNo(ibNo);
+//        entity.setChannelCode(channelCode);
+        if (Strings.isNullOrEmpty(channelCodes)) {
+            entity.setChannelCodes(null);
+        } else {
+
+            entity.setChannelCodes(Arrays.asList(channelCodes.split(",")));
+        }
+        entity.setSubmitStatus(submitStatus);
+        entity.setCountry(country);
+        entity.setPIbNo(pIbNo);
+        if ("undefinedundefined".equals(startSubmitDate)) {
+            startSubmitDate = null;
+        }
+        if ("undefinedundefined".equals(endSubmitDate)) {
+            endSubmitDate = null;
+        }
+
+        entity.setStartSubmitDate(Strings.isNullOrEmpty(startSubmitDate) ? null :
+                simpleDateFormat.parse(startSubmitDate));
+        entity.setEndSubmitDate(Strings.isNullOrEmpty(endSubmitDate) ? null : simpleDateFormat.parse(endSubmitDate));
+
+        BaseResultDto<List<FinanceAgentWithdrawDto>> resultDto =
+                financeAgentWithdrawFeignService.searchListExport(entity);
+        List<FinanceAgentWithdrawExportDto> dtos = Lists.newArrayList();
+        if (resultDto.getCode() == 200) {
+
+            resultDto.getData().forEach((item) -> {
+                FinanceAgentWithdrawExportDto dto = new FinanceAgentWithdrawExportDto();
+                BeanUtils.copyProperties(item, dto);
+                if (item.getStatus() == 1) {
+                    dto.setStatusName("待处理");
+                } else if (item.getStatus() == 2) {
+                   if (item.getSubmitStatus() == 2 && item.getCallbackStatus() == 1) {
+                       dto.setStatusName("已完成");
+                   } else {
+                       dto.setStatusName("处理中");
+                   }
+                } else if (item.getStatus() == 3) {
+                    dto.setStatusName("拒绝");
+                } else if (item.getStatus() == 5) {
+                    dto.setStatusName("已取消");
+                } else {
+                    dto.setStatusName("");
+                }
+
+
+                if (Constants.APPLY_STATUS.equals(item.getSubmitStatus())) {
+                    dto.setSubmitStatusName("未处理");
+                } else if (Constants.PASSED_STATUS.equals(item.getSubmitStatus())) {
+                    dto.setSubmitStatusName("已提交");
+                } else if (Constants.REJECTED_STATUS.equals(item.getSubmitStatus())) {
+                    dto.setSubmitStatusName("已拒绝");
+                }
+                dto.setCID(String.valueOf(item.getCId()));
+                dtos.add(dto);
+            });
+        }
+
+        ExportUtil.transferToResponse(genFileName(), dtos, FinanceAgentWithdrawExportDto.class, response);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<FinanceAgentWithdrawDto> searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return financeAgentWithdrawFeignService.searchSingle(entity);
+    }
+
+    @RequestMapping("/remit/channel")
+    public BaseResultDto remitChannel() throws Exception {
+        return financeAgentWithdrawFeignService.remitChannel();
+    }
+
+    @RequestMapping("/api/info")
+    public BaseResultDto withdrawInfo(@RequestBody FinanceWithdrawInfoEntity entity) throws Exception {
+
+        entity.setWithdrawInfoType(2);
+        return financeWithdrawApiFeignService.withdrawInfo(entity.getWithdrawInfoUrl(), entity);
+    }
+
+    @RequestMapping("/withdrawapi")
+    public BaseResultDto withdraw(@RequestBody Map<String, Object> params) throws Exception {
+        String contextPath = params.get("withdrawUrl").toString();
+
+        params.put("withdrawInfoType", 2);
+
+        return financeWithdrawApiFeignService.withdraw(contextPath, params);
+
+    }
+
+    private String genFileName() {
+        StringBuffer stringBuffer = new StringBuffer();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss");
+        stringBuffer.append("IB_EXPORT");
+        stringBuffer.append("_");
+        stringBuffer.append(sdf.format(new Date()));
+        stringBuffer.append(".xlsx");
+        String fileName = stringBuffer.toString();
+        return fileName;
+    }
+
+
+}

+ 53 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceCustomTransferController.java

@@ -0,0 +1,53 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.finance.FinanceCustomTransferFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.custom.FinanceCustomTransferSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.custom.FinanceCustomTransferApproveEntity;
+import com.crm.rely.backend.core.entity.finance.custom.FinanceCustomTransferDeleteEntity;
+import com.crm.rely.backend.core.entity.finance.custom.FinanceCustomTransferSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 内转
+ */
+@RestController
+@RequestMapping("/custom/transfer")
+public class FinanceCustomTransferController {
+
+
+    @Autowired
+    private FinanceCustomTransferFeignService service;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceCustomTransferApproveEntity entity) throws Exception {
+
+        return service.approve(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceCustomTransferDeleteEntity entity) throws Exception {
+
+        return service.delete(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<FinanceCustomTransferSearchDto> searcherList(@RequestBody @Validated FinanceCustomTransferSearchEntity entity) throws Exception {
+
+        return service.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<FinanceCustomTransferSearchDto> searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+
+        return service.searcherSingle(entity);
+    }
+}

+ 154 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceDepositController.java

@@ -0,0 +1,154 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceDepositExportDto;
+import com.crm.manager.service.finance.FinanceDepositFeignService;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.deposit.FinanceDepositDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.CustomAmountStatisticsEntity;
+import com.crm.rely.backend.core.entity.finance.deposit.*;
+import com.crm.rely.backend.util.CountryUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @description: 入金
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/finance/deposit")
+public class FinanceDepositController {
+
+    @Autowired
+    private FinanceDepositFeignService financeDepositFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceDepositApproveEntity entity) throws Exception {
+
+        return financeDepositFeignService.approve(entity);
+    }
+
+
+    @PostMapping("/activity/approve")
+    public BaseResultDto activityApprove(@RequestBody @Validated FinanceDepositActivityApproveEntity entity) throws Exception {
+        return financeDepositFeignService.activityApprove(entity);
+    }
+
+//    @PostMapping("/approve/manager")
+//    public BaseResultDto approveByManager(@RequestBody @Validated FinanceDepositApproveManagerEntity entity) throws
+//    Exception {
+//        if (!Constants.MANAGER_COMPLETED_STATUS.equals(entity.getDepositStatus())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+//        financeDepositService.approve(entity);
+//        return BaseResultDto.success();
+//    }
+
+
+    @PostMapping("/supplement")
+    public BaseResultDto supplement(@RequestBody @Validated FinanceDepositCallbackUpdateEntity balanceCallbackUpdateEntity) throws Exception {
+
+        return financeDepositFeignService.supplement(balanceCallbackUpdateEntity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceDepositDeleteEntity entity) throws Exception {
+
+        return financeDepositFeignService.delete(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated FinanceDepositSearchListEntity entity) throws Exception {
+
+        ResultWithPagerDto<FinanceDepositDto> resultWithPagerDto = financeDepositFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @GetMapping("/history/export")
+    public void tradeHistoryExport(@RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "platform") String platform,
+                                   @RequestParam(name = "status") Integer status,
+                                   @RequestParam(name = "channelCodes") String channelCodes,
+                                   @RequestParam(name = "callbackStatus") Integer callbackStatus,
+                                   @RequestParam(name = "serial") String serial,
+                                   @RequestParam(name = "country") String country,
+                                   HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        FinanceDepositSearchListEntity entity = new FinanceDepositSearchListEntity();
+        entity.setCallbackStatus(callbackStatus);
+        entity.setSerial(serial);
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setStatus(status);
+        entity.setStartDate(startDate == null ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? null : simpleDateFormat.parse(endDate));
+        entity.setPlatform(platform);
+        if (Strings.isNullOrEmpty(channelCodes)) {
+            entity.setChannelCodes(null);
+        } else {
+
+            entity.setChannelCodes(Arrays.asList(channelCodes.split(",")));
+        }
+        entity.setCountry(country);
+
+        BaseResultDto<List<FinanceDepositDto>> resultDto = financeDepositFeignService.export(entity);
+        if (resultDto.getCode() == 200) {
+            List<FinanceDepositExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                FinanceDepositExportDto dto = new FinanceDepositExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(item.getCId());
+                dto.setPIBNO(item.getPIbNo());
+
+//                activity_deposit
+
+                if (item.getActivityDeposit() == null || item.getActivityDeposit().equals(0)) {
+                    dto.setActivityDepositName("--");
+                } else {
+                    if (CountryUtil.isCN(item.getCountry())) {
+                        dto.setActivityDepositName("10%");
+                    } else {
+                        dto.setActivityDepositName("100%");
+                    }
+                }
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("DEPOSIT"), dtos, FinanceDepositExportDto.class,
+                    response);
+        }
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceDepositDto> resultDto = financeDepositFeignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+    @RequestMapping("/amount/statictics")
+    public BaseResultDto depositAmountStatictics(@RequestBody CustomAmountStatisticsEntity entity) throws Exception {
+        return financeDepositFeignService.depositAmountStatictics(entity);
+    }
+
+    @RequestMapping("/type/statictics")
+    public BaseResultDto depositPayTypeAmountStatictics(@RequestBody CustomAmountStatisticsEntity entity) throws Exception {
+        return financeDepositFeignService.depositPayTypeAmountStatictics(entity);
+    }
+
+}

+ 87 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceDepositGiveController.java

@@ -0,0 +1,87 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceDepositGiveExportDto;
+import com.crm.manager.service.finance.FinanceDepositGiveFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.deposit.give.FinanceDepositGiveDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.deposit.give.FinanceDepositGiveAddEntity;
+import com.crm.rely.backend.core.entity.finance.deposit.give.FinanceDepositGiveSearchListEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @description: 赠金
+ * @author: houn
+ * @create: 2020-12-07 18:01
+ **/
+@RestController
+@RequestMapping("/finance/deposit/give")
+public class FinanceDepositGiveController {
+
+    @Autowired
+    private FinanceDepositGiveFeignService financeDepositGiveFeignService;
+
+    @PostMapping("/add")
+    public BaseResultDto managerAdd(@RequestBody @Validated FinanceDepositGiveAddEntity entity) throws Exception {
+
+        return financeDepositGiveFeignService.add(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated FinanceDepositGiveSearchListEntity entity) throws Exception {
+
+        ResultWithPagerDto<FinanceDepositGiveDto> resultWithPagerDto =
+                financeDepositGiveFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @GetMapping("/history/export")
+    public void tradeHistoryExport(@RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "platform") String platform,
+                                   @RequestParam(name = "status") Integer status,
+                                   HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        FinanceDepositGiveSearchListEntity entity = new FinanceDepositGiveSearchListEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setStatus(status);
+        entity.setStartDate(startDate == null ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? null : simpleDateFormat.parse(endDate));
+        entity.setPlatform(platform);
+
+        BaseResultDto<List<FinanceDepositGiveDto>> resultDto = financeDepositGiveFeignService.export(entity);
+        if (resultDto.getCode() == 200) {
+            List<FinanceDepositGiveExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                FinanceDepositGiveExportDto dto = new FinanceDepositGiveExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(String.valueOf(item.getCId()));
+                dto.setPIBNO(item.getPIbNo());
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("DEPOSIT_GIVE"), dtos,
+                    FinanceDepositGiveExportDto.class, response);
+        }
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceDepositGiveDto> resultDto = financeDepositGiveFeignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+}

+ 51 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceFollowTransferController.java

@@ -0,0 +1,51 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.finance.FinanceFollowTransferFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.follow.transfer.FinanceFollowTransferSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.follow.transfer.FinanceFollowTransferApproveEntity;
+import com.crm.rely.backend.core.entity.finance.follow.transfer.FinanceFollowTransferDeleteEntity;
+import com.crm.rely.backend.core.entity.finance.follow.transfer.FinanceFollowTransferSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 内转
+ */
+@RestController
+@RequestMapping("/follow/transfer")
+public class FinanceFollowTransferController {
+
+
+    @Autowired
+    private FinanceFollowTransferFeignService service;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceFollowTransferApproveEntity entity) throws Exception {
+
+        return service.approve(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceFollowTransferDeleteEntity entity) throws Exception {
+        return service.delete(entity);
+    }
+
+    @PostMapping("/search/list")
+    public ResultWithPagerDto<FinanceFollowTransferSearchDto> searcherList(@RequestBody @Validated FinanceFollowTransferSearchEntity entity) throws Exception {
+        return service.searcherList(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<FinanceFollowTransferSearchDto> searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return service.searcherSingle(entity);
+    }
+
+}

+ 198 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceRateController.java

@@ -0,0 +1,198 @@
+package com.crm.manager.controller;
+
+import com.alibaba.fastjson.JSON;
+import com.crm.manager.service.FinanceRateService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.finance.rate.FinanceRateSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.finance.rate.*;
+import com.crm.rely.backend.core.entity.system.config.SendUpdateEmailCodeEntity;
+import com.crm.rely.backend.util.GetIpAndMac;
+import com.crm.rely.backend.util.GoogleAuthenticatorUtil;
+import com.crm.rely.backend.util.HttpUtil;
+import org.jsoup.Connection;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.*;
+
+/**
+ * @author houn
+ */
+@RestController
+@RequestMapping("/finance/rate")
+public class FinanceRateController {
+
+    @Autowired
+    private FinanceRateService financeRateService;
+
+    /**
+     * 添加汇率
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/add")
+    public BaseResultDto addRate(@RequestBody @Validated FinanceRateAddEntity entity, InfoEntity infoEntity) throws Exception {
+//        entity.setEmail(infoEntity.getIbInfo().getEmail());
+        if (!GoogleAuthenticatorUtil.verifyCode(infoEntity.getSecretKey(), entity.getGaCode())) {
+            return BaseResultDto.error(Constants.GOOGLE_CAPTCHA_ERROR);
+        }
+        financeRateService.add(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 修改汇率
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/update")
+    public BaseResultDto updateRate(@RequestBody @Validated FinanceRateUpdateEntity entity, InfoEntity infoEntity) throws Exception {
+//        entity.setEmail(infoEntity.getIbInfo().getEmail());
+        if (!GoogleAuthenticatorUtil.verifyCode(infoEntity.getSecretKey(), entity.getGaCode())) {
+            return BaseResultDto.error(Constants.GOOGLE_CAPTCHA_ERROR);
+        }
+        financeRateService.update(entity);
+        return BaseResultDto.success();
+    }
+
+    @PostMapping("/batch/update")
+    public BaseResultDto updateBatchRate(@RequestBody @Validated FinanceRateBatchUpdateEntity entity, InfoEntity infoEntity) throws Exception {
+        if (entity == null) {
+            return BaseResultDto.error(Constants.SYSTEM_ERROR);
+        }
+        if (!GoogleAuthenticatorUtil.verifyCode(infoEntity.getSecretKey(), entity.getGaCode())) {
+            return BaseResultDto.error(Constants.GOOGLE_CAPTCHA_ERROR);
+        }
+        List<FinanceRateUpdateEntity> entitys = null;
+        if (entity.getData() != null) {
+            entitys = new ArrayList<>(entity.getData().size());
+
+            for (FinanceRateUpdatesEntity financeRateUpdatesEntity :
+                    entity.getData()) {
+                FinanceRateUpdateEntity financeRateUpdateEntity = new FinanceRateUpdateEntity();
+                BeanUtils.copyProperties(financeRateUpdatesEntity, financeRateUpdateEntity);
+                financeRateUpdateEntity.setType(entity.getType());
+                entitys.add(financeRateUpdateEntity);
+            }
+        }
+//        entity.setEmail(infoEntity.getIbInfo().getEmail());
+        financeRateService.save(entity, entitys);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 删除汇率
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/delete")
+    public BaseResultDto deleteRate(@RequestBody @Validated FinanceRateDeleteEntity entity, InfoEntity infoEntity) throws Exception {
+//        entity.setEmail(infoEntity.getIbInfo().getEmail());
+        if (!GoogleAuthenticatorUtil.verifyCode(infoEntity.getSecretKey(), entity.getGaCode())) {
+            return BaseResultDto.error(Constants.GOOGLE_CAPTCHA_ERROR);
+        }
+        financeRateService.delete(entity);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 查询汇率
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherListRate(@RequestBody @Validated FinanceRateSearchListEntity entity) throws Exception {
+        BaseResultDto resultDto = financeRateService.searchList(entity);
+        return resultDto;
+    }
+
+    /**
+     * 单个查看汇率
+     *
+     * @param entity
+     * @return
+     */
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingleRate(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        FinanceRateSearchDto financeRateSearchDto = financeRateService.searchSingle(entity.getId());
+        return BaseResultDto.success(financeRateSearchDto);
+    }
+
+    @PostMapping("/add/send/code")
+    public BaseResultDto addChannelSendEmailCode(InfoEntity infoEntity) throws Exception {
+
+        return sendEmailCode(infoEntity);
+    }
+
+    @PostMapping("/update/send/code")
+    public BaseResultDto updateUpdateSendEmailCode(InfoEntity infoEntity) throws Exception {
+
+        return sendEmailCode(infoEntity);
+    }
+    @PostMapping("/batch/update/send/code")
+    public BaseResultDto updateBatchUpdateSendEmailCode(InfoEntity infoEntity) throws Exception {
+
+        return sendEmailCode(infoEntity);
+    }
+
+    @PostMapping("/delete/send/code")
+    public BaseResultDto deleteChannelSendEmailCode(InfoEntity infoEntity) throws Exception {
+
+        return sendEmailCode(infoEntity);
+    }
+
+
+    @RequestMapping("/convert")
+    public BaseResultDto convert(@RequestBody @Validated FinanceRateEntity entity) throws Exception {
+
+        String host = "https://tysjhlcx.market.alicloudapi.com";
+        String path = "/exchange_rate/convert";
+        String appcode = "e2e11e758e2c4a239456dead26feb847";
+        Map<String, String> headers = new HashMap<String, String>();
+        //最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
+        headers.put("Authorization", "APPCODE " + appcode);
+        Map<String, String> querys = new HashMap<String, String>();
+        querys.put("fromCode", entity.getTransformCurrency());
+        querys.put("toCode", entity.getCurrency());
+        querys.put("money", "1");
+
+
+        try {
+
+            Connection.Response response = HttpUtil.get(host + path, headers, querys);
+            return BaseResultDto.success(JSON.parseObject(response.body()).get("data"));
+        } catch (Exception e) {
+            e.printStackTrace();
+            return BaseResultDto.error();
+        }
+    }
+
+
+    public BaseResultDto sendEmailCode(InfoEntity infoEntity) throws Exception {
+        if (infoEntity == null && infoEntity.getIbInfo() == null) {
+            return BaseResultDto.error(Constants.SYSTEM_ERROR);
+        }
+        SendUpdateEmailCodeEntity emailCodeEntity = new SendUpdateEmailCodeEntity();
+
+        emailCodeEntity.setEmail(infoEntity.getIbInfo().getEmail());
+        emailCodeEntity.setTime(new Date());
+        emailCodeEntity.setUser(infoEntity.getIbInfo().getId());
+        emailCodeEntity.setIp(GetIpAndMac.getIp());
+
+        financeRateService.sendEmailCode(emailCodeEntity);
+        return BaseResultDto.success(Constants.SEND_SUCCESS);
+    }
+
+}

+ 106 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceSynonymTransferController.java

@@ -0,0 +1,106 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceSynonymTransferExportDto;
+import com.crm.manager.entity.excel.FinanceSynonymTransferExcelEntity;
+import com.crm.manager.service.finance.FinanceSynonymTransferFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.synonym.transfer.FinanceSynonymTransferSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferAddEntity;
+import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferApproveEntity;
+import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferDeleteEntity;
+import com.crm.rely.backend.core.entity.finance.synonym.transfer.FinanceSynonymTransferSearchEntity;
+import com.crm.rely.backend.util.EasyExcelUti;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @description: 异名内转
+ * @author: houn
+ * @create: 2021-07-12 18:01
+ **/
+@RestController
+@RequestMapping("/finance/synonym/transfer")
+public class FinanceSynonymTransferController {
+
+    @Autowired
+    private FinanceSynonymTransferFeignService financeSynonymTransferFeignService;
+
+
+    @PostMapping("/excel")
+    public BaseResultDto excel(@RequestParam("file") MultipartFile file) throws Exception {
+
+        List<FinanceSynonymTransferExcelEntity> financeSynonymTransferExcelEntities = EasyExcelUti.readExcel(file,
+                new FinanceSynonymTransferExcelEntity(),
+                1, FinanceSynonymTransferExcelEntity.class);
+        if (financeSynonymTransferExcelEntities == null || financeSynonymTransferExcelEntities.size() <= 0) {
+            return BaseResultDto.error(Constants.INFO_NOT_FOUND);
+        }
+        List<FinanceSynonymTransferAddEntity> entities = new ArrayList<>(financeSynonymTransferExcelEntities.size());
+        for (FinanceSynonymTransferExcelEntity financeSynonymTransferExcelEntity :
+                financeSynonymTransferExcelEntities) {
+            FinanceSynonymTransferAddEntity entity = new FinanceSynonymTransferAddEntity();
+            entity.setAmount(new BigDecimal(financeSynonymTransferExcelEntity.getAmount()));
+            entity.setWithdrawLogin(Long.parseLong(financeSynonymTransferExcelEntity.getWithdrawLogin()));
+            entity.setDepositLogin(Long.parseLong(financeSynonymTransferExcelEntity.getDepositLogin()));
+            entities.add(entity);
+        }
+
+        return financeSynonymTransferFeignService.saves(entities);
+    }
+
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody @Validated FinanceSynonymTransferAddEntity entity) throws Exception {
+
+        return financeSynonymTransferFeignService.save(entity);
+    }
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceSynonymTransferApproveEntity entity) throws Exception {
+
+        return financeSynonymTransferFeignService.approve(entity);
+    }
+
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceSynonymTransferDeleteEntity entity) throws Exception {
+
+        return financeSynonymTransferFeignService.delete(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public ResultWithPagerDto<FinanceSynonymTransferSearchDto> searcherList(@RequestBody @Validated FinanceSynonymTransferSearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<FinanceSynonymTransferSearchDto> resultWithPagerDto =
+                financeSynonymTransferFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceSynonymTransferSearchDto> resultDto =
+                financeSynonymTransferFeignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+    @GetMapping("/template/export")
+    public void templateExport(HttpServletResponse response) throws Exception {
+
+        List<FinanceSynonymTransferExportDto> dtos = Lists.newArrayList();
+
+        ExportUtil.transferToResponse(StringUtil.getXlsxFileName("TEMPLATE", false), dtos,
+                FinanceSynonymTransferExportDto.class, response);
+    }
+}

+ 86 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceTradeInterestController.java

@@ -0,0 +1,86 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceTradeInterestExportDto;
+import com.crm.manager.service.finance.FinanceTradeInterestFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.trade.interest.FinanceTradeInterestDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.trade.interest.FinanceTradeInterestAddEntity;
+import com.crm.rely.backend.core.entity.finance.trade.interest.FinanceTradeInterestSearchListEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.StringUtil;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.List;
+
+/**
+ * @description:
+ * @author: houn
+ * @create: 2022-04-11 18:01
+ **/
+@RestController
+@RequestMapping("/finance/trade/interest")
+public class FinanceTradeInterestController {
+
+    @Autowired
+    private FinanceTradeInterestFeignService feignService;
+
+    @PostMapping("/add")
+    public BaseResultDto managerAdd(@RequestBody @Validated FinanceTradeInterestAddEntity entity) throws Exception {
+
+        return feignService.add(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated FinanceTradeInterestSearchListEntity entity) throws Exception {
+
+        ResultWithPagerDto<FinanceTradeInterestDto> resultWithPagerDto = feignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @GetMapping("/history/export")
+    public void tradeHistoryExport(@RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "platform") String platform,
+                                   @RequestParam(name = "status") Integer status,
+                                   HttpServletResponse response) throws Exception {
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        FinanceTradeInterestSearchListEntity entity = new FinanceTradeInterestSearchListEntity();
+        entity.setLogin(login);
+        entity.setCId(cId);
+        entity.setStatus(status);
+        entity.setStartDate(startDate == null ? null : simpleDateFormat.parse(startDate));
+        entity.setEndDate(endDate == null ? null : simpleDateFormat.parse(endDate));
+        entity.setPlatform(platform);
+
+        BaseResultDto<List<FinanceTradeInterestDto>> resultDto = feignService.export(entity);
+        if (resultDto.getCode() == 200) {
+            List<FinanceTradeInterestExportDto> dtos = Lists.newArrayList();
+            resultDto.getData().forEach((item) -> {
+                FinanceTradeInterestExportDto dto = new FinanceTradeInterestExportDto();
+                BeanUtils.copyProperties(item, dto);
+                dto.setCID(String.valueOf(item.getCId()));
+                dto.setPIBNO(item.getPIbNo());
+                dtos.add(dto);
+            });
+            ExportUtil.transferToResponse(StringUtil.getXlsxFileName("TRADE_INTEREST"), dtos,
+                    FinanceTradeInterestExportDto.class, response);
+        }
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceTradeInterestDto> resultDto = feignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+}

+ 136 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceTransferController.java

@@ -0,0 +1,136 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceTransferExportDto;
+import com.crm.manager.dto.export.FinanceWithdrawExportDto;
+import com.crm.manager.service.finance.FinanceTransferFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.transfer.FinanceTransferSearchDto;
+import com.crm.rely.backend.core.dto.finance.withdraw.FinanceWithdrawDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.FinanceTransferApproveEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.FinanceTransferDeleteEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.FinanceTransferSearchEntity;
+import com.crm.rely.backend.core.entity.finance.withdraw.FinanceAgentWithdrawSearchListEntity;
+import com.crm.rely.backend.core.entity.finance.withdraw.FinanceWithdrawSearchListEntity;
+import com.crm.rely.backend.util.DateUtil;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.StringUtils;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @description: 内转
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/finance/transfer")
+public class FinanceTransferController {
+
+    @Autowired
+    private FinanceTransferFeignService financeTransferFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceTransferApproveEntity entity) throws Exception {
+
+        return financeTransferFeignService.approve(entity);
+    }
+
+//    @PostMapping("/approve/manager")
+//    public BaseResultDto approveByManager(@RequestBody @Validated FinanceSynonymTransferApproveManagerEntity
+//    entity) throws Exception {
+//        if (!Constants.MANAGER_COMPLETED_STATUS.equals(entity.getDepositStatus())) {
+//            return BaseResultDto.error(Constants.NOT_PERMIT);
+//        }
+//        entity.setDepositStatus(Constants.MANAGER_COMPLETED_STATUS);
+//        entity.setWithdrawStatus(Constants.MANAGER_COMPLETED_STATUS);
+//        financeTransferService.approve(entity);
+//        return BaseResultDto.success();
+//    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceTransferDeleteEntity entity) throws Exception {
+
+        return financeTransferFeignService.delete(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public ResultWithPagerDto<FinanceTransferSearchDto> searcherList(@RequestBody @Validated FinanceTransferSearchEntity entity) throws Exception {
+
+        ResultWithPagerDto<FinanceTransferSearchDto> resultWithPagerDto =
+                financeTransferFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceTransferSearchDto> resultDto = financeTransferFeignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+    @GetMapping("/searcher/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "status") String status,
+                                   @RequestParam(name = "fromLogin") Long fromLogin,
+                                   @RequestParam(name = "toLogin") Long toLogin,
+                                   @RequestParam(name = "ibNo") String ibNo,
+                                   HttpServletResponse response) throws Exception {
+
+        FinanceTransferSearchEntity entity = new FinanceTransferSearchEntity();
+        entity.setCId(cId);
+        entity.setStatus(status);
+        entity.setFromLogin(fromLogin);
+        entity.setToLogin(toLogin);
+        entity.setIbNo(ibNo);
+
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
+
+        if (StringUtils.isEmpty(startDate)) {
+            entity.setStartDate(DateUtil.getMonthStart(new Date()));
+        } else {
+            entity.setStartDate(sdf.parse(startDate));
+        }
+
+        if (StringUtils.isEmpty(endDate)) {
+            entity.setEndDate(DateUtil.addDate(new Date(), 1));
+        } else {
+            entity.setEndDate(sdf.parse(endDate));
+        }
+
+        entity.setPage(null);
+        if (StringUtils.isEmpty(entity.getStatus())) entity.setStatus(null);
+
+
+        BaseResultDto<List<FinanceTransferSearchDto>> resultDto = financeTransferFeignService.export(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<FinanceTransferSearchDto> dtos = resultDto.getData();
+            List<FinanceTransferExportDto> exportDtos = Lists.newArrayList();
+            dtos.forEach((item) -> {
+                FinanceTransferExportDto exportDto = new FinanceTransferExportDto();
+                BeanUtils.copyProperties(item, exportDto);
+                exportDto.setCID(item.getCId());
+                exportDto.setAmount(item.getAmount().multiply(new BigDecimal(-1)));
+                exportDto.setIbNo(item.getPIbNo());
+                exportDtos.add(exportDto);
+            });
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_TRANSFER_EXPORT"), exportDtos,
+                    FinanceTransferExportDto.class, response);
+        }
+    }
+
+}

+ 68 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceTransferRiskRemindController.java

@@ -0,0 +1,68 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.finance.FinanceTransferRiskRemindFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.finance.transfer.risk.remind.FinanceTransferRiskRemindSearchDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.risk.remind.FinanceTransferRiskRemindApproveEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.risk.remind.FinanceTransferRiskRemindDeleteEntity;
+import com.crm.rely.backend.core.entity.finance.transfer.risk.remind.FinanceTransferRiskRemindSearchEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @description: 内转风险提示
+ * @author: houn
+ * @create: 2022-11-08 18:01
+ **/
+@RestController
+@RequestMapping("/finance/transfer/risk/remind")
+public class FinanceTransferRiskRemindController {
+
+    @Autowired
+    private FinanceTransferRiskRemindFeignService FinanceTransferRiskRemindFeignService;
+
+    @PostMapping("/confirm")
+    public BaseResultDto confirm(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        FinanceTransferRiskRemindApproveEntity financeTransferRiskRemindApproveEntity =
+                new FinanceTransferRiskRemindApproveEntity();
+        financeTransferRiskRemindApproveEntity.setId(entity.getId());
+        financeTransferRiskRemindApproveEntity.setStatus(Constants.PASSED_STATUS);
+        return this.FinanceTransferRiskRemindFeignService.approve(financeTransferRiskRemindApproveEntity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceTransferRiskRemindDeleteEntity entity) throws Exception {
+
+        return this.FinanceTransferRiskRemindFeignService.delete(entity);
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultDto searcherPageList(@RequestBody @Validated FinanceTransferRiskRemindSearchEntity entity) throws Exception {
+
+        BaseResultDto resultWithPagerDto =
+                this.FinanceTransferRiskRemindFeignService.searchPageList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/list")
+    public BaseResultDto searchList(@RequestBody @Validated FinanceTransferRiskRemindSearchEntity entity) throws Exception {
+        entity.setStatus(Constants.APPLY_STATUS);
+        BaseResultDto resultWithPagerDto =
+                this.FinanceTransferRiskRemindFeignService.searchList(entity);
+        return resultWithPagerDto;
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceTransferRiskRemindSearchDto> resultDto =
+                this.FinanceTransferRiskRemindFeignService.searchSingle(entity);
+        return resultDto;
+    }
+
+}

+ 309 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FinanceWithdrawController.java

@@ -0,0 +1,309 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.dto.export.FinanceWithdrawExportDto;
+import com.crm.manager.service.finance.FinanceWithdrawApiFeignService;
+import com.crm.manager.service.finance.FinanceWithdrawFeignService;
+import com.crm.rely.backend.core.constant.Constants;
+import com.crm.rely.backend.core.constant.FeignClientAnnotation;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
+import com.crm.rely.backend.core.dto.finance.withdraw.FinanceWithdrawDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.custom.info.CustomAmountStatisticsEntity;
+import com.crm.rely.backend.core.entity.custom.info.InfoEntity;
+import com.crm.rely.backend.core.entity.finance.withdraw.*;
+import com.crm.rely.backend.core.entity.finance.withdraw.automatic.FinanceWithdrawInfoEntity;
+import com.crm.rely.backend.util.ExportUtil;
+import com.crm.rely.backend.util.FileProcessUtil;
+import com.google.common.base.Strings;
+import com.google.common.collect.Lists;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+/**
+ * @description: 出金
+ * @author: houn
+ * @create: 2020-07-07 18:01
+ **/
+@RestController
+@RequestMapping("/finance/withdraw")
+public class FinanceWithdrawController {
+
+    @Autowired
+    private FinanceWithdrawFeignService financeWithdrawFeignService;
+
+
+    @Autowired
+    private FinanceWithdrawApiFeignService financeWithdrawApiFeignService;
+
+    @PostMapping("/approve")
+    public BaseResultDto approve(@RequestBody @Validated FinanceWithdrawApproveEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        if (Constants.PASSED_STATUS.equals(entity.getStatus())) {
+            entity.setWithdrawStatus(Constants.MANAGER_PROCESSING_STATUS);
+        } else {
+            entity.setWithdrawStatus(Constants.MANAGER_PENDING_STATUS);
+        }
+        entity.setOperationType(Constants.OPERATION_TYPE_MANUAL);
+
+        return financeWithdrawFeignService.approve(entity);
+    }
+
+
+    @PostMapping("/approve/manager")
+    public BaseResultDto approveByManager(@RequestBody @Validated FinanceWithdrawApproveManagerEntity entity) throws Exception {
+
+        return financeWithdrawFeignService.approveByManager(entity);
+    }
+
+    @PostMapping("/sales/approve")
+    public BaseResultDto approveBySales(@RequestBody @Validated FinanceWithdrawApproveSalesEntity entity) throws Exception {
+        if (!Constants.PASSED_STATUS.equals(entity.getStatus()) && !Constants.REJECTED_STATUS.equals(entity.getStatus())) {
+            return BaseResultDto.error(Constants.NOT_PERMIT);
+        }
+        return financeWithdrawFeignService.approveBySales(entity);
+    }
+
+    @PostMapping("/approve/backstage")
+    public BaseResultDto approveByBackstage(@RequestBody @Validated FinanceWithdrawApproveBackstageEntity entity) throws Exception {
+
+
+        return financeWithdrawFeignService.approveByBackstage(entity);
+    }
+
+    @PostMapping("/approve/info")
+    public BaseResultDto approveByInfo(@RequestBody @Validated FinanceWithdrawApproveInfoEntity entity) throws Exception {
+
+
+        return financeWithdrawFeignService.approveByInfo(entity);
+    }
+
+    @PostMapping("/approve/infos")
+    public BaseResultDto approveByInfos(@RequestBody @Validated FinanceWithdrawApproveInfosEntity entity) throws Exception {
+        return financeWithdrawFeignService.approveByInfos(entity);
+    }
+
+    @PostMapping("/approve/submit/channel")
+    public BaseResultDto approveByManager(@RequestBody @Validated FinanceWithdrawApproveChannelSubmitEntity entity) throws Exception {
+
+
+        return financeWithdrawFeignService.approveBySubmit(entity);
+    }
+
+    @PostMapping("/approve/channel")
+    public BaseResultDto approveByManager(@RequestBody @Validated FinanceWithdrawApproveChannelEntity entity) throws Exception {
+
+        return financeWithdrawFeignService.approveByChannel(entity);
+    }
+
+    @PostMapping("/approve/submits/channel")
+    public BaseResultDto approveByChannelSubmits(@RequestBody @Validated FinanceWithdrawApproveChannelSubmitsEntity entity) throws Exception {
+
+
+        return financeWithdrawFeignService.approveBySubmits(entity);
+    }
+
+    @PostMapping("/approve/channels")
+    public BaseResultDto approveByChannel(@RequestBody @Validated FinanceWithdrawApproveChannelsEntity entity) throws Exception {
+
+        return financeWithdrawFeignService.approveByChannels(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto delete(@RequestBody @Validated FinanceWithdrawDeleteEntity entity) throws Exception {
+
+        return financeWithdrawFeignService.delete(entity);
+    }
+
+    @PostMapping("/searcher/list")
+    public BaseResultDto searcherList(@RequestBody @Validated FinanceWithdrawSearchListEntity entity,
+                                      InfoEntity infoEntity) throws Exception {
+
+        ResultWithPagerDto<FinanceWithdrawDto> resultWithPagerDto = financeWithdrawFeignService.searcherList(entity);
+        return resultWithPagerDto;
+    }
+
+    @GetMapping("/searcher/list/export")
+    public void searcherListExport(@RequestParam(name = "startDate") String startDate,
+                                   @RequestParam(name = "endDate") String endDate,
+                                   @RequestParam(name = "cId") Long cId,
+                                   @RequestParam(name = "status") Integer status,
+                                   @RequestParam(name = "login") Long login,
+                                   @RequestParam(name = "channelCodes") String channelCodes,
+                                   @RequestParam(name = "mtStatus") Integer mtStatus,
+                                   @RequestParam(name = "submitStatus") Integer submitStatus,
+                                   @RequestParam(name = "startSubmitDate") String startSubmitDate,
+                                   @RequestParam(name = "endSubmitDate") String endSubmitDate,
+                                   @RequestParam(name = "backstageStatus") Integer backstageStatus,
+                                   @RequestParam(name = "infoStatus") Integer infoStatus,
+                                   @RequestParam(name = "salaryLogin") Integer salaryLogin,
+                                   @RequestParam(name = "country") String country,
+                                   @RequestParam(name = "serial") String serial,
+                                   @RequestParam(name = "pIbNo" , required = false) String pIbNo,
+                                   HttpServletResponse response) throws Exception {
+
+        FinanceWithdrawSearchListEntity entity = new FinanceAgentWithdrawSearchListEntity();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
+        entity.setStartDate(Strings.isNullOrEmpty(startDate) ? new Date() : simpleDateFormat.parse(startDate));
+        entity.setEndDate(Strings.isNullOrEmpty(endDate) ? new Date() : simpleDateFormat.parse(endDate));
+        entity.setCId(cId);
+        entity.setStatus(status);
+        entity.setLogin(login);
+        if (Strings.isNullOrEmpty(channelCodes)) {
+            entity.setChannelCodes(null);
+        } else {
+
+            entity.setChannelCodes(Arrays.asList(channelCodes.split(",")));
+        }
+        entity.setMtStatus(mtStatus);
+        entity.setSubmitStatus(submitStatus);
+        entity.setBackstageStatus(backstageStatus);
+        entity.setInfoStatus(infoStatus);
+        entity.setSalaryLogin(salaryLogin);
+        entity.setCountry(country);
+        entity.setSerial(serial);
+        entity.setPIbNo(pIbNo);
+
+        if ("undefinedundefined".equals(startSubmitDate)) {
+            startSubmitDate = null;
+        }
+        if ("undefinedundefined".equals(endSubmitDate)) {
+            endSubmitDate = null;
+        }
+
+        entity.setStartSubmitDate(Strings.isNullOrEmpty(startSubmitDate) ? null :
+                simpleDateFormat.parse(startSubmitDate));
+        entity.setEndSubmitDate(Strings.isNullOrEmpty(endSubmitDate) ? null : simpleDateFormat.parse(endSubmitDate));
+
+        BaseResultDto<List<FinanceWithdrawDto>> resultDto = financeWithdrawFeignService.searcherListExport(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<FinanceWithdrawExportDto> exportDtos = setExport(resultDto.getData());
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_WITHDRAWAL_EXPORT"), exportDtos,
+                    FinanceWithdrawExportDto.class, response);
+        }
+    }
+
+    @GetMapping("/searcher/list/export/ids")
+    public void searcherListExport(@RequestParam(name = "ids") String ids,
+                                   HttpServletResponse response) throws Exception {
+
+        FinanceWithdrawSearchByIdsEntity entity = new FinanceWithdrawSearchByIdsEntity();
+
+        List<String> withdrawIdsString = Arrays.asList(ids.split(","));
+
+        List<Long> withdrawIds = new ArrayList<>(withdrawIdsString.size());
+        for (String s : withdrawIdsString) {
+            withdrawIds.add(Long.valueOf(s));
+        }
+
+        entity.setIds(withdrawIds);
+
+        BaseResultDto<List<FinanceWithdrawDto>> resultDto = financeWithdrawFeignService.searcherByIdsExport(entity);
+        if (resultDto.getCode() == Constants.SUCCESS_CODE) {
+            List<FinanceWithdrawExportDto> exportDtos = setExport(resultDto.getData());
+            ExportUtil.transferToResponse(FileProcessUtil.genExportFileName("CUSTOM_WITHDRAWAL_EXPORT"), exportDtos,
+                    FinanceWithdrawExportDto.class, response);
+        }
+    }
+
+    @PostMapping("/searcher/single")
+    public BaseResultDto searcherSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        BaseResultDto<FinanceWithdrawDto> resultDto = financeWithdrawFeignService.searcherSingle(entity);
+        return resultDto;
+    }
+
+    private List<FinanceWithdrawExportDto> setExport(List<FinanceWithdrawDto> dtos) {
+        List<FinanceWithdrawExportDto> exportDtos = Lists.newArrayList();
+        dtos.forEach((item) -> {
+            FinanceWithdrawExportDto exportDto = new FinanceWithdrawExportDto();
+            BeanUtils.copyProperties(item, exportDto);
+            exportDto.setInfoStatusName("--");
+
+            if (Constants.APPLY_STATUS.equals(item.getBackstageStatus())) {
+                exportDto.setBackstageStatusName("未处理");
+            } else if (Constants.PASSED_STATUS.equals(item.getBackstageStatus())) {
+                exportDto.setBackstageStatusName("已通过");
+            } else if (Constants.REJECTED_STATUS.equals(item.getBackstageStatus())) {
+                exportDto.setBackstageStatusName("已拒绝");
+            }
+            if (item.getFeeReduction() == null) {
+                exportDto.setFeeReductionName("--");
+            } else if (item.getFeeReduction() == 0) {
+                exportDto.setFeeReductionName("否");
+            } else if (item.getFeeReduction() == 1) {
+                exportDto.setFeeReductionName("是");
+            }
+
+            if (Constants.PASSED_STATUS.equals(item.getInfoStatus())) {
+                exportDto.setInfoStatusName("已通过");
+            } else if (Constants.REJECTED_STATUS.equals(item.getInfoStatus())) {
+                exportDto.setInfoStatusName("已拒绝");
+            }
+
+            if (Constants.APPLY_STATUS.equals(item.getSubmitStatus())) {
+                exportDto.setSubmitStatusName("未处理");
+            } else if (Constants.PASSED_STATUS.equals(item.getSubmitStatus())) {
+
+                exportDto.setInfoStatusName("已通过");
+                exportDto.setSubmitStatusName("已提交");
+            } else if (Constants.REJECTED_STATUS.equals(item.getSubmitStatus())) {
+                exportDto.setSubmitStatusName("已拒绝");
+            }
+
+            if (item.getFeeAmount() != null && item.getFeeReductionAmount() != null) {
+                exportDto.setActualFeeAmount(item.getFeeAmount().subtract(item.getFeeReductionAmount()));
+            } else {
+                exportDto.setActualFeeAmount(null);
+            }
+
+            if (item.getSalaryLogin() == null) {
+                exportDto.setSalaryLogin("NO");
+            } else {
+                exportDto.setSalaryLogin("YES");
+            }
+            exportDto.setPibNo(item.getPIbNo());
+            exportDtos.add(exportDto);
+        });
+        return exportDtos;
+    }
+
+    @RequestMapping("/remit/channel")
+    public BaseResultDto remitChannel() throws Exception {
+        return financeWithdrawFeignService.remitChannel();
+    }
+
+    @RequestMapping("/amount/statictics")
+    public BaseResultDto withdrawAmountStatictics(@RequestBody FinanceWithdrawBaseAddEntity entity) throws Exception {
+        return financeWithdrawFeignService.withdrawAmountStatictics(entity);
+    }
+
+    @RequestMapping("/type/statictics")
+    public BaseResultDto withdrawPayTypeAmountStatictics(@RequestBody CustomAmountStatisticsEntity entity) throws Exception {
+        return financeWithdrawFeignService.withdrawPayTypeAmountStatictics(entity);
+    }
+
+    @RequestMapping("/api/info")
+    public BaseResultDto withdrawInfo(@RequestBody FinanceWithdrawInfoEntity entity) throws Exception {
+        entity.setWithdrawInfoType(1);
+        return financeWithdrawApiFeignService.withdrawInfo(entity.getWithdrawInfoUrl(), entity);
+    }
+
+    @RequestMapping("/withdrawapi")
+    public BaseResultDto withdraw(@RequestBody Map<String, Object> params) throws Exception {
+        String contextPath = params.get("withdrawUrl").toString();
+
+        params.put("withdrawInfoType", 1);
+        return financeWithdrawApiFeignService.withdraw(contextPath, params);
+
+    }
+
+
+}

+ 50 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FollowCommissionConfigController.java

@@ -0,0 +1,50 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.follow.FollowCommissionConfigService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.follow.config.FollowCommissionConfigDto;
+import com.crm.rely.backend.core.entity.follow.config.FollowCommissionConfigAddEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * @author y
+ * @create 2022/6/21
+ */
+@RestController
+@RequestMapping("/follow/commission/config")
+public class FollowCommissionConfigController {
+
+    @Autowired
+    private FollowCommissionConfigService followCommissionConfigService;
+
+    /**
+     * 保存代理跟单分成比例
+     *
+     * @param entities
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/add")
+    public BaseResultDto add(@RequestBody List<FollowCommissionConfigAddEntity> entities) throws Exception {
+        followCommissionConfigService.add(entities);
+        return BaseResultDto.success();
+    }
+
+    /**
+     * 获取所有代理跟单分成比例
+     *
+     * @return
+     * @throws Exception
+     */
+    @PostMapping("/list")
+    public BaseResultDto<FollowCommissionConfigDto> list() throws Exception {
+        return BaseResultDto.success(followCommissionConfigService.getList());
+    }
+
+}

+ 44 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FollowCptController.java

@@ -0,0 +1,44 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.follow.FollowCptFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.follow.cpt.FollowCptDailyDto;
+import com.crm.rely.backend.core.dto.follow.cpt.FollowCptInfoDto;
+import com.crm.rely.backend.core.dto.follow.cpt.FollowCptResultDto;
+import com.crm.rely.backend.core.entity.follow.cpt.FollowCptRankSearchEntity;
+import com.crm.rely.backend.util.DateUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+import java.util.List;
+
+@RestController
+@RequestMapping("/follow/cpt")
+public class FollowCptController {
+
+    @Autowired
+    private FollowCptFeignService followCptFeignService;
+
+    @PostMapping("/info")
+    public BaseResultDto<List<FollowCptInfoDto>> cptInfo() throws Exception {
+        return followCptFeignService.cptInfo();
+    }
+
+    @PostMapping("/result")
+    public BaseResultWithPagerDto<List<FollowCptResultDto>> cptResult(@RequestBody @Validated FollowCptRankSearchEntity entity) throws Exception {
+        entity.setDate(DateUtil.getPureDate(new Date()));
+        return followCptFeignService.cptResult(entity);
+    }
+
+    @PostMapping("/daily")
+    public BaseResultWithPagerDto<List<FollowCptDailyDto>> cptDaily(@RequestBody @Validated FollowCptRankSearchEntity entity) throws Exception {
+        return followCptFeignService.cptDaily(entity);
+    }
+
+}

+ 52 - 0
uacrd-manager-server/src/main/java/com/crm/manager/controller/FollowCptInfoController.java

@@ -0,0 +1,52 @@
+package com.crm.manager.controller;
+
+import com.crm.manager.service.follow.FollowCptInfoFeignService;
+import com.crm.rely.backend.core.dto.base.BaseResultDto;
+import com.crm.rely.backend.core.dto.base.BaseResultWithPagerDto;
+import com.crm.rely.backend.core.dto.follow.cpt.FollowCptInfoDto;
+import com.crm.rely.backend.core.entity.base.SingleLongEntity;
+import com.crm.rely.backend.core.entity.follow.cpt.FollowCptInfoAddEntity;
+import com.crm.rely.backend.core.entity.follow.cpt.FollowCptInfoSearchEntity;
+import com.crm.rely.backend.core.entity.follow.cpt.FollowCptInfoUpdateEntity;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+@RestController
+@RequestMapping("/follow/cpt/info")
+public class FollowCptInfoController {
+
+    @Autowired
+    private FollowCptInfoFeignService followCptInfoFeignService;
+
+    @PostMapping("/add")
+    public BaseResultDto<Object> add(@RequestBody @Validated FollowCptInfoAddEntity entity) throws Exception {
+        return followCptInfoFeignService.add(entity);
+    }
+
+    @PostMapping("/update")
+    public BaseResultDto<Object> update(@RequestBody @Validated FollowCptInfoUpdateEntity entity) throws Exception {
+        return followCptInfoFeignService.update(entity);
+    }
+
+    @PostMapping("/delete")
+    public BaseResultDto<Object> delete(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return followCptInfoFeignService.delete(entity);
+    }
+
+    @PostMapping("/search/single")
+    public BaseResultDto<FollowCptInfoDto> searchSingle(@RequestBody @Validated SingleLongEntity entity) throws Exception {
+        return followCptInfoFeignService.searchSingle(entity);
+    }
+
+    @PostMapping("/search/list")
+    public BaseResultWithPagerDto<List<FollowCptInfoDto>> searchList(@RequestBody FollowCptInfoSearchEntity entity) throws Exception {
+        return followCptInfoFeignService.searchList(entity);
+    }
+
+}

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