From 5be07b1a021f596b003eac001f4cb77416ae6c7b Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 11 十二月 2024 17:08:47 +0800
Subject: [PATCH] 修改

---
 ruoyi-system/src/main/java/com/ruoyi/system/domain/TInformation.java                    |    3 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppUserController.java          |   24 ++
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java     |   16 +
 ruoyi-system/src/main/resources/mapper/system/TOrderMapper.xml                          |   38 +++
 ruoyi-system/src/main/resources/mapper/system/TAppUserMapper.xml                        |    8 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CourseQuery.java               |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java           |   30 ++-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TGeneratedRecordsController.java |    8 
 ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml                         |    2 
 ruoyi-admin/src/main/resources/templates/专业技术工作总结.xml                                   |    2 
 ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java      |   23 +-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TIndexMenuController.java        |   87 ++++++---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/DeclareNoticeQuery.java        |    5 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CommitteeQuery.java            |    4 
 ruoyi-system/src/main/java/com/ruoyi/system/domain/TAppUser.java                        |   16 +
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOrderController.java            |    1 
 ruoyi-system/src/main/resources/mapper/system/TCourseCommentMapper.xml                  |    1 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/InformationQuery.java          |    4 
 ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml                         |    1 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MsgUtil.java                    |   34 +++
 ruoyi-system/src/main/resources/mapper/system/TDeclareNoticeMapper.xml                  |    5 
 ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeclareNotice.java                  |    3 
 ruoyi-system/src/main/resources/mapper/system/TInformationMapper.xml                    |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TDeclareNoticeController.java    |   41 +++-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInformationController.java      |   35 ++-
 ruoyi-system/src/main/resources/mapper/system/TIndexMenuMapper.xml                      |    9 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCommitteeController.java        |   33 ++-
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTechnicalTitleController.java   |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CityQueryDto.java              |    8 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WebController.java               |   25 +-
 ruoyi-system/src/main/java/com/ruoyi/system/domain/TGeneratedRecords.java               |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConsultationController.java     |    2 
 ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTitleMajorMapper.java               |    2 
 33 files changed, 350 insertions(+), 132 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppUserController.java
index 36fb9be..05288d2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TAppUserController.java
@@ -33,6 +33,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.net.URLEncoder;
+import java.security.SecureRandom;
 import java.time.LocalDate;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
@@ -145,7 +146,10 @@
         TAppUser appUser = new TAppUser();
         appUser.setPhone(registerDto.getPhone());
         appUser.setPassword(SecurityUtils.encryptPassword(registerDto.getPwd()));
+        // 5位随机使用英文+数字格式
 
+        appUser.setName("用户"+generateRandomString(5));
+        appUser.setAvatar("https://tcjt-zpw.obs.cn-east-3.myhuaweicloud.com/xinquan/89ff629aace742ff965e88eab7069b9c.png");
         appUser.setCode(generateUniqueId());
         appUserService.save(appUser);
 
@@ -153,6 +157,18 @@
         return R.ok();
     }
 
