浏览代码

初始化

wujiefeng 10 月之前
父节点
当前提交
cae31989ae
共有 41 个文件被更改,包括 1353 次插入0 次删除
  1. 65 0
      RewardClient/pom.xml
  2. 12 0
      RewardClient/src/main/java/com/zhongshu/reward/client/config/RewardClientConfiguration.java
  3. 8 0
      RewardClient/src/main/java/com/zhongshu/reward/client/config/RewardServerConfiguration.java
  4. 二进制
      RewardClient/target/classes/com/zhongshu/reward/client/config/RewardClientConfiguration.class
  5. 二进制
      RewardClient/target/classes/com/zhongshu/reward/client/config/RewardServerConfiguration.class
  6. 155 0
      RewardServer/pom.xml
  7. 21 0
      RewardServer/src/main/java/com/zhongshu/reward/server/RewardServerApplication.java
  8. 11 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/AuthConfig.java
  9. 10 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/ClientConfig.java
  10. 14 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/MVCConfig.java
  11. 13 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/MongoConfig.java
  12. 37 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/PaymentConfig.java
  13. 9 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/PushConfig.java
  14. 26 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/RedisConfig.java
  15. 27 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/SchedulingConfig.java
  16. 31 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/SnowFlakeConfig.java
  17. 46 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/SwagerConfig.java
  18. 65 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/WeChatConfig.java
  19. 11 0
      RewardServer/src/main/java/com/zhongshu/reward/server/core/config/feign/ZswlCloudShopConfig.java
  20. 41 0
      RewardServer/src/main/resources/application-dev.yml
  21. 64 0
      RewardServer/src/main/resources/application.yml
  22. 23 0
      RewardServer/src/main/resources/bootstrap.yml
  23. 402 0
      RewardServer/src/test/java/com/zhongshu/payment/server/ServerApplicationTests.java
  24. 113 0
      RewardServer/target/classes/META-INF/spring-configuration-metadata.json
  25. 41 0
      RewardServer/target/classes/application-dev.yml
  26. 64 0
      RewardServer/target/classes/application.yml
  27. 23 0
      RewardServer/target/classes/bootstrap.yml
  28. 二进制
      RewardServer/target/classes/com/zhongshu/payment/server/core/config/MVCConfig.class
  29. 二进制
      RewardServer/target/classes/com/zhongshu/payment/server/core/config/PaymentConfig.class
  30. 二进制
      RewardServer/target/classes/com/zhongshu/payment/server/core/config/RedisConfig.class
  31. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/RewardServerApplication.class
  32. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/AuthConfig.class
  33. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/ClientConfig.class
  34. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/MongoConfig.class
  35. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/PushConfig.class
  36. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/SchedulingConfig.class
  37. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/SnowFlakeConfig.class
  38. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/SwagerConfig.class
  39. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/WeChatConfig.class
  40. 二进制
      RewardServer/target/classes/com/zhongshu/reward/server/core/config/feign/ZswlCloudShopConfig.class
  41. 21 0
      pom.xml

+ 65 - 0
RewardClient/pom.xml

@@ -0,0 +1,65 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.github.microservice</groupId>
+		<artifactId>PParent</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+		<relativePath>../../../super/PParent</relativePath>
+	</parent>
+
+
+	<groupId>com.zhongshu</groupId>
+	<artifactId>RewardClient</artifactId>
+	<name>RewardClient</name>
+	<properties>
+		<java.version>11</java.version>
+	</properties>
+	<dependencies>
+
+
+		<dependency>
+			<groupId>com.github.microservice</groupId>
+			<artifactId>PCore</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<!--应用中心客户端-->
+		<dependency>
+			<groupId>com.github.microservice.components</groupId>
+			<artifactId>ApplicationClient</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>com.github.microservice.auth</groupId>
+			<artifactId>AuthClient</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.github.xiaoymin</groupId>
+			<artifactId>knife4j-spring-boot-starter</artifactId>
+			<version>3.0.3</version>
+		</dependency>
+
+		<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
+		<dependency>
+			<groupId>cn.hutool</groupId>
+			<artifactId>hutool-all</artifactId>
+			<version>5.8.20</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>com.github.wechatpay-apiv3</groupId>
+			<artifactId>wechatpay-java</artifactId>
+			<version>0.2.12</version>
+		</dependency>
+
+	</dependencies>
+
+
+</project>

+ 12 - 0
RewardClient/src/main/java/com/zhongshu/reward/client/config/RewardClientConfiguration.java

@@ -0,0 +1,12 @@
+package com.zhongshu.reward.client.config;
+
+
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@EnableFeignClients("com.zhongshu.reward.client.service")
+@ComponentScan({"com.zhongshu.reward.client"})
+public class RewardClientConfiguration {
+}

+ 8 - 0
RewardClient/src/main/java/com/zhongshu/reward/client/config/RewardServerConfiguration.java

@@ -0,0 +1,8 @@
+package com.zhongshu.reward.client.config;
+
+
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+public class RewardServerConfiguration {
+}

二进制
RewardClient/target/classes/com/zhongshu/reward/client/config/RewardClientConfiguration.class


二进制
RewardClient/target/classes/com/zhongshu/reward/client/config/RewardServerConfiguration.class


+ 155 - 0
RewardServer/pom.xml

