Forráskód Böngészése

任务提交 使用线上环境作为开发环境 端口加入密码

秦国才 4 éve
szülő
commit
e97e625384

+ 7 - 0
common/fire-common/src/main/java/com/fire/common/es/config/EsConfig.java

@@ -21,6 +21,12 @@ public class EsConfig {
     @Value("${elasticsearch.rest.uris}")
     private String hostAndPorts;
 
+    @Value("${elasticsearch.rest.username}")
+    private String userName;
+
+    @Value("${elasticsearch.rest.password}")
+    private String passWord;
+
 
     @Bean
     public RestHighLevelClient elasticsearchClient() {
@@ -29,6 +35,7 @@ public class EsConfig {
                 .connectedTo(hostAndPort)
                 .withConnectTimeout(Duration.ofSeconds(5))
                 .withSocketTimeout(Duration.ofSeconds(3))
+                .withBasicAuth(userName, passWord)
                 .build();
 
         return RestClients.create(clientConfiguration).rest();

+ 1 - 1
common/fire-common/src/main/java/com/fire/common/redis/RedisAmountScript.java

@@ -68,7 +68,7 @@ public class RedisAmountScript {
      * 5.creditNum 授信金额
      * 返回 成功返回操作后金额 失败返回null
      */
-    public Long changeAmount(String amountName, Long customerId, String operating, int changeNum, Long creditNum) {
+    public Long changeAmount(String amountName, Long customerId, String operating, Long changeNum, Long creditNum) {
         Object res = jedisCluster.evalsha(runCode, Arrays.asList(amountName, amountName + customerId), Arrays.asList(operating, String.valueOf(changeNum), String.valueOf(creditNum)));
         if (res != null) {
             return Long.valueOf(res.toString());

+ 3 - 3
common/fire-dto/src/main/java/com/fire/dto/FlowOrderInfo.java

@@ -83,13 +83,13 @@ public class FlowOrderInfo {
     private String areaCode;
 
     @ApiModelProperty(value = "客户结算价格")
-    private Integer price;
+    private Long price;
 
     @ApiModelProperty(value = "代理商结算价格")
-    private Integer partnerBalancePrice;
+    private Long partnerBalancePrice;
 
     @ApiModelProperty(value = "成本价")
-    private Integer operatorBalancePrice;
+    private Long operatorBalancePrice;
 
     @ApiModelProperty(value = "客户产品id")
     private Integer customerProductId;

+ 1 - 1
modules/admin/src/main/java/com/fire/admin/service/impl/AdditionalPaymentServiceImpl.java

@@ -59,7 +59,7 @@ public class AdditionalPaymentServiceImpl extends ServiceImpl<AdditionalPaymentM
             int count = this.additionalPayment(additionalPaymentDto);
             if (count > 0) {
                 // TODO 加款成功之后,把加款的金额写入数据库
-                redisAmountScript.changeAmount(CUSTOMER_AMOUNT.key(), Long.getLong(additionalPaymentDto.getRelationId()), "add", additionalPaymentDto.getAmount().multiply(new BigDecimal(10000)).intValue(), 0L);
+                //redisAmountScript.changeAmount(CUSTOMER_AMOUNT.key(), Long.getLong(additionalPaymentDto.getRelationId()), "add", additionalPaymentDto.getAmount().multiply(new BigDecimal(10000)), 0L);
             }
         } else if (additionalPaymentDto.getType().equals("suppler")) {
             additionalPaymentDto.setDistinguish(1);

+ 7 - 9
modules/admin/src/main/resources/bootstrap.yml

@@ -1,11 +1,11 @@
 
 spring:
   profiles:
-    active: dev
+    active: prod
 
 ---
 server:
-  port: 8081
+  port: 8082
 
 spring:
   config:
@@ -28,7 +28,7 @@ spring:
         service: admin
 
 
-oss:
+oos:
   endpoint: http://oss-cn-chengdu.aliyuncs.com
   keyid: LTAI4FyxwFmsGEESaa7tiB6z # 填写刚刚生成的AccessKey
   keysecret: dG701ohwFU28pT84ZpEmIn7EcLOzzu  # 填写刚刚生成的Accesssecret
@@ -38,7 +38,7 @@ oss:
 
 ---
 server:
-  port: 8082
+  port: 8081
 
 spring:
   config:
@@ -52,17 +52,15 @@ spring:
   cloud:
     nacos:
       config:
-        server-addr: 192.168.2.114:8848
+        server-addr: 47.106.133.48:8848
         file-extension: yaml
         namespace: fire
       discovery:
-        server-addr: 192.168.2.114:8848
+        server-addr: 47.106.133.48:8848
         namespace: fire
         service: admin
 
-
-
-oss:
+oos:
   endpoint: http://oss-cn-chengdu.aliyuncs.com
   keyid: LTAI4FyxwFmsGEESaa7tiB6z # 填写刚刚生成的AccessKey
   keysecret: dG701ohwFU28pT84ZpEmIn7EcLOzzu  # 填写刚刚生成的Accesssecret