|
@@ -1,10 +1,7 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
-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.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.ActivityApplyStudentType;
|
|
|
import com.ym.mec.biz.dal.entity.Teacher;
|
|
@@ -15,6 +12,7 @@ import com.ym.mec.biz.dal.page.VipGroupActivityQueryInfo;
|
|
|
import com.ym.mec.biz.service.VipGroupActivityService;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
+import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -37,6 +35,8 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
private TeacherDao teacherDao;
|
|
|
@Autowired
|
|
|
private VipGroupCategoryDao vipGroupCategoryDao;
|
|
|
+ @Autowired
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Integer, VipGroupActivity> getDAO() {
|
|
@@ -366,15 +366,26 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Object doubleEleven2021OrderDetail(DoubleEleven2021QueryInfo queryInfo) {
|
|
|
- //EXPLAIN SELECT spo.user_id_,su.username_,spo.order_no_,aum.actual_price_,spo.create_time_,GROUP_CONCAT(vga.attribute1_) type_,cto.id_
|
|
|
- //FROM student_payment_order spo
|
|
|
- //LEFT JOIN activity_user_mapper aum ON spo.id_ = aum.payment_order_id_
|
|
|
- //LEFT JOIN vip_group_activity vga ON vga.id_ = aum.activity_id_
|
|
|
- //LEFT JOIN sys_user su ON su.id_ = spo.user_id_
|
|
|
- //LEFT JOIN cloud_teacher_order cto ON cto.student_id_ = spo.user_id_ AND cto.remark_ = '双十一活动赠送会员' AND spo.create_time_ BETWEEN '' AND ''
|
|
|
- //WHERE spo.status_ = 'SUCCESS' AND spo.type_ = 'DOUBLE_ELEVEN2021'
|
|
|
- //GROUP BY spo.id_
|
|
|
- return null;
|
|
|
+ public PageInfo<DoubleEleven2021OrderDetailDto> doubleEleven2021OrderDetail(DoubleEleven2021QueryInfo queryInfo) {
|
|
|
+ String startTime = sysConfigDao.findConfigValue("2021_double_eleven_give_member_start_time");
|
|
|
+ String endTime = sysConfigDao.findConfigValue("2021_double_eleven_give_member_end_time");
|
|
|
+ queryInfo.setGiveMemberStartTime(startTime);
|
|
|
+ queryInfo.setGiveMemberEndTime(endTime);
|
|
|
+ PageInfo<DoubleEleven2021OrderDetailDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
|
|
|
+ Map<String, Object> params = new HashMap<String, Object>();
|
|
|
+ MapUtil.populateMap(params, queryInfo);
|
|
|
+
|
|
|
+ List<DoubleEleven2021OrderDetailDto> dataList = null;
|
|
|
+ int count = vipGroupActivityDao.countDoubleEleven2021OrderDetail(params);
|
|
|
+ if (count > 0) {
|
|
|
+ pageInfo.setTotal(count);
|
|
|
+ params.put("offset", pageInfo.getOffset());
|
|
|
+ dataList = vipGroupActivityDao.queryDoubleEleven2021OrderDetail(params);
|
|
|
+ }
|
|
|
+ if (count == 0) {
|
|
|
+ dataList = new ArrayList<>();
|
|
|
+ }
|
|
|
+ pageInfo.setRows(dataList);
|
|
|
+ return pageInfo;
|
|
|
}
|
|
|
}
|