| | |
| | | @ResponseBody |
| | | @PostMapping("/base/pointMerchars/getCommoditys") |
| | | public PointMerchandiseVo getVicinityGoods(@RequestBody CommodityRequest request){ |
| | | if (request.getShopId()!=null){ |
| | | List<CoursePackage> coursePackages = coursePackageClient.queryByStoreId(request.getShopId()); |
| | | List<Integer> coursIds = new ArrayList<>(); |
| | | for (CoursePackage coursePackage : coursePackages) { |
| | | coursIds.add(coursePackage.getId()); |
| | | } |
| | | List<PointsMerchandise> points = pointsMerchandiseService.list(new QueryWrapper<PointsMerchandise>().eq("state",1).eq("shelves",1).in("coursePackageId", coursIds)); |
| | | PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo(); |
| | | pointMerchandiseVo.setMerchandises(points); |
| | | return pointMerchandiseVo; |
| | | |
| | | } |
| | | // if (request.getShopId()!=null){ |
| | | // List<CoursePackage> coursePackages = coursePackageClient.queryByStoreId(request.getShopId()); |
| | | // List<Integer> coursIds = new ArrayList<>(); |
| | | // for (CoursePackage coursePackage : coursePackages) { |
| | | // coursIds.add(coursePackage.getId()); |
| | | // } |
| | | // List<PointsMerchandise> points = pointsMerchandiseService.list(new QueryWrapper<PointsMerchandise>().eq("state",1).eq("shelves",1).in("coursePackageId", coursIds)); |
| | | // PointMerchandiseVo pointMerchandiseVo = new PointMerchandiseVo(); |
| | | // pointMerchandiseVo.setMerchandises(points); |
| | | // return pointMerchandiseVo; |
| | | // |
| | | // } |
| | | |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."), |
| | | }) |
| | | public ResultUtil<List<AppUserVideoResponse>> queryAfterSourceList( CourseOfAfterRequest search){ |
| | | try { |
| | | Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | |
| | | if(null == appUserId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | // try { |
| | | // Integer appUserId = tokenUtil.getUserIdFormRedis(); |
| | | // |
| | | // if(null == appUserId){ |
| | | // return ResultUtil.tokenErr(); |
| | | // } |
| | | // |
| | | // List<Integer> courseIds = new ArrayList<>(); |
| | | // QueryWrapper<TCoursePackagePayment> queryWrapper = new QueryWrapper<TCoursePackagePayment>().eq("appUserId", appUserId) |
| | |
| | | // } |
| | | |
| | | |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", appUserId); |
| | | QueryWrapper<CoursePackageStudent> queryWrapper1 = new QueryWrapper<CoursePackageStudent>().eq("appUserId", 19); |
| | | if (ToolUtil.isNotEmpty(search.getCourseTypeId())){ |
| | | queryWrapper1.eq("coursePackageId",search.getCourseTypeId()); |
| | | } |
| | |
| | | |
| | | |
| | | |
| | | }catch (Exception e){ |
| | | return ResultUtil.runErr(); |
| | | } |
| | | // }catch (Exception e){ |
| | | // return ResultUtil.runErr(); |
| | | // } |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | List<Map<String, Object>> queryCoursePackageSchedulingList(Page<Map<String, Object>> page, @Param("item") QueryCoursePackageSchedulingList queryCoursePackageSchedulingList); |
| | | |
| | | List<AppUserVideoResponse> queryAll(List<Long> longs); |
| | | List<AppUserVideoResponse> queryAll(@Param("longs") List<Long> longs); |
| | | |
| | | Integer isHave(Integer videoId); |
| | | } |
| | |
| | | <select id="queryAll" resultType="com.dsh.course.model.vo.response.AppUserVideoResponse"> |
| | | |
| | | SELECT cs.courseId as videoId,cs.coursePackageId as coursePackageId,tc.coverDrawing,tc.name as videoName,tc.introduce as synopsis,cs.integral |
| | | FROM t_course_package_scheduling4 cs |
| | | FROM t_course_package_scheduling cs |
| | | LEFT JOIN t_course tc ON cs.courseId = tc.id |
| | | WHERE cs.courseId IS NOT NULL and cs.id in #{longs} |
| | | WHERE cs.courseId IS NOT NULL and cs.id in |
| | | <foreach collection="longs" item="item" open="(" close=")" separator=","> |
| | | #{item} |
| | | </foreach> |
| | | |
| | | </select> |
| | | <select id="isHave" resultType="int"> |
| | | SELECT COUNT(1) FROM t_user_video_details WHERE courseId = #{videoId} |