@@ -0,0 +1,155 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>com.github.microservice</groupId>
+		<artifactId>PParent</artifactId>
+		<version>1.0.0-SNAPSHOT</version>
+		<relativePath>../../../super/PParent</relativePath>
+	</parent>
+
+
+	<groupId>com.zhongshu</groupId>
+	<artifactId>RewardServer</artifactId>
+	<name>RewardServer</name>
+	<description>返利中心</description>
+	<properties>
+		<java.version>11</java.version>
+	</properties>
+	<dependencies>
+
+
+		<dependency>
+			<groupId>com.github.microservice</groupId>
+			<artifactId>PCore</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<!--应用中心客户端-->
+		<dependency>
+			<groupId>com.github.microservice.components</groupId>
+			<artifactId>ApplicationClient</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+
+
+		<dependency>
+			<groupId>com.zswl.cloud.shop</groupId>
+			<artifactId>zswl-cloud-shop-client</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>com.github.microservice.components</groupId>
+			<artifactId>MongodbData</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+		<dependency>
+			<groupId>com.github.microservice.components</groupId>
+			<artifactId>RedisData</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>com.alibaba</groupId>
+			<artifactId>fastjson</artifactId>
+			<version>2.0.38</version>
+		</dependency>
+        <dependency>
+            <groupId>com.aliyun.oss</groupId>
+            <artifactId>aliyun-sdk-oss</artifactId>
+            <version>3.14.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.zhongshu</groupId>
+            <artifactId>RewardClient</artifactId>
+			<version>${project.version}</version>
+        </dependency>
+
+		<dependency>
+			<groupId>com.github.microservice.netdisk</groupId>
+			<artifactId>NetDiskClient</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+            <version>2.0.38</version>
+        </dependency>
+        <dependency>
+            <groupId>com.alibaba.fastjson2</groupId>
+            <artifactId>fastjson2</artifactId>
+            <version>2.0.38</version>
+        </dependency>
+
+		<dependency>
+			<groupId>com.github.microservice.components</groupId>
+			<artifactId>PushCenterClient</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+
+
+<!--		<dependency>-->
+<!--			<groupId>org.redisson</groupId>-->
+<!--			<artifactId>redisson-spring-boot-starter</artifactId>-->
+<!--			<version>3.17.1</version> &lt;!&ndash; 请根据实际情况选择版本 &ndash;&gt;-->
+<!--		</dependency>-->
+
+
+    </dependencies>
+
+	<build>
+
+
+		<plugins>
+			<plugin>
+				<groupId>org.springframework.boot</groupId>
+				<artifactId>spring-boot-maven-plugin</artifactId>
+				<configuration>
+					<fork>true</fork>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>repackage</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+
+
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-jar-plugin</artifactId>
+				<configuration>
+					<excludes>
+						<!-- This is where the exclusion occurs -->
+						<exclude>**/application-*.yml</exclude>
+					</excludes>
+				</configuration>
+			</plugin>
+
+		</plugins>
+
+		<!-- properties 取 pom 配置 -->
+		<resources>
+			<resource>
+				<directory>src/main/java</directory>
+				<includes>
+					<include>**/*.xml</include>
+				</includes>
+			</resource>
+			<resource>
+				<directory>src/main/resources</directory>
+				<filtering>true</filtering>
+			</resource>
+		</resources>
+
+	</build>
+</project>

+ 21 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/RewardServerApplication.java

@@ -0,0 +1,21 @@
+package com.zhongshu.reward.server;
+
+import com.github.microservice.app.annotation.EnableApplicationClient;
+import com.github.microservice.core.boot.ApplicationBootSuper;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+
+@SpringBootApplication
+@EnableApplicationClient
+@EnableScheduling
+@ComponentScan("com.zhongshu.reward.server.core")
+public class RewardServerApplication extends ApplicationBootSuper {
+
+	public static void main(String[] args) {
+		SpringApplication.run(RewardServerApplication.class, args);
+	}
+
+}

+ 11 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/AuthConfig.java

@@ -0,0 +1,11 @@
+package com.zhongshu.reward.server.core.config;
+
+import com.github.microservice.auth.config.AuthClientConfiguration;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+
+@Configuration
+@Import(AuthClientConfiguration.class)
+public class AuthConfig {
+}

+ 10 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/ClientConfig.java

@@ -0,0 +1,10 @@
+package com.zhongshu.reward.server.core.config;
+
+import com.zhongshu.reward.client.config.RewardServerConfiguration;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Configuration
+@Import(RewardServerConfiguration.class)
+public class ClientConfig {
+}

+ 14 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/MVCConfig.java

@@ -0,0 +1,14 @@
+package com.zhongshu.payment.server.core.config;
+
+import com.github.microservice.core.mvc.MVCConfiguration;
+import com.github.microservice.core.mvc.MVCResponseConfiguration;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+
+@Import({MVCConfiguration.class, MVCResponseConfiguration.class})
+@Configuration
+public class MVCConfig {
+
+}

+ 13 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/MongoConfig.java

@@ -0,0 +1,13 @@
+package com.zhongshu.reward.server.core.config;
+
+
+import com.github.microservice.components.data.mongo.mongo.config.MongoConfiguration;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
+
+@Configuration
+@Import(MongoConfiguration.class)
+@EnableMongoRepositories("com.zhongshu.payment.server.core.dao")
+public class MongoConfig {
+}

+ 37 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/PaymentConfig.java

@@ -0,0 +1,37 @@
+package com.zhongshu.payment.server.core.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+@ConfigurationProperties(prefix = "payment")
+public class PaymentConfig {
+
+    private String mer_no;
+
+    private String tid;
+
+    private String accesser_id;
+
+    private String key;
+
+    private String h5_page_url;
+
+    private String pc_page_url;
+
+    private String interface_url;
+
+    private String pay_key;
+
+    private String pay_url;
+
+    private String withdrawals_url;
+
+    private String withdrawals_key;
+
+    private String notifyUrl;
+
+
+}

+ 9 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/PushConfig.java

@@ -0,0 +1,9 @@
+package com.zhongshu.reward.server.core.config;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@ComponentScan("com.github.microservice.components.push")
+public class PushConfig {
+}

+ 26 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/RedisConfig.java

@@ -0,0 +1,26 @@
+package com.zhongshu.payment.server.core.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.connection.RedisConnectionFactory;
+import org.springframework.data.redis.core.RedisTemplate;
+import org.springframework.data.redis.serializer.StringRedisSerializer;
+
+@Configuration
+public class RedisConfig {
+    /**
+     * 自定义Key为String类型Value为Object类型的Redis操作模板
+     */
+    @Bean(name = "redisTemplate")
+    public RedisTemplate<String, Object> redisTemplate(RedisConnectionFactory redisConnectionFactory){
+        RedisTemplate<String, Object> redisTemplate = new RedisTemplate<>();
+        redisTemplate.setConnectionFactory(redisConnectionFactory);
+
+        // key采用String的序列化方式
+        redisTemplate.setKeySerializer(new StringRedisSerializer());
+        // hash的key也采用String的序列化方式
+        redisTemplate.setHashKeySerializer(new StringRedisSerializer());
+ 
+        return redisTemplate;
+    }
+}

