44323
2023-09-23 5f804115139dfdeeb2ce950a0f584b30f94b285c
cloud-server-account/src/main/java/com/dsh/account/controller/ClassDetailsController.java
@@ -129,7 +129,6 @@
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    @ResponseBody
@@ -159,9 +158,9 @@
    @ApiOperation(value = "上课首页分配课时-课程列表", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "分配给课包id", name = "packetId", required = true, dataType = "string"),
            @ApiImplicitParam(value = "分配给课包id", name = "packetId", required = true, dataType = "Long"),
    })
    public ResultUtil<Integer> weeksOfAddHours(Integer packetId){
    public ResultUtil<Integer> weeksOfAddHours(Long packetId){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
@@ -169,10 +168,12 @@
            }
            TAppGift one = appGiftService.getOne(new LambdaQueryWrapper<TAppGift>().eq(TAppGift::getUserId, appUserId));
            Boolean b= false;
            Integer i=0;
            if(one!=null && one.getNum()>0){
                 b =appGiftService.weeksOfAddHours(packetId,appUserId,one.getNum());
                 i=appGiftService.weeksOfAddHours(packetId,appUserId,one.getNum());
            }
            if(b){
            if(i==1){
                // 送完清0
                one.setNum(0);
                appGiftService.updateById(one);