+    public static String generateRandomString(int length) {
+        String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+        SecureRandom random = new SecureRandom();
+        StringBuilder sb = new StringBuilder(length);
+
+        for (int i = 0; i < length; i++) {
+            int index = random.nextInt(characters.length());
+            sb.append(characters.charAt(index));
+        }
+
+        return sb.toString();
+    }
 
     public static String generateUniqueId() {
         // 获取当前日期并格式化为yyyyMMdd
@@ -178,8 +194,8 @@
         TAppUser byId = appUserService.getById(userId);
 
 
-        String cacheObject = redisCache.getCacheObject(byId.getPhone());
-        if (!code.equals("123456")&&!cacheObject.equals(code)){
+        String cacheObject = redisCache.getCacheObject(newPhone);
+        if (!code.equals("123456")&&!code.equals(cacheObject)){
             return R.fail("验证码错误");
         }
 
@@ -259,6 +275,7 @@
                 .ge(appUserQuery.getCreateTime1() != null, TAppUser::getCreateTime,time1)
                 .le(appUserQuery.getCreateTime2() != null, TAppUser::getCreateTime,time2)
                 .in(finalIds.size() > 0, TAppUser::getId, finalIds)
+                .orderByDesc(TAppUser::getCreateTime)
                 .page(Page.of(appUserQuery.getPageNum(), appUserQuery.getPageSize()));
 
         for (TAppUser record : page.getRecords()) {
@@ -428,6 +445,9 @@
 
             String join1 = StringUtils.join(lateString, "、");
             record.setLateString(join1);
+
+            record.setCreateTimeStr(DateUtils.localDateTimeToString(record.getCreateTime()));
+
         }
 
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCommitteeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCommitteeController.java
index e35db69..77047a8 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCommitteeController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCommitteeController.java
@@ -93,18 +93,31 @@
         return R.ok();
     }
     //列表
-    @ApiOperation(value = "查询",tags = {"后台-评审委员会管理","web-评审委员会"})
+    @ApiOperation(value = "查询",tags = {"后台-评审委员会管理"})
     @PostMapping("/list")
     public R<Page<TCommittee>> list(@RequestBody CommitteeQuery informationQuery){
-        Page<TCommittee> page = tCommitteeService.lambdaQuery()
-                .like(!StringUtils.isEmpty(informationQuery.getName()), TCommittee::getCommitteeName, informationQuery.getName())
-                .like(!StringUtils.isEmpty(informationQuery.getCommitteeUnit()), TCommittee::getCommitteeLevel, informationQuery.getCommitteeUnit())
-                .eq(informationQuery.getRegionId() != null, TCommittee::getRegionId, informationQuery.getRegionId())
-                .eq(informationQuery.getTechnicalId() != null, TCommittee::getTechnicalId, informationQuery.getTechnicalId())
-                .eq(informationQuery.getMajorId() != null, TCommittee::getMajorId, informationQuery.getMajorId())
-                .eq(informationQuery.getLevel() != null, TCommittee::getLevel, informationQuery.getLevel())
-                .orderByDesc(TCommittee::getCommitteeSort)
-                .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        Page<TCommittee> page;
+        if(informationQuery.getSortType() == 1){
+            page = tCommitteeService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getName()), TCommittee::getCommitteeName, informationQuery.getName())
+                    .like(!StringUtils.isEmpty(informationQuery.getCommitteeUnit()), TCommittee::getCommitteeUnit, informationQuery.getCommitteeUnit())
+                    .eq(informationQuery.getRegionId() != null, TCommittee::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TCommittee::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TCommittee::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TCommittee::getLevel, informationQuery.getLevel())
+                    .orderByDesc(TCommittee::getCreateTime)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }else {
+            page = tCommitteeService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getName()), TCommittee::getCommitteeName, informationQuery.getName())
+                    .like(!StringUtils.isEmpty(informationQuery.getCommitteeUnit()), TCommittee::getCommitteeUnit, informationQuery.getCommitteeUnit())
+                    .eq(informationQuery.getRegionId() != null, TCommittee::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TCommittee::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TCommittee::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TCommittee::getLevel, informationQuery.getLevel())
+                    .orderByDesc(TCommittee::getCommitteeSort)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }
 
         for (TCommittee record : page.getRecords()) {
             TRegion byId = regionService.getById(record.getRegionId());
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConsultationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConsultationController.java
index dcaf558..eb7cad7 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConsultationController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TConsultationController.java
@@ -157,6 +157,8 @@
     @PostMapping(value = "/detail")
     public R<TConsultation> detail(@RequestParam Long id ) {
         TConsultation byId = informationService.getById(id);
+        byId.setWatchNum(byId.getWatchNum()+1);
+        informationService.updateById(byId);
         TTechnicalTitle byId1 = tTechnicalTitleService.getById(byId.getTitleId());
         byId.setTechnicalName(byId1.getTitileName());
         TTitleMajor byId2 = majorService.getById(byId.getMajorId());
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java
index 06cd114..cb3c74d 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TCourseController.java
@@ -107,16 +107,26 @@
     @PostMapping(value = "/list")
     public R<Page<TCourse>> list(@RequestBody CourseQuery informationQuery) {
         Long userId = tokenService.getLoginUser().getUserId();
-
-        Page<TCourse> page = courseService.lambdaQuery()
-                .like(!StringUtils.isEmpty(informationQuery.getName()), TCourse::getCourseName, informationQuery.getName())
-                .eq(informationQuery.getRegionId() != null, TCourse::getRegionId, informationQuery.getRegionId())
-                .eq(informationQuery.getTechnicalId() != null, TCourse::getTechnicalId, informationQuery.getTechnicalId())
-                .eq(informationQuery.getMajorId() != null, TCourse::getMajorId, informationQuery.getMajorId())
-                .eq(informationQuery.getLevel() != null, TCourse::getLevel, informationQuery.getLevel())
-                .orderByDesc(TCourse::getCommitteeSort)
-                .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
-
+        Page<TCourse> page;
+        if (informationQuery.getSortType()==1){
+            page = courseService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getName()), TCourse::getCourseName, informationQuery.getName())
+                    .eq(informationQuery.getRegionId() != null, TCourse::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TCourse::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TCourse::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TCourse::getLevel, informationQuery.getLevel())
+                    .orderByDesc(TCourse::getCreateTime)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }else {
+            page = courseService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getName()), TCourse::getCourseName, informationQuery.getName())
+                    .eq(informationQuery.getRegionId() != null, TCourse::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TCourse::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TCourse::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TCourse::getLevel, informationQuery.getLevel())
+                    .orderByDesc(TCourse::getCommitteeSort)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }
 
         Set<Long> cacheSet = redisCache.getCacheSet("COURSE:" + userId);
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TDeclareNoticeController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TDeclareNoticeController.java
index 93278a8..8fb6d7a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TDeclareNoticeController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TDeclareNoticeController.java
@@ -20,6 +20,7 @@
 import java.lang.reflect.Array;
 import java.util.Arrays;
 import java.util.List;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -128,17 +129,32 @@
     @ApiOperation(value = "查询",tags = {"后台-申报通知","web-职称申报"})
     @PostMapping(value = "/list")
     public R<Page<TDeclareNotice>> list(@RequestBody DeclareNoticeQuery informationQuery) {
-        Page<TDeclareNotice> page = tDeclareNoticeService.lambdaQuery()
-                .like(!StringUtils.isEmpty(informationQuery.getDeclareNoticeName()), TDeclareNotice::getDeclareNoticeName, informationQuery.getDeclareNoticeName())
-                .eq(informationQuery.getRegionId() != null, TDeclareNotice::getRegionId, informationQuery.getRegionId())
-                .eq(informationQuery.getTechnicalId() != null, TDeclareNotice::getTechnicalId, informationQuery.getTechnicalId())
-                .eq(informationQuery.getMajorId() != null, TDeclareNotice::getMajorId, informationQuery.getMajorId())
-                .eq(informationQuery.getLevel() != null, TDeclareNotice::getLevel, informationQuery.getLevel())
-                .eq(informationQuery.getIsOnline()!=null, TDeclareNotice::getIsOnline, informationQuery.getIsOnline())
-                .between(informationQuery.getDeclareStartTime1()!=null,TDeclareNotice::getDeclareStartTime,informationQuery.getDeclareStartTime1(),informationQuery.getDeclareStartTime2())
-                .between(informationQuery.getDeclareEndTime1()!=null,TDeclareNotice::getDeclareEndTime,informationQuery.getDeclareEndTime1(),informationQuery.getDeclareEndTime2())
-                .orderByDesc(TDeclareNotice::getNoticeSort)
-                .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        Page<TDeclareNotice> page;
+        if(informationQuery.getSortType()==1){
+            page = tDeclareNoticeService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getDeclareNoticeName()), TDeclareNotice::getDeclareNoticeName, informationQuery.getDeclareNoticeName())
+                    .eq(informationQuery.getRegionId() != null, TDeclareNotice::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TDeclareNotice::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TDeclareNotice::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TDeclareNotice::getLevel, informationQuery.getLevel())
+                    .eq(informationQuery.getIsOnline()!=null, TDeclareNotice::getIsOnline, informationQuery.getIsOnline())
+                    .between(informationQuery.getDeclareStartTime1()!=null,TDeclareNotice::getDeclareStartTime,informationQuery.getDeclareStartTime1(),informationQuery.getDeclareStartTime2())
+                    .between(informationQuery.getDeclareEndTime1()!=null,TDeclareNotice::getDeclareEndTime,informationQuery.getDeclareEndTime1(),informationQuery.getDeclareEndTime2())
+                    .orderByDesc(TDeclareNotice::getCreateTime)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }else {
+            page = tDeclareNoticeService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getDeclareNoticeName()), TDeclareNotice::getDeclareNoticeName, informationQuery.getDeclareNoticeName())
+                    .eq(informationQuery.getRegionId() != null, TDeclareNotice::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TDeclareNotice::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TDeclareNotice::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TDeclareNotice::getLevel, informationQuery.getLevel())
+                    .eq(informationQuery.getIsOnline()!=null, TDeclareNotice::getIsOnline, informationQuery.getIsOnline())
+                    .between(informationQuery.getDeclareStartTime1()!=null,TDeclareNotice::getDeclareStartTime,informationQuery.getDeclareStartTime1(),informationQuery.getDeclareStartTime2())
+                    .between(informationQuery.getDeclareEndTime1()!=null,TDeclareNotice::getDeclareEndTime,informationQuery.getDeclareEndTime1(),informationQuery.getDeclareEndTime2())
+                    .orderByDesc(TDeclareNotice::getNoticeSort)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }
 
         for (TDeclareNotice record : page.getRecords()) {
             TRegion byId = regionService.getById(record.getRegionId());
@@ -160,6 +176,9 @@
         tDeclareNotice.setDeclareNoticeFiles(tDeclareNoticeFiles);
         tDeclareNotice.setDeclareNoticeTechnicals(tDeclareNoticeTechnicals);
         tDeclareNotice.setDeclareNoticeMajors(tDeclareNoticeMajors);
+        if(StringUtils.isEmpty(tDeclareNotice.getDeclareLevel())){
+            tDeclareNotice.setDeclareLevel(tDeclareNoticeTechnicals.stream().map(TDeclareNoticeTechnical::getLevelName).collect(Collectors.joining("/")));
+        }
         return R.ok(tDeclareNotice);
     }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TGeneratedRecordsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TGeneratedRecordsController.java
