|
@@ -227,16 +227,13 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
@Override
|
|
|
public List<OrderUserCheckBuyBo> userCheckBuyList(List<OrderUserCheckBuyBo> list) {
|
|
|
for(OrderUserCheckBuyBo bo : list){
|
|
|
+ bo.setBuy(false);
|
|
|
if(Validator.isEmpty(bo.getIdCard())||Validator.isEmpty(bo.getGradeId())||Validator.isEmpty(bo.getGoodsId())){
|
|
|
bo.setMsg("参数缺失");
|
|
|
continue;
|
|
|
}
|
|
|
//订单商品
|
|
|
Goods goods = iGoodsService.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getGoodsId, bo.getGoodsId()));
|
|
|
- if (goods.getGoodsStatus() != 1) {
|
|
|
- bo.setMsg("商品已下架,请重新选择商品下单");
|
|
|
- continue;
|
|
|
- }
|
|
|
User user = iUserService.getOne(new LambdaQueryWrapper<User>()
|
|
|
.eq(User::getIdCard,bo.getIdCard()).last("limit 1"));
|
|
|
if(Validator.isNull(user)){
|
|
@@ -259,7 +256,11 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
payStatusList.add(4);
|
|
|
orderGoodsQueryBo.setPayStatusList(payStatusList);
|
|
|
List<OrderGoodsVo> list1 = iOrderGoodsService.selectList(orderGoodsQueryBo);
|
|
|
- for(OrderGoodsVo goodsVo : list1){
|
|
|
+ if(Validator.isNotEmpty(list1)&&list1.size()>0){
|
|
|
+ bo.setBuy(true);
|
|
|
+ }
|
|
|
+/* for(OrderGoodsVo goodsVo : list1){
|
|
|
+
|
|
|
if (goods.getGoodsType() == 6) {
|
|
|
//直播商品
|
|
|
bo.setMsg("直播商品不允许复购");
|
|
@@ -282,8 +283,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- if (goods.getGoodsType() == 1) {
|
|
|
+ }*/
|
|
|
+/* if (goods.getGoodsType() == 1) {
|
|
|
Long gradeId = bo.getGradeId();
|
|
|
//指定班级
|
|
|
if (gradeId != null && gradeId > 0) {
|
|
@@ -292,10 +293,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
bo.setMsg("班级不存在");
|
|
|
continue;
|
|
|
}
|
|
|
- if (classGradeVo.getStatus() != 1) {
|
|
|
+ *//* if (classGradeVo.getStatus() != 1) {
|
|
|
bo.setMsg("班级已失效");
|
|
|
continue;
|
|
|
- }
|
|
|
+ }*//*
|
|
|
ClassGradeGoods gradeGoods = iClassGradeGoodsService.getOne(new LambdaQueryWrapper<ClassGradeGoods>().eq(ClassGradeGoods::getGradeId, gradeId)
|
|
|
.eq(ClassGradeGoods::getGoodsId, goodsId));
|
|
|
if (gradeGoods == null) {
|
|
@@ -325,7 +326,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
continue;
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
bo.setMsg("下单验证成功");
|
|
|
}
|
|
|
return list;
|