yangdamao 1 年之前
父節點
當前提交
5356e7368a

+ 7 - 0
zhongzheng-api/src/main/java/com/zhongzheng/controller/order/OrderController.java

@@ -11,6 +11,7 @@ import com.zhongzheng.modules.base.vo.BaseFilterVo;
 import com.zhongzheng.modules.course.service.ICourseEducationTypeService;
 import com.zhongzheng.modules.course.vo.CourseEducationTypeVo;
 import com.zhongzheng.modules.goods.bo.GoodsFirstChoiceAddBo;
+import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.order.bo.*;
 import com.zhongzheng.modules.order.service.IOrderGoodsService;
 import com.zhongzheng.modules.order.service.IOrderService;
@@ -237,4 +238,10 @@ public class OrderController extends BaseController {
         bo.setUserId(loginUser.getUser().getUserId());
         return AjaxResult.success(iOrderGoodsService.firstChoiceGoods(bo));
     }
+
+    @ApiOperation("获取课程视频标签")
+        @GetMapping("/getViewSign/{orderGoodsId}")
+    public AjaxResult<GoodsVo> getCourseViewSign(@PathVariable("orderGoodsId") Long orderGoodsId) {
+        return AjaxResult.success(iOrderGoodsService.getCourseViewSign(orderGoodsId));
+    }
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/domain/Goods.java

@@ -183,4 +183,6 @@ private static final long serialVersionUID=1L;
     private Integer moreCertificateStatus;
     /** 关联题库ids */
     private String questionRelIds;
+    /** 视频标签:1保利威 2腾讯 */
+    private Integer viewSign;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/GoodsVo.java

@@ -401,4 +401,7 @@ public class GoodsVo {
 	/** 关联题库ids */
 	@ApiModelProperty("关联题库ids")
 	private String questionRelIds;
+	/** 视频标签:1保利威 2腾讯 */
+	@ApiModelProperty("视频标签:1保利威 2腾讯")
+	private Integer viewSign;
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderGoodsService.java

@@ -7,6 +7,7 @@ import com.zhongzheng.modules.goods.bo.GoodsFirstChoiceAddBo;
 import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
 import com.zhongzheng.modules.goods.bo.GoodsSectionListBo;
 import com.zhongzheng.modules.goods.vo.GoodsSectionListVo;
+import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.order.bo.*;
 import com.zhongzheng.modules.order.domain.OrderGoods;
 import com.zhongzheng.modules.order.vo.OrderGoodsVo;
@@ -129,4 +130,6 @@ public interface IOrderGoodsService extends IService<OrderGoods> {
     GoodsFirstChoiceAddBo firstChoiceGoods(GoodsFirstChoiceAddBo bo);
 
     OrderGoods getByIdNoTenant(Long orderGoodsId);
+
+    GoodsVo getCourseViewSign(Long orderGoodsId);
 }

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderGoodsServiceImpl.java

@@ -881,6 +881,16 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
         return baseMapper.getByIdNoTenant(orderGoodsId);
     }
 
+    @Override
+    public GoodsVo getCourseViewSign(Long orderGoodsId) {
+        OrderGoods orderGoods = getById(orderGoodsId);
+        if (ObjectUtils.isNull(orderGoods)){
+            throw new CustomException("订单有误,请检查");
+        }
+        Goods goods = iGoodsService.getById(orderGoods.getGoodsId());
+        return BeanUtil.toBean(goods,GoodsVo.class);
+    }
+
     private boolean checkUnique(Long GoodsId,Long UserId) {
         ShoppingCart info = iShoppingCartService.getOne(new LambdaQueryWrapper<ShoppingCart>()
                 .eq(ShoppingCart::getUserId,UserId).eq(ShoppingCart::getGoodsId,GoodsId).last("limit 1"));