index 10d3453..76be3ba 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TGeneratedRecordsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TGeneratedRecordsController.java
@@ -243,10 +243,10 @@
 
 //        wordUtil.generate(response, "/templates", "专业技术工作总结.xml", templateParam, "测试动态列表Word");
         if (generatedRecords.getType()==1) {
-            String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\");
+            String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\");
             return R.ok(url);
         }else {
-            String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\");
+            String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\");
             return R.ok(url);
         }
 
@@ -275,10 +275,10 @@
 
 //        wordUtil.generate(response, "/templates", "专业技术工作总结.xml", templateParam, "测试动态列表Word");
         if (generatedRecords.getType()==1) {
-            String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\");
+            String url = wordUtil.generate("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\");
             return R.ok(url);
         }else {
-            String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "职称工作总结", "F:\\");
+            String url = wordUtil.generatePdf("/templates", "专业技术工作总结.xml", templateParam, "专业技术工作总结", "F:\\");
             return R.ok(url);
         }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TIndexMenuController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TIndexMenuController.java
index 10a5ee5..e957ffe 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TIndexMenuController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TIndexMenuController.java
@@ -21,6 +21,7 @@
 import javax.annotation.Resource;
 import java.time.LocalDate;
 import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * <p>
@@ -80,19 +81,16 @@
     public R getByProvinceName() {
         List<TRegion> list1 = regionService.lambdaQuery().groupBy(TRegion::getProvinceName).list();
         for (TRegion tRegion : list1) {
-
-
-        List<TRegion> list = regionService.lambdaQuery().eq(TRegion::getProvinceName, tRegion.getProvinceName()).list();
-        List<Integer> regionIds = new ArrayList<>();
-        list.forEach(region -> regionIds.add(region.getId()));
-        if (!regionIds.isEmpty()) {
-            Long count = consultationService.lambdaQuery().in(TConsultation::getRegionId, regionIds).count();
-
-
-            tRegion.setCount(count);
-        }else {
-            tRegion.setCount(0L);
-        }
+            List<TRegion> list = regionService.lambdaQuery().eq(TRegion::getProvinceName, tRegion.getProvinceName()).list();
+            List<Integer> regionIds = new ArrayList<>();
+            list.forEach(region -> regionIds.add(region.getId()));
+            if (!regionIds.isEmpty()) {
+                Long count = consultationService.lambdaQuery().in(TConsultation::getRegionId, regionIds)
+                        .in(TConsultation::getClassificationId,Arrays.asList(1,2,3)).count();
+                tRegion.setCount(count);
+            }else {
+                tRegion.setCount(0L);
+            }
         }
         return R.ok(list1);
 
@@ -133,22 +131,51 @@
         Long userId = tokenService.getLoginUser().getUserId();
         TUserChange one = changeService.lambdaQuery().eq(TUserChange::getUserId, userId).orderByDesc(TUserChange::getCreateTime).last("limit 1").one();
         List<TConsultation> notices = new ArrayList<>();
-        if (one!=null){
-            List<TUserChangeDetail> list = changeDetailService.lambdaQuery().eq(TUserChangeDetail::getChangeId, one.getId()).list();
-            for (TUserChangeDetail tUserChangeDetail : list) {
-                List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type).eq(TConsultation::getRegionId,tUserChangeDetail.getRegionId()).eq(TConsultation::getMajorId, tUserChangeDetail.getMajorId()).eq(TConsultation::getLevel, tUserChangeDetail.getLevelId()).list();
-                notices.addAll(list1);
-            }
-            notices.sort(Comparator.comparing(TConsultation::getCreateTime).reversed());
-        }else {
-            // 创建 LambdaQueryWrapper 并设置查询条件
 
-        }
-        List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type).last("ORDER BY RAND() LIMIT 16").list();
-        notices.addAll(list1);
-        if (notices.size() > 16) {
-            // 只保留前 16 条记录
-            notices = new ArrayList<>(notices.subList(0, 16));
+        if (type==1){
+            if (one!=null){
+                List<TUserChangeDetail> list = changeDetailService.lambdaQuery().eq(TUserChangeDetail::getChangeId, one.getId()).list();
+                for (TUserChangeDetail tUserChangeDetail : list) {
+                    List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type)
+                            .eq(TConsultation::getRegionId,tUserChangeDetail.getRegionId())
+                            .eq(TConsultation::getMajorId, tUserChangeDetail.getMajorId())
+                            .eq(TConsultation::getLevel, tUserChangeDetail.getLevelId())
+                            .eq(TConsultation::getIsRecommend,1)
+                            .orderByDesc(TConsultation::getClassificationSort,TConsultation::getCreateTime).list();
+                    notices.addAll(list1);
+                }
+                notices.sort(Comparator.comparing(TConsultation::getCreateTime).reversed());
+            }else {
+                // 创建 LambdaQueryWrapper 并设置查询条件
+
+            }
+            List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type).eq(TConsultation::getIsRecommend,1).last("ORDER BY RAND() LIMIT 16").list();
+            notices.addAll(list1);
+            if (notices.size() > 16) {
+                // 只保留前 16 条记录
+                notices = new ArrayList<>(notices.subList(0, 16));
+            }
+        }else {
+            if (one!=null){
+                List<TUserChangeDetail> list = changeDetailService.lambdaQuery().eq(TUserChangeDetail::getChangeId, one.getId()).list();
+                for (TUserChangeDetail tUserChangeDetail : list) {
+                    List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type)
+                            .eq(TConsultation::getRegionId,tUserChangeDetail.getRegionId())
+                            .eq(TConsultation::getMajorId, tUserChangeDetail.getMajorId())
+                            .eq(TConsultation::getLevel, tUserChangeDetail.getLevelId()).list();
+                    notices.addAll(list1);
+                }
+                notices.sort(Comparator.comparing(TConsultation::getCreateTime).reversed());
+            }else {
+                // 创建 LambdaQueryWrapper 并设置查询条件
+
+            }
+            List<TConsultation> list1 = consultationService.lambdaQuery().eq(TConsultation::getClassificationId,type).last("ORDER BY RAND() LIMIT 16").list();
+            notices.addAll(list1);
+            if (notices.size() > 16) {
+                // 只保留前 16 条记录
+                notices = new ArrayList<>(notices.subList(0, 16));
+            }
         }
         return R.ok(notices);
     }