+ 27 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/SchedulingConfig.java

@@ -0,0 +1,27 @@
+package com.zhongshu.reward.server.core.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.scheduling.annotation.EnableScheduling;
+import org.springframework.scheduling.annotation.SchedulingConfigurer;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+import org.springframework.scheduling.config.ScheduledTaskRegistrar;
+
+@Configuration
+@EnableScheduling
+public class SchedulingConfig implements SchedulingConfigurer {
+
+    @Bean
+    public ThreadPoolTaskScheduler taskScheduler() {
+        ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
+        scheduler.setPoolSize(5); // 设置线程池大小
+        scheduler.setThreadNamePrefix("scheduled-task-");
+        scheduler.setRemoveOnCancelPolicy(true);
+        return scheduler;
+    }
+
+    @Override
+    public void configureTasks(ScheduledTaskRegistrar taskRegistrar) {
+        taskRegistrar.setTaskScheduler(taskScheduler());
+    }
+}

+ 31 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/SnowFlakeConfig.java

@@ -0,0 +1,31 @@
+package com.zhongshu.reward.server.core.config;
+
+import cn.hutool.core.lang.Snowflake;
+import cn.hutool.core.util.IdUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.cloud.client.ServiceInstance;
+import org.springframework.cloud.client.discovery.DiscoveryClient;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import java.util.List;
+
+@Configuration
+public class SnowFlakeConfig {
+    @Autowired
+    DiscoveryClient discoveryClient;
+
+    @Value("${spring.application.name}")
+    private String applicationName;
+
+
+    @Bean
+    public Snowflake snowflake(){
+
+        List<ServiceInstance> instances = discoveryClient.getInstances(applicationName);
+
+        return IdUtil.getSnowflake(instances.size());
+    }
+
+}

+ 46 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/SwagerConfig.java

@@ -0,0 +1,46 @@
+package com.zhongshu.reward.server.core.config;
+
+import com.github.microservice.components.swagger.config.SwaggerConfiguration;
+import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Import;
+import springfox.documentation.builders.ApiInfoBuilder;
+import springfox.documentation.builders.PathSelectors;
+import springfox.documentation.builders.RequestHandlerSelectors;
+import springfox.documentation.service.ApiInfo;
+import springfox.documentation.spi.DocumentationType;
+import springfox.documentation.spring.web.plugins.Docket;
+import springfox.documentation.swagger2.annotations.EnableSwagger2;
+
+@Configuration
+@EnableSwagger2
+@Import(SwaggerConfiguration.class)
+public class SwagerConfig {
+
+    @Value("${spring.application.name}")
+    private String applicationName;
+    @Bean
+    public Docket defaultApi() {
+        return new Docket(DocumentationType.SWAGGER_2)
+                .host("https://api.dev.zonelife.cn/")
+                .apiInfo(apiInfo())
+                .groupName(applicationName)
+                .select()
+                // 添加@Api注解才显示
+                .apis(RequestHandlerSelectors.withClassAnnotation(Api.class))
+                .paths(PathSelectors.any())
+                .build();
+    }
+
+    /**
+     * swagger-api接口描述信息
+     */
+    private ApiInfo apiInfo() {
+        return new ApiInfoBuilder()
+                .title(applicationName)
+                .version("1.0.0")
+                .build();
+    }
+}

+ 65 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/WeChatConfig.java

@@ -0,0 +1,65 @@
+package com.zhongshu.reward.server.core.config;
+
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+@Data
+@Component
+//@Configuration
+@ConfigurationProperties(prefix = "wechat")
+public class WeChatConfig {
+
+    /**
+     * 商户号
+     */
+    private String merchantId;
+
+    /**
+     * 商户API私钥
+     */
+    private String privateKey;
+
+    /**
+     * 商户证书序列号
+     */
+    private String merchantSerialNumber;
+
+    /**
+     * 商户APIV3密钥
+     */
+    private String apiV3Key;
+
+    /**
+     * 资金类型 (归类)
+     */
+    private String transferSceneId;
+
+    /**
+     * 商户id
+     */
+    private String appid;
+
+//    @Bean
+//    public TransferBatchService index() {
+//        // 初始化商户配置
+//        Config config =
+//                new RSAAutoCertificateConfig.Builder()
+//                        .merchantId(merchantId)
+//                        // 使用 com.wechat.pay.java.core.util
+//                        // 中的函数从本地文件中加载商户私钥,商户私钥会用来生成请求的签名
+//                        .privateKey(privateKey)
+//                        .merchantSerialNumber(merchantSerialNumber)
+//                        .apiV3Key(apiV3Key)
+//                        .build();
+//
+////        com.wechat.pay.java.core.util.PemUtil
+//
+//        // 初始化服务
+//        return new TransferBatchService.Builder().config(config).build();
+//
+//
+//    }
+
+}

+ 11 - 0
RewardServer/src/main/java/com/zhongshu/reward/server/core/config/feign/ZswlCloudShopConfig.java

@@ -0,0 +1,11 @@
+package com.zhongshu.reward.server.core.config.feign;
+
+import org.springframework.cloud.openfeign.EnableFeignClients;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@EnableFeignClients("com.zswl.cloud.shop.client.service")
+@ComponentScan("com.zswl.cloud.shop.client")
+@Configuration
+public class ZswlCloudShopConfig {
+}

