main
黄海 6 months ago
parent 4370f27218
commit bfc42c2b0c

@ -30,8 +30,15 @@ public class SyncDataEase {
stageLessonSummary();
//年级课程数量
NianJiLessonSummary();
//学校数量
schoolCount();
}
/**
*
* @param cnt
* @param type
*/
public static void updateLessonSummary(int cnt, String type) {
//更新数据
String sql = Db.getSql("DataEase.updateLessonSummary");
@ -47,6 +54,11 @@ public class SyncDataEase {
//更新数据
int cnt = record.getInt("cnt");
updateLessonSummary(cnt, "课程建设总量");
//一个数据,两处使用
String sql = Db.getSql("DataEase.updateSchoolCount");
Db.use(MYSQL_DB).update(sql, cnt, "直播课程");
print("课程建设总量(包括:直播课、点播课、专题题):" + cnt);
}
@ -183,4 +195,16 @@ public class SyncDataEase {
print("初中一年级至三年级:" + c1 + ",二年级:" + c2 + ",三年级:" + c3);
print("高中一年级至三年级:" + g1 + ",二年级:" + g2 + ",三年级:" + g3);
}
/**
*
*/
public static void schoolCount() {
SqlPara sqlPara = Db.getSqlPara("DataEase.schoolCount");
Record record = Db.findFirst(sqlPara);
int cnt = record.getInt("cnt");
String sql = Db.getSql("DataEase.updateSchoolCount");
Db.use(MYSQL_DB).update(sql, cnt, "参与学校数量");
}
}

@ -134,4 +134,12 @@ ORDER BY
#sql("updateNianJiLessonSummary")
update `excel__6f2819d1f9` set ``=?,``=? where ``=? and ``=?
#end
-- 参与学校数量
#sql("schoolCount")
SELECT COUNT(DISTINCT organization_name) as cnt FROM t_crawler_lesson_school WHERE match_type=2;
#end
-- 更新参与学校数量
#sql("updateSchoolCount")
update `excel__d20e478c67` set ``=? where ``=?
#end
#end
Loading…
Cancel
Save