|
@@ -5,12 +5,16 @@ 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.enums.BusinessType;
|
|
|
+import com.zhongzheng.common.utils.ServletUtils;
|
|
|
+import com.zhongzheng.framework.web.service.WxTokenService;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
|
import com.zhongzheng.modules.goods.bo.*;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsAttachedService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsAuditionConfigService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsAttachedVo;
|
|
|
import com.zhongzheng.modules.goods.vo.GoodsVo;
|
|
|
+import com.zhongzheng.modules.user.entity.ClientLoginUser;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.models.auth.In;
|
|
@@ -39,19 +43,21 @@ public class GoodsController extends BaseController {
|
|
|
|
|
|
private final IGoodsAttachedService iGoodsAttachedService;
|
|
|
|
|
|
-
|
|
|
+ private final WxTokenService wxTokenService;
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 获取商品详细信息
|
|
|
*/
|
|
|
- @ApiOperation("获取题库商品错题和收集题数")
|
|
|
+ @ApiOperation("获取商品详细信息")
|
|
|
@GetMapping("/{goodsId}")
|
|
|
- public AjaxResult<GoodsVo> getBankGoodsNum(@PathVariable("goodsId" ) Long goodsId) {
|
|
|
- return AjaxResult.success(iGoodsService.selectDetail(goodsId));
|
|
|
+ public AjaxResult<GoodsVo> getInfo(@PathVariable("goodsId" ) Long goodsId) {
|
|
|
+ CourseQueryBo bo = new CourseQueryBo();
|
|
|
+ ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
|
|
|
+ bo.setUserId(loginUser.getUser().getUserId());
|
|
|
+ bo.setGoodsId(goodsId);
|
|
|
+ return AjaxResult.success(iGoodsService.selectUserDetail(bo));
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
}
|