nickchange
2023-10-10 ee9cb0da4a43bcf523ebb157678f64a2895fba1a
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/system/TStudentController.java
@@ -104,7 +104,7 @@
     */
    @RequestMapping("/changelist/{payId}")
    @ResponseBody
    public ResultUtil changelist(@PathVariable("payId") Integer payId, ConsumeQuery consumeQuery) {
    public ResultUtil changelist(@PathVariable("payId") Long payId, ConsumeQuery consumeQuery) {
        consumeQuery.setPayId(payId);
        System.out.println("=======changelist==========="+consumeQuery);
        List<CourseCounsum> courseCounsums =   courseStuddentClient.queryCounsum(consumeQuery);
@@ -173,7 +173,6 @@
        model.addAttribute("id", id);
        model.addAttribute("ids", ids);
        TAppUser tAppUser = appUserClient.queryById(tStudentDto.getAppUserId());
        model.addAttribute("userName",tAppUser.getName());
        model.addAttribute("tStudentDto",tStudentDto);
@@ -194,6 +193,9 @@
            payment.setId(Long.valueOf(tCoursePackage.getId()));
            BigDecimal cashPayment = payment.getCashPayment();
            if (cashPayment==null){
                cashPayment = BigDecimal.ZERO;
            }
            Integer totalClassHours = payment.getTotalClassHours();
            BigDecimal result =  new BigDecimal(0);
            if (totalClassHours!=0) {
@@ -360,6 +362,8 @@
        return ResultUtil.success();
    }
//同意退款
    @RequestMapping("/changeStatus/{id}")
    @ResponseBody
    public ResultUtil changeStatus(@PathVariable Integer id) {
@@ -375,6 +379,21 @@
        return new ResultUtil<>(0,0,"同意成功",null,null);
    }
    @RequestMapping("/noStatus/{id}")
    @ResponseBody
    public ResultUtil noStatus(@PathVariable Integer id) {
//        InsertBackDto insertBackDto= new InsertBackDto();
//        insertBackDto.setId(id);
////        insertBackDto.setIds(ids);
//        System.out.println("=====insertBackDto========"+insertBackDto);
        courseStuddentClient.changeStatus(id);
        courseStuddentClient.backStausClass(id);
//        courseStuddentClient.zeroClass(id);
        System.out.println("============学员查询接口=========");
        return new ResultUtil<>(0,0,"同意成功",null,null);
    }
    /**
     * 学员修改
@@ -430,7 +449,7 @@
        historyClient.createHistory(historyDto);
        return ResultUtil.success();
        return new ResultUtil<>(0,0,"更改成功",null,null);
    }
@@ -453,7 +472,7 @@
     */
    @RequestMapping(value = "/getUserSlect/{id}")
    @ResponseBody
    public ResultUtil getUserSlect(@PathVariable("id") Integer payId) {
    public ResultUtil getUserSlect(@PathVariable("id") Long payId) {
       List<SelectDto>  selectDtos =  courseStuddentClient.getSelect(payId);
        Map<String,List<SelectDto>> map = new HashMap<>();
@@ -466,7 +485,7 @@
     */
    @RequestMapping(value = "/toClass")
    @ResponseBody
    public ResultUtil toClass( Integer id,Integer toStudentId) {
    public ResultUtil toClass( Long id,Integer toStudentId) {
        ToClassDto toClassDto = new ToClassDto();
        toClassDto.setToStudentId(toStudentId);
        toClassDto.setId(id);
@@ -536,10 +555,11 @@
        System.out.println("========ToHoliDto========="+resultUtil);
        if (resultUtil==""){
        if (resultUtil==""||resultUtil==null){
            return new ResultUtil<>(0,0,"报名成功");
        }else
        return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);
        }else{
        return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);}
    }
@@ -562,15 +582,15 @@
        if (resultUtil==""){
            return new ResultUtil<>(0,0,"报名成功");
        }else
            return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);
        }else{
            return new ResultUtil<>(0,0,"报名成功,以下学员剩余课时不足"+resultUtil);}
    }
    //赠课
    @RequestMapping(value = "/giftTo")
    @ResponseBody
    public ResultUtil toClagiftToss( Integer id,Integer toStudentId) {
    public ResultUtil toClagiftToss( Long id,Integer toStudentId) {
        ToClassDto toClassDto = new ToClassDto();
        toClassDto.setToStudentId(toStudentId);
        toClassDto.setId(id);