package com.zhongzheng.controller.cmmon; import com.zhongzheng.common.core.controller.BaseController; import com.zhongzheng.common.core.domain.AjaxResult; import com.zhongzheng.common.core.page.TableDataInfo; import com.zhongzheng.common.core.redis.RedisCache; import com.zhongzheng.common.utils.ServletUtils; import com.zhongzheng.framework.web.service.WxTokenService; import com.zhongzheng.modules.course.bo.CourseMenuQueryBo; import com.zhongzheng.modules.course.bo.CourseQueryBo; import com.zhongzheng.modules.course.service.ICourseChapterSectionService; import com.zhongzheng.modules.course.service.ICourseMenuService; import com.zhongzheng.modules.course.service.ICourseModuleChapterService; import com.zhongzheng.modules.course.service.ICourseService; import com.zhongzheng.modules.course.vo.CourseUserChapterSectionVo; import com.zhongzheng.modules.course.vo.CourseUserMenuVo; import com.zhongzheng.modules.course.vo.CourseUserModuleChapterVo; import com.zhongzheng.modules.course.vo.CourseUserVo; import com.zhongzheng.modules.goods.bo.GoodsAttachedQueryBo; import com.zhongzheng.modules.goods.service.IGoodsAttachedService; import com.zhongzheng.modules.goods.vo.GoodsAttachedVo; import com.zhongzheng.modules.goods.vo.GoodsUserVo; import com.zhongzheng.modules.order.bo.OrderAddBo; import com.zhongzheng.modules.order.domain.Printer; import com.zhongzheng.modules.order.service.IOrderGoodsService; import com.zhongzheng.modules.order.service.IOrderService; import com.zhongzheng.modules.user.entity.ClientLoginUser; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import org.apache.commons.compress.utils.IOUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.util.ResourceUtils; import org.springframework.web.bind.annotation.*; import java.io.ByteArrayInputStream; import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.security.KeyStore; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 课程Controller * * @author hjl * @date 2021-10-09 */ @Api(value = "游客访问接口", tags = {"游客访问接口"}) @RequiredArgsConstructor(onConstructor_ = @Autowired) @RestController @RequestMapping("/app/common/") public class CommonController extends BaseController { private final ICourseService iCourseService; @Autowired private RedisCache redisCache; /** * 查询课程列表 */ @ApiOperation("查询商品下的课程列表") @GetMapping("/courseList") public TableDataInfo courseList(CourseQueryBo bo) { startPage(); List list = iCourseService.courseList(bo); return getDataTable(list); } /** * 查询课程列表 */ @ApiOperation("查询用户拥有的商品") @GetMapping("/goodsList") public TableDataInfo goodsList(CourseQueryBo bo) { startPage(); List list = iCourseService.goodsList(bo); return getDataTable(list); } @ApiOperation("查询用户拥有的商品") @GetMapping("/test") public AjaxResult test(CourseQueryBo bo) throws InterruptedException, ParseException { return AjaxResult.success(Printer.num); } @ApiOperation("小程序配置") @GetMapping("/config") public AjaxResult> config(CourseQueryBo bo) throws InterruptedException, ParseException { Map map = new HashMap<>(); map.put("hide",false); return AjaxResult.success(map); } }