liujie
2023-09-16 1aa309700fb7e12d85f98bed22a45bdac448ec1c
cloud-server-competition/src/main/java/com/dsh/competition/controller/CompetitionController.java
@@ -75,29 +75,30 @@
    private AppUserClient appUserClient;
    @ResponseBody
    @PostMapping("/base/competition/getPayedCompetitions")
    public List<PaymentCompetition> getAllCompetitionPayRecord(@RequestBody BillingDataRequestVo requestVo){
        List<Integer> integers = new ArrayList<>();
        integers.add(1);
        integers.add(2);
        return paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>()
                .in("payType",integers)
                .eq("appUserId",requestVo.getAppUserId())
                .eq("payStatus",2)
                .between("payTime",requestVo.getMonthStart(),requestVo.getMonthEnd()));
    public BillingRequestVo getAllCompetitionPayRecord(@RequestBody BillingDataRequestVo requestVo){
        BillingRequestVo billingRequestVo = new BillingRequestVo();
        List<BillingRequest> integers = new ArrayList<>();
        integers = paymentCompetitionService.queryDatas(requestVo.getAppUserId(),requestVo.getMonthStart(),requestVo.getMonthEnd());
        System.out.println(integers);
        if (integers.size() > 0 ){
            billingRequestVo.setRequests(integers);
        }
        return billingRequestVo;
    }
    @ResponseBody
    @PostMapping("/base/competition/getCancelOrderOfUserPay")
    public List<PaymentCompetition> getCancelOrderOfUserPayRecord(@RequestBody BillingDataRequestVo requestVo){
        List<Integer> integers = new ArrayList<>();
        integers.add(1);
        integers.add(2);
        return paymentCompetitionService.list(new QueryWrapper<PaymentCompetition>()
                .in("payType",integers)
                .eq("appUserId",requestVo.getAppUserId())
                .eq("payStatus",3)
                .between("refundTime",requestVo.getMonthStart(),requestVo.getMonthEnd()));
    public BillingRequestVo getCancelOrderOfUserPayRecord(@RequestBody BillingDataRequestVo requestVo){
        BillingRequestVo billingRequestVo = new BillingRequestVo();
        List<BillingRequest> integers = new ArrayList<>();
        integers = paymentCompetitionService.queryCancelDatas(requestVo.getAppUserId(),requestVo.getMonthStart(),requestVo.getMonthEnd());
        System.out.println(integers);
        if (integers.size() > 0 ){
            billingRequestVo.setRequests(integers);
        }
        return billingRequestVo;
    }
@@ -203,6 +204,7 @@
    @ApiOperation(value = "赛事报名", tags = {"APP-赛事活动列表"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil paymentCompetition(PaymentCompetitionVo paymentCompetitionVo){
        try {
@@ -216,6 +218,25 @@
            return ResultUtil.runErr();
        }
    }
    @ResponseBody
    @PostMapping("/api/competition/paymentCompetitionCourseList")
    @ApiOperation(value = "赛事报名--支付可用课时列表", tags = {"APP-赛事活动列表"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "赛事id", name = "id", dataType = "int", required = true),
    })
    public ResultUtil paymentCompetitionCourseList(Integer id){
        try {
            Integer uid = tokenUtil.getUserIdFormRedis();
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            return cttService.paymentCompetitionCourseList(uid, id);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    /**