|
|
@@ -37,10 +37,7 @@ import com.zhongzheng.modules.exam.service.IExamApplySiteTimeService;
|
|
|
import com.zhongzheng.modules.exam.service.IExamApplyUserService;
|
|
|
import com.zhongzheng.modules.exam.service.IExamBeforeService;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
|
|
|
-import com.zhongzheng.modules.goods.bo.CheckGoodsStatusBo;
|
|
|
-import com.zhongzheng.modules.goods.bo.GoodsCourseQueryBo;
|
|
|
-import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
|
-import com.zhongzheng.modules.goods.bo.GoodsSectionListBo;
|
|
|
+import com.zhongzheng.modules.goods.bo.*;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.domain.GoodsQuestionRel;
|
|
|
import com.zhongzheng.modules.goods.domain.QuestionMerchant;
|
|
|
@@ -921,4 +918,25 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
|
|
|
return true;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public Long firstChoiceGoods(GoodsFirstChoiceAddBo bo) {
|
|
|
+ if(Validator.isEmpty(bo.getGoodsId())||Validator.isEmpty(bo.getOrderGoodsId())){
|
|
|
+ throw new CustomException("参数错误");
|
|
|
+ }
|
|
|
+ Goods goodsOld = iGoodsService.getOne(new LambdaQueryWrapper<Goods>()
|
|
|
+ .eq(Goods::getGoodsId, bo.getGoodsId()));
|
|
|
+ if(Validator.isEmpty(goodsOld)){
|
|
|
+ throw new CustomException("数据错误");
|
|
|
+ }
|
|
|
+ if(Validator.isEmpty(goodsOld.getFirstChoiceStatus())||goodsOld.getFirstChoiceStatus()!=1){
|
|
|
+ throw new CustomException("非法商品操作");
|
|
|
+ }
|
|
|
+ OrderGoods orderGoods = getOne(new LambdaQueryWrapper<OrderGoods>()
|
|
|
+ .eq(OrderGoods::getOrderGoodsId, bo.getOrderGoodsId()));
|
|
|
+ if(Validator.isEmpty(orderGoods)||orderGoods.getGoodsId()!=bo.getGoodsId()){
|
|
|
+ throw new CustomException("订单商品数据错误");
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|