Browse Source

Merge remote-tracking branch 'origin/2021-04-28' into 2021-04-28

zouxuan 4 years ago
parent
commit
86a169b6b0

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/IndexBaseMonthDataDao.java

@@ -39,7 +39,7 @@ public interface IndexBaseMonthDataDao extends BaseDAO<Long, IndexBaseMonthData>
                                               @Param("startMonth") String startMonth,
                                               @Param("endMonth") String endMonth);
 
-    List<IndexBaseMonthData> getIndexBaseDataList(@Param("organIds") Set<Integer> organIds,
+    List<IndexBaseMonthData> getVipCourseDataList(@Param("organIds") Set<Integer> organIds,
                                               @Param("dataTypes") Set<String> dataTypes,
                                               @Param("startMonth") String startMonth,
                                               @Param("endMonth") String endMonth);

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/IndexBaseMonthDataServiceImpl.java

@@ -115,7 +115,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
 			vipDataTypes.add("VIP_GROUP_COURSE");
 			vipDataTypes.add("VIP_GROUP_ONLINE_COURSE");
 			vipDataTypes.add("VIP_GROUP_OFFLINE_COURSE");
-			List<IndexBaseMonthData> indexBaseDataList = indexBaseMonthDataDao.getIndexBaseDataList(organIds, vipDataTypes, startDate.toString(), endDate.toString());
+			List<IndexBaseMonthData> indexBaseDataList = indexBaseMonthDataDao.getVipCourseDataList(organIds, vipDataTypes, startDate.toString(), endDate.toString());
 			if(!CollectionUtils.isEmpty(indexBaseDataList)){
 				for (IndexBaseMonthData indexBaseMonthData : indexBaseDataList) {
 					if(StringUtils.isBlank(indexBaseMonthData.getExtendInfo())){

+ 7 - 2
mec-biz/src/main/resources/config/mybatis/IndexBaseMonthDataMapper.xml

@@ -148,10 +148,14 @@
 		GROUP BY month_,data_type_
 	</select>
 
-	<select id="getIndexBaseDataList" resultMap="IndexBaseMonthData">
+	<select id="getVipCourseDataList" resultMap="IndexBaseMonthData">
 		SELECT
-			*
+			month_,
+			organ_id_,
+			data_type_,
+			extend_info_
 		FROM index_base_month_data
+		FORCE INDEX(data_type_, month_)
 			<where>
 				<if test="dataTypes!=null and dataTypes.size()>0">
 					AND data_type_ IN
@@ -171,6 +175,7 @@
 				<if test="endMonth!=null and endMonth!=''">
 					AND month_&lt;=#{endMonth}
 				</if>
+				AND extend_info_ IS NOT NULL
 			</where>
 	</select>