+ 41 - 0
RewardServer/src/main/resources/application-dev.yml

@@ -0,0 +1,41 @@
+spring:
+  data:
+    mongodb:
+      #uri: mongodb://paymentcenter:paymentcenter@192.168.110.241:30117,192.168.110.241:30118,192.168.110.241:30119/paymentcenter?replicaSet=MongoSetsShard1
+      uri: mongodb://rewardcenter:rewardcenter@192.168.110.241:30117,192.168.110.241:30118,192.168.110.241:30119/rewardcenter?replicaSet=MongoSetsShard1
+      auto-index-creation: true
+  redis:
+    host: 192.168.110.241
+    port: 6379
+    database: 6
+
+swagger:
+  packageName: "com.zhongshu.payment.core.controller"
+  title: ${project.artifactId}
+  description: ${project.description}
+  version: "1.0"
+  enable: true
+
+payment:
+  mer_no: 89852017372911Y
+  tid: PEYAH8X1
+  accesser_id: GZHYXHSH52011
+  key: udik876ehjde32dU61edsxsf
+  h5_page_url: https://selfapply-test.chinaums.com/self-sign-mobile/#/chooseRole
+  pc_page_url: https://selfapply-test.chinaums.com/self-sign-web/#/verify
+  interface_url: https://selfapply-test.chinaums.com/self-contract-nmrs/interface/autoReg
+#  interface_url: http://192.168.110.241:7300/mock/654babd538574f002773e5f8/dev/autoReg
+#  interface_url: https://yinshangpai.chinaums.com/self-contract-nmrs/interface/autoReg
+  pay_url: https://dhjt-uat.chinaums.com/queryService/UmsWebPayPlugins
+  pay_key: 11111111111111111111111111111111
+  withdrawals_url: https://dhjt.chinaums.com/entryService/unified-withdrawals-api
+  # 提现秘钥
+  withdrawals_key: 11111111111111111111111111111111
+  notifyUrl: https://api.dev.zonelife.cn/springbatchservice/pay/sync
+#  pay_url: https://dhjt-api.chinaums.com/queryService/UmsWebPayPlugins
+
+
+
+#knife4j:
+#debug: true
+#  production: false

+ 64 - 0
RewardServer/src/main/resources/application.yml

@@ -0,0 +1,64 @@
+#Web?????
+server:
+  port: 9403
+
+#??????
+spring:
+  cloud:
+    consul:
+      discovery:
+        prefer-ip-address: true # ip????
+        hostname: localhost    # ??????
+        port: ${server.port}
+        health-check-path: /actuator/health  # ??????
+        health-check-interval: 10s   # ??10s??
+        register: true  # ????
+        service-name: ${spring.application.name} # ????
+        instance-id: ${spring.application.name}:${server.port}
+      host: ${ApplicationCenter.url}
+      port: ${ApplicationCenter.port}
+    #kafka
+    stream:
+      kafka:
+        binder:
+          brokers: ${Kafka.brokers}
+          replication-factor: 1
+      function:
+        definition: userLogStreamConsumer;vipUserStreamConsumer
+      bindings:
+        userLogStreamConsumer-in-0:
+          destination: UserLogStream
+          group: ${project.artifactId}
+        vipUserStreamConsumer-in-0:
+          destination: VipUserStream
+          group: ${project.artifactId}
+    bus:
+      enabled: true
+  #??zipkin???????
+  zipkin:
+    base-url: ${Zipkin.baseUrl}
+    enabled: true
+    sender:
+      type: web
+  sleuth:
+    sampler:
+      probability: ${Zipkin.sampler.probability}
+
+
+
+
+wechat:
+  merchantId: 111
+  privateKey: 1212
+  merchantSerialNumber: 111
+  apiV3Key: 1111
+  appid: 1111
+  transferSceneId: 1111
+
+
+
+#????????
+logging:
+  file:
+    name: logs/${project.artifactId}.log
+#debug: true

+ 23 - 0
RewardServer/src/main/resources/bootstrap.yml

@@ -0,0 +1,23 @@
+###需拷贝到每一个模块下
+
+spring:
+  mvc:
+    pathmatch:
+      matching-strategy: ant_path_matcher
+  main: #允许循环引用
+    allow-circular-references: true
+  # 应用名
+  application:
+    name: ${project.artifactId}
+  # 当前读取配置文件的类型
+  profiles:
+    active: ${spring.profiles.active}
+  #配置中心
+  cloud:
+    config:
+      uri: ${ConfigCenter.url}
+      name: ${project.artifactId},ConfigCenter
+  autoconfigure:
+    exclude:
+      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+      - org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration

+ 402 - 0
RewardServer/src/test/java/com/zhongshu/payment/server/ServerApplicationTests.java

