| | |
| | | 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.*; |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/queryByStoreId") |
| | | public List<TCoursePackage> queryByStoreId(@RequestBody Integer shopId){ |
| | | try { |
| | | List<TCoursePackage> shopId1 = coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("storeId", shopId)); |
| | | return shopId1; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | private TCoursePackagePaymentService packagePaymentService; |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/coursePackage/queryByCode") |
| | | public Integer queryByCode(@RequestBody String code){ |
| | | |
| | | |
| | | return packagePaymentService.listStoreId(code); |
| | | } |
| | | /** |
| | | * 根据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/{typeId}/{storeId}") |
| | | public List<TCoursePackage> getCoursePackageByType(@PathVariable("typeId") Integer typeId,@PathVariable("storeId")Integer storeId){ |
| | | |
| | | return coursePackageService.list(new QueryWrapper<TCoursePackage>().eq("coursePackageTypeId", typeId).eq("storeId",storeId)); |
| | | } |
| | | /** |
| | | * 本周福利列表 |
| | | */ |
| | |
| | | @ResponseBody |
| | | @PostMapping("/coursePackage/addCoursePackage") |
| | | public Integer addCoursePackage(@RequestBody TCoursePackage coursePackage){ |
| | | coursePackage.setNeedNum(coursePackage.getCodeTime()); |
| | | return coursePackageService.addCoursePackage(coursePackage); |
| | | } |
| | | |