|
@@ -49,6 +49,7 @@ import com.zhongzheng.modules.order.domain.OrderPay;
|
|
|
import com.zhongzheng.modules.order.mapper.OrderMapper;
|
|
|
import com.zhongzheng.modules.order.service.*;
|
|
|
import com.zhongzheng.modules.order.vo.*;
|
|
|
+import com.zhongzheng.modules.user.domain.User;
|
|
|
import com.zhongzheng.modules.user.domain.UserExamGoods;
|
|
|
import com.zhongzheng.modules.user.service.IUserExamGoodsService;
|
|
|
import com.zhongzheng.modules.user.service.IUserService;
|
|
@@ -223,6 +224,25 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
return orderListVos;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<OrderUserCheckBuyBo> userCheckBuyList(List<OrderUserCheckBuyBo> list) {
|
|
|
+ for(OrderUserCheckBuyBo bo : list){
|
|
|
+ //订单商品
|
|
|
+ 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)){
|
|
|
+ bo.setMsg("该身份证用户不存在");
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 实体类转化成视图对象
|
|
|
*
|