Bläddra i källkod

本地redis连接哨兵

linhui.li 3 veckor sedan
förälder
incheckning
97d02fe18b

+ 7 - 1
auc/src/main/resources/application-local.yml

@@ -1,8 +1,11 @@
 spring:
   redis:
+    sentinel:
+      master: poyee-master
+#      nodes: 192.168.50.8:26379
     database: 9
     host: ${REDIS_HOST:192.168.50.8}
-    port: ${REDIS_PORT:6379}
+    port: ${REDIS_PORT:26379}
     password: Pass2010    # 密码(默认为空)
     timeout: 60000  # 连接超时时长(毫秒)
     lettuce:
@@ -13,6 +16,9 @@ spring:
         min-idle: 5       # 连接池中的最小空闲连接
 
 hobbystocks:
+  redis:
+    sentinel:
+      nodes: ${SENTINEL_NODES:192.168.50.8:26379}
   host:
     pointUrl: https://m-dev.hobbystocks.net/app/api/local/v1/point/operate
     getSku: https://m-dev.hobbystocks.net/app/api/local/v1/items/sku/

+ 1 - 1
bid/src/main/java/cn/hobbystocks/auc/app/AppClient.java

@@ -153,7 +153,7 @@ public class AppClient {
             params.put("type", "amount");
             params.put("amount", soldEvent.getBids().get(0).getAmount());
         } else {
-            params.put("amount", soldEvent.getPoint() * 100);
+            params.put("amount", soldEvent.getAmount() * 100);
             params.put("type", "point");
         }
         params.put("auctionId", soldEvent.getLotId());

+ 2 - 2
bid/src/main/java/cn/hobbystocks/auc/task/BidTask.java

@@ -170,7 +170,7 @@ public class BidTask implements CacheMap {
     /**
      * 每5秒检查下订单状态,如订单已过期则更新拍品状态为流拍
      */
-    @Scheduled(fixedRate = 5000)
+    /*@Scheduled(fixedRate = 5000)
     public void expireOrder(){
         //查询所有订单状态,如果订单超时未支付,更新拍品状态为流拍
         List<Order> orderList = orderService.list();
@@ -201,7 +201,7 @@ public class BidTask implements CacheMap {
             }
 
         }
-    }
+    }*/
 
 
 

+ 1 - 3
lot/src/main/java/cn/hobbystocks/auc/domain/Lot.java

@@ -148,9 +148,7 @@ public class Lot extends BaseEntity
     @ApiModelProperty("已支付")
     private Long paid;
 
-    /** 订单id */
-    @ApiModelProperty("订单id")
-    private String orderId;
+
 
     /** 出价次数 */
     @ApiModelProperty("出价次数")

+ 3 - 2
lot/src/main/resources/mapper/AuctionMapper.xml

@@ -25,13 +25,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="createTime"    column="create_time"    />
         <result property="updateBy"    column="update_by"    />
         <result property="updateTime"    column="update_time"    />
+        <result property="sort" column="sort"/>
     </resultMap>
 
     <sql id="selectAuctionVo">
         select
             id, no, name,type, imgs, banner, deposit, service_tariff, pay_time_limit,
         description, pub_status, pub_time, status, start_time, end_time,
-            del_flag, create_by, create_time, update_by, update_time
+            del_flag, create_by, create_time, update_by, update_time,sort
         from
             auction
     </sql>
@@ -43,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="auction.pubStatus != null "> and pub_status = #{auction.pubStatus}</if>
             and del_flag &lt;&gt; 1
         </where>
-        order by sort asc,id asc
+        order by sort desc,id asc
     </select>
 
     <select id="selectPubbedAndNoEndAuction" resultMap="AuctionResult">