beetlsql3-dev
Mlxa0324 2 years ago
parent 15ecfeeaa8
commit 2141a13552

@ -3,6 +3,7 @@ package com.ibeetl.admin.core.dao;
import com.ibeetl.admin.core.entity.CoreDict;
import org.beetl.sql.mapper.BaseMapper;
import org.beetl.sql.mapper.annotation.SqlResource;
import org.springframework.cache.annotation.Cacheable;
import java.util.List;
import java.util.Map;
@ -23,12 +24,14 @@ public interface CoreDictDao extends BaseMapper<CoreDict> {
List<CoreDict> findAllList(String type);
//根据表名、字段名查询 主键名和注释 和 字段名和注释
@Cacheable(value = "core.coreDict:findPkAndValue", key = "#tableName+#columnName")
List<Map<String,Object>> findPkAndValue (String tableName, String columnNames);
//根据表名、字段名查询 注释
List<Map<String,Object>> findComment (String tableName,String columnNames);
//动态表名、字段名查询并包装成coreDict实体
@Cacheable(value = "core.coreDict:findALlListByTable", key = "#idName+#filedName+#tableCode+#tableName+#params")
List<CoreDict> findALlListByTable (String idName,String filedName,String tableCode,String tableName,String[] params);
/**

@ -4,7 +4,6 @@ import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import org.apache.logging.log4j.util.Strings;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -56,11 +55,11 @@ public abstract class HolidaysUtils {
}
String URL1 = String.format(githubHolidaysURL2, year);
String URL2 = String.format(githubHolidaysURL1, year);
String defaultResponseStr = HttpUtil.get(URL1);
String secondResponseStr = HttpUtil.get(URL2);
String responseStr = ObjectUtil.defaultIfBlank(defaultResponseStr, secondResponseStr);
String responseStr = HttpUtil.get(URL1);
if (ObjectUtil.isEmpty(responseStr)) {
responseStr = HttpUtil.get(URL2);
}
Holidays holidays = JSONObject.parseObject(responseStr, Holidays.class);
log.info("正在从{} 获取节假日列表信息。", Strings.isNotBlank(defaultResponseStr) ? URL1 : URL2);
cache.put(year, holidays);
return holidays;
}

@ -37,6 +37,39 @@ Cookie: JSESSIONID={{session}}
}
}
//{
// "startTime": "2022-10-25",
// "weekNum": "4",
// "openOnHolidays": false,
// "weekDetail": [
// "T1",
// "T2",
// "T3",
// "T4"
// ],
// "schoolClassIdPlural": "12,13,14,7,9",
// "teacherId": "40",
// "teacherOpenCourseId": "1569699103338831872",
// "sessionClassList": {
// "1568607566282530816": [
// {
// "teacherOpenCourseScheduleSessionTagName": "第三节",
// "teacherOpenCourseScheduleSessionTagDuration": 40,
// "teacherOpenCourseScheduleSessionTagStartTime": "13:00",
// "teacherOpenCourseScheduleSessionTagEndTime": "13:40"
// }
// ],
// "1568621132431663104": [
// {
// "teacherOpenCourseScheduleSessionTagName": "第四节",
// "teacherOpenCourseScheduleSessionTagDuration": 60,
// "teacherOpenCourseScheduleSessionTagStartTime": "14:00",
// "teacherOpenCourseScheduleSessionTagEndTime": "15:00"
// }
// ]
// }
//}
### 排课列表
POST {{baseURL}}/jlw/teacherOpenCourseScheduleSession/groupList.json
Content-Type: application/x-www-form-urlencoded

@ -254,7 +254,7 @@ public class TeacherOpenCourseScheduleSessionService extends CoreBaseService<Tea
for (DateTime dateTime: dateTimes) {
// 课表主表保存
TeacherOpenCourseScheduleSession tocss = new TeacherOpenCourseScheduleSession();
tocss.setTeacherOpenCourseScheduleSessionAddTime(new Date());
tocss.setTeacherOpenCourseScheduleSessionAddTime(DateUtil.beginOfHour(DateUtil.date()));
tocss.setTeacherOpenCourseId(options.getTeacherOpenCourseId());
tocss.setSchoolClassIds(options.getSchoolClassIdPlural());
tocss.setTeacherId(options.getTeacherId());

@ -162,6 +162,7 @@ queryByConditionGroup
t.teacher_open_course_schedule_session_start_date,
t.teacher_open_course_schedule_session_end_date,
t.teacher_open_course_schedule_session_week_num,
t.teacher_open_course_schedule_session_add_time,
t.org_id,
t.user_id
)tz

Loading…
Cancel
Save