@@ -0,0 +1,402 @@
+package com.zhongshu.payment.server;
+
+import cn.hutool.core.lang.Snowflake;
+import cn.hutool.json.JSONUtil;
+import com.github.microservice.auth.client.content.ResultContent;
+import com.zhongshu.payment.client.model.order.AdminSeachOrderModel;
+import com.zhongshu.payment.client.model.order.v2.*;
+import com.zhongshu.payment.client.model.payment.CreateRequestModel;
+import com.zhongshu.payment.client.model.payment.CreateResponseModel;
+import com.zhongshu.payment.client.model.payment.SubOrdersConfirmResponseModel;
+import com.zhongshu.payment.client.model.payment.withdrawals.*;
+import com.zhongshu.payment.client.model.payment.zswl.ApplyWithdrawalsModel;
+import com.zhongshu.payment.client.service.v2.OrderService2;
+import com.zhongshu.payment.client.type.Channel;
+import com.zhongshu.payment.client.type.JobFlowMap;
+import com.zhongshu.payment.client.type.OrderType;
+import com.zhongshu.payment.server.core.api.PaymentApi;
+import com.zhongshu.payment.server.core.api.PaymentApi2;
+import com.zhongshu.payment.server.core.api.WithdrawalsApi;
+import com.zhongshu.payment.server.core.config.PaymentConfig;
+import com.zhongshu.payment.server.core.dao.*;
+import com.zhongshu.payment.server.core.domain.Complex;
+import com.zhongshu.payment.server.core.domain.Goods;
+import com.zhongshu.payment.server.core.domain.PaymentBind;
+import com.zhongshu.payment.server.core.domain.PaymentInfo;
+import com.zhongshu.payment.server.core.service.v2.PaymentServerImpl2;
+import com.zhongshu.payment.server.core.timer.ComplexTimer;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.mongodb.core.MongoTemplate;
+import org.springframework.util.Assert;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+@SpringBootTest
+public class ServerApplicationTests {
+
+    private static final Logger log = LoggerFactory.getLogger(ServerApplicationTests.class);
+    @Autowired
+    Snowflake snowflake;
+
+    @Autowired
+    PaymentApi paymentApi;
+
+    @Autowired
+    WithdrawalsApi withdrawalsApi;
+
+    @Autowired
+    PaymentConfig paymentConfig;
+
+
+    @Autowired
+    PaymentServerImpl2 paymentService2;
+
+    @Autowired
+    OrderService2 orderService2;
+
+    @Autowired
+    PaymentBindDao paymentBindDao;
+
+    @Autowired
+    ApiLogDao apiLogDao;
+
+    @Autowired
+    GoodsDao goodsDao;
+
+    @Autowired
+    ComplexDao complexDao;
+
+    @Autowired
+    PaymentDao paymentDao;
+
+    @Autowired
+    Order2Dao order2Dao;
+
+    @Autowired
+    TransferDetailDao transferDetailDao;
+    @Autowired
+    private TransferDao transferDao;
+
+    @Autowired
+    ComplexTimer complexTimer;
+
+
+
+    @Test
+    public void payOrder() {
+
+        orderService2.findChannelGoods(JobFlowMap.Hotel,"");
+    }
+
+    @Test
+    public void query() {
+
+        AdminSeachOrderModel adminSeachOrderModel = new AdminSeachOrderModel();
+        adminSeachOrderModel.setPlatInter(true);
+        adminSeachOrderModel.setOrderType(OrderType.REFUNDED);
+        orderService2.adminSearch(adminSeachOrderModel);
+
+    }
+
+    @Test
+    public void create() {
+        Complex byAccesserUserId = complexDao.findByAccesser_user_id("65aa17f980f6d56f44643a1f");
+        Assert.isTrue(byAccesserUserId.isFinish(), "签约未完成");
+        String merNo = byAccesserUserId.getMer_no();
+//        String mappNo = byAccesserUserId.getMapp_info_list().get(0).getMapp_no();
+
+        GetMoneyDetailRequest getDetailRequest = new GetMoneyDetailRequest();
+        getDetailRequest.setTransMid(merNo);
+//        getDetailRequest.setMappId(mappNo);
+        GetMoneyDetailResponse moneyDetail = withdrawalsApi.getMoneyDetail(getDetailRequest);
+
+//        String quotaUse = moneyDetail.getData().get(0).getQuotaUse();
+//        CountDetail countDetail = new CountDetail();
+//        countDetail.setQuotaUse(quotaUse);
+    }
+
+
+    @Test
+    public void refund() {
+
+//        PaymentBind bind = paymentBindDao.findByEpId("Platform");
+//        PaymentInfo paymentInfo = bind.getPaymentInfo();
+//////
+//////
+//        RefundRequestModel requestModel = new RefundRequestModel();
+//        requestModel.setPlatformAmount(0L);
+//        requestModel.setRefundDesc("测试退款,未分账退款");
+//        requestModel.setRefundOrderId("42171772810695244943360");
+//        requestModel.setRefundAmount(10L);
+//        requestModel.setBillDate("2024-03-27");
+//        requestModel.setTid("PEYAH8X1");
+//        requestModel.setMerOrderId("89852017372911Y");
+//        CreateRequestModel.SubOrders subOrders = new CreateRequestModel.SubOrders();
+//        subOrders.setMid("89852015995900D");
+//        subOrders.setTotalAmount(10L);
+//
+//
+//        requestModel.setSubOrders(List.of(subOrders));
+//
+//
+//        PaymentApi2 paymentApi2 = new PaymentApi2(paymentInfo, apiLogDao);
+//        RefundResponseModel refund = paymentApi2.refund(requestModel);
+//        System.out.println(refund);
+
+        RefundParam2Model refundParam2Model = new RefundParam2Model();
+        refundParam2Model.setRefundAmount(BigDecimal.valueOf(10));
+        refundParam2Model.setBuyShopAmount(BigDecimal.valueOf(10));
+        refundParam2Model.setPlatformAmount(BigDecimal.valueOf(0));
+        refundParam2Model.setUseShopAmount(BigDecimal.valueOf(0));
+
+//        Goods goods = goodsDao.findById("6603823d85012d0d233372b2").get();
+//        paymentService2.refund(refundParam2Model, goods);
+
+        paymentService2.close("1788021041601630208", "660a534e32e63427d1a09c2a");
+
+    }
+
+    @Test
+    public void close() {
+
+
+        PaymentBind bind = paymentBindDao.findByChannel(Channel.ZhongShu);
+        PaymentInfo paymentInfo = bind.getPaymentInfo();
+        CreateRequestModel createRequestModel = new CreateRequestModel("wx.unifiedOrder");
+        createRequestModel.setExpireTime("2024-03-30 12:12:12");
+
+        createRequestModel.setMerOrderId("4217" + "22222222222222");
+        createRequestModel.setBusiOrderId("1111111111111111");
+        createRequestModel.setMid("89852017372911Y");
+        createRequestModel.setTid("PEYAH8X1");
+        createRequestModel.setTotalAmount(10L);
+        createRequestModel.setSubOpenId("oZJ7S4uer9LHDvLrIWmDQRuFtk98");
+        createRequestModel.setEmployeeNo("gonghao");
+//        createRequestModel.setNotifyUrl(paymentInfo.getNotifyUrl());
+//        createRequestModel.setReturnUrl("回调链接");
+        // 是否分账
+        createRequestModel.setDivisionFlag(false);
+        // 异步分账
+
+
+        PaymentApi2 paymentApi2 = new PaymentApi2(paymentInfo, apiLogDao);
+        CreateResponseModel responseBaseModel = paymentApi2.creatOrder(createRequestModel);
+        System.out.println(responseBaseModel);
+    }
+
+    @Test
+    public void ttt() {
+
+        AdminSeachOrderModel adminSeachOrderModel = new AdminSeachOrderModel();
+        adminSeachOrderModel.setNoOrGName("1772440085801148416");
+        adminSeachOrderModel.setShopId("");
+
+        ResultContent<Page<OrderResult2Model>> pageResultContent = orderService2.adminSearch(adminSeachOrderModel);
+
+        System.out.println(pageResultContent.getContent());
+
+    }
+
+    @Test
+    public void ttt2() {
+
+        AdminSeachOrderModel adminSeachOrderModel = new AdminSeachOrderModel();
+        adminSeachOrderModel.setOrderType(OrderType.WAIT_USE);
+        ResultContent<Page<OrderResult2Model>> pageResultContent = orderService2.adminSearch(adminSeachOrderModel);
+        System.out.println(pageResultContent);
+//        ResultContent<SubOrdersConfirmResponseModel> subOrdersConfirmResponseModelResultContent = paymentService2.subOrdersConfirm("66042b98aefddc65323e187e", "6580f9b9cae1326607eaa24a");
+//        subOrdersConfirmResponseModelResultContent.getContent();
+        List<Goods> distinctByGoodsIdAndUserId = goodsDao.findByGoodsIdAndUserId("1772928077253447680", "65fe583d74d67a7dbd842b45");
+        System.out.println(distinctByGoodsIdAndUserId.size());
+
+
+    }
+
+
+    @Test
+    public void videoWithdrawals() {
+
+
+    }
+
+
+    @Test
+    public void batchQueryRequest() {
+        BatchQueryRequest batchQueryRequest = new BatchQueryRequest();
+        batchQueryRequest.setBatchNo("17453442885887262722");
+        batchQueryRequest.setTxnDate("20240417");
+        batchQueryRequest.setTransMid("89852017372912P");
+
+        BatchQueryResponse withdrawals = withdrawalsApi.batchQuery(batchQueryRequest);
+        log.info("响应:{}", JSONUtil.toJsonStr(withdrawals));
+
+    }
+
+
+    @Test
+    public void tt112t() {
+
+        ApplyWithdrawalsModel applyWithdrawalsModel = new ApplyWithdrawalsModel();
+        applyWithdrawalsModel.setPlatform(false);
+        applyWithdrawalsModel.setChannel(Channel.ZhongShu);
+        applyWithdrawalsModel.setShopId("6605627832e63427d1a08714");
+
+        paymentService2.applicationWithdrawals(applyWithdrawalsModel);
+
+        ApplyWithdrawalsModel applyWithdrawalsModel1 = new ApplyWithdrawalsModel();
+        applyWithdrawalsModel1.setPlatform(true);
+        applyWithdrawalsModel1.setChannel(Channel.ZhongShu);
+        applyWithdrawalsModel1.setShopId(Channel.ZhongShu.name());
+
+        paymentService2.applicationWithdrawals(applyWithdrawalsModel);
+
+//        for (TransferDetail transferDetail : transferDetailDao.findByShopMid("89852017372912Y")) {
+//
+//            List<Transfer> byOrderNo = transferDao.findByOrderNo(transferDetail.getOrderNo());
+//            byOrderNo.forEach(it->it.setChannel(Channel.GuiDa));
+//            transferDao.saveAll(byOrderNo);
+//        }
+
+
+    }
+
+
+    @Test
+    public void testw() {
+
+
+        WithdrawalsRequest withdrawalsRequest = new WithdrawalsRequest();
+//        withdrawalsRequest.setTotalAmt("8");
+//        withdrawalsRequest.setTotalQty("1");
+        withdrawalsRequest.setTransMid("89852017372911Y");
+        withdrawalsRequest.setBatchNo(snowflake.nextIdStr());
+        WithdrawalsRequest.Deatil deatil = new WithdrawalsRequest.Deatil();
+        deatil.setTxnNo(snowflake.nextIdStr());
+        deatil.setMerOrderId("42171773171497466568704");
+        deatil.setClearDate("20240328");
+        deatil.setMerNo("89852015995900D");
+        deatil.setMerName("宠物店");
+//        deatil.setTxnAmt("8");
+        withdrawalsRequest.setDetail(List.of(deatil));
+
+
+        WithdrawalsResponse withdrawals = withdrawalsApi.withdrawals(withdrawalsRequest);
+        System.out.println(withdrawals);
+
+
+    }
+
+
+    @Test
+    public void ttttt() {
+
+        ResultContent<SubOrdersConfirmResponseModel> subOrdersConfirmResponseModelResultContent = paymentService2.subOrdersConfirm("6605b6f666f86738e91987e9", "65fe7c9174d67a7dbd842b74");
+        System.out.println(subOrdersConfirmResponseModelResultContent);
+
+    }
+
+    @Test
+    public void transferDetailDao() {
+
+        WithdrawRequestModel withdrawRequestModel = new WithdrawRequestModel();
+        withdrawRequestModel.setShopId("6605627832e63427d1a08714");
+        withdrawRequestModel.setSize(10);
+        withdrawRequestModel.setPage(0);
+
+        transferDetailDao.shopTransferDetail(withdrawRequestModel);
+        ApplyWithdrawalsModel applyWithdrawalsModel = new ApplyWithdrawalsModel();
+        applyWithdrawalsModel.setPlatform(false);
+        applyWithdrawalsModel.setChannel(Channel.ZhongShu);
+        applyWithdrawalsModel.setShopId("661e1fad30fed626f8b583f8");
+        transferDetailDao.detailAccount(applyWithdrawalsModel);
+//        transferDetailDao.acount("6605627832e63427d1a08714");
+//        transferDetailDao.withdrawOrder(withdrawRequestModel);
+    }
+
+    @Test
+    public void tee() {
+//        AdminSeachOrderModel adminSeachOrderModel = new AdminSeachOrderModel();
+//        adminSeachOrderModel.setOrderType(OrderType.APPLY_REFUND);
+//        order2Dao.findAdminOrder(adminSeachOrderModel, PageRequest.of(0, 10));
+
+//        ResultContent resultContent = paymentService2.applicationWithdrawals("PLATFORM");
+        transferDetailDao.acountDetail("6603b43c32e63427d1a07ab6");
+    }
+
+    @Test
+    public void transfer() {
+
+        ResultContent<GoodsResultModel> goodsResultModelResultContent = orderService2.goodsDetail2("1777974122433875968", "1777974122842091520");
+        System.out.println(goodsResultModelResultContent.getContent());
+
+    }
+
+    @Autowired
+    MongoTemplate mongoTemplate;
+
+    @Test
+    public void time() {
+//        goods.goodsState": "WAIT_USE", "transfer": false, "pay": true
+//
+//        Aggregation aggregation = newAggregation(
+//                Aggregation.lookup("goods", "orderNo", "orderNo", "goods"),
+//                Aggregation.match(Criteria.where("goods.validDay").ne(null).and("goods.goodsState").is("WAIT_USE").and("pay").is(true)),
+//                Aggregation.project()
+//                        .and("createTime").as("createTime")
+//                        .and("goodsId").as("goodsId")
+//                        .and("orderNo").as("orderNo")
+//                        .and("transfer").as("transfer")
+//                        .and("platform").as("platform")
+//                        .and("buyShop").as("buyShop")
+//                        .and("useShop").as("useShop")
+//                        .and("shopId").as("goods.shopId")
+//                        .andExpression("{$add: {{ $arrayElemAt: {'$goods.createTime', 0} },{ $multiply: {{ $arrayElemAt: {'$goods.validDay', 0} }, 24 * 60 * 60 * 1000} }}}").as("time"),
+//                Aggregation.match(Criteria.where("time").lte(new Date().getTime()))
+//        );
+//
+//        mongoTemplate.aggregate(aggregation, "transfer", Document.class).getMappedResults();
+
+        for (TransferModel transferModel : transferDao.validDayTimeOute()) {
+            System.out.println(transferModel);
+        }
+
+    }
+
+
+    @Test
+    public void guiDaPayment() {
+
+
+        CreateRequestModel createRequestModel = new CreateRequestModel("wx.miniPreOrder");
+        createRequestModel.setAsynDivisionFlag(true);
+        createRequestModel.setSubOpenId("1784754317116801025");
+        createRequestModel.setDivisionFlag(true);
+        createRequestModel.setMerOrderId("42171784754317116801025");
+        createRequestModel.setMid("89852017372912Y");
+        createRequestModel.setOrderDesc("文创商品");
+        createRequestModel.setPlatformAmount(0L);
+        createRequestModel.setSubOpenId("ovIOO4spgsdv4vNtrs0j3_VDkKLY");
+        CreateRequestModel.SubOrders subOrders = new CreateRequestModel.SubOrders();
+        subOrders.setMid("89852015995900D");
+        subOrders.setTotalAmount(10L);
+        createRequestModel.setSubOrders(List.of(subOrders));
+        createRequestModel.setTid("NT4RL61Q");
+        createRequestModel.setTotalAmount(10L);
+        createRequestModel.setUserId("65fe583d74d67a7dbd842b45");
+
+
+        paymentApi.creatOrder(createRequestModel);
+
+
+    }
+
+
+}

