ソースを参照

Merge branch 'pre'

dzx 1 年間 前
コミット
55dadeafc4
56 ファイル変更1808 行追加230 行削除
  1. 1 1
      src/main/java/com/xjrsoft/common/xss/XssHttpServletRequestWrapper.java
  2. 2 2
      src/main/java/com/xjrsoft/module/activity/controller/ActivityInfoController.java
  3. 2 2
      src/main/java/com/xjrsoft/module/attendance/controller/TeacherStatisticsController.java
  4. 58 28
      src/main/java/com/xjrsoft/module/base/controller/BaseClassCourseController.java
  5. 60 62
      src/main/java/com/xjrsoft/module/job/JianyuekbScheduleTask.java
  6. 19 13
      src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java
  7. 1 0
      src/main/java/com/xjrsoft/module/schedule/util/ScheduleUtil.java
  8. 28 2
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentDevelopmentController.java
  9. 2 1
      src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipReleaseController.java
  10. 2 1
      src/main/java/com/xjrsoft/module/student/controller/CadreDeptController.java
  11. 5 0
      src/main/java/com/xjrsoft/module/student/dto/BaseStudentSimpleInfoDto.java
  12. 1 1
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentDevelopmentPageVo.java
  13. 10 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentDevelopmentVo.java
  14. 3 0
      src/main/java/com/xjrsoft/module/student/vo/BaseStudentUserPageVo.java
  15. 109 0
      src/main/java/com/xjrsoft/module/system/controller/XjrMenuGroupSetController.java
  16. 145 0
      src/main/java/com/xjrsoft/module/system/controller/XjrTipsMessageController.java
  17. 32 0
      src/main/java/com/xjrsoft/module/system/dto/AddXjrMenuGroupDto.java
  18. 43 0
      src/main/java/com/xjrsoft/module/system/dto/AddXjrMenuGroupSetDto.java
  19. 39 0
      src/main/java/com/xjrsoft/module/system/dto/AddXjrTipsMessageDto.java
  20. 24 0
      src/main/java/com/xjrsoft/module/system/dto/UpdateXjrMenuGroupSetDto.java
  21. 24 0
      src/main/java/com/xjrsoft/module/system/dto/UpdateXjrTipsMessageDto.java
  22. 21 0
      src/main/java/com/xjrsoft/module/system/dto/XjrMenuGroupMenuListDto.java
  23. 19 0
      src/main/java/com/xjrsoft/module/system/dto/XjrMenuGroupSetPageDto.java
  24. 21 0
      src/main/java/com/xjrsoft/module/system/dto/XjrTipsMessagePageDto.java
  25. 84 0
      src/main/java/com/xjrsoft/module/system/entity/XjrMenuGroup.java
  26. 98 0
      src/main/java/com/xjrsoft/module/system/entity/XjrMenuGroupSet.java
  27. 90 0
      src/main/java/com/xjrsoft/module/system/entity/XjrTipsMessage.java
  28. 22 0
      src/main/java/com/xjrsoft/module/system/mapper/XjrMenuGroupMapper.java
  29. 16 0
      src/main/java/com/xjrsoft/module/system/mapper/XjrMenuGroupSetMapper.java
  30. 16 0
      src/main/java/com/xjrsoft/module/system/mapper/XjrTipsMessageMapper.java
  31. 49 0
      src/main/java/com/xjrsoft/module/system/service/IXjrMenuGroupSetService.java
  32. 14 0
      src/main/java/com/xjrsoft/module/system/service/IXjrTipsMessageService.java
  33. 13 0
      src/main/java/com/xjrsoft/module/system/service/impl/LoginServiceImpl.java
  34. 60 4
      src/main/java/com/xjrsoft/module/system/service/impl/MenuServiceImpl.java
  35. 121 0
      src/main/java/com/xjrsoft/module/system/service/impl/XjrMenuGroupSetServiceImpl.java
  36. 19 0
      src/main/java/com/xjrsoft/module/system/service/impl/XjrTipsMessageServiceImpl.java
  37. 3 0
      src/main/java/com/xjrsoft/module/system/vo/LoginByCodeVo.java
  38. 3 0
      src/main/java/com/xjrsoft/module/system/vo/MenuTreeVo.java
  39. 2 0
      src/main/java/com/xjrsoft/module/system/vo/MenuVo.java
  40. 32 0
      src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupMenuListVo.java
  41. 68 0
      src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupSetPageVo.java
  42. 45 0
      src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupSetVo.java
  43. 33 0
      src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupVo.java
  44. 71 0
      src/main/java/com/xjrsoft/module/system/vo/XjrTipsMessagePageVo.java
  45. 39 0
      src/main/java/com/xjrsoft/module/system/vo/XjrTipsMessageVo.java
  46. 9 13
      src/main/java/com/xjrsoft/module/textbook/service/impl/WfTextbookSubscriptionServiceImpl.java
  47. 8 8
      src/main/resources/application-dev.yml
  48. 3 0
      src/main/resources/mapper/organization/UserMapper.xml
  49. 1 1
      src/main/resources/mapper/room/RoomBedMapper.xml
  50. 2 2
      src/main/resources/mapper/student/BaseStudentDevelopmentMapper.xml
  51. 1 1
      src/main/resources/mapper/student/BaseStudentMapper.xml
  52. 2 2
      src/main/resources/mapper/student/BaseStudentScholarshipReleaseMapper.xml
  53. 11 22
      src/main/resources/mapper/student/PbVXsxxsfytbMapper.xml
  54. 16 0
      src/main/resources/mapper/system/XjrMenuGroupMapper.xml
  55. 126 64
      src/test/java/com/xjrsoft/module/job/JianyuekbScheduleTaskTest.java
  56. 60 0
      src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

+ 1 - 1
src/main/java/com/xjrsoft/common/xss/XssHttpServletRequestWrapper.java

@@ -34,7 +34,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
 
     private String method;
 
-    private final List<String> ignoreXssUrl = ListUtil.toList("/magic-api/**", "/magic/web/**");
+    private final List<String> ignoreXssUrl = ListUtil.toList("/magic-api/**", "/magic/web/**","/workflow/execute/*");
     //html过滤
     private final static HTMLFilter HTML_FILTER = new HTMLFilter();
 

+ 2 - 2
src/main/java/com/xjrsoft/module/activity/controller/ActivityInfoController.java

