|
@@ -8,6 +8,9 @@ import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.modules.bank.domain.QuestionBusiness;
|
|
|
import com.zhongzheng.modules.goods.domain.Goods;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
|
+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.order.bo.*;
|
|
|
import com.zhongzheng.modules.order.domain.Order;
|
|
|
import com.zhongzheng.modules.order.domain.OrderBusiness;
|
|
@@ -47,7 +50,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
private IOrderBusinessService iOrderBusinessService;
|
|
|
@Autowired
|
|
|
private IGoodsService iGoodsService;
|
|
|
-
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeService iClassGradeService;
|
|
|
+ @Autowired
|
|
|
+ private IClassGradeUserService iClassGradeUserService;
|
|
|
|
|
|
|
|
|
@Autowired
|
|
@@ -230,4 +236,24 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
|
|
|
}
|
|
|
return this.removeByIds(ids);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 加入班级
|
|
|
+ * @param goodsId
|
|
|
+ * @param classId
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public boolean joinClass(Long goodsId,Long classId,Long userId){
|
|
|
+ if(classId!=null){
|
|
|
+ ClassGradeVo classGradeVo = iClassGradeService.queryById(classId);
|
|
|
+ if(classGradeVo==null){
|
|
|
+ throw new CustomException("班级不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|