| | |
| | | package com.dsh.course.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dsh.course.entity.CoursePackagePaymentConfig; |
| | | import com.dsh.course.entity.TCoursePackage; |
| | | import com.dsh.course.entity.TCoursePackagePayment; |
| | | import com.dsh.course.entity.TCoursePackageType; |
| | | import com.dsh.course.feignclient.model.StoreOfCourseVo; |
| | | import com.dsh.course.feignclient.other.StoreClient; |
| | | import com.dsh.course.feignclient.other.model.Store; |
| | | import com.dsh.course.model.BaseVo; |
| | | import com.dsh.course.model.QueryCoursePackageLists; |
| | | import com.dsh.course.model.QueryExamineCoursePackageLists; |
| | | import com.dsh.course.model.vo.response.Details; |
| | | import com.dsh.course.model.vo.response.ExchangeCoursePackageResponse; |
| | | import com.dsh.course.service.ICoursePackagePaymentConfigService; |
| | | import com.dsh.course.service.TCoursePackageDiscountService; |
| | | import com.dsh.course.service.TCoursePackagePaymentService; |
| | | import com.dsh.course.service.TCoursePackageService; |
| | | import com.dsh.course.util.PageFactory; |
| | | import com.dsh.course.util.ResultUtil; |
| | | import com.dsh.course.util.TokenUtil; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.bouncycastle.math.Primes; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | return null; |
| | | } |
| | | } |
| | | /** |
| | | * 根据id获取课包 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/getCoursePackageByStoreId") |
| | | public List<TCoursePackage> getCoursePackageByStoreId(@RequestBody Integer storeId){ |
| | | |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("storeId", storeId)); |
| | | } |
| | | /** |
| | | * 根据课包类型获取课包 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/getCoursePackageByType") |
| | | public List<TCoursePackage> getCoursePackageByType(@RequestBody Integer typeId){ |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("coursePackageTypeId", typeId)); |
| | | } |
| | | /** |
| | | * 本周福利列表 |
| | | */ |
| | |
| | | return icppconfigService.getById(coursePackConfigId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取课包管理列表数据 |
| | | * @param queryCoursePackageLists |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/queryCoursePackageLists") |
| | | public Page<Map<String, Object>> queryCoursePackageLists(@RequestBody QueryCoursePackageLists queryCoursePackageLists){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryCoursePackageLists.getLimit(), queryCoursePackageLists.getOffset(), queryCoursePackageLists.getSort(), queryCoursePackageLists.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageService.queryCoursePackageLists(page, queryCoursePackageLists)); |
| | | return mapPage; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加数据 |
| | | * @param coursePackage |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/addCoursePackage") |
| | | public Integer addCoursePackage(@RequestBody TCoursePackage coursePackage){ |
| | | coursePackage.setNeedNum(coursePackage.getCodeTime()); |
| | | return coursePackageService.addCoursePackage(coursePackage); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改数据 |
| | | * @param coursePackage |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/updateCoursePackageById") |
| | | public void updateCoursePackageById(@RequestBody TCoursePackage coursePackage){ |
| | | coursePackageService.updateCoursePackageById(coursePackage); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 获取课包审核列表 |
| | | * @param queryExamineCoursePackageLists |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/queryExamineCoursePackageLists") |
| | | public Page<Map<String, Object>> queryExamineCoursePackageLists(@RequestBody QueryExamineCoursePackageLists queryExamineCoursePackageLists){ |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(queryExamineCoursePackageLists.getLimit(), queryExamineCoursePackageLists.getOffset(), |
| | | queryExamineCoursePackageLists.getSort(), queryExamineCoursePackageLists.getOrder()); |
| | | Page<Map<String, Object>> mapPage = page.setRecords(coursePackageService.queryExamineCoursePackageLists(page, queryExamineCoursePackageLists)); |
| | | return mapPage; |
| | | } |
| | | } |