张延森 4 lat temu
rodzic
commit
e1d1060ccf

+ 3
- 1
src/main/java/com/yunzhi/niucai/controller/TaOrderController.java Wyświetl plik

@@ -55,6 +55,8 @@ public class TaOrderController extends BaseController {
55 55
     @ApiOperation(value="商铺订单列表", notes = "商铺订单列表", httpMethod = "GET", response = ResponseBean.class)
56 56
     public ResponseBean taOrderList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57 57
                                     @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
58
+                                    @ApiParam("是否待出票") @RequestParam(value ="isDrawn", required = false) Boolean isDrawn,
59
+                                    @ApiParam("是否待派奖") @RequestParam(value ="isCashed", required = false) Boolean isCashed,
58 60
                                     @ApiParam("彩种类型, 不传就是所有") @RequestParam(value ="lotteryId",defaultValue = "") String lotteryId,
59 61
                                     HttpServletRequest request
60 62
                                     ) throws Exception{
@@ -62,7 +64,7 @@ public class TaOrderController extends BaseController {
62 64
         TaShop taShop = iTaShopService.getProfileBy(taShopkeeper);
63 65
 
64 66
         IPage<TaOrder> pg = new Page<>(pageNum, pageSize);
65
-        IPage<TaOrder> result = iTaOrderService.getShopOrders(pg, taShop, lotteryId);
67
+        IPage<TaOrder> result = iTaOrderService.getShopOrders(pg, taShop, lotteryId, isDrawn, isCashed);
66 68
         return ResponseBean.success(result);
67 69
     }
68 70
 //

+ 5
- 2
src/main/java/com/yunzhi/niucai/mapper/TaOrderMapper.java Wyświetl plik

@@ -3,7 +3,6 @@ package com.yunzhi.niucai.mapper;
3 3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4 4
 import com.yunzhi.niucai.entity.TaOrder;
5 5
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
-import com.yunzhi.niucai.entity.TaShop;
7 6
 import org.apache.ibatis.annotations.Mapper;
8 7
 import org.apache.ibatis.annotations.Param;
9 8
 import org.apache.ibatis.annotations.Select;
@@ -24,7 +23,11 @@ public interface TaOrderMapper extends BaseMapper<TaOrder> {
24 23
 
25 24
     IPage<TaOrder> getShopOrders(IPage<TaOrder> pg, @Param("shopId") Integer shopId) throws Exception;
26 25
 
27
-    IPage<TaOrder> getShopOrdersWithLottery(IPage<TaOrder> pg, @Param("shopId") Integer shopId, @Param("lotteryId") String lotteryId) throws Exception;
26
+    IPage<TaOrder> getShopOrdersWithLottery(IPage<TaOrder> pg,
27
+                                            @Param("shopId") Integer shopId,
28
+                                            @Param("lotteryId") String lotteryId,
29
+                                            @Param("isDrawn") Boolean isDrawn,
30
+                                            @Param("isCashed") Boolean isCashed) throws Exception;
28 31
 
29 32
     TaOrder getShopOrder(@Param("shopId") Integer shopId, @Param("orderId") String orderId) throws Exception;
30 33
 

+ 1
- 1
src/main/java/com/yunzhi/niucai/service/ITaOrderService.java Wyświetl plik

@@ -21,7 +21,7 @@ public interface ITaOrderService extends IService<TaOrder> {
21 21
 
22 22
     TaOrder bettingOrder(TaBettingPlan taBettingPlan, TaCustomerBetting taCustomerBetting) throws Exception;
23 23
 
24
-    IPage<TaOrder> getShopOrders(IPage<TaOrder> pg, TaShop taShop, String lotteryId) throws Exception;
24
+    IPage<TaOrder> getShopOrders(IPage<TaOrder> pg, TaShop taShop, String lotteryId, Boolean isDrawn, Boolean isCashed) throws Exception;
25 25
 
26 26
     TaOrder getShopOrderDetail(TaShop taShop, String orderId) throws Exception;
27 27
 

+ 7
- 7
src/main/java/com/yunzhi/niucai/service/impl/TaOrderServiceImpl.java Wyświetl plik

@@ -72,17 +72,17 @@ public class TaOrderServiceImpl extends ServiceImpl<TaOrderMapper, TaOrder> impl
72 72
     }
73 73
 
74 74
     @Override
75
-    public IPage<TaOrder> getShopOrders(IPage<TaOrder> pg, TaShop taShop, String lotteryId) throws Exception {
75
+    public IPage<TaOrder> getShopOrders(IPage<TaOrder> pg, TaShop taShop, String lotteryId, Boolean isDrawn, Boolean isCashed) throws Exception {
76 76
         if (taShop == null) {
77 77
             return null;
78 78
         }
79 79
 
80
-        IPage<TaOrder> result = null;
81
-        if (StringUtils.isEmpty(lotteryId)) {
82
-            result = taOrderMapper.getShopOrders(pg, taShop.getShopId());
83
-        } else {
84
-            result = taOrderMapper.getShopOrdersWithLottery(pg, taShop.getShopId(), lotteryId);
85
-        }
80
+        IPage<TaOrder> result = taOrderMapper.getShopOrdersWithLottery(pg, taShop.getShopId(), lotteryId, isDrawn, isCashed);
81
+//        if (StringUtils.isEmpty(lotteryId)) {
82
+//            result = taOrderMapper.getShopOrders(pg, taShop.getShopId(), isDrawn, isCashed);
83
+//        } else {
84
+//            result = taOrderMapper.getShopOrdersWithLottery(pg, taShop.getShopId(), lotteryId, isDrawn, isCashed);
85
+//        }
86 86
 
87 87
         // 带上投注信息
88 88
         if (null != result.getRecords() && result.getRecords().size() > 0) {

+ 4
- 4
src/main/resources/application-dev.yml Wyświetl plik

@@ -22,10 +22,10 @@ logging:
22 22
 
23 23
 aliPay:
24 24
   appid: 2016102600762812
25
-  private-key: E:/work/niucai/app-service/cert/rsa-private.txt
26
-  cert-path: E:/work/niucai/app-service/cert/appCertPublicKey_2016102600762812.crt
27
-  public-cert-path: E:/work/niucai/app-service/cert/alipayCertPublicKey_RSA2.crt
28
-  root-cert-path: E:/work/niucai/app-service/cert/alipayRootCert.crt
25
+  private-key: D:/work/niucai/app-service/cert/rsa-private.txt
26
+  cert-path: D:/work/niucai/app-service/cert/appCertPublicKey_2016102600762812.crt
27
+  public-cert-path: D:/work/niucai/app-service/cert/alipayCertPublicKey_RSA2.crt
28
+  root-cert-path: D:/work/niucai/app-service/cert/alipayRootCert.crt
29 29
   api-url: https://openapi.alipay.com/gateway.do
30 30
   notify-url: http://127.0.0.1:8080/api/app/callback/alipay/pay
31 31
   auth-url: https://openauth.alipay.com/oauth2/appToAppBatchAuth.htm

+ 10
- 1
src/main/resources/mapper/TaOrderMapper.xml Wyświetl plik

@@ -21,7 +21,16 @@
21 21
         INNER JOIN ta_customer_betting s ON t.betting_id = s.betting_id
22 22
         WHERE
23 23
             t.shop_id = #{shopId}
24
-            AND s.lottery_id = #{lotteryId}
24
+            AND t.order_type = 'buy-lottery'
25
+            <if test="null != lotteryId and lotteryId != ''">
26
+                AND s.lottery_id = #{lotteryId}
27
+            </if>
28
+            <if test="null != isDrawn and isDrawn == false">
29
+                AND s.is_drawn = 0
30
+            </if>
31
+            <if test="null != isCashed and isCashed == false">
32
+                AND s.is_cashed = 0
33
+            </if>
25 34
             AND t.`status` &gt; 0
26 35
             AND s.`status` &gt; -1
27 36
         ORDER BY