+ 113 - 0
RewardServer/target/classes/META-INF/spring-configuration-metadata.json

@@ -0,0 +1,113 @@
+{
+  "groups": [
+    {
+      "name": "payment",
+      "type": "com.zhongshu.payment.server.core.config.PaymentConfig",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "wechat",
+      "type": "com.zhongshu.reward.server.core.config.WeChatConfig",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    }
+  ],
+  "properties": [
+    {
+      "name": "payment.accesser-id",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.h5-page-url",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.interface-url",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.key",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.mer-no",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.notify-url",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.pay-key",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.pay-url",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.pc-page-url",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.tid",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.withdrawals-key",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "payment.withdrawals-url",
+      "type": "java.lang.String",
+      "sourceType": "com.zhongshu.payment.server.core.config.PaymentConfig"
+    },
+    {
+      "name": "wechat.api-v3-key",
+      "type": "java.lang.String",
+      "description": "商户APIV3密钥",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    },
+    {
+      "name": "wechat.appid",
+      "type": "java.lang.String",
+      "description": "商户id",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    },
+    {
+      "name": "wechat.merchant-id",
+      "type": "java.lang.String",
+      "description": "商户号",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    },
+    {
+      "name": "wechat.merchant-serial-number",
+      "type": "java.lang.String",
+      "description": "商户证书序列号",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    },
+    {
+      "name": "wechat.private-key",
+      "type": "java.lang.String",
+      "description": "商户API私钥",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    },
+    {
+      "name": "wechat.transfer-scene-id",
+      "type": "java.lang.String",
+      "description": "资金类型 (归类)",
+      "sourceType": "com.zhongshu.reward.server.core.config.WeChatConfig"
+    }
+  ],
+  "hints": []
+}

