张延森 4 vuotta sitten
vanhempi
commit
e1d1060ccf

+ 3
- 1
src/main/java/com/yunzhi/niucai/controller/TaOrderController.java Näytä tiedosto

55
     @ApiOperation(value="商铺订单列表", notes = "商铺订单列表", httpMethod = "GET", response = ResponseBean.class)
55
     @ApiOperation(value="商铺订单列表", notes = "商铺订单列表", httpMethod = "GET", response = ResponseBean.class)
56
     public ResponseBean taOrderList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
56
     public ResponseBean taOrderList(@ApiParam("页码") @RequestParam(value ="pageNum",defaultValue = "1") Integer pageNum,
57
                                     @ApiParam("单页数据量") @RequestParam(value ="pageSize",defaultValue = "10") Integer pageSize,
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
                                     @ApiParam("彩种类型, 不传就是所有") @RequestParam(value ="lotteryId",defaultValue = "") String lotteryId,
60
                                     @ApiParam("彩种类型, 不传就是所有") @RequestParam(value ="lotteryId",defaultValue = "") String lotteryId,
59
                                     HttpServletRequest request
61
                                     HttpServletRequest request
60
                                     ) throws Exception{
62
                                     ) throws Exception{
62
         TaShop taShop = iTaShopService.getProfileBy(taShopkeeper);
64
         TaShop taShop = iTaShopService.getProfileBy(taShopkeeper);
63
 
65
 
64
         IPage<TaOrder> pg = new Page<>(pageNum, pageSize);
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
         return ResponseBean.success(result);
68
         return ResponseBean.success(result);
67
     }
69
     }
68
 //
70
 //

+ 5
- 2
src/main/java/com/yunzhi/niucai/mapper/TaOrderMapper.java Näytä tiedosto

3
 import com.baomidou.mybatisplus.core.metadata.IPage;
3
 import com.baomidou.mybatisplus.core.metadata.IPage;
4
 import com.yunzhi.niucai.entity.TaOrder;
4
 import com.yunzhi.niucai.entity.TaOrder;
5
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
5
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6
-import com.yunzhi.niucai.entity.TaShop;
7
 import org.apache.ibatis.annotations.Mapper;
6
 import org.apache.ibatis.annotations.Mapper;
8
 import org.apache.ibatis.annotations.Param;
7
 import org.apache.ibatis.annotations.Param;
9
 import org.apache.ibatis.annotations.Select;
8
 import org.apache.ibatis.annotations.Select;
24
 
23
 
25
     IPage<TaOrder> getShopOrders(IPage<TaOrder> pg, @Param("shopId") Integer shopId) throws Exception;
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
     TaOrder getShopOrder(@Param("shopId") Integer shopId, @Param("orderId") String orderId) throws Exception;
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 Näytä tiedosto

21
 
21
 
22
     TaOrder bettingOrder(TaBettingPlan taBettingPlan, TaCustomerBetting taCustomerBetting) throws Exception;
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
     TaOrder getShopOrderDetail(TaShop taShop, String orderId) throws Exception;
26
     TaOrder getShopOrderDetail(TaShop taShop, String orderId) throws Exception;
27
 
27
 

+ 7
- 7
src/main/java/com/yunzhi/niucai/service/impl/TaOrderServiceImpl.java Näytä tiedosto

72
     }
72
     }
73
 
73
 
74
     @Override
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
         if (taShop == null) {
76
         if (taShop == null) {
77
             return null;
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
         if (null != result.getRecords() && result.getRecords().size() > 0) {
88
         if (null != result.getRecords() && result.getRecords().size() > 0) {

+ 4
- 4
src/main/resources/application-dev.yml Näytä tiedosto

22
 
22
 
23
 aliPay:
23
 aliPay:
24
   appid: 2016102600762812
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
   api-url: https://openapi.alipay.com/gateway.do
29
   api-url: https://openapi.alipay.com/gateway.do
30
   notify-url: http://127.0.0.1:8080/api/app/callback/alipay/pay
30
   notify-url: http://127.0.0.1:8080/api/app/callback/alipay/pay
31
   auth-url: https://openauth.alipay.com/oauth2/appToAppBatchAuth.htm
31
   auth-url: https://openauth.alipay.com/oauth2/appToAppBatchAuth.htm

+ 10
- 1
src/main/resources/mapper/TaOrderMapper.xml Näytä tiedosto

21
         INNER JOIN ta_customer_betting s ON t.betting_id = s.betting_id
21
         INNER JOIN ta_customer_betting s ON t.betting_id = s.betting_id
22
         WHERE
22
         WHERE
23
             t.shop_id = #{shopId}
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
             AND t.`status` &gt; 0
34
             AND t.`status` &gt; 0
26
             AND s.`status` &gt; -1
35
             AND s.`status` &gt; -1
27
         ORDER BY
36
         ORDER BY