Browse Source

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

hy 7 years ago
parent
commit
9a6a2d07bc
14 changed files with 155 additions and 30 deletions
  1. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java
  2. 10 0
      applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java
  3. 13 2
      applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml
  4. 16 2
      applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml
  5. 6 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/docker/Dockerfile
  6. 8 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/po/BrokerMessagelog.java
  7. 0 24
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/po/MessageInfo.java
  8. 2 2
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/BaseRabbitReceiveService.java
  9. 30 0
      applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/TaskSchedulerConfig.java
  10. 2 0
      applications/transfers/transfers-server/src/main/resources/application.yml
  11. 13 0
      applications/transfers/transfers-server/src/main/resources/config/application-dev.yml
  12. 23 0
      applications/transfers/transfers-server/src/main/resources/config/application-docker-prod.yml
  13. 12 0
      applications/transfers/transfers-server/src/main/resources/config/application-docker-test.yml
  14. 10 0
      applications/transfers/transfers-server/src/main/resources/config/application-docker.yml

+ 10 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Paybalance.java

@@ -81,6 +81,16 @@ public class Paybalance extends CommonBaseEntity implements Serializable {
 
     private String pb_auditman;
 
+    private Double pb_amount;
+
+    public Double getPb_amount() {
+        return pb_amount;
+    }
+
+    public void setPb_amount(Double pb_amount) {
+        this.pb_amount = pb_amount;
+    }
+
     public Date getPb_auditdate() {
         return pb_auditdate;
     }

+ 10 - 0
applications/money/money-server/src/main/java/com/usoftchina/saas/money/po/Recbalance.java

@@ -81,6 +81,16 @@ public class Recbalance extends CommonBaseEntity implements Serializable {
 
     private Date rb_auditdate;
 
+    private Double rb_amount;
+
+    public Double getRb_amount() {
+        return rb_amount;
+    }
+
+    public void setRb_amount(Double rb_amount) {
+        this.rb_amount = rb_amount;
+    }
+
     public String getRb_auditman() {
         return rb_auditman;
     }

+ 13 - 2
applications/money/money-server/src/main/resources/mapper/PaybalanceMapper.xml

@@ -41,6 +41,8 @@
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="pb_auditdate" property="pb_auditdate" jdbcType="TIMESTAMP" />
     <result column="pb_auditman" property="pb_auditman" jdbcType="VARCHAR" />
+    <result column="pb_amount" property="pb_amount" jdbcType="DOUBLE" />
+    <result column="pd_paycode" property="pd_paycode" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -105,13 +107,13 @@
     pb_pdamount, pb_pbdamount, pb_preamount, pb_discounts, pb_havebalance,
      pb_status, pb_statuscode, pb_remark, paybalance.companyId,
     paybalance.updaterId,paybalance.updatedate, pb_text1, pb_text2, pb_text3, pb_text4, pb_text5, paybalance.creatorName,
-    paybalance.createTime, pb_auditdate, pb_auditman
+    paybalance.createTime, pb_auditdate, pb_auditman,pb_amount
   </sql>
   <sql id="left_Column_List">
     ve_leftamount
   </sql>
   <sql id="detail_Column_List">
-    pd_bankname,pd_amount,pd_paymethod,pd_remark
+    pd_bankname,pd_amount,pd_paymethod,pd_remark,pd_paycode
   </sql>
   <select id="selectList" resultMap="BaseResultMap">
     select
@@ -209,6 +211,9 @@
       <if test="updaterId != null">
         updaterId,
       </if>
+      <if  test="pb_amount != null">
+        pb_amount,
+      </if>
       <if test="pb_text1 != null">
         pb_text1,
       </if>
@@ -304,6 +309,9 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="pb_amount != null" >
+        #{pb_amount,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -384,6 +392,9 @@
       </if>
       <if test="pb_text5 != null">
         pb_text5 = #{pb_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="pb_amount != null">
+        pb_amount = #{pb_amount,jdbcType=DOUBLE},
       </if>
         pb_auditman = #{pb_auditman,jdbcType=VARCHAR},
         pb_auditdate = #{pb_auditdate,jdbcType=TIMESTAMP}

+ 16 - 2
applications/money/money-server/src/main/resources/mapper/RecbalanceMapper.xml

@@ -41,6 +41,8 @@
     <result column="createTime" property="createTime" jdbcType="TIMESTAMP" />
     <result column="rb_auditman" property="rb_auditman" jdbcType="VARCHAR" />
     <result column="rb_auditdate" property="rb_auditdate" jdbcType="TIMESTAMP" />
+    <result column="rb_amount" property="rb_amount" jdbcType="DOUBLE" />
+    <result column="rd_paycode" property="rd_paycode" jdbcType="VARCHAR" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -105,13 +107,13 @@
     rb_rdamount, rb_rbdamount, rb_preamount, rb_discounts, rb_havebalance, rb_status, rb_statuscode, rb_remark,
     recbalance.companyId,
     recbalance.updaterId,recbalance.updatedate, rb_text1, rb_text2, rb_text3, rb_text4, rb_text5,
-    recbalance.creatorName, recbalance.createTime, rb_auditman, rb_auditdate
+    recbalance.creatorName, recbalance.createTime, rb_auditman, rb_auditdate, rb_amount
   </sql>
   <sql id="left_Column_List">
     cu_leftamount
   </sql>
   <sql id="detail_Column_List">
-      rd_bankname,rd_amount,rd_paymethod,rd_paycode,rd_remark
+      rd_bankname,rd_amount,rd_paymethod,rd_paycode,rd_remark,rd_paycode
   </sql>
 
   <select id="selectByExample" parameterType="com.usoftchina.saas.money.po.RecbalanceExample" resultMap="BaseResultMap">
@@ -273,6 +275,9 @@
       <if test="createTime != null" >
         createTime,
       </if>
+      <if test="rb_amount != null">
+        rb_amount,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="rb_code != null">
@@ -347,6 +352,9 @@
       <if test="createTime != null" >
         #{createTime,jdbcType=TIMESTAMP},
       </if>
+      <if test="rb_amount != null">
+        #{rb_amount,jdbcType=DOUBLE},
+      </if>
     </trim>
     <selectKey resultType="Long" keyProperty="id" order="AFTER">
       SELECT LAST_INSERT_ID()
@@ -433,6 +441,9 @@
       <if test="record.rb_text5 != null">
         rb_text5 = #{record.rb_text5,jdbcType=VARCHAR},
       </if>
+      <if test="pb_amount != null">
+        pb_amount = #{pb_amount,jdbcType=DOUBLE},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -536,6 +547,9 @@
       </if>
       <if test="rb_text5 != null">
         rb_text5 = #{rb_text5,jdbcType=VARCHAR},
+      </if>
+      <if test="rb_amount != null">
+        rb_amount = #{rb_amount,jdbcType=DOUBLE},
       </if>
         rb_auditman = #{rb_auditman,jdbcType=VARCHAR},
       rb_auditdate = #{rb_auditdate,jdbcType=TIMESTAMP}

+ 6 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/docker/Dockerfile

@@ -0,0 +1,6 @@
+FROM frolvlad/alpine-oraclejdk8:slim
+VOLUME /tmp
+ADD transfers-server-1.0.0-SNAPSHOT.jar app.jar
+RUN sh -c 'touch /app.jar'
+ENV JAVA_OPTS=""
+ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

+ 8 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/po/BrokerMessagelog.java

@@ -0,0 +1,8 @@
+package com.usoftchina.saas.transfers.po;
+
+/**
+ * @author: guq
+ * @create: 2018-12-29 09:46
+ **/
+public class BrokerMessagelog {
+}

+ 0 - 24
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/po/MessageInfo.java

@@ -28,14 +28,6 @@ public class MessageInfo implements Serializable {
      * 业务单据ID
      */
     private String bizId;
-    /**
-     * 时间戳
-     */
-    private long timestamp;
-    /**
-     * 重试次数
-     */
-    private int retryCount;
 
     public String getMsgId() {
         return msgId;
@@ -77,22 +69,6 @@ public class MessageInfo implements Serializable {
         this.bizId = bizId;
     }
 
-    public long getTimestamp() {
-        return timestamp;
-    }
-
-    public void setTimestamp(long timestamp) {
-        this.timestamp = timestamp;
-    }
-
-    public int getRetryCount() {
-        return retryCount;
-    }
-
-    public void setRetryCount(int retryCount) {
-        this.retryCount = retryCount;
-    }
-
     public MessageInfo(String userId, String appId, String bizType, String bizId) {
         this.userId = userId;
         this.appId = appId;

+ 2 - 2
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/service/BaseRabbitReceiveService.java

@@ -188,7 +188,7 @@ public abstract class BaseRabbitReceiveService implements ChannelAwareMessageLis
      */
     private void sendDelayMessage(MessageInfo messageInfo, Channel channel, String queueName) {
         //重试次数+1
-        messageInfo.setRetryCount(messageInfo.getRetryCount() + 1);
+        /*messageInfo.setRetryCount(messageInfo.getRetryCount() + 1);
         String messageJson = JsonUtils.toJsonString(messageInfo);
         try {
             String dQueueName = getDelayQueueName(channel, queueName);
@@ -199,7 +199,7 @@ public abstract class BaseRabbitReceiveService implements ChannelAwareMessageLis
             LOGGER.info("发送延时消息[BaseRabbitReceiveService.sendDelayMessage].正常,messageJson:{},queueName:{}", messageJson, queueName);
         } catch (IOException e) {
             LOGGER.error("发送延时消息[BaseRabbitReceiveService.sendDelayMessage].异常,messageJson:{},queueName:{}", messageJson, queueName, e);
-        }
+        }*/
     }
 
     /**

+ 30 - 0
applications/transfers/transfers-server/src/main/java/com/usoftchina/saas/transfers/task/TaskSchedulerConfig.java

@@ -0,0 +1,30 @@
+package com.usoftchina.saas.transfers.task;
+
+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.config.ScheduledTaskRegistrar;
+
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+
+/**
+ * @author: guq
+ * @create: 2018-12-29 09:38
+ **/
+@Configuration
+@EnableScheduling
+public class TaskSchedulerConfig implements SchedulingConfigurer{
+
+    @Override
+    public void configureTasks(ScheduledTaskRegistrar scheduledTaskRegistrar) {
+        scheduledTaskRegistrar.setScheduler(taskScheduler());
+    }
+
+    @Bean(destroyMethod = "shutdown")
+    public Executor taskScheduler() {
+        return Executors.newScheduledThreadPool(100);
+    }
+
+}

+ 2 - 0
applications/transfers/transfers-server/src/main/resources/application.yml

@@ -26,6 +26,8 @@ spring:
   redis:
     host: 10.1.81.62
     port: 6379
+  profiles:
+    active: dev
 management:
   endpoints:
     web:

+ 13 - 0
applications/transfers/transfers-server/src/main/resources/config/application-dev.yml

@@ -0,0 +1,13 @@
+eureka:
+  instance:
+    leaseRenewalIntervalInSeconds: 10
+    health-check-url-path: /actuator/health
+    status-page-url-path: /actuator/info
+    prefer-ip-address: true
+    metadata-map:
+      user.name: ${spring.security.user.name}
+      user.password: ${spring.security.user.password}
+  client:
+    registryFetchIntervalSeconds: 5
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@127.0.0.1:8500/eureka/

+ 23 - 0
applications/transfers/transfers-server/src/main/resources/config/application-docker-prod.yml

@@ -0,0 +1,23 @@
+eureka:
+  instance:
+    hostname: saas-transfers-server
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    host: 10.10.100.103
+    port: 5672
+    virtual-host: docker
+    username: saas
+    password: select123***
+  datasource:
+    url: jdbc:mysql://10.10.100.18:3306/saas_biz?characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
+    username: saas
+    password: select111***
+  redis:
+    host: 10.10.100.173
+    port: 6379
+logging:
+  destination: 10.10.100.160:5000

+ 12 - 0
applications/transfers/transfers-server/src/main/resources/config/application-docker-test.yml

@@ -0,0 +1,12 @@
+eureka:
+  instance:
+    hostname: saas-transfers-server-test
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server-test:8515/eureka/
+spring:
+  rabbitmq:
+    virtual-host: test
+server:
+  port: 9015

+ 10 - 0
applications/transfers/transfers-server/src/main/resources/config/application-docker.yml

@@ -0,0 +1,10 @@
+eureka:
+  instance:
+    hostname: saas-transfers-server
+    prefer-ip-address: false
+  client:
+    serviceUrl:
+      defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@saas-eureka-server:8500/eureka/
+spring:
+  rabbitmq:
+    virtual-host: docker