+ 41 - 0
RewardServer/target/classes/application-dev.yml

@@ -0,0 +1,41 @@
+spring:
+  data:
+    mongodb:
+      #uri: mongodb://paymentcenter:paymentcenter@192.168.110.241:30117,192.168.110.241:30118,192.168.110.241:30119/paymentcenter?replicaSet=MongoSetsShard1
+      uri: mongodb://rewardcenter:rewardcenter@192.168.110.241:30117,192.168.110.241:30118,192.168.110.241:30119/rewardcenter?replicaSet=MongoSetsShard1
+      auto-index-creation: true
+  redis:
+    host: 192.168.110.241
+    port: 6379
+    database: 6
+
+swagger:
+  packageName: "com.zhongshu.payment.core.controller"
+  title: RewardServer
+  description: 返利中心
+  version: "1.0"
+  enable: true
+
+payment:
+  mer_no: 89852017372911Y
+  tid: PEYAH8X1
+  accesser_id: GZHYXHSH52011
+  key: udik876ehjde32dU61edsxsf
+  h5_page_url: https://selfapply-test.chinaums.com/self-sign-mobile/#/chooseRole
+  pc_page_url: https://selfapply-test.chinaums.com/self-sign-web/#/verify
+  interface_url: https://selfapply-test.chinaums.com/self-contract-nmrs/interface/autoReg
+#  interface_url: http://192.168.110.241:7300/mock/654babd538574f002773e5f8/dev/autoReg
+#  interface_url: https://yinshangpai.chinaums.com/self-contract-nmrs/interface/autoReg
+  pay_url: https://dhjt-uat.chinaums.com/queryService/UmsWebPayPlugins
+  pay_key: 11111111111111111111111111111111
+  withdrawals_url: https://dhjt.chinaums.com/entryService/unified-withdrawals-api
+  # 提现秘钥
+  withdrawals_key: 11111111111111111111111111111111
+  notifyUrl: https://api.dev.zonelife.cn/springbatchservice/pay/sync
+#  pay_url: https://dhjt-api.chinaums.com/queryService/UmsWebPayPlugins
+
+
+
+#knife4j:
+#debug: true
+#  production: false