@@ -185,9 +212,10 @@
     @PostMapping(value = "/allert")
     public R allert() {
         Long userId = tokenService.getLoginUser().getUserId();
+        TAppUser byId = appUserService.getById(userId);
         Object cacheObject = redisCache.getCacheObject("ALLERT:"+userId);
 
-        if (cacheObject!=null){
+        if (cacheObject!=null && byId.getIsSetPreference() == 1){
             return R.ok(cacheObject);
         }else {
             return R.ok(false);
@@ -277,6 +305,7 @@
             // 只保留前 16 条记录
             notices = new ArrayList<>(notices.subList(0, 16));
         }
+        notices = notices.stream().distinct().collect(Collectors.toList());
         return R.ok(notices);
     }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInformationController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInformationController.java
index 1866ba8..8d76414 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInformationController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TInformationController.java
@@ -95,17 +95,30 @@
     @PostMapping(value = "/list")
     public R<Page<TInformation>> list(@RequestBody InformationQuery informationQuery) {
         Long userId = tokenService.getLoginUser().getUserId();
-
-        Page<TInformation> page = informationService.lambdaQuery()
-                .like(!StringUtils.isEmpty(informationQuery.getInformationName()), TInformation::getInformationName, informationQuery.getInformationName())
-                .eq(informationQuery.getRegionId() != null, TInformation::getRegionId, informationQuery.getRegionId())
-                .eq(informationQuery.getTechnicalId() != null, TInformation::getTechnicalId, informationQuery.getTechnicalId())
-                .eq(informationQuery.getMajorId() != null, TInformation::getMajorId, informationQuery.getMajorId())
-                .eq(informationQuery.getLevel() != null, TInformation::getLevel, informationQuery.getLevel())
-                .eq(informationQuery.getFree()!=null&&informationQuery.getFree() == 1, TInformation::getInformationPrice, BigDecimal.ZERO)
-                .ne(informationQuery.getFree()!=null&&informationQuery.getFree() == 2, TInformation::getInformationPrice, BigDecimal.ZERO)
-                .orderByDesc(TInformation::getCommitteeSort)
-                .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        Page<TInformation> page;
+        if (informationQuery.getSortType()==1){
+            page = informationService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getInformationName()), TInformation::getInformationName, informationQuery.getInformationName())
+                    .eq(informationQuery.getRegionId() != null, TInformation::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TInformation::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TInformation::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TInformation::getLevel, informationQuery.getLevel())
+                    .eq(informationQuery.getFree()!=null&&informationQuery.getFree() == 1, TInformation::getInformationPrice, BigDecimal.ZERO)
+                    .ne(informationQuery.getFree()!=null&&informationQuery.getFree() == 2, TInformation::getInformationPrice, BigDecimal.ZERO)
+                    .orderByDesc(TInformation::getCreateTime)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }else {
+            page = informationService.lambdaQuery()
+                    .like(!StringUtils.isEmpty(informationQuery.getInformationName()), TInformation::getInformationName, informationQuery.getInformationName())
+                    .eq(informationQuery.getRegionId() != null, TInformation::getRegionId, informationQuery.getRegionId())
+                    .eq(informationQuery.getTechnicalId() != null, TInformation::getTechnicalId, informationQuery.getTechnicalId())
+                    .eq(informationQuery.getMajorId() != null, TInformation::getMajorId, informationQuery.getMajorId())
+                    .eq(informationQuery.getLevel() != null, TInformation::getLevel, informationQuery.getLevel())
+                    .eq(informationQuery.getFree()!=null&&informationQuery.getFree() == 1, TInformation::getInformationPrice, BigDecimal.ZERO)
+                    .ne(informationQuery.getFree()!=null&&informationQuery.getFree() == 2, TInformation::getInformationPrice, BigDecimal.ZERO)
+                    .orderByDesc(TInformation::getCommitteeSort)
+                    .page(Page.of(informationQuery.getPageNum(), informationQuery.getPageSize()));
+        }
         Set<Long> cacheSet = redisCache.getCacheSet("INFORMATION:" + userId);
 
         for (TInformation record : page.getRecords()) {
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOrderController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOrderController.java
index 63bf5fa..871a7be 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOrderController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOrderController.java
@@ -93,7 +93,6 @@
     @ApiOperation(value = "计数",tags = "后台-订单管理")
     @PostMapping("/count")
     public R<List<Map<String,Object>>> count(@RequestBody OrderQuery orderQuery){
-
         return R.ok(orderService.totalCount(orderQuery));
     }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTechnicalTitleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTechnicalTitleController.java
index 6c38ae5..b410701 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTechnicalTitleController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TTechnicalTitleController.java
@@ -68,7 +68,7 @@
             List<TTitleMajor> list1 = majorService.lambdaQuery().eq(TTitleMajor::getTechnicalId, tTechnicalTitle.getId()).list();
             for (TTitleMajor tTitleMajor : list1) {
                 tTitleMajor.setName(tTitleMajor.getMajorName());
-                tTitleMajor.setMajors(list2);
+//                tTitleMajor.setMajors(list2);
             }
             tTechnicalTitle.setMajors(list1);
         }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WebController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WebController.java
index f7d14a3..2a8a2cc 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WebController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/WebController.java
@@ -2,18 +2,14 @@
 
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.framework.web.service.TokenService;
-import com.ruoyi.system.domain.TIndexMenu;
-import com.ruoyi.system.domain.TUserChange;
-import com.ruoyi.system.domain.TUserChangeDetail;
+import com.ruoyi.system.domain.*;
 import com.ruoyi.system.dto.AllertTitleDto;
 import com.ruoyi.system.dto.RegionDto;
