| | |
| | | |
| | | @Autowired |
| | | private TCoursePackageDiscountService discountService; |
| | | @Autowired |
| | | private ICoursePackagePaymentConfigService coursePackagePaymentConfigService; |
| | | |
| | | /** |
| | | * 上/下架 1为上架 2为下架 3为删除 |
| | |
| | | @ApiImplicitParam(value = "纬度", name = "lat", dataType = "string", required = false), |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<CoursePackageInfo> queryCourseInfo(Integer id, String lon, String lat){ |
| | | public ResultUtil<CoursePackageInfo> queryCourseInfo(Integer id, String lon, String lat,Long payId){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "用户token(Bearer +token)", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil paymentCourse(PaymentCourseVo paymentCourseVo){ |
| | | public synchronized ResultUtil paymentCourse(PaymentCourseVo paymentCourseVo){ |
| | | try { |
| | | Integer uid = tokenUtil.getUserIdFormRedis(); |
| | | if(null == uid){ |
| | |
| | | for (TCoursePackagePayment coursePackagePayment : list) { |
| | | coursePackagePayment.setPayStatus(2); |
| | | coursePackagePayment.setOrderNumber(trade_no); |
| | | coursePackagePayment.setAppUserId(null); |
| | | } |
| | | coursePackagePaymentService.updateBatchById(list); |
| | | } |
| | |
| | | return strings; |
| | | |
| | | } |
| | | |
| | | // 获取课包商品的价格配置 |
| | | @PostMapping("/course/getHoursByPackageId") |
| | | @ResponseBody |
| | | public List<CoursePackagePaymentConfig> getHoursByPackageId(@RequestBody Integer coursePackageId1){ |
| | | List<CoursePackagePaymentConfig> coursePackageId = coursePackagePaymentConfigService.list(new QueryWrapper<CoursePackagePaymentConfig>() |
| | | .eq("coursePackageId", coursePackageId1)); |
| | | return coursePackageId; |
| | | } |
| | | @PostMapping("/course/getHours") |
| | | public String getHours(@RequestBody Integer coursePackageId1){ |
| | | public List<Integer> getHours(@RequestBody Integer coursePackageId1){ |
| | | return coursePackageService.getHours(coursePackageId1); |
| | | } |
| | | |
| | |
| | | |
| | | @PostMapping("/course/auditDiscount") |
| | | public Boolean auditDiscount( @RequestBody AuditDiscount auditDiscount){ |
| | | TCoursePackageDiscount byId = discountService.getById(auditDiscount.getId()); |
| | | List<TCoursePackageDiscount> list = discountService.list(new LambdaQueryWrapper<TCoursePackageDiscount>().eq(TCoursePackageDiscount::getCoursePackageId, byId.getCoursePackageId())); |
| | | |
| | | List<TCoursePackageDiscount> list = discountService.list(new LambdaQueryWrapper<TCoursePackageDiscount>() |
| | | .eq(TCoursePackageDiscount::getCoursePackageId, auditDiscount.getId())); |
| | | for (TCoursePackageDiscount tCoursePackageDiscount : list) { |
| | | tCoursePackageDiscount.setAuditStatus(auditDiscount.getType()); |
| | | tCoursePackageDiscount.setAuditRemark(auditDiscount.getText()); |