+ 64 - 0
RewardServer/target/classes/application.yml

@@ -0,0 +1,64 @@
+#Web?????
+server:
+  port: 9403
+
+#??????
+spring:
+  cloud:
+    consul:
+      discovery:
+        prefer-ip-address: true # ip????
+        hostname: localhost    # ??????
+        port: ${server.port}
+        health-check-path: /actuator/health  # ??????
+        health-check-interval: 10s   # ??10s??
+        register: true  # ????
+        service-name: ${spring.application.name} # ????
+        instance-id: ${spring.application.name}:${server.port}
+      host: 192.168.110.241:8500,192.168.110.241:8501,192.168.110.241:8502
+      port: 8500
+    #kafka
+    stream:
+      kafka:
+        binder:
+          brokers: 192.168.110.241:9092,192.168.110.241:9093,192.168.110.241:9094
+          replication-factor: 1
+      function:
+        definition: userLogStreamConsumer;vipUserStreamConsumer
+      bindings:
+        userLogStreamConsumer-in-0:
+          destination: UserLogStream
+          group: RewardServer
+        vipUserStreamConsumer-in-0:
+          destination: VipUserStream
+          group: RewardServer
+    bus:
+      enabled: true
+  #??zipkin???????
+  zipkin:
+    base-url: http://192.168.110.241:9411
+    enabled: true
+    sender:
+      type: web
+  sleuth:
+    sampler:
+      probability: 0.01
+
+
+
+
+wechat:
+  merchantId: 111
+  privateKey: 1212
+  merchantSerialNumber: 111
+  apiV3Key: 1111
+  appid: 1111
+  transferSceneId: 1111
+
+
+
+#????????
+logging:
+  file:
+    name: logs/RewardServer.log
+#debug: true

+ 23 - 0
RewardServer/target/classes/bootstrap.yml

@@ -0,0 +1,23 @@
+###需拷贝到每一个模块下
+
+spring:
+  mvc:
+    pathmatch:
+      matching-strategy: ant_path_matcher
+  main: #允许循环引用
+    allow-circular-references: true
+  # 应用名
+  application:
+    name: RewardServer
+  # 当前读取配置文件的类型
+  profiles:
+    active: dev
+  #配置中心
+  cloud:
+    config:
+      uri: http://192.168.110.241:8000
+      name: RewardServer,ConfigCenter
+  autoconfigure:
+    exclude:
+      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+      - org.springframework.cloud.netflix.ribbon.RibbonAutoConfiguration

二进制
RewardServer/target/classes/com/zhongshu/payment/server/core/config/MVCConfig.class


二进制
RewardServer/target/classes/com/zhongshu/payment/server/core/config/PaymentConfig.class


二进制
RewardServer/target/classes/com/zhongshu/payment/server/core/config/RedisConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/RewardServerApplication.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/AuthConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/ClientConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/MongoConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/PushConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/SchedulingConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/SnowFlakeConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/SwagerConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/WeChatConfig.class


二进制
RewardServer/target/classes/com/zhongshu/reward/server/core/config/feign/ZswlCloudShopConfig.class


+ 21 - 0
pom.xml

@@ -0,0 +1,21 @@
+<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<groupId>com.zhongshu</groupId>
+	<artifactId>RewardCenter</artifactId>
+	<version>0.0.1-SNAPSHOT</version>
+	<name>RewardCenter</name>
+	<packaging>pom</packaging>
+	<description>RewardCenter</description>
+
+	<modules>
+		<module>RewardClient</module>
+		<module>RewardServer</module>
+
+	</modules>
+
+
+
+</project>