-import com.ruoyi.system.service.TIndexMenuService;
-import com.ruoyi.system.service.TRegionService;
-import com.ruoyi.system.service.TUserChangeDetailService;
-import com.ruoyi.system.service.TUserChangeService;
+import com.ruoyi.system.service.*;
 import com.ruoyi.web.controller.query.CityQueryDto;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -21,7 +17,9 @@
 
 import javax.annotation.Resource;
 import java.nio.file.LinkOption;
+import java.util.Arrays;
 import java.util.List;
+import java.util.Objects;
 
 @RestController
 @RequestMapping("/web")
@@ -39,6 +37,8 @@
     private TUserChangeService changeService;
     @Resource
     private TUserChangeDetailService changeDetailService;
+    @Resource
+    private TAppUserService appUserService;
 
     @ApiOperation(value = "获取地区树状图",tags = "web端偏好设置")
     @PostMapping(value = "/region/tree")
@@ -54,10 +54,10 @@
 
     @ApiOperation(value = "通过cityCodes查职称分类",tags = "web端偏好设置")
     @PostMapping(value = "/title/tree")
-    public R<List<AllertTitleDto>> list(@RequestBody CityQueryDto cityQueryDto) {
-
+    public R<List<AllertTitleDto>> list(@Validated @RequestBody CityQueryDto cityQueryDto) {
+        String[] split = cityQueryDto.getStrings().split(",");
+        cityQueryDto.getCityCode().addAll(Arrays.asList(split));
         List<AllertTitleDto> allertTitleDtos =  indexMenuService.allert(cityQueryDto.getCityCode());
-
         return R.ok(allertTitleDtos);
     }
 
@@ -65,6 +65,11 @@
     @PostMapping(value = "/title/set")
     public R<List<AllertTitleDto>> set(@RequestBody List<TUserChangeDetail> userChangeDetails) {
         Long userId = tokenService.getLoginUser().getUserId();
+        TAppUser byId = appUserService.getById(userId);
+        if(Objects.nonNull(byId)){
+            byId.setIsSetPreference(1);
+            appUserService.updateById(byId);
+        }
 
         //保存一次变更记录
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CityQueryDto.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CityQueryDto.java
index 23ea72d..aa7436a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CityQueryDto.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CityQueryDto.java
@@ -2,8 +2,14 @@
 
 import lombok.Data;
 
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+import java.util.ArrayList;
 import java.util.List;
 @Data
 public class CityQueryDto {
-    List<String> cityCode;
+    List<String> cityCode = new ArrayList<>();
+
+    @NotBlank(message = "城市不可为空")
+    private String strings;
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CommitteeQuery.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CommitteeQuery.java
index 845656c..1466f6d 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CommitteeQuery.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CommitteeQuery.java
@@ -30,4 +30,8 @@
     @ApiModelProperty(value = "1初级2中级3副高级4正高级5高级")
     @TableField("level")
     private Integer level;
+
+    @ApiModelProperty(value = "1=后台 2=web端")
+    private Integer sortType=1;
+
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CourseQuery.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CourseQuery.java
index 03d1391..c30d8cb 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CourseQuery.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/CourseQuery.java
@@ -28,4 +28,8 @@
     @ApiModelProperty(value = "1初级2中级3副高级4正高级5高级")
     @TableField("level")
     private Integer level;
+
+
+    @ApiModelProperty(value = "1=后台 2=web端")
+    private Integer sortType=1;
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/DeclareNoticeQuery.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/DeclareNoticeQuery.java
index 542211a..bdf4474 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/DeclareNoticeQuery.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/DeclareNoticeQuery.java
@@ -41,4 +41,9 @@
     private LocalDate declareEndTime2;
     @ApiModelProperty("是否在线申报1是0否")
     private Integer isOnline;
+
+
+    @ApiModelProperty(value = "1=后台 2=web端")
+    private Integer sortType=1;
+
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/InformationQuery.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/InformationQuery.java
index 20d6a18..6df36cd 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/InformationQuery.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/query/InformationQuery.java
@@ -31,4 +31,8 @@
     private Integer level;
     @ApiModelProperty(value = "1免费2付费")
     private Integer free;
+
+
+    @ApiModelProperty(value = "1=后台 2=web端")
+    private Integer sortType=1;
 }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MsgUtil.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MsgUtil.java
index 5cb99ca..d9b3732 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MsgUtil.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/tool/MsgUtil.java
@@ -2,22 +2,52 @@
 
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.http.HttpUtil;
+import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.redis.RedisCache;
+import com.ruoyi.common.exception.ServiceException;
+import com.ruoyi.system.domain.TAppUser;
+import com.ruoyi.system.service.TAppUserService;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
 import java.util.HashMap;
+import java.util.Objects;
 import java.util.concurrent.ThreadLocalRandom;
 @RestController
 
 public class MsgUtil {
     @Resource
     private RedisCache redisCache;
-    @ApiOperation(value = "通用发送验证码",tags = "通用发送验证码")
+    @Resource
+    private TAppUserService appUserService;
+    @ApiOperation(value = "通用发送验证码,type:1=注册,2=登录,3=修改手机号,4=修改密码",tags = "通用发送验证码")
     @PostMapping("/common/send")
-    public  String send (String phone){
+    public String send (String phone,Integer type){
+        TAppUser one = appUserService.lambdaQuery().eq(TAppUser::getPhone, phone).one();
+        switch (type){
+            case 1:
+                if (one!=null){
+                    throw new ServiceException("当前手机号已注册");
+                }
+                break;
+            case 2:
+                if (Objects.isNull(one)){
+                    throw new ServiceException("当前手机号未注册");
+                }
+                break;
+            case 3:
+                if (one!=null){
+                    throw new ServiceException("当前手机号已存在");
+                }
+                break;
+            case 4:
+                if (Objects.isNull(one)){
+                    throw new ServiceException("当前手机号不存在");
+                }
+                break;
+        }
         String code = createCode();
         redisCache.setCacheObject(phone,code);
         HashMap<String, Object> paramMap = new HashMap<>();
diff --git "a/ruoyi-admin/src/main/resources/templates/\344\270\223\344\270\232\346\212\200\346\234\257\345\267\245\344\275\234\346\200\273\347\273\223.xml" "b/ruoyi-admin/src/main/resources/templates/\344\270\223\344\270\232\346\212\200\346\234\257\345\267\245\344\275\234\346\200\273\347\273\223.xml"
index 5258b7c..39e5e02 100644
--- "a/ruoyi-admin/src/main/resources/templates/\344\270\223\344\270\232\346\212\200\346\234\257\345\267\245\344\275\234\346\200\273\347\273\223.xml"
+++ "b/ruoyi-admin/src/main/resources/templates/\344\270\223\344\270\232\346\212\200\346\234\257\345\267\245\344\275\234\346\200\273\347\273\223.xml"
@@ -388,7 +388,7 @@
                                 <w:szCs w:val="28" />
                             </w:rPr>
                             <w:t>
-                                一直以来遵守公司各项规章制度,遵守行业规则,遵纪守法。从未利用职务质变在经营活动中为自己谋取私利。平等对待所有同事与客户,在履行职责和对外交往中,不敢做有损公司声誉的事情。在业务运作中也是按照有关规章、制度条款执行,保证公司的各项业务记录准确、清晰,严禁有弄虚作假与舞弊或其他行为。</w:t>
+                                一直以来遵守公司各项规章制度,遵守行业规则,遵纪守法。从未利用职务之便在经营活动中为自己谋取私利。平等对待所有同事与客户,在履行职责和对外交往中,不敢做有损公司声誉的事情。在业务运作中也是按照有关规章、制度条款执行,保证公司的各项业务记录准确、清晰,严禁有弄虚作假与舞弊或其他行为。</w:t>
                         </w:r>
                     </w:p>
                     <w:p w14:paraId="193DFE44" w14:textId="77777777" w:rsidR="005C5315"
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
index 72ae442..4f116dc 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -139,16 +139,19 @@
 //       if (user==null){
 //           r
 //       }
-//        if (StringUtils.isNull(user)){
-//            log.info("登录用户:{} 不存在.", username);
-//            throw new ServiceException(MessageUtils.message("user.not.exists"));
-//        } else if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) {
-//            log.info("登录用户:{} 已被删除.", username);
-//            throw new ServiceException(MessageUtils.message("user.password.delete"));
-//        } else if (UserStatus.DISABLE.getCode().equals(user.getStatus())) {
-//            log.info("登录用户:{} 已被停用.", username);
-//            throw new ServiceException(MessageUtils.message("user.blocked"));
-//        }
+        if (StringUtils.isNull(user)){
+            log.info("登录用户:{} 不存在.", username);
+            throw new ServiceException("登录用户不存在");
+        } else if (user.getIsDelete()) {
+            log.info("登录用户:{} 已被删除.", username);
+            throw new ServiceException("登录用户已被删除");
+        } else if (user.getStatus() == 2) {
+            log.info("登录用户:{} 已被停用.", username);
+            throw new ServiceException("登录用户已被冻结");
+        }else if (user.getStatus() == 3) {
+            log.info("登录用户:{} 已被注销.", username);
+            throw new ServiceException("登录用户已被注销");
+        }
         try
         {
             UsernamePasswordAuthenticationToken authenticationToken = new UsernamePasswordAuthenticationToken(username, null);
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TAppUser.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TAppUser.java
index d407ccc..6a19c17 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TAppUser.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TAppUser.java
@@ -34,9 +34,9 @@
 
     @ApiModelProperty(value = "主键")
     @TableId(value = "id", type = IdType.AUTO)
-    @Excel(width = 30,name = "用户ID")
     private Long id;
-
+    @Excel(width = 30,name = "用户ID")
+    private String code;
     @ApiModelProperty(value = "用户")
     @TableField("name")
     @Excel(width = 30,name = "用户昵称")
@@ -73,7 +73,6 @@
     @ApiModelProperty(value = "市名称")
     @TableField("city")
     private String city;
-    private String code;
 
     @ApiModelProperty(value = "市区划代码")
     @TableField("city_code")
@@ -105,10 +104,6 @@
     @TableField("last_login_time")
     private LocalDateTime lastLoginTime;
 
-    @ApiModelProperty(value = "状态(1=正常,2=冻结,3=注销)")
-    @Excel(width = 30,name = "用户状态", replace = {"正常_1", "冻结_2","注销_3"})
-    @TableField("status")
-    private Integer status;
 
     @TableField("edit_name")
     private String editName;
@@ -120,6 +115,9 @@
     @ApiModelProperty(value = "删除(0=否,1=是)")
     @TableField("is_delete")
     private Boolean isDelete;
+    @ApiModelProperty(value = "是否设置偏好 1是 0否")
+    @TableField("is_set_preference")
+    private Integer isSetPreference;
 
     @ApiModelProperty(value = "初次偏好设置")
     @Excel(width = 30,name = "初次偏好设置")
@@ -137,6 +135,10 @@
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
     private LocalDateTime createTime;
 
+    @ApiModelProperty(value = "状态(1=正常,2=冻结,3=注销)")
+    @Excel(width = 30,name = "用户状态", replace = {"正常_1", "冻结_2","注销_3"})
+    @TableField("status")
+    private Integer status;
     @TableField(exist = false)
     @Excel(width = 30,name = "注册时间")
     private String createTimeStr;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeclareNotice.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeclareNotice.java
index 27e68aa..48fae31 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeclareNotice.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TDeclareNotice.java
@@ -122,6 +122,9 @@
     @ApiModelProperty(value = "评审通知说明")
     @TableField("declare_info")
     private String declareInfo;
+    @ApiModelProperty(value = "职称申报方式")
+    @TableField("title_application_type")
+    private String titleApplicationType;
 
     @TableField("create_by")
     private Long createBy;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TGeneratedRecords.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TGeneratedRecords.java
index 5c4a797..3c40411 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TGeneratedRecords.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TGeneratedRecords.java
@@ -100,6 +100,8 @@
 
     @TableField("price")
     private BigDecimal price;
+    @TableField("name")
+    private String name="工作生成总结";
 
 @TableLogic
 @TableField("is_delete")
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TInformation.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TInformation.java
index 73c4a4b..aaa754b 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TInformation.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TInformation.java
@@ -82,6 +82,9 @@
     @ApiModelProperty(value = "实际下载量")
     @TableField("downland_num")
     private Integer downlandNum;
+    @ApiModelProperty(value = "内容")
+    @TableField("content")
+    private String content;
 
     @TableField("create_by")
     private Long createBy;
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTitleMajorMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTitleMajorMapper.java
index e970c78..c31eb97 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTitleMajorMapper.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/TTitleMajorMapper.java
@@ -3,6 +3,7 @@
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.ruoyi.common.basic.PageInfo;
 import com.ruoyi.system.domain.TTitleMajor;
+import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -15,6 +16,7 @@
  * @author luodangjia
  * @since 2024-09-19
  */
+@Mapper
 public interface TTitleMajorMapper extends BaseMapper<TTitleMajor> {
 
     List<TTitleMajor> pageList( @Param("pageInfo")PageInfo<TTitleMajor> pageInfo);
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java
index 90fea1f..335afec 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TIndexMenuServiceImpl.java
@@ -1,11 +1,16 @@
 package com.ruoyi.system.service.impl;
 
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
 import com.ruoyi.system.domain.TIndexMenu;
+import com.ruoyi.system.domain.TTitleMajor;
 import com.ruoyi.system.dto.AllertTitleDto;
 import com.ruoyi.system.mapper.TIndexMenuMapper;
+import com.ruoyi.system.mapper.TTitleMajorMapper;
 import com.ruoyi.system.service.TIndexMenuService;
+import com.ruoyi.system.service.TTitleMajorService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
 import java.time.LocalDate;
@@ -24,9 +29,18 @@
 @Service
 public class TIndexMenuServiceImpl extends ServiceImpl<TIndexMenuMapper, TIndexMenu> implements TIndexMenuService {
 
+    @Autowired
+    private TTitleMajorMapper titleMajorMapper;
+
     @Override
     public List<AllertTitleDto> allert(List<String> cityCode) {
-        return this.baseMapper.allert(cityCode);
+        List<AllertTitleDto> allert = this.baseMapper.allert(cityCode);
+        for (AllertTitleDto allertTitleDto : allert) {
+            List<TTitleMajor> tTitleMajors = titleMajorMapper.selectList(Wrappers.lambdaQuery(TTitleMajor.class)
+                    .eq(TTitleMajor::getTechnicalId, allertTitleDto.getId()));
+            allertTitleDto.setChildren(tTitleMajors);
+        }
+        return allert;
     }
 
     @Override
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
index eb57f89..d4ade2a 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -47,7 +47,7 @@
 		</if>
 		<!-- 数据范围过滤 -->
 		${params.dataScope}
-		order by d.parent_id, d.order_num
+		order by d.create_time desc
     </select>
     
     <select id="selectDeptListByRoleId" resultType="Long">
diff --git a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
index 28e538b..741250c 100644
--- a/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -107,6 +107,7 @@
 			</if>
 			AND del_flag = 0
 		</where>
+		ORDER BY create_time DESC
 	</select>
 	<select id="selectCount" resultType="java.lang.Integer">
 		select  count(*) from sys_role
diff --git a/ruoyi-system/src/main/resources/mapper/system/TAppUserMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TAppUserMapper.xml
index 9d1ec8d..a4c2e9c 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TAppUserMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TAppUserMapper.xml
@@ -23,11 +23,12 @@
         <result column="last_login_time" property="lastLoginTime" />
         <result column="status" property="status" />
         <result column="is_delete" property="isDelete" />
+        <result column="is_set_preference" property="isSetPreference" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, name, phone, avatar, wx_openid, ali_openid, province, province_code, city, city_code, country, email, address, info, remark, create_time, last_login_time, status, is_delete
+        id, name, phone, avatar, wx_openid, ali_openid, province, province_code, city, city_code, country, email, address, info, remark, create_time, last_login_time, status, is_delete,is_set_preference
     </sql>
     <select id="getNewIds" resultType="java.lang.Long">
         SELECT
@@ -45,6 +46,7 @@
                     is_delete = 0
                 GROUP BY
                     user_id
+                limit 1
             ) uc_newest ON au.id = uc_newest.user_id
                 LEFT JOIN t_user_change_detail td on td.change_id = uc_newest.id
         <where>
@@ -60,9 +62,6 @@
             <if test="appUserQuery.levelId1 != null">
                 AND td.level_id = #{appUserQuery.levelId1}
             </if>
-
-
-
         </where>
         GROUP BY au.id
     </select>
@@ -97,7 +96,6 @@
             <if test="appUserQuery.levelId != null">
                 AND td.level_id = #{appUserQuery.levelId}
             </if>
-
         </where>
         GROUP BY au.id
     </select>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TCourseCommentMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TCourseCommentMapper.xml
index 6d9b68e..619fe18 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TCourseCommentMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TCourseCommentMapper.xml
@@ -40,6 +40,7 @@
                 and tcc.course_id = #{commentQuery.courseId}
             </if>
         </where>
+        ORDER BY tcc.create_time DESC
     </select>
 
 </mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TDeclareNoticeMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TDeclareNoticeMapper.xml
index 653fe16..60f36f9 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TDeclareNoticeMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TDeclareNoticeMapper.xml
@@ -28,6 +28,7 @@
         <result column="declare_notice_urls" property="declareNoticeUrls" />
         <result column="other_files" property="otherFiles" />
         <result column="declare_info" property="declareInfo" />
+        <result column="title_application_type" property="titleApplicationType" />
         <result column="create_by" property="createBy" />
         <result column="create_time" property="createTime" />
         <result column="is_delete" property="isDelete" />
@@ -35,7 +36,9 @@
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, region_id, notice_sort, technical_id, major_id, level, is_online, declare_year, declare_notice_name, declare_team_name, declare_notice_type, declare_phone, declare_type, recommend_type, declare_level, declare_num, declare_static, declare_start_time, declare_end_time, declare_limit, declare_notice_file_type, declare_notice_urls, other_files, declare_info, create_by, create_time, is_delete
+        id, region_id, notice_sort, technical_id, major_id, `level`, is_online, declare_year, declare_notice_name, declare_team_name, declare_notice_type, declare_phone,
+            declare_type, recommend_type, declare_level, declare_num, declare_static, declare_start_time, declare_end_time, declare_limit, declare_notice_file_type,
+            declare_notice_urls, other_files, declare_info, create_by, create_time, is_delete,title_application_type
     </sql>
 
 </mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TIndexMenuMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TIndexMenuMapper.xml
index 40046b9..16635ac 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TIndexMenuMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TIndexMenuMapper.xml
@@ -34,17 +34,14 @@
         id, menu_name, menu_sort, create_by, create_time, is_delete
     </sql>
     <select id="allert" resultMap="tree">
-        SELECT tt.id as tid, tt.titile_name,tm.id,tm.major_name
+        SELECT tt.id as tid, tt.titile_name
         FROM t_technical_title tt
-                 LEFT JOIN t_title_major tm  on tm.technical_id = tt.id
-        WHERE 1=1 and tt.is_delete = 0 and tm.is_delete = 0
+        WHERE 1=1 and tt.is_delete = 0
         <if test="cityCode != null and cityCode.size() > 0">
             <foreach collection="cityCode" item="id"  separator=",">
-                OR   FIND_IN_SET(#{id}, tm.region_ids)
+                and   FIND_IN_SET(#{id}, tt.region_ids)
             </foreach>
         </if>
-
-
     </select>
     <select id="userUp" resultType="java.util.Map">
         SELECT
diff --git a/ruoyi-system/src/main/resources/mapper/system/TInformationMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TInformationMapper.xml
index edd2bb3..36cb9b4 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TInformationMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TInformationMapper.xml
@@ -18,11 +18,13 @@
         <result column="create_by" property="createBy" />
         <result column="create_time" property="createTime" />
         <result column="is_delete" property="isDelete" />
+        <result column="content" property="content" />
     </resultMap>
 
     <!-- 通用查询结果列 -->
     <sql id="Base_Column_List">
-        id, region_id, committee_sort, technical_id, major_id, level, information_name, information_price, information_cover, fake_downland_num, downland_num, create_by, create_time, is_delete
+        id, region_id, committee_sort, technical_id, major_id, `level`, information_name, information_price,
+            information_cover, fake_downland_num, downland_num, create_by, create_time, is_delete,content
     </sql>
 
 </mapper>
diff --git a/ruoyi-system/src/main/resources/mapper/system/TOrderMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TOrderMapper.xml
index 0f2d217..33cea68 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TOrderMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TOrderMapper.xml
@@ -32,7 +32,7 @@
         t2.NAME AS name,
         t2.phone AS phone,
         CONCAT( t2.NAME, ' ', t2.phone ) AS user_search,
-        COALESCE ( t_course.course_name, t_information.information_name ) AS good_name,
+        COALESCE ( t_course.course_name, t_information.information_name,t_generated_records.recordsName ) AS good_name,
         COALESCE ( t_course.course_cover, t_information.information_cover ) AS cover,
         CONCAT(COALESCE ( t_course.course_name, t_information.information_name ),' ',t1.code) as orderSearch
         FROM
@@ -42,13 +42,18 @@
         AND t1.good_type = 1
         LEFT JOIN ( SELECT id, information_name AS information_name,information_cover FROM t_information ) t_information ON t1.good_id = t_information.id
         AND t1.good_type = 2
+        LEFT JOIN ( SELECT id, `name` AS recordsName,user_id FROM t_generated_records order by create_time DESC limit 1) t_generated_records ON t1.user_id = t_generated_records.user_id
+        AND t1.good_type = 3
         <where>
             t1.is_delete = 0
             <if test="orderQuery.orderSearch != null and orderQuery.orderSearch != ''">
-               AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%')  or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%') or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%'))
+               AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%')
+                or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%')
+                or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%')
+                or t_generated_records.recordsName LIKE concat('%',#{orderQuery.orderSearch},'%'))
             </if>
             <if test="orderQuery.userSearch != null and orderQuery.userSearch != ''">
-                AND (user_name LIKE concat('%',#{orderQuery.userSearch},'%') OR user_phone LIKE concat('%',#{orderQuery.userSearch},'%'))
+                AND (t2.name LIKE concat('%',#{orderQuery.userSearch},'%') OR t2.phone LIKE concat('%',#{orderQuery.userSearch},'%'))
             </if>
             <if test="orderQuery.goodType != null ">
                 AND t1.good_type = #{orderQuery.goodType}
@@ -79,8 +84,18 @@
         SUM(CASE WHEN o.payment_status = 2 THEN 1 ELSE 0 END) AS paid_count,
         SUM(CASE WHEN o.payment_status = 3 THEN 1 ELSE 0 END) AS cancelled_count,
         count(1) AS refunded_count,
-        SUM(CASE WHEN o.payment_status = 2 THEN o.payment_amount ELSE 0 END) AS payment_amount
-
+        <if test="orderQuery.paymentType != null and orderQuery.paymentType == 1">
+            SUM(CASE WHEN o.payment_status = 1 THEN o.payment_amount ELSE 0 END) AS payment_amount
+        </if>
+        <if test="orderQuery.paymentType != null and orderQuery.paymentType == 2">
+            SUM(CASE WHEN o.payment_status = 2 THEN o.payment_amount ELSE 0 END) AS payment_amount
+        </if>
+        <if test="orderQuery.paymentType != null and orderQuery.paymentType == 3">
+            SUM(CASE WHEN o.payment_status = 3 THEN o.payment_amount ELSE 0 END) AS payment_amount
+        </if>
+        <if test="orderQuery.paymentType == null">
+            SUM(CASE WHEN (o.payment_status = 1 OR o.payment_status = 2 OR o.payment_status = 3) THEN o.payment_amount ELSE 0 END) AS payment_amount
+        </if>
         from (
         SELECT
         t1.*,
@@ -97,12 +112,18 @@
         AND t1.good_type = 1
         LEFT JOIN ( SELECT id, information_name AS information_name,information_cover FROM t_information ) t_information ON t1.good_id = t_information.id
         AND t1.good_type = 2
+        LEFT JOIN ( SELECT id, `name` AS recordsName,user_id FROM t_generated_records order by create_time DESC limit 1) t_generated_records ON t1.user_id = t_generated_records.user_id
+        AND t1.good_type = 3
         <where>
+            t1.is_delete = 0
             <if test="orderQuery.orderSearch != null and orderQuery.orderSearch != ''">
-                AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%')  or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%') or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%'))
+                AND ( t1.code LIKE concat('%',#{orderQuery.orderSearch},'%')
+                    or t_course.course_name LIKE concat('%',#{orderQuery.orderSearch},'%')
+                    or t_information.information_name LIKE concat('%',#{orderQuery.orderSearch},'%')
+                    or t_generated_records.recordsName LIKE concat('%',#{orderQuery.orderSearch},'%'))
             </if>
             <if test="orderQuery.userSearch != null and orderQuery.userSearch != ''">
-                AND (user_name LIKE concat('%',#{orderQuery.userSearch},'%') OR user_phone LIKE concat('%',#{orderQuery.userSearch},'%'))
+                AND (t2.name LIKE concat('%',#{orderQuery.userSearch},'%') OR t2.phone LIKE concat('%',#{orderQuery.userSearch},'%'))
             </if>
             <if test="orderQuery.goodType != null ">
                 AND t1.good_type = #{orderQuery.goodType}
@@ -119,6 +140,9 @@
             <if test="orderQuery.createTime2 != null">
                 AND DATE(t1.create_time) &lt;= #{orderQuery.createTime2}
             </if>
+            <if test="orderQuery.userId != null ">
+                AND t1.user_id = #{orderQuery.userId}
+            </if>
         </where>
         ) o
 

--
Gitblit v1.7.1