|
@@ -23,10 +23,7 @@ import com.zhongzheng.modules.grade.service.IClassGradeService;
|
|
|
import com.zhongzheng.modules.grade.service.IClassGradeUserService;
|
|
|
import com.zhongzheng.modules.grade.vo.ClassGradeVo;
|
|
|
import com.zhongzheng.modules.grade.vo.ClassPeriodVo;
|
|
|
-import com.zhongzheng.modules.order.bo.OrderAddBo;
|
|
|
-import com.zhongzheng.modules.order.bo.OrderGoodsAddBo;
|
|
|
-import com.zhongzheng.modules.order.bo.OrderGoodsEditBo;
|
|
|
-import com.zhongzheng.modules.order.bo.OrderGoodsQueryBo;
|
|
|
+import com.zhongzheng.modules.order.bo.*;
|
|
|
import com.zhongzheng.modules.order.domain.Order;
|
|
|
import com.zhongzheng.modules.order.domain.OrderGoods;
|
|
|
import com.zhongzheng.modules.order.mapper.OrderGoodsMapper;
|
|
@@ -37,7 +34,9 @@ import com.zhongzheng.modules.order.vo.OrderListVo;
|
|
|
import com.zhongzheng.modules.order.vo.OrderVo;
|
|
|
import com.zhongzheng.modules.user.bo.UserExamGoodsQueryBo;
|
|
|
import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
|
|
|
+import com.zhongzheng.modules.user.domain.User;
|
|
|
import com.zhongzheng.modules.user.service.IUserExamGoodsService;
|
|
|
+import com.zhongzheng.modules.user.service.IUserService;
|
|
|
import com.zhongzheng.modules.user.service.IUserStudyRecordService;
|
|
|
import io.swagger.models.auth.In;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -88,6 +87,9 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
@Autowired
|
|
|
private IUserStudyRecordService iUserStudyRecordService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IUserService iUserService;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public OrderGoodsVo queryById(Long orderGoodsId) {
|
|
@@ -387,6 +389,20 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<OrderGoodsVo> listUserSubjectGoods(OrderSubjectUserBuyBo bo) {
|
|
|
+ User user = iUserService.getOne(new LambdaQueryWrapper<User>()
|
|
|
+ .eq(User::getIdCard,bo.getIdCard()).last("limit 1"));
|
|
|
+ if(Validator.isNull(user)){
|
|
|
+ throw new CustomException("该身份证号码用户不存在");
|
|
|
+ }
|
|
|
+ GoodsQueryBo queryBo = new GoodsQueryBo();
|
|
|
+ queryBo.setSubjectId(bo.getSubjectId());
|
|
|
+ queryBo.setBusinessId(bo.getBusinessId());
|
|
|
+ queryBo.setUserId(user.getUserId());
|
|
|
+ return this.baseMapper.listUserSubjectGoods(queryBo);
|
|
|
+ }
|
|
|
+
|
|
|
public boolean joinGrade(Long orderGoodsId, Long gradeId, Long userId, Long goodsId) {
|
|
|
ClassGradeVo classGradeVo = iClassGradeService.queryById(gradeId);
|
|
|
if (classGradeVo == null) {
|