|
|
@@ -5,10 +5,12 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.mec.biz.dal.dao.ActivityApplyStudentTypeDao;
|
|
|
import com.ym.mec.biz.dal.dao.TeacherDao;
|
|
|
import com.ym.mec.biz.dal.dao.VipGroupActivityDao;
|
|
|
+import com.ym.mec.biz.dal.dao.VipGroupCategoryDao;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.ActivityApplyStudentType;
|
|
|
import com.ym.mec.biz.dal.entity.Teacher;
|
|
|
import com.ym.mec.biz.dal.entity.VipGroupActivity;
|
|
|
+import com.ym.mec.biz.dal.entity.VipGroupCategory;
|
|
|
import com.ym.mec.biz.dal.page.VipGroupActivityQueryInfo;
|
|
|
import com.ym.mec.biz.event.source.EntityChangeEventSource;
|
|
|
import com.ym.mec.biz.service.VipGroupActivityService;
|
|
|
@@ -37,6 +39,8 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
private ActivityApplyStudentTypeDao activityApplyStudentTypeDao;
|
|
|
@Autowired
|
|
|
private TeacherDao teacherDao;
|
|
|
+ @Autowired
|
|
|
+ private VipGroupCategoryDao vipGroupCategoryDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Integer, VipGroupActivity> getDAO() {
|
|
|
@@ -175,12 +179,23 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
@Override
|
|
|
public ActivityWaitCourseStudentNumDto getActivityWaitCourseStudentNum(Integer userId, Integer activityId) {
|
|
|
ActivityWaitCourseStudentNumDto activityWaitCourseStudentNum = vipGroupActivityDao.getActivityWaitCourseStudentNum(userId, activityId);
|
|
|
- activityWaitCourseStudentNum.setVipGroupActivity(vipGroupActivityDao.get(activityId));
|
|
|
+ VipGroupActivity activity = vipGroupActivityDao.get(activityId);
|
|
|
+ if(StringUtils.isNotEmpty(activity.getVipGroupCategoryIdList())){
|
|
|
+ VipGroupCategory category = vipGroupCategoryDao.get(Integer.parseInt(activity.getVipGroupCategoryIdList().split(",")[0]));
|
|
|
+ activity.setVipGroupCategoryNames(category.getName());
|
|
|
+ activity.setVipGroupCategoryNum(category.getStudentNum());
|
|
|
+ }
|
|
|
+ if(StringUtils.isNotEmpty(activity.getGiveCategoryId())){
|
|
|
+ VipGroupCategory category = vipGroupCategoryDao.get(Integer.parseInt(activity.getGiveCategoryId()));
|
|
|
+ activity.setGiveCategoryName(category.getName());
|
|
|
+ activity.setGiveCategoryNum(category.getStudentNum());
|
|
|
+ }
|
|
|
+ activityWaitCourseStudentNum.setVipGroupActivity(activity);
|
|
|
return activityWaitCourseStudentNum;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ActivityWaitCourseStudentNumDto getActivityStudentCanCourseNum(Integer userId, Integer activityId) {
|
|
|
+ public List<ActivityWaitCourseStudentNumDto> getActivityStudentCanCourseNum(Integer userId, Integer activityId) {
|
|
|
return vipGroupActivityDao.getActivityStudentCanCourseNum(userId,activityId);
|
|
|
}
|
|
|
}
|