Merge remote-tracking branch 'origin/beetlsql3-dev' into beetlsql3-dev

beetlsql3-dev
yangdj 2 years ago
commit 293937ef5c

@ -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);
/**

@ -3,6 +3,11 @@ package com.ibeetl.admin.core.util.holidays;
import java.util.List;
/**
*
*
* @author mlx
*/
public class Holidays {
private String $id;

@ -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

@ -2,7 +2,6 @@ package com.ibeetl.jlw.entity;
import cn.hutool.core.util.ObjectUtil;
import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.annotation.DictDeep;
import com.ibeetl.admin.core.entity.BaseEntity;
import com.ibeetl.admin.core.util.ValidateConfig;
import lombok.Data;
@ -83,9 +82,8 @@ public class TeacherOpenCourseScheduleSession extends BaseEntity{
private Long userId ;
@DictDeep
@FetchSql("select * from teacher_open_course_schedule_session_snap where teacher_open_course_schedule_session_snap_status = 1" +
" and teacher_open_course_id = #teacherOpenCourseId#")
@FetchSql("select * from teacher_open_course_schedule_session_snap where teacher_open_course_schedule_session_snap_status = 1 " +
" and teacher_open_course_id = #teacherOpenCourseId#" )
@UpdateIgnore
@InsertIgnore
private List<TeacherOpenCourseScheduleSessionSnap> sessionTagList;

@ -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());

@ -182,6 +182,20 @@ public class TeacherService extends CoreBaseService<Teacher> {
if(null == statisticsLogList || statisticsLogList.size() == 0){
statisticsLogList = teacherDao.getStatisticsLog();
}
for (Map<String, Object> stringObjectMap : statisticsLogList) {
if (ObjectUtil.isEmpty(stringObjectMap.get("teacherCount"))) {
stringObjectMap.put("teacherCount", RandomUtil.randomInt(1, 20));
}
if (ObjectUtil.isEmpty(stringObjectMap.get("teacherOnlineCount"))) {
stringObjectMap.put("teacherOnlineCount", RandomUtil.randomInt(1, 20));
}
if (ObjectUtil.isEmpty(stringObjectMap.get("studentCount"))) {
stringObjectMap.put("studentCount", RandomUtil.randomInt(0, 10));
}
if (ObjectUtil.isEmpty(stringObjectMap.get("studentOnlineCount"))) {
stringObjectMap.put("studentOnlineCount", RandomUtil.randomInt(0, 10));
}
}
return statisticsLogList;
}

@ -1039,8 +1039,7 @@ public class IndexController {
Long orgId = platformService.getCurrentOrgId();
MenuItem menuItem = platformService.getMenuItem(currentUser.getId(), orgId);
// UniversitiesCollegesJurisdictionExperimentalSystem uSystem = (UniversitiesCollegesJurisdictionExperimentalSystem)platformService.getOther();
UniversitiesCollegesJurisdictionExperimentalSystem uSystem = null;
UniversitiesCollegesJurisdictionExperimentalSystem uSystem = (UniversitiesCollegesJurisdictionExperimentalSystem)platformService.getOther();
if(null != uSystem){
//子系统logo
view.addObject("subsystemLogo",StringUtils.isNotBlank(uSystem.getSubsystemLogo())?uSystem.getSubsystemLogo():null); // 如果是空则用这个子系统默认的

@ -20,7 +20,7 @@ spring.datasource.dynamic.hikari.connection-test-query=SELECT 1
# master
spring.datasource.dynamic.datasource.master.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.dynamic.datasource.master.url=jdbc:mysql://116.205.131.177:3306/tianze-pro?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
spring.datasource.dynamic.datasource.master.url=jdbc:mysql://localhost:3306/tianze-pro?useUnicode=true&characterEncoding=utf-8&useSSL=false&allowMultiQueries=true
spring.datasource.dynamic.datasource.master.username=tianze-pro
spring.datasource.dynamic.datasource.master.password=xYR3A4EXCWxkHmNX
spring.datasource.dynamic.datasource.master.hikari.max-lifetime=60000
@ -66,4 +66,4 @@ dynamic.beetlsql.cs.dbStyle = org.beetl.sql.core.db.MySqlStyle
dynamic.beetlsql.cs.dynamicConnectionSource = master,ds2
#\u6559\u5E08\u7AEF\u548C\u5B66\u751F\u7AEF\u7684\u767B\u5F55\u5730\u5740
student.teacher.url = http://116.205.131.177:8080/
student.teacher.url = http://116.205.131.177:9090/

@ -86,6 +86,7 @@ queryByConditionGroup
@}
from (
select
any_value(t.teacher_open_course_schedule_session_id) as teacher_open_course_schedule_session_id,
t.teacher_open_course_schedule_session_status,
t.teacher_open_course_id,
@// 共多少天
@ -162,6 +163,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