puzhibing
2023-04-07 eaa20cb58afc80e3612fd6e93d6f27e181a027e7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
package com.supersavedriving.user.modular.api;
 
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.supersavedriving.user.core.common.annotion.ServiceLog;
import com.supersavedriving.user.core.util.ToolUtil;
import com.supersavedriving.user.modular.system.model.AppUser;
import com.supersavedriving.user.modular.system.model.Order;
import com.supersavedriving.user.modular.system.service.IAppUserService;
import com.supersavedriving.user.modular.system.service.IBillService;
import com.supersavedriving.user.modular.system.service.IOrderService;
import com.supersavedriving.user.modular.system.util.PayMoneyUtil;
import com.supersavedriving.user.modular.system.util.ResultUtil;
import com.supersavedriving.user.modular.system.warpper.*;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
 
/**
* 订单控制器
* @author pzb
* @Date 2023/2/28 11:24
*/
@RestController
@RequestMapping("")
public class OrderController {
 
    @Autowired
    private IOrderService orderService;
 
    @Autowired
    private IAppUserService appUserService;
 
    @Autowired
    private PayMoneyUtil payMoneyUtil;
 
    @Autowired
    private IBillService billService;
 
 
 
 
 
    @ResponseBody
    @PostMapping("/api/order/queryServerOrder")
//    @ServiceLog(name = "获取正在进行中的订单id", url = "/api/order/queryServerOrder")
    @ApiOperation(value = "获取正在进行中的订单id", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<List<Long>> queryServerOrder(){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            AppUser appUser = appUserService.selectById(uid);
            List<Integer> list = Arrays.asList(101, 102, 103, 104, 105, 106, 107, 201, 401);
            List<Order> orders = orderService.selectList(new EntityWrapper<Order>().eq("userPhone", appUser.getPhone()).eq("status", 1).in("state", list));
            List<Long> collect = orders.stream().map(Order::getId).collect(Collectors.toList());
            return ResponseWarpper.success(collect);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/getEstimatedCosts")
//    @ServiceLog(name = "获取预估费用", url = "/api/order/getEstimatedCosts")
    @ApiOperation(value = "获取预估费用", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<EstimatedCostsWarpper> getEstimatedCosts(EstimatedCosts estimatedCosts){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil<EstimatedCostsWarpper> estimatedCosts1 = orderService.getEstimatedCosts(uid, estimatedCosts);
            return ResponseWarpper.success(estimatedCosts1);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/travelOrder")
//    @ServiceLog(name = "用户下单/扫码下单", url = "/api/order/travelOrder")
    @ApiOperation(value = "用户下单/扫码下单", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper travelOrder(TravelOrder travelOrder){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil resultUtil = orderService.travelOrder(uid, travelOrder);
            return ResponseWarpper.success(resultUtil);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
 
    @ResponseBody
    @PostMapping("/api/order/cancelOrder")
//    @ServiceLog(name = "用户取消订单", url = "/api/order/cancelOrder")
    @ApiOperation(value = "用户取消订单", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
            @ApiImplicitParam(value = "取消原因", name = "cause", required = true, dataType = "string"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper cancelOrder(Long orderId, String cause){
        if(null == orderId){
            return ResponseWarpper.success(ResultUtil.paranErr("orderId"));
        }
        if(ToolUtil.isEmpty(cause)){
            return ResponseWarpper.success(ResultUtil.paranErr("cause"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil resultUtil = orderService.cancelOrder(uid, orderId, cause);
            return ResponseWarpper.success(resultUtil);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/queryOrderInfo")
//    @ServiceLog(name = "获取订单详情", url = "/api/order/queryOrderInfo")
    @ApiOperation(value = "获取订单详情", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<OrderInfoWarpper> queryOrderInfo(Long orderId){
        if(null == orderId){
            return ResponseWarpper.success(ResultUtil.paranErr("orderId"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            OrderInfoWarpper orderInfoWarpper = orderService.queryOrderInfo(uid, orderId);
            return ResponseWarpper.success(orderInfoWarpper);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/base/order/queryShareOrderInfo")
//    @ServiceLog(name = "获取订单详情", url = "/base/order/queryShareOrderInfo")
    @ApiOperation(value = "获取订单详情", tags = {"用户端-分享"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
    })
    public ResponseWarpper<OrderInfoWarpper> queryOrderInfo1(Long orderId){
        if(null == orderId){
            return ResponseWarpper.success(ResultUtil.paranErr("orderId"));
        }
        try {
            OrderInfoWarpper orderInfoWarpper = orderService.queryOrderInfo(null, orderId);
            return ResponseWarpper.success(orderInfoWarpper);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/editOrderEndAddress")
//    @ServiceLog(name = "修改终点", url = "/api/order/editOrderEndAddress")
    @ApiOperation(value = "修改终点", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper editOrderEndAddress(EditOrderEndAddress editOrderEndAddress){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil resultUtil = orderService.editOrderEndAddress(uid, editOrderEndAddress);
            return ResponseWarpper.success(resultUtil);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
    @ResponseBody
    @PostMapping("/api/order/queryOrderPrice")
//    @ServiceLog(name = "获取待支付页面订单费用明细", url = "/api/order/queryOrderPrice")
    @ApiOperation(value = "获取待支付页面订单费用明细", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<OrderPriceWarpper> queryOrderPrice(Long orderId){
        if(null == orderId){
            return ResponseWarpper.success(ResultUtil.paranErr("orderId"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            OrderPriceWarpper orderPriceWarpper = orderService.queryOrderPrice(uid, orderId);
            return ResponseWarpper.success(orderPriceWarpper);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/calculationOfExpenses")
//    @ServiceLog(name = "重新计算待支付页面订单费用明细", url = "/api/order/calculationOfExpenses")
    @ApiOperation(value = "重新计算待支付页面订单费用明细", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
            @ApiImplicitParam(value = "优惠券id", name = "couponId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "是否使用余额抵扣(0=否,1=是)", name = "payType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "抵扣金额", name = "balance", required = true, dataType = "double"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<OrderPriceWarpper> calculationOfExpenses(Long orderId, Integer couponId, Integer payType, Double balance){
        if(null == orderId){
            return ResponseWarpper.success(ResultUtil.paranErr("orderId"));
        }
        if(null == payType){
            return ResponseWarpper.success(ResultUtil.paranErr("payType"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            OrderPriceWarpper orderPriceWarpper = orderService.calculationOfExpenses(uid, orderId, couponId, payType, balance);
            return ResponseWarpper.success(orderPriceWarpper);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/queryPayCouponList")
//    @ServiceLog(name = "获取支付页面优惠券选择列表", url = "/api/order/queryPayCouponList")
    @ApiOperation(value = "获取支付页面优惠券选择列表", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<List<CouponWarpper>> queryPayCouponList(Long orderId){
        if(null == orderId){
            return ResponseWarpper.success(ResultUtil.paranErr("orderId"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            List<CouponWarpper> list = orderService.queryPayCouponList(uid, orderId);
            return ResponseWarpper.success(list);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
    @ResponseBody
    @PostMapping("/api/order/orderPayment")
//    @ServiceLog(name = "订单完成后的支付操作", url = "/api/order/orderPayment")
    @ApiOperation(value = "订单完成后的支付操作", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper orderPayment(OrderPayment orderPayment){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil resultUtil = orderService.orderPayment(uid, orderPayment);
            return ResponseWarpper.success(resultUtil);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
    /**
     * 订单微信支付回调处理
     * @param request
     * @param response
     */
    @ResponseBody
    @PostMapping("/base/order/orderPayCallback")
    public void orderPayCallback(HttpServletRequest request, HttpServletResponse response){
        try {
            Map<String, String> map = payMoneyUtil.weixinpayCallback(request);
            if(null != map){
                String out_trade_no = map.get("out_trade_no");
                String transaction_id = map.get("transaction_id");
                String result = map.get("result");
                String orderId = out_trade_no.substring(17);
                ResultUtil resultUtil = orderService.orderPayCallback(orderId, transaction_id);
                if(resultUtil.getCode() == 10000){
                    PrintWriter out = response.getWriter();
                    out.print(result);
                    out.flush();
                    out.close();
                }
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
 
 
 
 
    @ResponseBody
    @PostMapping("/api/order/orderAppraise")
//    @ServiceLog(name = "订单评价操作", url = "/api/order/orderAppraise")
    @ApiOperation(value = "订单评价操作", tags = {"用户端-首页"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "long"),
            @ApiImplicitParam(value = "评分", name = "score", required = true, dataType = "int"),
            @ApiImplicitParam(value = "评价内容", name = "content", required = true, dataType = "string"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper orderAppraise(Long orderId, Integer score, String content){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil resultUtil = orderService.orderAppraise(uid, orderId, score, content);
            return ResponseWarpper.success(resultUtil);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
    @ResponseBody
    @PostMapping("/api/order/queryMyOrder")
//    @ServiceLog(name = "获取我的行程", url = "/api/order/queryMyOrder")
    @ApiOperation(value = "获取我的行程", tags = {"用户端-个人中心"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"),
            @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<List<OrderListWarpper>> queryMyOrder(Integer pageNum, Integer pageSize){
        if(null == pageNum){
            return ResponseWarpper.success(ResultUtil.paranErr("pageNum"));
        }
        if(null == pageSize){
            return ResponseWarpper.success(ResultUtil.paranErr("pageSize"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            List<OrderListWarpper> orderListWarppers = orderService.queryMyOrder(uid, pageNum, pageSize);
            return ResponseWarpper.success(orderListWarppers);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
    @ResponseBody
    @PostMapping("/api/order/queryNotInvoiceOrder")
//    @ServiceLog(name = "获取未开票订单列表", url = "/api/order/queryNotInvoiceOrder")
    @ApiOperation(value = "获取未开票订单列表", tags = {"用户端-个人中心"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<List<OrderListWarpper>> queryNotInvoiceOrder(NotInvoiceOrder notInvoiceOrder){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            List<OrderListWarpper> orderListWarppers = orderService.queryNotInvoiceOrder(uid, notInvoiceOrder);
            return ResponseWarpper.success(orderListWarppers);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/invoicing")
//    @ServiceLog(name = "开票操作", url = "/api/order/invoicing")
    @ApiOperation(value = "开票操作", tags = {"用户端-个人中心"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper invoicing(Invoicing invoicing){
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            ResultUtil invoicing1 = billService.invoicing(uid, invoicing);
            return ResponseWarpper.success(invoicing1);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
 
 
 
    @ResponseBody
    @PostMapping("/api/order/queryBillList")
//    @ServiceLog(name = "获取开票历史", url = "/api/order/queryBillList")
    @ApiOperation(value = "获取开票历史", tags = {"用户端-个人中心"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "页码,首页1", name = "pageNum", required = true, dataType = "int"),
            @ApiImplicitParam(value = "页条数", name = "pageSize", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResponseWarpper<List<BillWarpper>> queryBillList(Integer pageNum, Integer pageSize){
        if(null == pageNum){
            return ResponseWarpper.success(ResultUtil.paranErr("pageNum"));
        }
        if(null == pageSize){
            return ResponseWarpper.success(ResultUtil.paranErr("pageSize"));
        }
        try {
            Integer uid = appUserService.getUserByRequest();
            if(null == uid){
                return ResponseWarpper.success(ResultUtil.tokenErr());
            }
            List<BillWarpper> billWarppers = billService.queryBillList(uid, pageNum, pageSize);
            return ResponseWarpper.success(billWarppers);
        }catch (Exception e){
            e.printStackTrace();
            return new ResponseWarpper(500, e.getMessage());
        }
    }
}