@@ -155,10 +155,10 @@ public class ActivityInfoController {
             Set<ActivityEnrollPageVo> studentSet = enrollList.stream().filter(x -> x.getStudentId() != null).collect(Collectors.toSet());
             infoVo.setStudentCount(studentSet.size());
 
-            Set<ActivityEnrollPageVo> suretSet = enrollList.stream().filter(x -> (x.getStatus() == 1 || x.getStatus() == 2)).collect(Collectors.toSet());
+            Set<ActivityEnrollPageVo> suretSet = enrollList.stream().filter(x -> (x.getStatus() == 2)).collect(Collectors.toSet());
             infoVo.setSureCount(suretSet.size());
 
-            Set<ActivityEnrollPageVo> notSuretSet = enrollList.stream().filter(x -> x.getStatus() == 0).collect(Collectors.toSet());
+            Set<ActivityEnrollPageVo> notSuretSet = enrollList.stream().filter(x -> x.getStatus() == 1).collect(Collectors.toSet());
             infoVo.setNotSureCount(notSuretSet.size());
         }else if(category == 3){
             String tableName = "club_activities";

+ 2 - 2
src/main/java/com/xjrsoft/module/attendance/controller/TeacherStatisticsController.java

@@ -126,7 +126,7 @@ public class TeacherStatisticsController {
             for (TeacherStatisticsPageVo record : voIPage.getRecords()) {
                 LocalDateTime startTime, endTime, amEndTime = null;
                 AttendanceRuleDetailsUserVo detailsUserVo = teacherTodyRuleByUserId.get(record.getUserId());
-                if(dto.getTimePeriod() == 1){
+                if(dto.getTimePeriod() != null && dto.getTimePeriod() == 1){
                     startTime = queryDate.atTime(5, 0, 0);
                     if(detailsUserVo != null && detailsUserVo.getAmStartTime() != null){
                         startTime = queryDate.atTime(detailsUserVo.getAmStartTime());
@@ -135,7 +135,7 @@ public class TeacherStatisticsController {
                     if(detailsUserVo != null && detailsUserVo.getAmEndTime() != null){
                         endTime = queryDate.atTime(detailsUserVo.getAmEndTime());
                     }
-                }else if(dto.getTimePeriod() == 2){
+                }else if(dto.getTimePeriod() != null && dto.getTimePeriod() == 2){
                     startTime = queryDate.atTime(12, 0, 0);
                     if(detailsUserVo != null && detailsUserVo.getPmStartTime() != null){
                         startTime = queryDate.atTime(detailsUserVo.getPmStartTime());

+ 58 - 28
src/main/java/com/xjrsoft/module/base/controller/BaseClassCourseController.java

@@ -4,6 +4,7 @@ import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.excel.support.ExcelTypeEnum;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.model.result.RT;
@@ -22,13 +23,15 @@ import com.xjrsoft.module.base.entity.BaseSemester;
 import com.xjrsoft.module.base.entity.ClassCourseTextbook;
 import com.xjrsoft.module.base.entity.CourseBookInfo;
 import com.xjrsoft.module.base.service.IBaseClassCourseService;
-import com.xjrsoft.module.base.service.impl.BaseCourseSubjectServiceImpl;
+import com.xjrsoft.module.base.service.IBaseClassService;
+import com.xjrsoft.module.base.service.IBaseCourseSubjectService;
+import com.xjrsoft.module.base.service.IBaseSemesterService;
 import com.xjrsoft.module.base.vo.BaseClassCourseExportListVo;
 import com.xjrsoft.module.base.vo.BaseClassCourseListVo;
 import com.xjrsoft.module.base.vo.BaseClassCoursePageVo;
 import com.xjrsoft.module.base.vo.BaseClassCourseVo;
 import com.xjrsoft.module.textbook.entity.Textbook;
-import com.xjrsoft.module.textbook.service.impl.TextbookServiceImpl;
+import com.xjrsoft.module.textbook.service.ITextbookService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
@@ -50,8 +53,10 @@ import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Date;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 /**
  * @title: 班级课程
@@ -68,8 +73,10 @@ public class BaseClassCourseController {
 
     private static final Logger log = LoggerFactory.getLogger(BaseClassCourseController.class);
     private final IBaseClassCourseService baseClassCourseService;
-    private final BaseCourseSubjectServiceImpl baseCourseSubjectServiceImpl;
-    private final TextbookServiceImpl textbookServiceImpl;
+    private final IBaseCourseSubjectService subjectService;
+    private final ITextbookService textbookService;
+    private final IBaseClassService classService;
+    private final IBaseSemesterService semesterService;
 
     @GetMapping(value = "/page")
     @ApiOperation(value = "班级课程列表(分页)")
@@ -167,7 +174,6 @@ public class BaseClassCourseController {
     @ApiOperation(value = "复用课程教材")
     @SaCheckPermission("baseclasscourse:detail")
     public RT<Boolean> insertClassCourseTextbookCombinations(@Valid @RequestBody ClassCourseReuseDto dto) {
-//        baseClassCourseService.markExistingRecordsAsDeleted(newClassId, sourceClassId);
         return RT.ok(baseClassCourseService.duplicateCourseBook(dto));
     }
 
@@ -206,33 +212,57 @@ public class BaseClassCourseController {
         List<BaseClassCourse> baseClassCourses = new ArrayList<>();
         List<String> duplicateLogs = new ArrayList<>();
         List<String> errorLogs = new ArrayList<>();
+        List<BaseClass> classList = classService.list(new QueryWrapper<BaseClass>());
+        Map<String, Long> classMap = new HashMap<>();
+        for (BaseClass baseClass : classList) {
+            classMap.put(baseClass.getName(), baseClass.getId());
+        }
+        List<BaseCourseSubject> courseSubjectList = subjectService.list(new QueryWrapper<BaseCourseSubject>());
+        Map<String, Long> courseSubjectMap = new HashMap<>();
+        for (BaseCourseSubject baseCourseSubject : courseSubjectList) {
+            courseSubjectMap.put(baseCourseSubject.getName(), baseCourseSubject.getId());
+        }
+        List<Textbook> textbookList = textbookService.list(new QueryWrapper<Textbook>());
+        Map<String, Long> textbookMap = new HashMap<>();
+        for (Textbook textbook : textbookList) {
+            textbookMap.put(textbook.getBookName(), textbook.getId());
+        }
+
+        List<BaseSemester> semesterList = semesterService.list(new QueryWrapper<BaseSemester>());
+        Map<String, Long> semesterMap = new HashMap<>();
+        for (BaseSemester baseSemester : semesterList) {
+            semesterMap.put(baseSemester.getName(), baseSemester.getId());
+        }
 
         for (BaseClassCoursePageVo vo : savedDataList) {
-            try {
-                Long classId = Long.parseLong(baseClassCourseService.GetClassIdByName(vo.getClassName()).toString());
-                Long courseId = Long.parseLong(baseClassCourseService.GetCourseIdByName(vo.getCourseName()).toString());
-                Long textbookId = Long.parseLong(baseClassCourseService.GetTextbookIdByName(vo.getTextbookName()).toString());
-                Long baseSemesterId = Long.parseLong(baseClassCourseService.GetBaseSemesterIdByName(vo.getSemester()).toString());
-
-                if (baseClassCourseService.checkExits(classId, courseId, textbookId)) {
-                    duplicateLogs.add(String.format("[输入的信息重复添加] 班级: %s, 课程: %s, 教材: %s", vo.getClassName(), vo.getCourseName(), vo.getTextbookName()));
-                    continue;
-                }
+            String[] textbookNames = vo.getTextbookName().split(" ");
+            for (String textbookName : textbookNames) {
+                try {
+                    Long classId = classMap.get(vo.getClassName());
+                    Long courseId = courseSubjectMap.get(vo.getCourseName());
+                    Long textbookId = textbookMap.get(textbookName);
+                    Long baseSemesterId = semesterMap.get(vo.getSemester());
+
+                    if (baseClassCourseService.checkExits(classId, courseId, textbookId)) {
+                        duplicateLogs.add(String.format("[输入的信息重复添加] 班级: %s, 课程: %s, 教材: %s", vo.getClassName(), vo.getCourseName(), vo.getTextbookName()));
+                        continue;
+                    }
 
-                if (classId != null && courseId != null && textbookId != null && baseSemesterId != null) {
-                    BaseClassCourse baseClassCourse = new BaseClassCourse();
-                    baseClassCourse.setClassId(classId);
-                    baseClassCourse.setCourseId(courseId);
-                    baseClassCourse.setTextbookId(textbookId);
-                    baseClassCourse.setCreateDate(new Date());
-                    baseClassCourse.setDeleteMark(0);
-                    baseClassCourse.setBaseSemesterId(baseSemesterId);
-                    baseClassCourses.add(baseClassCourse);
+                    if (classId != null && courseId != null && textbookId != null && baseSemesterId != null) {
+                        BaseClassCourse baseClassCourse = new BaseClassCourse();
+                        baseClassCourse.setClassId(classId);
+                        baseClassCourse.setCourseId(courseId);
+                        baseClassCourse.setTextbookId(textbookId);
+                        baseClassCourse.setCreateDate(new Date());
+                        baseClassCourse.setDeleteMark(0);
+                        baseClassCourse.setBaseSemesterId(baseSemesterId);
+                        baseClassCourses.add(baseClassCourse);
+                    }
+                } catch (NumberFormatException e) {
+                    errorLogs.add(String.format("[无法解析输入的信息] 班级: %s, 班级: %s, 教材: %s", vo.getClassName(), vo.getCourseName(), vo.getTextbookName()));
+                } catch (Exception e) {
+                    errorLogs.add(String.format("[意外错误(检查输入的名称是否正确且存在,输入错误可能返回 null)] 班级: %s, 课程: %s, 教材: %s - 错误信息:%s", vo.getClassName(), vo.getCourseName(), vo.getTextbookName(), e.getMessage()));
                 }
-            } catch (NumberFormatException e) {
-                errorLogs.add(String.format("[无法解析输入的信息] 班级: %s, 班级: %s, 教材: %s", vo.getClassName(), vo.getCourseName(), vo.getTextbookName()));
-            } catch (Exception e) {
-                errorLogs.add(String.format("[意外错误(检查输入的名称是否正确且存在,输入错误可能返回 null)] 班级: %s, 课程: %s, 教材: %s - 错误信息:%s", vo.getClassName(), vo.getCourseName(), vo.getTextbookName(), e.getMessage()));
             }
         }
 

+ 60 - 62
src/main/java/com/xjrsoft/module/job/JianyuekbScheduleTask.java

@@ -9,7 +9,6 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
-import java.sql.SQLException;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoUnit;
@@ -28,10 +27,10 @@ import java.util.Set;
 @Slf4j
 public class JianyuekbScheduleTask {
     @Scheduled(cron = "0 */10 * * * ?")
-    public void execute() throws SQLException, InterruptedException {
+    public void execute() throws Exception {
         RefreshConnectionPool();
     }
-    public void RefreshConnectionPool() throws SQLException, InterruptedException {
+    public void RefreshConnectionPool() throws Exception {
         String active = SpringUtil.getActiveProfile();
         if(!"prod".equals(active)){
             log.info("非正式环境,无法执行获取课表数据");
@@ -39,66 +38,22 @@ public class JianyuekbScheduleTask {
         }
         String sql = "SELECT * FROM course_receive_msg WHERE delete_mark = 0 AND is_callback IS NULL";
         List<Map<String, Object>> receiveMsgs = SqlRunnerAdapter.db().selectList(sql, CourseReceiveMsg.class);
+        JsonArray allScheduleInfo = new JsonArray();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        DataUtil dataUtil = new DataUtil();
         for (Map<String, Object> receiveMsg : receiveMsgs) {
             String updSql = "update course_receive_msg set is_callback = 0 where id = " + receiveMsg.get("id").toString();
             SqlRunnerAdapter.db().update(updSql);
 
-            doExecute(receiveMsg.get("edu_year_serial_no").toString(), receiveMsg.get("start_date").toString(), receiveMsg.get("end_date").toString());
+            String eduYearSerialNo = receiveMsg.get("edu_year_serial_no").toString();
 
-            updSql = "update course_receive_msg set is_callback = 1 where id = " + receiveMsg.get("id").toString();
-            SqlRunnerAdapter.db().update(updSql);
-        }
-    }
-
-    void doExecute(String eduYearSerialNo, String startDateStr, String endDateStr){
-        log.info("开始获取课表数据");
-        try {
-            String sql = "SELECT distinct table_name FROM jianyue_data WHERE 1 = 1";
-            List<Map<String, Object>> query = SqlRunnerAdapter.db().selectList(sql);
-            Set<String> tables = new HashSet<>();
-            for (Map<String, Object> jianyueData : query) {
-                tables.add(jianyueData.get("table_name").toString());
-            }
-            sql = "SELECT * FROM jianyue_data WHERE 0 = 0";
-            List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList(sql);
-            Map<String, Map<String, String>> dataMap = new HashMap<>();
-            for (String table : tables) {
-                Map<String, String> tableData = new HashMap<>();
-                for (Map<String, Object> jianyueData : list) {
-                    if(!table.equals(jianyueData.get("table_name").toString())){
-                        continue;
-                    }
-                    tableData.put(jianyueData.get("jianyue_id").toString(), jianyueData.get("source_id").toString());
-                }
-                dataMap.put(table, tableData);
-            }
-            DataUtil dataUtil = new DataUtil();
-            //获取年级
-            String tableName = "base_grade";
-//            Map<String, Long> gradeMap = dataMap.get(tableName);
-            //获取学期
-            tableName = "base_semester";
-            Map<String, String> semesterMap = dataMap.get(tableName);
-            //获取课程
-            tableName = "base_course_subject";
-            Map<String, String> courseMap = dataMap.get(tableName);
-            //获取教职工
-            tableName = "base_teacher";
-            Map<String, String> teacherMap = dataMap.get(tableName);
-            //获取行政班
-            tableName = "base_class";
-            Map<String, String> classMap = dataMap.get(tableName);
-
-            tableName = "base_classroom";
-            Map<String, String> classroomMap = dataMap.get(tableName);
-            LocalDate startDateObj = LocalDate.parse(startDateStr);
-            LocalDate endDateObj = LocalDate.parse(endDateStr);
+            LocalDate startDateObj = LocalDate.parse(receiveMsg.get("start_date").toString());
+            LocalDate endDateObj = LocalDate.parse(receiveMsg.get("end_date").toString());
             long between = ChronoUnit.DAYS.between(startDateObj, endDateObj);
-            long times = (between / 7) + 1;
-            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-            JsonArray allScheduleInfo = new JsonArray();
-            for (int i = 0; i < times; i ++) {
-                LocalDate statrTime = startDateObj.plusDays(i * 7L);
+            int times = Integer.parseInt(((between / 7) + 1) + "");
+
+            for (int index = 0; index < times; index ++) {
+                LocalDate statrTime = startDateObj.plusDays(index * 7L);
                 String startDate = statrTime.format(formatter);
                 LocalDate endTime = statrTime.plusDays(6L);
                 if(endTime.isAfter(endDateObj)){
@@ -110,12 +65,55 @@ public class JianyuekbScheduleTask {
                 JsonArray scheduleInfo = dataUtil.getScheduleInfoByGrade(eduYearSerialNo, startDate, endDate);
                 allScheduleInfo.addAll(scheduleInfo);
             }
-            dataUtil.insertCourseTableEntiy(allScheduleInfo, classroomMap, courseMap, semesterMap, teacherMap, classMap);
-            dataUtil.insertClassTime(allScheduleInfo);
-            log.info("课表数据获取完成");
-        } catch (Exception e) {
-            log.error(e.getMessage(), e);
+
+            updSql = "update course_receive_msg set is_callback = 1 where id = " + receiveMsg.get("id").toString();
+            SqlRunnerAdapter.db().update(updSql);
+        }
+        doExecute(allScheduleInfo);
+    }
+
+    void doExecute(JsonArray scheduleInfo){
+        String sql = "SELECT distinct table_name FROM jianyue_data WHERE 1 = 1";
+        List<Map<String, Object>> query = SqlRunnerAdapter.db().selectList(sql);
+        Set<String> tables = new HashSet<>();
+        for (Map<String, Object> jianyueData : query) {
+            tables.add(jianyueData.get("table_name").toString());
         }
+        sql = "SELECT * FROM jianyue_data WHERE 0 = 0";
+        List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList(sql);
+        Map<String, Map<String, String>> dataMap = new HashMap<>();
+        for (String table : tables) {
+            Map<String, String> tableData = new HashMap<>();
+            for (Map<String, Object> jianyueData : list) {
+                if(!table.equals(jianyueData.get("table_name").toString())){
+                    continue;
+                }
+                tableData.put(jianyueData.get("jianyue_id").toString(), jianyueData.get("source_id").toString());
+            }
+            dataMap.put(table, tableData);
+        }
+        DataUtil dataUtil = new DataUtil();
+        //获取年级
+        String tableName = "base_grade";
+//            Map<String, Long> gradeMap = dataMap.get(tableName);
+        //获取学期
+        tableName = "base_semester";
+        Map<String, String> semesterMap = dataMap.get(tableName);
+        //获取课程
+        tableName = "base_course_subject";
+        Map<String, String> courseMap = dataMap.get(tableName);
+        //获取教职工
+        tableName = "base_teacher";
+        Map<String, String> teacherMap = dataMap.get(tableName);
+        //获取行政班
+        tableName = "base_class";
+        Map<String, String> classMap = dataMap.get(tableName);
+
+        tableName = "base_classroom";
+        Map<String, String> classroomMap = dataMap.get(tableName);
+
+        dataUtil.insertCourseTableEntiy(scheduleInfo, classroomMap, courseMap, semesterMap, teacherMap, classMap);
+        dataUtil.insertClassTime(scheduleInfo);
     }
 
 }

+ 19 - 13
src/main/java/com/xjrsoft/module/schedule/util/DataUtil.java

@@ -24,8 +24,10 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 /**
  * @author dzx
@@ -616,23 +618,28 @@ public class DataUtil {
 
     public void insertCourseTableEntiy(JsonArray data, Map<String, String> classroomMap, Map<String, String> coureseMap,
                                   Map<String, String> semesterMap, Map<String, String> teacherMap, Map<String, String> classMap) {
-//        List<String> sqls = new ArrayList<>();
-//        Map<Integer, String> week = ScheduleUtil.getWeek();
         Map<Integer, Integer> tmePeriod = ScheduleUtil.getTmePeriod();
         String tableName = "course_table";
         List<Entity> entityList = new ArrayList();
         SimpleDateFormat sdf = new SimpleDateFormat("yyy-MM-dd HH:mm:ss");
+        List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList("select * from course_table");
+        Set<String> serialNos = new HashSet<>();
+        for (Map<String, Object> objectMap : list) {
+            if(objectMap.get("jianyue_id") == null){
+                continue;
+            }
+            serialNos.add(objectMap.get("jianyue_id").toString());
+        }
         for (JsonElement jsonElement : data) {
             JsonObject asJsonObject = jsonElement.getAsJsonObject();
             JsonArray teachers = asJsonObject.get("teachers").getAsJsonArray();
             if(asJsonObject.get("courseClassId").isJsonNull() || coureseMap.get(asJsonObject.get("courseClassId").getAsString()) == null){
                 continue;
             }
-            String numberOfDayName = asJsonObject.get("numberOfDayName").getAsString();
-            Integer timeNumber = 0;//节次
-            if(!StrUtil.isEmpty(numberOfDayName)){
-                timeNumber = Integer.parseInt(numberOfDayName.substring(numberOfDayName.length() - 1));
+            if(serialNos.contains(asJsonObject.get("id").getAsString())){
+                continue;
             }
+            int timeNumber = asJsonObject.get("numberOfDay").getAsInt();//节次
 
             Entity entity = Entity.create(tableName);
             entity.set("id", IdUtil.getSnowflakeNextId());
@@ -688,26 +695,25 @@ public class DataUtil {
             json.add("numberOfDay", asJsonObject.get("numberOfDay"));
             infoMap.put(numberOfDayName, json);
         }
-//        List<String> sqls = new ArrayList<>();
         int count = 1;
         for (String number : infoMap.keySet()) {
-            String substring1 = number.substring(number.length() - 1);
             JsonObject jsonObject = infoMap.get(number);
+            int timeNumber = jsonObject.get("numberOfDay").getAsInt();//节次
             long id = System.currentTimeMillis();
-            String fullName = "第" +substring1 + "节课";
+
             String sql = "INSERT INTO class_time(id,time_period,number,full_name,short_name,create_date,summer_start_time"
                     + ",summer_end_time,winter_start_time,winter_end_time) select " + id + String.format("%04d", count) + ","
                     + jsonObject.get("tmePeriod").getAsInt() + ","
-                    + substring1 + ","
-                    + "'" + fullName + "',"
-                    + "'" + fullName + "',now(),"
+                    + timeNumber + ","
+                    + "'" + number + "',"
+                    + "'" + number + "',now(),"
                     + "'" + jsonObject.get("startTime").getAsString() + "',"
                     + "'" + jsonObject.get("endTime").getAsString() + "',"
                     + "'" + jsonObject.get("startTime").getAsString() + "',"
                     + "'" + jsonObject.get("endTime").getAsString() + "' FROM DUAL"
                     + " WHERE NOT EXISTS(SELECT * FROM class_time WHERE time_period = "
                     + jsonObject.get("tmePeriod").getAsInt()
-                    + " and number = " + substring1 + ")";
+                    + " and number = " + timeNumber + ")";
 //            sqls.add(sql);
             SqlRunnerAdapter.db().insert(sql);
             count ++;

+ 1 - 0
src/main/java/com/xjrsoft/module/schedule/util/ScheduleUtil.java

@@ -158,6 +158,7 @@ public class ScheduleUtil {
 
     public static Map<Integer, Integer> getTmePeriod(){
         Map<Integer, Integer> map = new HashMap<>();
+        map.put(1, 0);
         map.put(2, 1);
         map.put(3, 2);
         map.put(4, 3);

+ 28 - 2
src/main/java/com/xjrsoft/module/student/controller/BaseStudentDevelopmentController.java

@@ -2,9 +2,12 @@ package com.xjrsoft.module.student.controller;
 
 import cn.dev33.satoken.annotation.SaCheckPermission;
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.db.Entity;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.github.yulichang.wrapper.MPJLambdaWrapper;
 import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
 import com.xjrsoft.common.page.ConventPage;
 import com.xjrsoft.common.page.PageOutput;
 import com.xjrsoft.common.utils.VoToColumnUtil;
@@ -30,6 +33,7 @@ import org.springframework.web.bind.annotation.RestController;
 import javax.validation.Valid;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
 * @title: 学生去向登记
@@ -51,7 +55,7 @@ public class BaseStudentDevelopmentController {
     @SaCheckPermission("basestudentdevelopment:detail")
     public RT<PageOutput<BaseStudentDevelopmentPageVo>> page(@Valid BaseStudentDevelopmentPageDto dto){
 
-        LambdaQueryWrapper<BaseStudentDevelopment> queryWrapper = new LambdaQueryWrapper<>();
+        MPJLambdaWrapper<BaseStudentDevelopment> queryWrapper = new MPJLambdaWrapper<BaseStudentDevelopment>();
         queryWrapper
                 .eq(BaseStudentDevelopment::getBaseStudentGraduateId, dto.getBaseStudentGraduateId())
                     .orderByDesc(BaseStudentDevelopment::getId)
@@ -79,6 +83,18 @@ public class BaseStudentDevelopmentController {
     public RT<Boolean> add(@Valid @RequestBody AddBaseStudentDevelopmentDto dto){
         BaseStudentDevelopment baseStudentDevelopment = BeanUtil.toBean(dto, BaseStudentDevelopment.class);
         baseStudentDevelopment.setCreateDate(new Date());
+
+        if(baseStudentDevelopment.getCompanyCoopId() != null){
+            String tableName = "company_coop";
+            Entity entity = Entity.create(tableName);
+            entity.set("id", baseStudentDevelopment.getCompanyCoopId());
+
+            Map<String, Object> objectMap = SqlRunnerAdapter.db().dynamicSelectOne(tableName, entity);
+            if(objectMap != null){
+                baseStudentDevelopment.setWorkCompany(objectMap.get("company_name").toString());
+                baseStudentDevelopment.setCompanyScale(objectMap.get("company_size").toString());
+            }
+        }
         boolean isSuccess = developmentService.save(baseStudentDevelopment);
         return RT.ok(isSuccess);
     }
@@ -90,6 +106,17 @@ public class BaseStudentDevelopmentController {
 
         BaseStudentDevelopment baseStudentDevelopment = BeanUtil.toBean(dto, BaseStudentDevelopment.class);
         baseStudentDevelopment.setModifyDate(new Date());
+        if(baseStudentDevelopment.getCompanyCoopId() != null){
+            String tableName = "company_coop";
+            Entity entity = Entity.create(tableName);
+            entity.set("id", baseStudentDevelopment.getCompanyCoopId());
+
+            Map<String, Object> objectMap = SqlRunnerAdapter.db().dynamicSelectOne(tableName, entity);
+            if(objectMap != null){
+                baseStudentDevelopment.setWorkCompany(objectMap.get("company_name").toString());
+                baseStudentDevelopment.setCompanyScale(objectMap.get("company_size").toString());
+            }
+        }
         return RT.ok(developmentService.updateById(baseStudentDevelopment));
 
     }
@@ -99,7 +126,6 @@ public class BaseStudentDevelopmentController {
     @SaCheckPermission("basestudentdevelopment:delete")
     public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
         return RT.ok(developmentService.removeBatchByIds(ids));
-
     }
 
 }

+ 2 - 1
src/main/java/com/xjrsoft/module/student/controller/BaseStudentScholarshipReleaseController.java

@@ -144,13 +144,14 @@ public class BaseStudentScholarshipReleaseController {
             for (BaseStudentScholarshipApplicant applicantVo : applicantList) {
                 applicantVo.setScholarshipLevel(dto.getScholarshipLevel());
                 applicantVo.setBaseStudentScholarshipCategoryId(dto.getBaseStudentScholarshipCategoryId());
+                applicantVo.setReviewStatus(1);
                 dataList.add(applicantVo);
 
                 insertList.add(
                         new BaseStudentScholarshipRelease(){{
+                            setCreateDate(new Date());
                             setAmount(applicantVo.getAmount());
                             setBaseStudentScholarshipApplicantId(applicantVo.getId());
-                            setReleaseDate(new Date());
                         }}
                 );
             }

+ 2 - 1
src/main/java/com/xjrsoft/module/student/controller/CadreDeptController.java

@@ -118,8 +118,9 @@ public class CadreDeptController {
         //校验code唯一性
         if(ObjectUtil.isNotNull(dto.getCode())){
             CadreDept cadreDept = cadreDeptService.getOne(Wrappers.<CadreDept>lambdaQuery()
+                            .ne(CadreDept::getId, dto.getId())
                     .eq(CadreDept::getCode,dto.getCode()));
-            if(ObjectUtil.isNotNull(cadreDept) && cadreDept.getId() != (dto.getId())){
+            if(ObjectUtil.isNotNull(cadreDept)){
                 throw new MyException("干部部门编号不唯一");
             }
         }

+ 5 - 0
src/main/java/com/xjrsoft/module/student/dto/BaseStudentSimpleInfoDto.java

@@ -15,4 +15,9 @@ public class BaseStudentSimpleInfoDto {
 
     @ApiModelProperty("用户id")
     private Long userId;
+
+    @ApiModelProperty("姓名")
+    private String name;
+
+    private String idNumber;
 }

+ 1 - 1
src/main/java/com/xjrsoft/module/student/vo/BaseStudentDevelopmentPageVo.java

@@ -58,7 +58,7 @@ public class BaseStudentDevelopmentPageVo {
     * 是否灵活就业(1:是 0:否)
     */
     @ApiModelProperty("工作内容")
-    private Integer workContent;
+    private String workContent;
     /**
     * 是否校企合作单位(1:是 0:否)
     */

+ 10 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentDevelopmentVo.java

@@ -109,6 +109,14 @@ public class BaseStudentDevelopmentVo {
     */
     @ApiModelProperty("升学渠道(xjr_dictionary_item[ascending_channels])")
     private String ascendingChannelsCn;
+
+    @ApiModelProperty("学生类型(xjr_dictionary_item[culture_type])")
+    private String cultureType;
+    /**
+     * 升学渠道(xjr_dictionary_item[ascending_channels])
+     */
+    @ApiModelProperty("升学渠道(xjr_dictionary_item[ascending_channels])")
+    private String ascendingChannels;
     /**
     * 学校名称
     */
@@ -140,6 +148,8 @@ public class BaseStudentDevelopmentVo {
     @ApiModelProperty("备注信息")
     private String remark;
 
+    @ApiModelProperty("未就业类型(xjr_dictionary_item[unemployed_type])")
+    private String unemployedType;
 
 
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/student/vo/BaseStudentUserPageVo.java

@@ -41,4 +41,7 @@ public class BaseStudentUserPageVo {
 
     @ApiModelProperty("学习形式")
     private String learnStatusCn;
+
+    @ApiModelProperty("工号/学号")
+    private String userName;
 }

+ 109 - 0
src/main/java/com/xjrsoft/module/system/controller/XjrMenuGroupSetController.java

@@ -0,0 +1,109 @@
+package com.xjrsoft.module.system.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.system.dto.AddXjrMenuGroupDto;
+import com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto;
+import com.xjrsoft.module.system.dto.XjrMenuGroupSetPageDto;
+import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
+import com.xjrsoft.module.system.service.IXjrMenuGroupSetService;
+import com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo;
+import com.xjrsoft.module.system.vo.XjrMenuGroupSetPageVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/system" + "/xjrMenuGroupSet")
+@Api(value = "/system"  + "/xjrMenuGroupSet",tags = "功能分类设置代码")
+@AllArgsConstructor
+public class XjrMenuGroupSetController {
+
+
+    private final IXjrMenuGroupSetService xjrMenuGroupSetService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="功能分类设置列表(分页)")
+    @SaCheckPermission("xjrmenugroupset:detail")
+    public RT<PageOutput<XjrMenuGroupSetPageVo>> page(@Valid XjrMenuGroupSetPageDto dto){
+
+        LambdaQueryWrapper<XjrMenuGroupSet> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                    .orderByDesc(XjrMenuGroupSet::getId)
+                .select(XjrMenuGroupSet.class,x -> VoToColumnUtil.fieldsToColumns(XjrMenuGroupSetPageVo.class).contains(x.getProperty()));
+        IPage<XjrMenuGroupSet> page = xjrMenuGroupSetService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<XjrMenuGroupSetPageVo> pageOutput = ConventPage.getPageOutput(page, XjrMenuGroupSetPageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+//    @GetMapping(value = "/info")
+//    @ApiOperation(value="根据id查询功能分类设置信息")
+//    @SaCheckPermission("xjrmenugroupset:detail")
+//    public RT<XjrMenuGroupSetVo> info(@RequestParam Long id){
+//        XjrMenuGroupSet xjrMenuGroupSet = xjrMenuGroupSetService.getByIdDeep(id);
+//        if (xjrMenuGroupSet == null) {
+//           return RT.error("找不到此数据!");
+//        }
+//        return RT.ok(BeanUtil.toBean(xjrMenuGroupSet, XjrMenuGroupSetVo.class));
+//    }
+//
+//
+//    @PostMapping
+//    @ApiOperation(value = "新增功能分类设置")
+//    @SaCheckPermission("xjrmenugroupset:add")
+//    public RT<Boolean> add(@Valid @RequestBody AddXjrMenuGroupSetDto dto){
+//        XjrMenuGroupSet xjrMenuGroupSet = BeanUtil.toBean(dto, XjrMenuGroupSet.class);
+//        boolean isSuccess = xjrMenuGroupSetService.add(xjrMenuGroupSet);
+//        return RT.ok(isSuccess);
+//    }
+//
+//    @PutMapping
+//    @ApiOperation(value = "修改功能分类设置")
+//    @SaCheckPermission("xjrmenugroupset:edit")
+//    public RT<Boolean> update(@Valid @RequestBody UpdateXjrMenuGroupSetDto dto){
+//        XjrMenuGroupSet xjrMenuGroupSet = BeanUtil.toBean(dto, XjrMenuGroupSet.class);
+//        return RT.ok(xjrMenuGroupSetService.update(xjrMenuGroupSet));
+//    }
+//
+//    @DeleteMapping
+//    @ApiOperation(value = "删除功能分类设置")
+//    @SaCheckPermission("xjrmenugroupset:delete")
+//    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+//        return RT.ok(xjrMenuGroupSetService.delete(ids));
+//    }
+
+    @GetMapping(value = "/menu-list")
+    @ApiOperation(value = "查询学生菜单")
+    @SaCheckPermission("xjrmenugroupset:detail")
+    public RT<List<XjrMenuGroupMenuListVo>> menuList(@Valid XjrMenuGroupMenuListDto dto){
+        return RT.ok(xjrMenuGroupSetService.getMenuList(dto));
+    }
+
+    @PostMapping(value = "/set-menu")
+    @ApiOperation(value = "配置功能")
+    @SaCheckPermission("xjrmenugroupset:add")
+    public RT<Boolean> setMenu(@Valid @RequestBody AddXjrMenuGroupDto dto){
+        boolean isSuccess = xjrMenuGroupSetService.setMenu(dto);
+        return RT.ok(isSuccess);
+    }
+
+}

+ 145 - 0
src/main/java/com/xjrsoft/module/system/controller/XjrTipsMessageController.java

@@ -0,0 +1,145 @@
+package com.xjrsoft.module.system.controller;
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.xjrsoft.common.model.result.RT;
+import com.xjrsoft.common.page.ConventPage;
+import com.xjrsoft.common.page.PageOutput;
+import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.system.dto.AddXjrTipsMessageDto;
+import com.xjrsoft.module.system.dto.UpdateXjrTipsMessageDto;
+import com.xjrsoft.module.system.dto.XjrTipsMessagePageDto;
+import com.xjrsoft.module.system.entity.XjrTipsMessage;
+import com.xjrsoft.module.system.service.IXjrTipsMessageService;
+import com.xjrsoft.module.system.vo.XjrTipsMessagePageVo;
+import com.xjrsoft.module.system.vo.XjrTipsMessageVo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@RestController
+@RequestMapping("/system" + "/xjrTipsMessage")
+@Api(value = "/system"  + "/xjrTipsMessage",tags = "系统提示信息设置代码")
+@AllArgsConstructor
+public class XjrTipsMessageController {
+
+
+    private final IXjrTipsMessageService xjrTipsMessageService;
+
+    @GetMapping(value = "/page")
+    @ApiOperation(value="系统提示信息设置列表(分页)")
+    @SaCheckPermission("xjrtipsmessage:detail")
+    public RT<PageOutput<XjrTipsMessagePageVo>> page(@Valid XjrTipsMessagePageDto dto){
+
+        LambdaQueryWrapper<XjrTipsMessage> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .orderByDesc(XjrTipsMessage::getId)
+                .eq(ObjectUtil.isNotNull(dto), XjrTipsMessage::getGroupName, dto.getGroupName())
+                .select(XjrTipsMessage.class,x -> VoToColumnUtil.fieldsToColumns(XjrTipsMessagePageVo.class).contains(x.getProperty()));
+        IPage<XjrTipsMessage> page = xjrTipsMessageService.page(ConventPage.getPage(dto), queryWrapper);
+        PageOutput<XjrTipsMessagePageVo> pageOutput = ConventPage.getPageOutput(page, XjrTipsMessagePageVo.class);
+        return RT.ok(pageOutput);
+    }
+
+    @GetMapping(value = "/list")
+    @ApiOperation(value="系统提示信息设置列表")
+    @SaCheckPermission("xjrtipsmessage:detail")
+    public RT<List<XjrTipsMessagePageVo>> list(@Valid XjrTipsMessagePageDto dto){
+
+        LambdaQueryWrapper<XjrTipsMessage> queryWrapper = new LambdaQueryWrapper<>();
+        queryWrapper
+                .eq(ObjectUtil.isNotNull(dto), XjrTipsMessage::getGroupName, dto.getGroupName())
+                .orderByDesc(XjrTipsMessage::getId)
+                .select(XjrTipsMessage.class,x -> VoToColumnUtil.fieldsToColumns(XjrTipsMessagePageVo.class).contains(x.getProperty()));
+        List<XjrTipsMessage> list = xjrTipsMessageService.list(queryWrapper);
+        return RT.ok(BeanUtil.copyToList(list, XjrTipsMessagePageVo.class));
+    }
+
+    @GetMapping(value = "/info")
+    @ApiOperation(value="根据id查询系统提示信息设置信息")
+    @SaCheckPermission("xjrtipsmessage:detail")
+    public RT<XjrTipsMessageVo> info(@RequestParam Long id){
+        XjrTipsMessage xjrTipsMessage = xjrTipsMessageService.getById(id);
+        if (xjrTipsMessage == null) {
+           return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(xjrTipsMessage, XjrTipsMessageVo.class));
+    }
+
+    @GetMapping(value = "/infoByCode")
+    @ApiOperation(value="根据code查询系统提示信息设置信息")
+    @SaCheckPermission("xjrtipsmessage:detail")
+    public RT<XjrTipsMessageVo> infoByCode(@RequestParam String code){
+        XjrTipsMessage xjrTipsMessage = xjrTipsMessageService.getOne(
+                new QueryWrapper<XjrTipsMessage>().lambda().eq(XjrTipsMessage::getCode, code)
+        );
+        if (xjrTipsMessage == null) {
+            return RT.error("找不到此数据!");
+        }
+        return RT.ok(BeanUtil.toBean(xjrTipsMessage, XjrTipsMessageVo.class));
+    }
+
+
+    @PostMapping
+    @ApiOperation(value = "新增系统提示信息设置")
+    @SaCheckPermission("xjrtipsmessage:add")
+    public RT<Boolean> add(@Valid @RequestBody AddXjrTipsMessageDto dto){
+        long count = xjrTipsMessageService.count(
+                new QueryWrapper<XjrTipsMessage>().lambda()
+                        .eq(XjrTipsMessage::getCode, dto.getCode())
+        );
+        if(count > 0){
+            return RT.error("code已存在!请保证code唯一!");
+        }
+        XjrTipsMessage xjrTipsMessage = BeanUtil.toBean(dto, XjrTipsMessage.class);
+        boolean isSuccess = xjrTipsMessageService.save(xjrTipsMessage);
+        return RT.ok(isSuccess);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "修改系统提示信息设置")
+    @SaCheckPermission("xjrtipsmessage:edit")
+    public RT<Boolean> update(@Valid @RequestBody UpdateXjrTipsMessageDto dto){
+        long count = xjrTipsMessageService.count(
+                new QueryWrapper<XjrTipsMessage>().lambda()
+                        .eq(XjrTipsMessage::getCode, dto.getCode())
+                        .ne(XjrTipsMessage::getId, dto.getId())
+        );
+        if(count > 0){
+            return RT.error("code已存在!请保证code唯一!");
+        }
+        XjrTipsMessage xjrTipsMessage = BeanUtil.toBean(dto, XjrTipsMessage.class);
+        return RT.ok(xjrTipsMessageService.updateById(xjrTipsMessage));
+
+    }
+
+    @DeleteMapping
+    @ApiOperation(value = "删除系统提示信息设置")
+    @SaCheckPermission("xjrtipsmessage:delete")
+    public RT<Boolean> delete(@Valid @RequestBody List<Long> ids){
+        return RT.ok(xjrTipsMessageService.removeBatchByIds(ids));
+
+    }
+
+}

+ 32 - 0
src/main/java/com/xjrsoft/module/system/dto/AddXjrMenuGroupDto.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+/**
+* @title: 功能分类设置菜单关联表
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class AddXjrMenuGroupDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 菜单id(xjr_menu)
+    */
+    @ApiModelProperty("菜单id(xjr_menu)")
+    private List<Long> xjrMenuIds;
+    /**
+    * 功能分类设置(xjr_menu_group_set)
+    */
+    @ApiModelProperty("功能分类设置(xjr_menu_group_set)")
+    private Long xjrMenuGroupSetId;
+
+}

+ 43 - 0
src/main/java/com/xjrsoft/module/system/dto/AddXjrMenuGroupSetDto.java

@@ -0,0 +1,43 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class AddXjrMenuGroupSetDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 功能分类名称
+    */
+    @ApiModelProperty("功能分类名称")
+    private String name;
+    /**
+    * 分组代码(xjr_dictionary_item[xjr_menu_group])
+    */
+    @ApiModelProperty("分组代码(xjr_dictionary_item[xjr_menu_group])")
+    private String code;
+    /**
+    * 使用范围(1:全部学生 2:白名单学生)
+    */
+    @ApiModelProperty("使用范围(1:全部学生 2:白名单学生)")
+    private Integer useRange;
+
+    /**
+    * xjrMenuGroup
+    */
+    @ApiModelProperty("xjrMenuGroup子表")
+    private List<AddXjrMenuGroupDto> xjrMenuGroupList;
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/system/dto/AddXjrTipsMessageDto.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Data
+public class AddXjrTipsMessageDto implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 消息分组
+    */
+    @ApiModelProperty("消息分组")
+    private String groupName;
+    /**
+    * 唯一code
+    */
+    @ApiModelProperty("唯一code")
+    private String code;
+    /**
+    * 消息内容
+    */
+    @ApiModelProperty("消息内容")
+    private String content;
+
+    @ApiModelProperty("提示名称")
+    private String name;
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/system/dto/UpdateXjrMenuGroupSetDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class UpdateXjrMenuGroupSetDto extends AddXjrMenuGroupSetDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 24 - 0
src/main/java/com/xjrsoft/module/system/dto/UpdateXjrTipsMessageDto.java

@@ -0,0 +1,24 @@
+package com.xjrsoft.module.system.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Data
+public class UpdateXjrTipsMessageDto extends AddXjrTipsMessageDto {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+}

+ 21 - 0
src/main/java/com/xjrsoft/module/system/dto/XjrMenuGroupMenuListDto.java

@@ -0,0 +1,21 @@
+package com.xjrsoft.module.system.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 功能分类设置分页查询入参
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class XjrMenuGroupMenuListDto extends PageInput {
+
+    @ApiModelProperty("功能分类设置id")
+    private Long xjrMenuGroupSetId;
+}

+ 19 - 0
src/main/java/com/xjrsoft/module/system/dto/XjrMenuGroupSetPageDto.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.system.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 功能分类设置分页查询入参
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class XjrMenuGroupSetPageDto extends PageInput {
+
+
+}

+ 21 - 0
src/main/java/com/xjrsoft/module/system/dto/XjrTipsMessagePageDto.java

@@ -0,0 +1,21 @@
+package com.xjrsoft.module.system.dto;
+
+import com.xjrsoft.common.page.PageInput;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+
+/**
+* @title: 系统提示信息设置分页查询入参
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Data
+@EqualsAndHashCode(callSuper = false)
+public class XjrTipsMessagePageDto extends PageInput {
+
+    @ApiModelProperty("分组名称(精准查询)")
+    private String groupName;
+}

+ 84 - 0
src/main/java/com/xjrsoft/module/system/entity/XjrMenuGroup.java

@@ -0,0 +1,84 @@
+package com.xjrsoft.module.system.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 功能分类设置菜单关联表
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+@TableName("xjr_menu_group")
+@ApiModel(value = "xjr_menu_group", description = "功能分类设置菜单关联表")
+public class XjrMenuGroup implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改日期
+    */
+    @ApiModelProperty("修改日期")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标记
+    */
+    @ApiModelProperty("有效标记")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 菜单id(xjr_menu)
+    */
+    @ApiModelProperty("菜单id(xjr_menu)")
+    private Long xjrMenuId;
+    /**
+    * 功能分类设置(xjr_menu_group_set)
+    */
+    @ApiModelProperty("功能分类设置(xjr_menu_group_set)")
+    private Long xjrMenuGroupSetId;
+
+
+}

+ 98 - 0
src/main/java/com/xjrsoft/module/system/entity/XjrMenuGroupSet.java

@@ -0,0 +1,98 @@
+package com.xjrsoft.module.system.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.github.yulichang.annotation.EntityMapping;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+@TableName("xjr_menu_group_set")
+@ApiModel(value = "xjr_menu_group_set", description = "功能分类设置")
+public class XjrMenuGroupSet implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改日期
+    */
+    @ApiModelProperty("修改日期")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标记
+    */
+    @ApiModelProperty("有效标记")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 功能分类名称
+    */
+    @ApiModelProperty("功能分类名称")
+    private String name;
+    /**
+    * 分组代码(xjr_dictionary_item[xjr_menu_group])
+    */
+    @ApiModelProperty("分组代码(xjr_dictionary_item[xjr_menu_group])")
+    private String code;
+    /**
+    * 使用范围(1:全部学生 2:白名单学生)
+    */
+    @ApiModelProperty("使用范围(1:全部学生 2:白名单学生)")
+    private Integer useRange;
+
+    /**
+    * xjrMenuGroup
+    */
+    @ApiModelProperty("xjrMenuGroup子表")
+    @TableField(exist = false)
+    @EntityMapping(thisField = "id", joinField = "xjrMenuGroupSetId")
+    private List<XjrMenuGroup> xjrMenuGroupList;
+
+}

+ 90 - 0
src/main/java/com/xjrsoft/module/system/entity/XjrTipsMessage.java

@@ -0,0 +1,90 @@
+package com.xjrsoft.module.system.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Data
+@TableName("xjr_tips_message")
+@ApiModel(value = "xjr_tips_message", description = "系统提示信息设置")
+public class XjrTipsMessage implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    @TableId
+    private Long id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    @TableField(fill = FieldFill.INSERT)
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    @TableField(fill = FieldFill.INSERT)
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    @TableField(fill = FieldFill.UPDATE)
+    private Long modifyUserId;
+    /**
+    * 修改日期
+    */
+    @ApiModelProperty("修改日期")
+    @TableField(fill = FieldFill.UPDATE)
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    @TableField(fill = FieldFill.INSERT)
+    @TableLogic
+    private Integer deleteMark;
+    /**
+    * 有效标记
+    */
+    @ApiModelProperty("有效标记")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer enabledMark;
+    /**
+    * 消息分组
+    */
+    @ApiModelProperty("消息分组")
+    private String groupName;
+    /**
+    * 唯一code
+    */
+    @ApiModelProperty("唯一code")
+    private String code;
+    /**
+    * 消息内容
+    */
+    @ApiModelProperty("消息内容")
+    private String content;
+
+    @ApiModelProperty("提示名称")
+    private String name;
+}

+ 22 - 0
src/main/java/com/xjrsoft/module/system/mapper/XjrMenuGroupMapper.java

@@ -0,0 +1,22 @@
+package com.xjrsoft.module.system.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto;
+import com.xjrsoft.module.system.entity.XjrMenuGroup;
+import com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+* @title: 功能分类设置菜单关联表
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Mapper
+public interface XjrMenuGroupMapper extends MPJBaseMapper<XjrMenuGroup> {
+
+    List<XjrMenuGroupMenuListVo> getMenuList(@Param("dto")XjrMenuGroupMenuListDto dto);
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/system/mapper/XjrMenuGroupSetMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.system.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Mapper
+public interface XjrMenuGroupSetMapper extends MPJBaseMapper<XjrMenuGroupSet> {
+
+}

+ 16 - 0
src/main/java/com/xjrsoft/module/system/mapper/XjrTipsMessageMapper.java

@@ -0,0 +1,16 @@
+package com.xjrsoft.module.system.mapper;
+
+import com.github.yulichang.base.MPJBaseMapper;
+import com.xjrsoft.module.system.entity.XjrTipsMessage;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Mapper
+public interface XjrTipsMessageMapper extends MPJBaseMapper<XjrTipsMessage> {
+
+}

+ 49 - 0
src/main/java/com/xjrsoft/module/system/service/IXjrMenuGroupSetService.java

@@ -0,0 +1,49 @@
+package com.xjrsoft.module.system.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.system.dto.AddXjrMenuGroupDto;
+import com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto;
+import com.xjrsoft.module.system.entity.XjrMenuGroup;
+import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
+import com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo;
+
+import java.util.List;
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+
+public interface IXjrMenuGroupSetService extends MPJBaseService<XjrMenuGroupSet> {
+    /**
+    * 新增
+    *
+    * @param xjrMenuGroupSet
+    * @return
+    */
+    Boolean add(XjrMenuGroupSet xjrMenuGroupSet);
+
+    /**
+    * 更新
+    *
+    * @param xjrMenuGroupSet
+    * @return
+    */
+    Boolean update(XjrMenuGroupSet xjrMenuGroupSet);
+
+    /**
+    * 删除
+    *
+    * @param ids
+    * @return
+    */
+    Boolean delete(List<Long> ids);
+
+    List<XjrMenuGroupMenuListVo> getMenuList(XjrMenuGroupMenuListDto dto);
+
+    Boolean setMenu(AddXjrMenuGroupDto dto);
+
+    List<XjrMenuGroup> getXjrMenuGroupMenu();
+}

+ 14 - 0
src/main/java/com/xjrsoft/module/system/service/IXjrTipsMessageService.java

@@ -0,0 +1,14 @@
+package com.xjrsoft.module.system.service;
+
+import com.github.yulichang.base.MPJBaseService;
+import com.xjrsoft.module.system.entity.XjrTipsMessage;
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+
+public interface IXjrTipsMessageService extends MPJBaseService<XjrTipsMessage> {
+}

+ 13 - 0
src/main/java/com/xjrsoft/module/system/service/impl/LoginServiceImpl.java

@@ -9,6 +9,7 @@ import cn.hutool.core.util.IdUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
@@ -22,6 +23,8 @@ import com.xjrsoft.common.utils.RedisUtil;
 import com.xjrsoft.common.utils.WeChatUtil;
 import com.xjrsoft.config.CommonPropertiesConfig;
 import com.xjrsoft.config.LicenseConfig;
+import com.xjrsoft.module.base.entity.WhitelistManagement;
+import com.xjrsoft.module.base.service.IWhitelistManagementService;
 import com.xjrsoft.module.organization.entity.Department;
 import com.xjrsoft.module.organization.entity.Post;
 import com.xjrsoft.module.organization.entity.User;
@@ -85,6 +88,8 @@ public class LoginServiceImpl implements ILoginService {
 
     private final CommonPropertiesConfig propertiesConfig;
 
+    private final IWhitelistManagementService whitelistManagementService;
+
     @Override
     public LoginVo login(LoginDto dto) throws Exception {
         if (licenseConfig.getEnabled()) {
@@ -147,6 +152,14 @@ public class LoginServiceImpl implements ILoginService {
         }
         LoginVo loginVo = getLoginInfo(loginUser, "WX-MP");
         result.setToken(loginVo.getToken());
+        result.setWhitelistStatus(0);
+        List<WhitelistManagement> managementList = whitelistManagementService.list(
+                new QueryWrapper<WhitelistManagement>().lambda()
+                        .eq(WhitelistManagement::getUserId, loginUser.getId())
+        );
+        if(!managementList.isEmpty()){
+            result.setWhitelistStatus(1);
+        }
         result.setUserType(loginVo.getUserType());
 
         return result;

+ 60 - 4
src/main/java/com/xjrsoft/module/system/service/impl/MenuServiceImpl.java

@@ -3,6 +3,8 @@ package com.xjrsoft.module.system.service.impl;
 import cn.dev33.satoken.stp.StpUtil;
 import cn.hutool.core.util.ObjectUtil;
 import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.github.yulichang.base.MPJBaseServiceImpl;
@@ -10,7 +12,10 @@ import com.github.yulichang.toolkit.MPJWrappers;
 import com.xjrsoft.common.constant.GlobalConstant;
 import com.xjrsoft.common.enums.AuthorizeType;
 import com.xjrsoft.common.enums.EnabledMark;
+import com.xjrsoft.common.enums.RoleEnum;
 import com.xjrsoft.common.utils.VoToColumnUtil;
+import com.xjrsoft.module.base.entity.WhitelistManagement;
+import com.xjrsoft.module.base.service.IWhitelistManagementService;
 import com.xjrsoft.module.organization.entity.UserRoleRelation;
 import com.xjrsoft.module.organization.mapper.UserRoleRelationMapper;
 import com.xjrsoft.module.system.dto.MenuTreeDto;
@@ -18,18 +23,22 @@ import com.xjrsoft.module.system.dto.RoleMenuServeListDto;
 import com.xjrsoft.module.system.entity.Authorize;
 import com.xjrsoft.module.system.entity.Menu;
 import com.xjrsoft.module.system.entity.Subsystem;
+import com.xjrsoft.module.system.entity.XjrMenuGroup;
+import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
 import com.xjrsoft.module.system.entity.XjrMenuQuick;
 import com.xjrsoft.module.system.mapper.AuthorizeMapper;
 import com.xjrsoft.module.system.mapper.MenuMapper;
 import com.xjrsoft.module.system.mapper.XjrMenuDeptRelationMapper;
 import com.xjrsoft.module.system.mapper.XjrMenuQuickMapper;
 import com.xjrsoft.module.system.service.IMenuService;
+import com.xjrsoft.module.system.service.IXjrMenuGroupSetService;
 import com.xjrsoft.module.system.vo.MenuAllServeVo;
 import com.xjrsoft.module.system.vo.MenuListVo;
 import com.xjrsoft.module.system.vo.MenuServeVo;
 import com.xjrsoft.module.system.vo.MenuTreeVo;
 import com.xjrsoft.module.system.vo.MenuVo;
 import com.xjrsoft.module.system.vo.XjrMentDeptGroupVo;
+import com.xjrsoft.module.system.vo.XjrMenuGroupSetPageVo;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
 
@@ -37,6 +46,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 import java.util.function.Function;
 import java.util.stream.Collectors;
 
@@ -60,6 +70,9 @@ public class MenuServiceImpl extends MPJBaseServiceImpl<MenuMapper, Menu> implem
 
     private final XjrMenuDeptRelationMapper menuDeptRelationMapper;
 
+    private final IXjrMenuGroupSetService xjrMenuGroupSetService;
+    private final IWhitelistManagementService whitelistManagementService;
+
     @Override
     public List<MenuVo> getAuthMenuList(MenuTreeDto dto) {
         List<Long> roleIds = getUserRoleIds();
@@ -225,12 +238,55 @@ public class MenuServiceImpl extends MPJBaseServiceImpl<MenuMapper, Menu> implem
             deptNameMap.put(deptGroupVo.getMenuId(), deptGroupVo.getDeptNames());
             deptIdMap.put(deptGroupVo.getMenuId(), deptGroupVo.getDeptIds());
         }
-        for (MenuVo menuVo : menuVos) {
-            menuVo.setDeptId(deptIdMap.get(menuVo.getId()));
-            menuVo.setDeptName(deptNameMap.get(menuVo.getId()));
+        List<MenuVo> result = new ArrayList<>();
+        Map<Long, Long> menuGroupMap = new HashMap<>();
+        Map<Long, Integer> menuDisabledMap = new HashMap<>();
+        if(roleIds.contains(RoleEnum.STUDENT.getCode())){
+            LambdaQueryWrapper<XjrMenuGroupSet> queryWrapper = new LambdaQueryWrapper<>();
+            queryWrapper
+                    .orderByAsc(XjrMenuGroupSet::getId)
+                    .select(XjrMenuGroupSet.class,x -> VoToColumnUtil.fieldsToColumns(XjrMenuGroupSetPageVo.class).contains(x.getProperty()));
+            List<XjrMenuGroupSet> list = xjrMenuGroupSetService.list(queryWrapper);
+            Map<Long, Integer> menuUsedMap = new HashMap<>();
+            for (XjrMenuGroupSet menuGroupSet : list) {
+                result.add(new MenuVo(){{
+                    setTitle(menuGroupSet.getName());
+                    setName(menuGroupSet.getName());
+                    setId(menuGroupSet.getId());
+                    setDisplay(0);
+                    setMenuType(0);
+                }});
+                menuUsedMap.put(menuGroupSet.getId(), menuGroupSet.getUseRange());
+            }
+            List<XjrMenuGroup> xjrMenuGroupMenu = xjrMenuGroupSetService.getXjrMenuGroupMenu();
+            Set<Long> menuIds = xjrMenuGroupMenu.stream().map(XjrMenuGroup::getXjrMenuId).collect(Collectors.toSet());
+            menuGroupMap.putAll(xjrMenuGroupMenu.stream().collect(Collectors.toMap(XjrMenuGroup::getXjrMenuId, XjrMenuGroup::getXjrMenuGroupSetId)));
+            List<WhitelistManagement> managementList = whitelistManagementService.list(
+                    new QueryWrapper<WhitelistManagement>().lambda()
+                            .eq(WhitelistManagement::getUserId, StpUtil.getLoginIdAsLong())
+            );
+            for (XjrMenuGroup menuGroupMenu : xjrMenuGroupMenu) {
+                menuDisabledMap.put(menuGroupMenu.getXjrMenuId(), 0);
+                if(menuUsedMap.get(menuGroupMenu.getXjrMenuGroupSetId()) != null && menuUsedMap.get(menuGroupMenu.getXjrMenuGroupSetId()) == 2 && managementList.isEmpty()){
+                    menuDisabledMap.put(menuGroupMenu.getXjrMenuId(), 1);
+                }
+            }
+            for (MenuVo menuVo : menuVos) {
+                menuVo.setDeptId(deptIdMap.get(menuVo.getId()));
+                menuVo.setDeptName(deptNameMap.get(menuVo.getId()));
+                if(menuGroupMap.get(menuVo.getId()) != null){
+                    menuVo.setParentId(menuGroupMap.get(menuVo.getId()));
+                    menuVo.setIsDisable(menuDisabledMap.get(menuVo.getId()));
+                }
+                if("system_app".equals(dto.getSystemType()) && menuIds.contains(menuVo.getId())){
+                    result.add(menuVo);
+                }
+            }
+        }else{
+            result.addAll(menuVos);
         }
 
-        return menuVos;
+        return result;
     }
 
     /**

+ 121 - 0
src/main/java/com/xjrsoft/module/system/service/impl/XjrMenuGroupSetServiceImpl.java

@@ -0,0 +1,121 @@
+package com.xjrsoft.module.system.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.system.dto.AddXjrMenuGroupDto;
+import com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto;
+import com.xjrsoft.module.system.entity.XjrMenuGroup;
+import com.xjrsoft.module.system.entity.XjrMenuGroupSet;
+import com.xjrsoft.module.system.mapper.XjrMenuGroupMapper;
+import com.xjrsoft.module.system.mapper.XjrMenuGroupSetMapper;
+import com.xjrsoft.module.system.service.IXjrMenuGroupSetService;
+import com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+/**
+* @title: 功能分类设置
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class XjrMenuGroupSetServiceImpl extends MPJBaseServiceImpl<XjrMenuGroupSetMapper, XjrMenuGroupSet> implements IXjrMenuGroupSetService {
+    private final XjrMenuGroupSetMapper setMapper;
+
+    private final XjrMenuGroupMapper groupMapper;
+
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean add(XjrMenuGroupSet xjrMenuGroupSet) {
+        setMapper.insert(xjrMenuGroupSet);
+        for (XjrMenuGroup xjrMenuGroup : xjrMenuGroupSet.getXjrMenuGroupList()) {
+            xjrMenuGroup.setXjrMenuGroupSetId(xjrMenuGroupSet.getId());
+            groupMapper.insert(xjrMenuGroup);
+        }
+
+        return true;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean update(XjrMenuGroupSet xjrMenuGroupSet) {
+        setMapper.updateById(xjrMenuGroupSet);
+        //********************************* XjrMenuGroup  增删改  开始 *******************************************/
+        {
+            // 查出所有子级的id
+            List<XjrMenuGroup> xjrMenuGroupList = groupMapper.selectList(Wrappers.lambdaQuery(XjrMenuGroup.class).eq(XjrMenuGroup::getXjrMenuGroupSetId, xjrMenuGroupSet.getId()).select(XjrMenuGroup::getId));
+            List<Long> xjrMenuGroupIds = xjrMenuGroupList.stream().map(XjrMenuGroup::getId).collect(Collectors.toList());
+            //原有子表单 没有被删除的主键
+            List<Long> xjrMenuGroupOldIds = xjrMenuGroupSet.getXjrMenuGroupList().stream().map(XjrMenuGroup::getId).filter(Objects::nonNull).collect(Collectors.toList());
+            //找到需要删除的id
+            List<Long> xjrMenuGroupRemoveIds = xjrMenuGroupIds.stream().filter(item -> !xjrMenuGroupOldIds.contains(item)).collect(Collectors.toList());
+
+            for (XjrMenuGroup xjrMenuGroup : xjrMenuGroupSet.getXjrMenuGroupList()) {
+                //如果不等于空则修改
+                if (xjrMenuGroup.getId() != null) {
+                    groupMapper.updateById(xjrMenuGroup);
+                }
+                //如果等于空 则新增
+                else {
+                    //已经不存在的id 删除
+                    xjrMenuGroup.setXjrMenuGroupSetId(xjrMenuGroupSet.getId());
+                    groupMapper.insert(xjrMenuGroup);
+                }
+            }
+            //已经不存在的id 删除
+            if(xjrMenuGroupRemoveIds.size() > 0){
+                groupMapper.deleteBatchIds(xjrMenuGroupRemoveIds);
+            }
+        }
+        //********************************* XjrMenuGroup  增删改  结束 *******************************************/
+
+        return true;
+    }
+
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public Boolean delete(List<Long> ids) {
+        setMapper.deleteBatchIds(ids);
+        groupMapper.delete(Wrappers.lambdaQuery(XjrMenuGroup.class).in(XjrMenuGroup::getXjrMenuGroupSetId, ids));
+
+        return true;
+    }
+
+    @Override
+    public List<XjrMenuGroupMenuListVo> getMenuList(XjrMenuGroupMenuListDto dto) {
+        return groupMapper.getMenuList(dto);
+    }
+
+    @Override
+    public Boolean setMenu(AddXjrMenuGroupDto dto) {
+        groupMapper.delete(
+                new QueryWrapper<XjrMenuGroup>().lambda()
+                        .eq(XjrMenuGroup::getXjrMenuGroupSetId, dto.getXjrMenuGroupSetId())
+        );
+        for (Long xjrMenuId : dto.getXjrMenuIds()) {
+            groupMapper.insert(
+                    new XjrMenuGroup(){{
+                        setCreateDate(new Date());
+                        setXjrMenuId(xjrMenuId);
+                        setXjrMenuGroupSetId(dto.getXjrMenuGroupSetId());
+                    }}
+            );
+        }
+        return true;
+    }
+
+    @Override
+    public List<XjrMenuGroup> getXjrMenuGroupMenu() {
+        return groupMapper.selectList(new QueryWrapper<XjrMenuGroup>());
+    }
+}

+ 19 - 0
src/main/java/com/xjrsoft/module/system/service/impl/XjrTipsMessageServiceImpl.java

@@ -0,0 +1,19 @@
+package com.xjrsoft.module.system.service.impl;
+
+import com.github.yulichang.base.MPJBaseServiceImpl;
+import com.xjrsoft.module.system.entity.XjrTipsMessage;
+import com.xjrsoft.module.system.mapper.XjrTipsMessageMapper;
+import com.xjrsoft.module.system.service.IXjrTipsMessageService;
+import lombok.AllArgsConstructor;
+import org.springframework.stereotype.Service;
+
+/**
+* @title: 系统提示信息设置
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Service
+@AllArgsConstructor
+public class XjrTipsMessageServiceImpl extends MPJBaseServiceImpl<XjrTipsMessageMapper, XjrTipsMessage> implements IXjrTipsMessageService {
+}

+ 3 - 0
src/main/java/com/xjrsoft/module/system/vo/LoginByCodeVo.java

@@ -10,4 +10,7 @@ public class LoginByCodeVo extends LoginVo {
     private String openId;
 
     private  String unionId;
+
+
+    private Integer whitelistStatus;
 }

+ 3 - 0
src/main/java/com/xjrsoft/module/system/vo/MenuTreeVo.java

@@ -191,4 +191,7 @@ public class MenuTreeVo implements ITreeNode<MenuTreeVo,Long>, Serializable {
 
     @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
     private Integer isShowServce;
+
+    @ApiModelProperty("是否禁用(0:否 1:是)")
+    private Integer isDisable;
 }

+ 2 - 0
src/main/java/com/xjrsoft/module/system/vo/MenuVo.java

@@ -99,4 +99,6 @@ public class MenuVo implements Serializable {
     @ApiModelProperty("是否显示在服务中心(0:否 1:是)")
     private Integer isShowServce;
 
+    @ApiModelProperty("是否禁用(0:否 1:是)")
+    private Integer isDisable;
 }

+ 32 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupMenuListVo.java

@@ -0,0 +1,32 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 功能分类设置菜单关联表表单出参
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class XjrMenuGroupMenuListVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("菜单id(xjr_menu)")
+    private Long id;
+    /**
+    * 菜单id(xjr_menu)
+    */
+    @ApiModelProperty("菜单名称")
+    private String name;
+
+    @ApiModelProperty("是否被选择(1:是 0:否)")
+    private Integer isSelected;
+
+    @ApiModelProperty("是否被其它使用(1:是 0:否)")
+    private Integer isUsed;
+
+}

+ 68 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupSetPageVo.java

@@ -0,0 +1,68 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 功能分类设置分页列表出参
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class XjrMenuGroupSetPageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private String id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    private Long modifyUserId;
+    /**
+    * 修改日期
+    */
+    @ApiModelProperty("修改日期")
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    private Integer deleteMark;
+    /**
+    * 有效标记
+    */
+    @ApiModelProperty("有效标记")
+    private Integer enabledMark;
+    /**
+    * 功能分类名称
+    */
+    @ApiModelProperty("功能分类名称")
+    private String name;
+    /**
+    * 分组代码(xjr_dictionary_item[xjr_menu_group])
+    */
+    @ApiModelProperty("分组代码(xjr_dictionary_item[xjr_menu_group])")
+    private String code;
+    /**
+    * 使用范围(1:全部学生 2:白名单学生)
+    */
+    @ApiModelProperty("使用范围(1:全部学生 2:白名单学生)")
+    private Integer useRange;
+
+}

+ 45 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupSetVo.java

@@ -0,0 +1,45 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+* @title: 功能分类设置表单出参
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class XjrMenuGroupSetVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 功能分类名称
+    */
+    @ApiModelProperty("功能分类名称")
+    private String name;
+    /**
+    * 分组代码(xjr_dictionary_item[xjr_menu_group])
+    */
+    @ApiModelProperty("分组代码(xjr_dictionary_item[xjr_menu_group])")
+    private String code;
+    /**
+    * 使用范围(1:全部学生 2:白名单学生)
+    */
+    @ApiModelProperty("使用范围(1:全部学生 2:白名单学生)")
+    private Integer useRange;
+
+
+    /**
+    * xjrMenuGroup
+    */
+    @ApiModelProperty("xjrMenuGroup子表")
+    private List<XjrMenuGroupVo> xjrMenuGroupList;
+
+}

+ 33 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrMenuGroupVo.java

@@ -0,0 +1,33 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 功能分类设置菜单关联表表单出参
+* @Author dzx
+* @Date: 2024-08-09
+* @Version 1.0
+*/
+@Data
+public class XjrMenuGroupVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 菜单id(xjr_menu)
+    */
+    @ApiModelProperty("菜单id(xjr_menu)")
+    private Long xjrMenuId;
+    /**
+    * 功能分类设置(xjr_menu_group_set)
+    */
+    @ApiModelProperty("功能分类设置(xjr_menu_group_set)")
+    private Long xjrMenuGroupSetId;
+
+
+
+}

+ 71 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrTipsMessagePageVo.java

@@ -0,0 +1,71 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+* @title: 系统提示信息设置分页列表出参
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Data
+public class XjrTipsMessagePageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private String id;
+    /**
+    * 创建人
+    */
+    @ApiModelProperty("创建人")
+    private Long createUserId;
+    /**
+    * 创建时间
+    */
+    @ApiModelProperty("创建时间")
+    private Date createDate;
+    /**
+    * 修改人
+    */
+    @ApiModelProperty("修改人")
+    private Long modifyUserId;
+    /**
+    * 修改日期
+    */
+    @ApiModelProperty("修改日期")
+    private Date modifyDate;
+    /**
+    * 删除标记
+    */
+    @ApiModelProperty("删除标记")
+    private Integer deleteMark;
+    /**
+    * 有效标记
+    */
+    @ApiModelProperty("有效标记")
+    private Integer enabledMark;
+    /**
+    * 消息分组
+    */
+    @ApiModelProperty("消息分组")
+    private String groupName;
+    /**
+    * 唯一code
+    */
+    @ApiModelProperty("唯一code")
+    private String code;
+    /**
+    * 消息内容
+    */
+    @ApiModelProperty("消息内容")
+    private String content;
+
+    @ApiModelProperty("提示名称")
+    private String name;
+
+}

+ 39 - 0
src/main/java/com/xjrsoft/module/system/vo/XjrTipsMessageVo.java

@@ -0,0 +1,39 @@
+package com.xjrsoft.module.system.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+* @title: 系统提示信息设置表单出参
+* @Author dzx
+* @Date: 2024-08-12
+* @Version 1.0
+*/
+@Data
+public class XjrTipsMessageVo {
+
+    /**
+    * 
+    */
+    @ApiModelProperty("")
+    private Long id;
+    /**
+    * 消息分组
+    */
+    @ApiModelProperty("消息分组")
+    private String groupName;
+    /**
+    * 唯一code
+    */
+    @ApiModelProperty("唯一code")
+    private String code;
+    /**
+    * 消息内容
+    */
+    @ApiModelProperty("消息内容")
+    private String content;
+
+    @ApiModelProperty("提示名称")
+    private String name;
+
+}

+ 9 - 13
src/main/java/com/xjrsoft/module/textbook/service/impl/WfTextbookSubscriptionServiceImpl.java

@@ -397,19 +397,15 @@ public class WfTextbookSubscriptionServiceImpl extends MPJBaseServiceImpl<WfText
             return null;
         }
 
-        Map<Long, WfTextbookSubscriptionItem> itemByIdMap = wfTextbookSubscriptionItemList
-                .stream()
-                .collect(Collectors.toMap(
-                        WfTextbookSubscriptionItem::getId,
-                        item -> item
-                ));
-
-        Map<String, WfTextbookSubscriptionItem> itemByIssnMap = wfTextbookSubscriptionItemList
-                .stream()
-                .collect(Collectors.toMap(
-                        WfTextbookSubscriptionItem::getIssn,
-                        item -> item
-                ));
+        Map<Long, WfTextbookSubscriptionItem> itemByIdMap = new HashMap<>();
+        for (WfTextbookSubscriptionItem el : wfTextbookSubscriptionItemList) {
+            itemByIdMap.put(el.getId(), el);
+        }
+
+        Map<String, WfTextbookSubscriptionItem> itemByIssnMap = new HashMap<>();
+        for (WfTextbookSubscriptionItem el : wfTextbookSubscriptionItemList) {
+            itemByIssnMap.put(el.getIssn(), el);
+        }
 
         Date now = new Date();
         Long loginId = StpUtil.getLoginIdAsLong();

+ 8 - 8
src/main/resources/application-dev.yml

@@ -18,14 +18,14 @@ spring:
       # 连接池空闲连接的有效时间 ,设置30分钟
       min-evictable-idle-time-millis: 1800000
       max-active: 200
-  #    dynamic:
-#      primary: master
-#      datasource:
-#        master:
-#          driver-class-name: com.mysql.cj.jdbc.Driver
-#          url: jdbc:mysql://10.150.10.139:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
-#          username: root
-#          password: Zwr~-f6H,u6QE^]C-AD_
+      dynamic:
+        primary: master
+        datasource:
+          master:
+            driver-class-name: com.mysql.cj.jdbc.Driver
+            url: jdbc:mysql://10.150.10.139:3306/tl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&autoReconnect=true&failOverReadOnly=false
+            username: root
+            password: Zwr~-f6H,u6QE^]C-AD_
 
   redis:
     database: 10

+ 3 - 0
src/main/resources/mapper/organization/UserMapper.xml

@@ -30,6 +30,9 @@
         <if test="dto.keyword != null and dto.keyword != ''">
             AND (t1.name like concat('%', #{dto.keyword}, '%') OR t1.credential_number like concat('%', #{dto.keyword}, '%'))
         </if>
+        <if test="dto.name != null and dto.name != '' and dto.idNumber != null and dto.idNumber != ''">
+            AND t1.name = #{dto.name} and t1.credential_number = #{dto.idNumber}
+        </if>
         <if test="dto.userId != null">
             AND t1.id = #{dto.userId}
         </if>

+ 1 - 1
src/main/resources/mapper/room/RoomBedMapper.xml

@@ -319,7 +319,7 @@
             and t2.name like concat('%', #{dto.studentName}, '%')
         </if>
         <if test="dto.payStatus != null">
-            and (t8.factrecarmny >= t8.factar) = #{dto.payStatus}
+            and (SELECT (SUM(factrecarmny) >= SUM(factar)) FROM pb_v_xsxxsfytb WHERE Studentcode = t2.credential_number) = #{dto.payStatus}
         </if>
     </select>
 

+ 2 - 2
src/main/resources/mapper/student/BaseStudentDevelopmentMapper.xml

@@ -7,8 +7,8 @@
         SELECT t1.id,t1.is_entrepreneurship,t1.entrepreneurial_project,t1.is_flexible_work,t1.work_content,
                t1.is_company_coop,t1.work_company,t7.name AS company_industry,t8.name AS company_nature,t2.name AS company_scale_cn,t1.is_matching,
                t1.money,t1.work_date,t1.work_city,t3.name AS culture_type_cn,t4.name AS ascending_channels_cn,
-               t1.school,t1.admission_major,t1.score,t5.name AS ascending_arrangement_cn,t6.name AS unemployed_type_cn,t1.remark,t1.enroll_type
-
+               t1.school,t1.admission_major,t1.score,t5.name AS ascending_arrangement_cn,t6.name AS unemployed_type_cn,t1.remark,t1.enroll_type,
+               t1.culture_type,t1.ascending_channels,t1.unemployed_type
         FROM base_student_development t1
                  LEFT JOIN xjr_dictionary_detail t2 ON t1.company_scale = t2.code
                  LEFT JOIN xjr_dictionary_detail t3 ON t1.culture_type = t3.code

+ 1 - 1
src/main/resources/mapper/student/BaseStudentMapper.xml

@@ -51,7 +51,7 @@
         INNER JOIN base_student t2 ON t1.id = t2.user_id
     </select>
     <select id="getStudentPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentUserPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentUserPageVo">
-        SELECT t1.id,t4.name AS class_name,t5.name AS teacher_name,t1.name,t6.name AS gender_cn,t1.credential_number,
+        SELECT t1.id,t4.name AS class_name,t5.name AS teacher_name,t1.name,t6.name AS gender_cn,t1.credential_number,t1.user_name,
         t1.mobile,t7.name AS archives_status_cn ,t8.name AS stduy_status_cn,t9.name AS student_type_cn,t10.name as learn_status_cn FROM xjr_user t1
         INNER JOIN base_student t2 ON t1.id = t2.user_id
         LEFT JOIN base_student_school_roll t3 ON t1.id = t3.user_id

+ 2 - 2
src/main/resources/mapper/student/BaseStudentScholarshipReleaseMapper.xml

@@ -4,13 +4,13 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.xjrsoft.module.student.mapper.BaseStudentScholarshipReleaseMapper">
     <select id="getPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo">
-        SELECT t1.id,t2.name AS semester_name,t1.release_status,t1.name,t4.name AS gender_cn,t3.credential_number,t6.name AS class_name,
+        SELECT t1.id,t2.name AS semester_name,t1.release_status,t3.name,t4.name AS gender_cn,t3.credential_number,t6.name AS class_name,
         t7.name AS scholarship_category,t8.name AS category_cn,t7.scholarship_level,t1.amount,t1.bank_no,t1.bank_type,t1.bank_user_name,
         (SELECT SUM(amount) FROM base_student_scholarship_release WHERE base_student_scholarship_applicant_id = t1.id AND delete_mark = 0) AS release_amount,
         (SELECT release_date FROM base_student_scholarship_release WHERE base_student_scholarship_applicant_id = t1.id
         AND delete_mark = 0 ORDER BY release_date DESC LIMIT 0, 1) AS release_date FROM base_student_scholarship_applicant t1
         LEFT JOIN base_semester t2 ON t1.base_semester_id = t2.id
-        LEFT JOIN xjr_user t3 ON t1.applicant_user_id = t2.id
+        LEFT JOIN xjr_user t3 ON t1.applicant_user_id = t3.id
         LEFT JOIN xjr_dictionary_detail t4 ON t3.gender = t4.code AND t4.item_id = 2023000000000000004
         LEFT JOIN base_student_school_roll t5 ON t3.id = t5.user_id
         LEFT JOIN base_class t6 ON t5.class_id = t6.id

+ 11 - 22
src/main/resources/mapper/student/PbVXsxxsfytbMapper.xml

@@ -45,38 +45,27 @@
 
 
     <select id="studentCategoryStat" parameterType="com.xjrsoft.module.student.dto.PbVXsxxsfytbStatDto" resultType="com.xjrsoft.module.student.vo.StringCountVo">
-        SELECT t1.resourcename as name,COUNT(t1.studentcode) as count FROM pb_cse_feeobjupdate t1
-        INNER JOIN xjr_user t2 ON t1.studentcode = t2.credential_number
-        INNER JOIN base_student_school_roll t3 ON t2.id = t3.user_id
-        WHERE t2.delete_mark = 0 AND t3.delete_mark = 0
+        SELECT t2.name,COUNT(t1.credential_number) as count FROM xjr_user t1
+        INNER JOIN base_student_school_roll t3 ON t1.id = t3.user_id
+        left JOIN xjr_dictionary_detail t2 ON t3.student_type = t2.code and t2.item_id = 2023000000000000028
+        WHERE t3.delete_mark = 0
         <if test="dto.gradeId != null">
             and t3.grade_id = #{dto.gradeId}
         </if>
-        GROUP BY t1.resourcename
+        GROUP BY t2.name
     </select>
     <select id="stduyStatusStat" parameterType="com.xjrsoft.module.student.dto.PbVXsxxsfytbStatDto" resultType="com.xjrsoft.module.student.vo.StringCountVo">
-        SELECT t1.quartername as name,COUNT(t1.studentcode) as count FROM pb_cse_feeobjupdate t1
-        INNER JOIN xjr_user t2 ON t1.studentcode = t2.credential_number
-        INNER JOIN base_student_school_roll t3 ON t2.id = t3.user_id
-        WHERE t2.delete_mark = 0 AND t3.delete_mark = 0
+        SELECT t2.name,COUNT(t1.credential_number) as count FROM xjr_user t1
+        INNER JOIN base_student_school_roll t3 ON t1.id = t3.user_id
+        left JOIN xjr_dictionary_detail t2 ON t3.stduy_status = t2.code and t2.item_id = 2023000000000000030
+        WHERE t3.delete_mark = 0
         <if test="dto.gradeId != null">
             and t3.grade_id = #{dto.gradeId}
         </if>
-        GROUP BY t1.quartername
+        GROUP BY t2.name
     </select>
-    <select id="stduyStatusStat" parameterType="com.xjrsoft.module.student.dto.PbVXsxxsfytbStatDto" resultType="com.xjrsoft.module.student.vo.StringCountVo">
-        SELECT t1.quartername as name,COUNT(t1.studentcode) as count FROM pb_cse_feeobjupdate t1
-        INNER JOIN xjr_user t2 ON t1.studentcode = t2.credential_number
-        INNER JOIN base_student_school_roll t3 ON t2.id = t3.user_id
-        WHERE t2.delete_mark = 0 AND t3.delete_mark = 0
-        <if test="dto.gradeId != null">
-            and t3.grade_id = #{dto.gradeId}
-        </if>
-        GROUP BY t1.quartername
-    </select>
-
     <select id="getClassQfPage" parameterType="com.xjrsoft.module.student.dto.PbVXsxxsfytbStatDto" resultType="com.xjrsoft.module.student.vo.ClassQfPageVo">
-        SELECT t1.id, t2.name AS grade_name,t2.name AS class_name,t3.name AS teacher_name,
+        SELECT t1.id, t1.name AS grade_name,t2.name AS class_name,t3.name AS teacher_name,
         (
         SELECT SUM(qfje) FROM pb_v_xsxxsfytb a1
         INNER JOIN xjr_user a2 ON a1.studentcode = a2.credential_number

+ 16 - 0
src/main/resources/mapper/system/XjrMenuGroupMapper.xml

@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.xjrsoft.module.system.mapper.XjrMenuGroupMapper">
+    <select id="getMenuList" parameterType="com.xjrsoft.module.system.dto.XjrMenuGroupMenuListDto" resultType="com.xjrsoft.module.system.vo.XjrMenuGroupMenuListVo">
+        SELECT id, name,(
+            SELECT COUNT(*) FROM xjr_menu_group WHERE delete_mark = 0 AND xjr_menu_group_set_id = #{dto.xjrMenuGroupSetId}
+            AND xjr_menu_id = xjr_menu.id
+        ) AS is_selected,
+            (SELECT COUNT(*) FROM xjr_menu_group WHERE delete_mark = 0 AND xjr_menu_group_set_id != #{dto.xjrMenuGroupSetId}
+                                                                AND xjr_menu_id = xjr_menu.id) as is_used FROM xjr_menu WHERE system_id = 1726806691140907010
+        AND delete_mark = 0 AND enabled_mark = 1
+        and system_type = 'system_app'
+    </select>
+</mapper>

+ 126 - 64
src/test/java/com/xjrsoft/module/job/JianyuekbScheduleTaskTest.java

@@ -1,30 +1,34 @@
 package com.xjrsoft.module.job;
 
+import cn.hutool.db.Entity;
 import cn.hutool.extra.spring.SpringUtil;
 import com.google.gson.JsonArray;
 import com.google.gson.JsonElement;
 import com.google.gson.JsonObject;
+import com.google.gson.JsonParser;
 import com.xjrsoft.XjrSoftApplication;
 import com.xjrsoft.common.mybatis.SqlRunnerAdapter;
 import com.xjrsoft.module.schedule.entity.CourseReceiveMsg;
 import com.xjrsoft.module.schedule.util.DataUtil;
+import com.xjrsoft.module.schedule.util.ScheduleUtil;
+import org.camunda.bpm.engine.impl.util.JsonUtil;
 import org.junit.jupiter.api.Test;
 import org.junit.runner.RunWith;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
-import java.sql.SQLException;
+import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
-import static org.junit.jupiter.api.Assertions.*;
-
 /**
  * @author dzx
  * @date 2024/8/7
@@ -35,70 +39,27 @@ import static org.junit.jupiter.api.Assertions.*;
 class JianyuekbScheduleTaskTest {
 
     @Test
-    public void RefreshConnectionPool() throws SQLException, InterruptedException {
+    public void RefreshConnectionPool() throws Exception {
         String active = SpringUtil.getActiveProfile();
         if(!"prod".equals(active)){
             return;
         }
         String sql = "SELECT * FROM course_receive_msg WHERE delete_mark = 0 AND id in (1821034023531098114,1821034021123567617)";
         List<Map<String, Object>> receiveMsgs = SqlRunnerAdapter.db().selectList(sql, CourseReceiveMsg.class);
+        JsonArray allScheduleInfo = new JsonArray();
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        DataUtil dataUtil = new DataUtil();
         for (Map<String, Object> receiveMsg : receiveMsgs) {
             String updSql = "update course_receive_msg set is_callback = 0 where id = " + receiveMsg.get("id").toString();
             SqlRunnerAdapter.db().update(updSql);
 
-            doExecute(receiveMsg.get("edu_year_serial_no").toString(), receiveMsg.get("start_date").toString(), receiveMsg.get("end_date").toString());
+            String eduYearSerialNo = receiveMsg.get("edu_year_serial_no").toString();
 
-            updSql = "update course_receive_msg set is_callback = 1 where id = " + receiveMsg.get("id").toString();
-            SqlRunnerAdapter.db().update(updSql);
-        }
-    }
-
-    void doExecute(String eduYearSerialNo, String startDateStr, String endDateStr){
-        try {
-            String sql = "SELECT distinct table_name FROM jianyue_data WHERE 1 = 1";
-            List<Map<String, Object>> query = SqlRunnerAdapter.db().selectList(sql);
-            Set<String> tables = new HashSet<>();
-            for (Map<String, Object> jianyueData : query) {
-                tables.add(jianyueData.get("table_name").toString());
-            }
-            sql = "SELECT * FROM jianyue_data WHERE 0 = 0";
-            List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList(sql);
-            Map<String, Map<String, String>> dataMap = new HashMap<>();
-            for (String table : tables) {
-                Map<String, String> tableData = new HashMap<>();
-                for (Map<String, Object> jianyueData : list) {
-                    if(!table.equals(jianyueData.get("table_name").toString())){
-                        continue;
-                    }
-                    tableData.put(jianyueData.get("jianyue_id").toString(), jianyueData.get("source_id").toString());
-                }
-                dataMap.put(table, tableData);
-            }
-            DataUtil dataUtil = new DataUtil();
-            //获取年级
-            String tableName = "base_grade";
-//            Map<String, Long> gradeMap = dataMap.get(tableName);
-            //获取学期
-            tableName = "base_semester";
-            Map<String, String> semesterMap = dataMap.get(tableName);
-            //获取课程
-            tableName = "base_course_subject";
-            Map<String, String> courseMap = dataMap.get(tableName);
-            //获取教职工
-            tableName = "base_teacher";
-            Map<String, String> teacherMap = dataMap.get(tableName);
-            //获取行政班
-            tableName = "base_class";
-            Map<String, String> classMap = dataMap.get(tableName);
-
-            tableName = "base_classroom";
-            Map<String, String> classroomMap = dataMap.get(tableName);
-            LocalDate startDateObj = LocalDate.parse(startDateStr);
-            LocalDate endDateObj = LocalDate.parse(endDateStr);
+            LocalDate startDateObj = LocalDate.parse(receiveMsg.get("start_date").toString());
+            LocalDate endDateObj = LocalDate.parse(receiveMsg.get("end_date").toString());
             long between = ChronoUnit.DAYS.between(startDateObj, endDateObj);
             int times = Integer.parseInt(((between / 7) + 1) + "");
-            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-            JsonArray allScheduleInfo = new JsonArray();
+
             for (int index = 0; index < times; index ++) {
                 LocalDate statrTime = startDateObj.plusDays(index * 7L);
                 String startDate = statrTime.format(formatter);
@@ -112,19 +73,120 @@ class JianyuekbScheduleTaskTest {
                 JsonArray scheduleInfo = dataUtil.getScheduleInfoByGrade(eduYearSerialNo, startDate, endDate);
                 allScheduleInfo.addAll(scheduleInfo);
             }
-            Map<String, Integer> courseTable = new HashMap<>();
-            for (JsonElement jsonElement : allScheduleInfo) {
-                JsonObject object = jsonElement.getAsJsonObject();
-                courseTable.put(object.get("courseClassName").getAsString(), object.get("timeOption").getAsInt());
-            }
 
-            for (String key : courseTable.keySet()) {
-                System.out.println(key+" ----> " + courseTable.get(key));
+            updSql = "update course_receive_msg set is_callback = 1 where id = " + receiveMsg.get("id").toString();
+            SqlRunnerAdapter.db().update(updSql);
+        }
+        doExecute(allScheduleInfo);
+//        Map<String, JsonObject> infoMap = new HashMap<>();
+//        Map<Integer, Integer> tmePeriod = ScheduleUtil.getTmePeriod();
+//        for (JsonElement jsonElement : allScheduleInfo) {
+//            JsonObject asJsonObject = jsonElement.getAsJsonObject();
+//            String numberOfDayName = asJsonObject.get("numberOfDayName").getAsString();
+//            JsonObject json = new JsonObject();
+//            json.add("startTime", asJsonObject.get("startTime"));
+//            json.add("endTime", asJsonObject.get("endTime"));
+//            json.addProperty("tmePeriod", tmePeriod.get(asJsonObject.get("timeOption").getAsInt()));
+//            json.add("numberOfDay", asJsonObject.get("numberOfDay"));
+//            infoMap.put(numberOfDayName, json);
+//        }
+//        System.out.println(JsonUtil.asString(infoMap));
+
+    }
+
+    void doExecute(JsonArray scheduleInfo){
+        String sql = "SELECT distinct table_name FROM jianyue_data WHERE 1 = 1";
+        List<Map<String, Object>> query = SqlRunnerAdapter.db().selectList(sql);
+        Set<String> tables = new HashSet<>();
+        for (Map<String, Object> jianyueData : query) {
+            tables.add(jianyueData.get("table_name").toString());
+        }
+        sql = "SELECT * FROM jianyue_data WHERE 0 = 0";
+        List<Map<String, Object>> list = SqlRunnerAdapter.db().selectList(sql);
+        Map<String, Map<String, String>> dataMap = new HashMap<>();
+        for (String table : tables) {
+            Map<String, String> tableData = new HashMap<>();
+            for (Map<String, Object> jianyueData : list) {
+                if(!table.equals(jianyueData.get("table_name").toString())){
+                    continue;
+                }
+                tableData.put(jianyueData.get("jianyue_id").toString(), jianyueData.get("source_id").toString());
             }
+            dataMap.put(table, tableData);
+        }
+        DataUtil dataUtil = new DataUtil();
+        //获取年级
+        String tableName = "base_grade";
+//            Map<String, Long> gradeMap = dataMap.get(tableName);
+        //获取学期
+        tableName = "base_semester";
+        Map<String, String> semesterMap = dataMap.get(tableName);
+        //获取课程
+        tableName = "base_course_subject";
+        Map<String, String> courseMap = dataMap.get(tableName);
+        //获取教职工
+        tableName = "base_teacher";
+        Map<String, String> teacherMap = dataMap.get(tableName);
+        //获取行政班
+        tableName = "base_class";
+        Map<String, String> classMap = dataMap.get(tableName);
+
+        tableName = "base_classroom";
+        Map<String, String> classroomMap = dataMap.get(tableName);
+
+        dataUtil.insertCourseTableEntiy(scheduleInfo, classroomMap, courseMap, semesterMap, teacherMap, classMap);
+        dataUtil.insertClassTime(scheduleInfo);
+    }
+
+
+    @Test
+    void updateClass() throws Exception {
+        String url  = ScheduleUtil.apiUrl + "Class/page";
+        JsonObject pageJson = new JsonObject();
+        pageJson.addProperty("pageSize", 200);
+        pageJson.addProperty("pageIndex", 1);
+        JsonParser parser = new JsonParser();
+
+        long timestamp = System.currentTimeMillis();
+        String sign = ScheduleUtil.createSign(timestamp);
 
-            //dataUtil.insertCourseTableEntiy(allScheduleInfo, classroomMap, courseMap, semesterMap, teacherMap, classMap);
-            //dataUtil.insertClassTime(allScheduleInfo);
-        } catch (Exception e) {
+        String doPost = ScheduleUtil.doPost(url, pageJson.toString(), sign, timestamp);
+        System.out.println(doPost);
+        JsonArray dataList = parser.parse(doPost).getAsJsonObject().get("data").getAsJsonObject().get("dataList").getAsJsonArray();
+        String sql = "select * from base_class where delete_mark = 0";
+        List<Map<String, Object>> classList = SqlRunnerAdapter.db().selectList(sql);
+        Map<String, Long> classMap = new HashMap<>();
+        for (Map<String, Object> objectMap : classList) {
+            classMap.put(objectMap.get("name").toString(), (Long)objectMap.get("id"));
         }
+
+        sql = "select * from jianyue_data where table_name = 'base_class'";
+        List<Map<String, Object>> classList2 = SqlRunnerAdapter.db().selectList(sql);
+        Set<String> sourceIds = new HashSet<>();
+        for (Map<String, Object> objectMap : classList2) {
+            sourceIds.add(objectMap.get("jianyue_id").toString());
+        }
+
+        String tableName = "jianyue_data";
+        List<Entity> insertList = new ArrayList<>();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+        for (JsonElement jsonElement : dataList) {
+            JsonObject object = jsonElement.getAsJsonObject();
+            String serialNo = object.get("serialNo").getAsString();
+            if(sourceIds.contains(serialNo)){
+                continue;
+            }
+            if(classMap.get(object.get("name").getAsString()) == null){
+                continue;
+            }
+            Entity entity = Entity.create(tableName);
+            entity.set("create_date", sdf.format(new Date()));
+            entity.set("table_name", "base_class");
+            entity.set("source_id", classMap.get(object.get("name").getAsString()));
+            entity.set("jianyue_id", serialNo);
+            insertList.add(entity);
+        }
+        SqlRunnerAdapter.db().dynamicInsertBatch(tableName, insertList);
+
     }
 }

+ 60 - 0
src/test/java/com/xjrsoft/xjrsoftboot/FreeMarkerGeneratorTest.java

@@ -3632,4 +3632,64 @@ public class FreeMarkerGeneratorTest {
 
         apiGeneratorService.generateCodes(params);
     }
+
+    @Test
+    public void gcSysMenuGroup() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("xjr_menu_group_set");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        mainTable = new TableConfig();
+        mainTable.setTableName("xjr_menu_group");//init_sql中的表名
+        mainTable.setIsMain(false);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        mainTable.setRelationField("xjr_menu_group_set_id");//设置外键
+        mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("system");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
+
+
+    @Test
+    public void gcXjrTipsMessage() throws IOException {
+        List<TableConfig> tableConfigs = new ArrayList<>();
+        TableConfig mainTable = new TableConfig();
+        mainTable.setTableName("xjr_tips_message");//init_sql中的表名
+        mainTable.setIsMain(true);//是否是主表,一般默认为true
+        mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
+        mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
+        tableConfigs.add(mainTable);
+
+        ApiGenerateCodesDto params = new ApiGenerateCodesDto();
+        params.setAuthor("dzx");//作者名称
+        params.setPackageName("system");//包名
+        params.setTableConfigs(tableConfigs);
+        params.setPage(true);//是否生成分页接口
+        params.setImport(false);//是否生成导入接口
+        params.setExport(false);//是否生成导出接口
+        params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
+        params.setDs(ds);
+
+        IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
+
+        apiGeneratorService.generateCodes(params);
+    }
 }