Quellcode durchsuchen

Merge branch 'V0.0.2' of http://10.87.10.227:4000/jzyd_yyds/soc into V0.0.2

jiawuxian vor 2 Jahren
Ursprung
Commit
ed41d4da23
19 geänderte Dateien mit 84 neuen und 62 gelöschten Zeilen
  1. 3 0
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteConfigService.java
  2. 6 1
      soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteConfigFallbackFactory.java
  3. 2 2
      soc-auth/src/main/resources/bootstrap.yml
  4. 1 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/ErrorMsgConstants.java
  5. 3 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/weather/domain/WeatherWarning.java
  6. 2 2
      soc-gateway/src/main/resources/bootstrap.yml
  7. 8 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java
  8. 2 2
      soc-modules/soc-modules-core/src/main/resources/bootstrap.yml
  9. 3 4
      soc-modules/soc-modules-file/src/main/resources/bootstrap.yml
  10. 2 2
      soc-modules/soc-modules-gen/src/main/resources/bootstrap.yml
  11. 4 4
      soc-modules/soc-modules-job/src/main/resources/bootstrap.yml
  12. 2 0
      soc-modules/soc-modules-sync/src/main/java/com/xunmei/sync/service/impl/FJNXSyncServiceImpl.java
  13. 5 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysConfigController.java
  14. 17 36
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysMenuController.java
  15. 3 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java
  16. 14 0
      soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeSetServiceImpl.java
  17. 2 3
      soc-modules/soc-modules-system/src/main/resources/bootstrap.yml
  18. 4 1
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml
  19. 1 0
      soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

+ 3 - 0
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/RemoteConfigService.java

@@ -16,4 +16,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 public interface RemoteConfigService {
     @GetMapping("/config/findFirstByCode")
     R<SysConfig> findFirstByCode(@RequestParam("code") String code, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
+
+    @GetMapping("/config/findSysConfigByCode")
+    SysConfig findSysConfigByCode(@RequestParam("code") String code, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
 }

+ 6 - 1
soc-api/soc-api-system/src/main/java/com/xunmei/system/api/factory/RemoteConfigFallbackFactory.java

@@ -13,12 +13,17 @@ public class RemoteConfigFallbackFactory implements FallbackFactory<RemoteConfig
     private static final Logger log = LoggerFactory.getLogger(RemoteConfigFallbackFactory.class);
     @Override
     public RemoteConfigService create(Throwable throwable) {
-        log.error("文件服务调用失败:{}", throwable.getMessage());
+        log.error("参数配置服务调用失败:{}", throwable.getMessage());
         return new RemoteConfigService() {
             @Override
             public R<SysConfig> findFirstByCode(String code, String source) {
                 return null;
             }
+
+            @Override
+            public SysConfig findSysConfigByCode(String code, String source) {
+                return null;
+            }
         };
     }
 }

+ 2 - 2
soc-auth/src/main/resources/bootstrap.yml

@@ -15,7 +15,7 @@ spring:
       discovery:
         # 服务注册地址
         server-addr: 10.87.10.54:8848
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 598294c7-43c1-4d78-a437-21669f936cbb
       config:
         # 配置中心地址
         server-addr: 10.87.10.54:8848
@@ -24,7 +24,7 @@ spring:
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 598294c7-43c1-4d78-a437-21669f936cbb
 logging:
   file:
     name: logs/${spring.application.name}/info.log

+ 1 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/constant/ErrorMsgConstants.java

@@ -15,4 +15,5 @@ public class ErrorMsgConstants {
 
     public static final String CUR_USER_ORT_TYPE_ERROR = "当前用户所在机构类型无法确认!";
     public static final String QUERY_USER_DATA_ERROR = "获取用户信息失败!";
+    public static final String QUERY_SYS_CONFIG_ERROR = "获取参数配置信息失败!";
 }

+ 3 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/weather/domain/WeatherWarning.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
@@ -65,10 +66,12 @@ public class WeatherWarning implements Serializable {
 
     @ApiModelProperty(value = "预警发布时间")
     @TableField("alarm_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date alarmTime;
 
     @ApiModelProperty(value = "创建时间")
     @TableField("create_time")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date createTime;
 
 

+ 2 - 2
soc-gateway/src/main/resources/bootstrap.yml

@@ -15,7 +15,7 @@ spring:
       discovery:
         # 服务注册地址
         server-addr: 10.87.10.54:8848
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 083dc0cf-7829-4914-9d5c-d48f1a31015d
       config:
         # 配置中心地址
         server-addr: 10.87.10.54:8848
@@ -24,7 +24,7 @@ spring:
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 083dc0cf-7829-4914-9d5c-d48f1a31015d
     sentinel:
       #取消控制台懒加载
       eager: true

+ 8 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/weather/service/impl/WeatherWarningServiceImpl.java

@@ -11,6 +11,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.xunmei.common.core.constant.ErrorMsgConstants;
 import com.xunmei.common.core.constant.SecurityConstants;
+import com.xunmei.common.core.domain.R;
 import com.xunmei.common.core.domain.weather.domain.WeatherWarning;
 import com.xunmei.common.core.domain.weather.dto.WeatherWarningDto;
 import com.xunmei.common.core.utils.KeyValue;
@@ -18,7 +19,9 @@ import com.xunmei.common.core.web.page.TableDataInfo;
 import com.xunmei.core.weather.mapper.WeatherWarningMapper;
 import com.xunmei.core.weather.service.IWeatherWarningService;
 import com.xunmei.core.weather.utils.HttpUtils;
+import com.xunmei.system.api.RemoteConfigService;
 import com.xunmei.system.api.RemoteOrgService;
+import com.xunmei.system.api.domain.SysConfig;
 import com.xunmei.system.api.domain.SysOrgExtend;
 import com.xunmei.system.api.function.RemoteCallHandlerExecutor;
 import lombok.extern.slf4j.Slf4j;
@@ -49,6 +52,8 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
     private StringRedisTemplate redisTemplate;
     @Resource
     private RemoteOrgService orgService;
+    @Autowired
+    private RemoteConfigService systemParameService;
     @Override
     public TableDataInfo<WeatherWarning> pageList(WeatherWarningDto request) {
         Page<WeatherWarning> page;
@@ -64,10 +69,8 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
 
     @Override
     public void getDataFromApi() {
-
-      /*  SystemParame systemParame = systemParameService.findFirstByCode(SystemParameterConstant.WEATHER_APP_CODE);
-        String appCode = systemParame.getValue();*/
-        String appCode = "123";
+        SysConfig sysConfig =  RemoteCallHandlerExecutor.executeRemoteCall(() -> systemParameService.findSysConfigByCode("WEATHER_APP_CODE", SecurityConstants.INNER),ErrorMsgConstants.QUERY_SYS_CONFIG_ERROR);
+        String appCode = sysConfig.getConfigValue();
         if(StringUtils.isEmpty(appCode)){
             log.error("尚未开通天气预警服务");
             return;
@@ -112,7 +115,7 @@ public class WeatherWarningServiceImpl extends ServiceImpl<WeatherWarningMapper,
     @Override
     public List<WeatherWarning> getTheAreaWeather(Long orgId) {
         SysOrgExtend orgExtend = RemoteCallHandlerExecutor.executeRemoteCall(() -> orgService.selectSysOrgExtendById(orgId, SecurityConstants.INNER), ErrorMsgConstants.QUERY_ORG_DATA_ERROR);
-        String key = "wearth_areaid_"+orgExtend.getWeatherAreaCode();
+        String key = "wearth_areaid_101190409";//+orgExtend.getWeatherAreaCode();
         Object obj = this.redisTemplate.opsForValue().get(key);
         List<WeatherWarning> list =  JSON.parseArray((String) obj, WeatherWarning.class);
 

+ 2 - 2
soc-modules/soc-modules-core/src/main/resources/bootstrap.yml

@@ -13,11 +13,11 @@ spring:
   cloud:
     nacos:
       discovery:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
         # 服务注册地址
         server-addr: 10.87.10.54:8848
       config:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
         # 配置中心地址
         server-addr: 10.87.10.54:8848
         # 配置文件格式

+ 3 - 4
soc-modules/soc-modules-file/src/main/resources/bootstrap.yml

@@ -13,11 +13,11 @@ spring:
   cloud:
     nacos:
       discovery:
-
+        namespace: 489e15c5-b16f-4c78-87f8-f398f73b6103
         # 服务注册地址
         server-addr: 10.87.10.54:8848
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
       config:
+        namespace: 489e15c5-b16f-4c78-87f8-f398f73b6103
         # 配置中心地址
         server-addr: 10.87.10.54:8848
         # 配置文件格式
@@ -25,7 +25,6 @@ spring:
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
 logging:
   file:
-    name: logs/${spring.application.name}/info.log
+    name: logs/${spring.application.name}/info.log

+ 2 - 2
soc-modules/soc-modules-gen/src/main/resources/bootstrap.yml

@@ -13,10 +13,11 @@ spring:
   cloud:
     nacos:
       discovery:
+        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
         # 服务注册地址
         server-addr: 10.87.10.54:8848
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
       config:
+        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
         # 配置中心地址
         server-addr: 10.87.10.54:8848
         # 配置文件格式
@@ -24,4 +25,3 @@ spring:
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba

+ 4 - 4
soc-modules/soc-modules-job/src/main/resources/bootstrap.yml

@@ -3,7 +3,7 @@ server:
   port: 9203
 
 # Spring
-spring:
+spring: 
   application:
     # 应用名称
     name: soc-job
@@ -13,11 +13,11 @@ spring:
   cloud:
     nacos:
       discovery:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
         # 服务注册地址
         server-addr: 10.87.10.54:8848
       config:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 34306a91-1bb7-45ce-b80d-4092dd08ea64
         # 配置中心地址
         server-addr: 10.87.10.54:8848
         # 配置文件格式
@@ -27,4 +27,4 @@ spring:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
 logging:
   file:
-    name: logs/${spring.application.name}/info.log
+    name: logs/${spring.application.name}/info.log

+ 2 - 0
soc-modules/soc-modules-sync/src/main/java/com/xunmei/sync/service/impl/FJNXSyncServiceImpl.java

@@ -831,8 +831,10 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
         Date syncDateTime = new Date();
         list.forEach(item -> {
             if(StringUtil.isNullOrEmpty(item.getOrgCode())) {
+                log.error("没有机构编码,机构名称:{}", item.getOrgName());
                 return;
             }
+
             FjnxOrg tempOrg = new FjnxOrg();
             BeanUtils.copyBeanProp(tempOrg, item);
 

+ 5 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysConfigController.java

@@ -115,4 +115,9 @@ public class SysConfigController extends BaseController
     public R<SysConfig> findFirstByCode(String code){
         return R.ok(configService.findFirstByCode(code));
     }
+
+    @GetMapping("/findSysConfigByCode")
+    public SysConfig findSysConfigByCode(String code){
+        return configService.findFirstByCode(code);
+    }
 }

+ 17 - 36
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/controller/SysMenuController.java

@@ -24,8 +24,7 @@ import java.util.List;
  */
 @RestController
 @RequestMapping("/menu")
-public class SysMenuController extends BaseController
-{
+public class SysMenuController extends BaseController {
     @Autowired
     private ISysMenuService menuService;
 
@@ -34,8 +33,7 @@ public class SysMenuController extends BaseController
      */
     @RequiresPermissions("system:menu:list")
     @GetMapping("/list")
-    public AjaxResult list(SysMenu menu)
-    {
+    public AjaxResult list(SysMenu menu) {
         Long userId = SecurityUtils.getUserId();
         List<SysMenu> menus = menuService.selectMenuList(menu, userId);
         return success(menus);
@@ -46,8 +44,7 @@ public class SysMenuController extends BaseController
      */
     @RequiresPermissions("system:menu:query")
     @GetMapping(value = "/{menuId}")
-    public AjaxResult getInfo(@PathVariable Long menuId)
-    {
+    public AjaxResult getInfo(@PathVariable Long menuId) {
         return success(menuService.selectMenuById(menuId));
     }
 
@@ -55,8 +52,7 @@ public class SysMenuController extends BaseController
      * 获取菜单下拉树列表
      */
     @GetMapping("/treeselect")
-    public AjaxResult treeselect(SysMenu menu)
-    {
+    public AjaxResult treeselect(SysMenu menu) {
         Long userId = SecurityUtils.getUserId();
         List<SysMenu> menus = menuService.selectMenuList(menu, userId);
         return success(menuService.buildMenuTreeSelect(menus));
@@ -66,8 +62,7 @@ public class SysMenuController extends BaseController
      * 加载对应角色菜单列表树
      */
     @GetMapping(value = "/roleMenuTreeselect/{roleId}")
-    public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId)
-    {
+    public AjaxResult roleMenuTreeselect(@PathVariable("roleId") Long roleId) {
         Long userId = SecurityUtils.getUserId();
         List<SysMenu> menus = menuService.selectMenuList(userId);
         AjaxResult ajax = AjaxResult.success();
@@ -82,14 +77,10 @@ public class SysMenuController extends BaseController
     @RequiresPermissions("system:menu:add")
     @Log(title = "菜单管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@Validated @RequestBody SysMenu menu)
-    {
-        if (!menuService.checkMenuNameUnique(menu))
-        {
+    public AjaxResult add(@Validated @RequestBody SysMenu menu) {
+        if (!menuService.checkMenuNameUnique(menu)) {
             return error("新增菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
-        }
-        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
-        {
+        } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
             return error("新增菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
         }
         menu.setCreateBy(SecurityUtils.getUsername());
@@ -102,18 +93,12 @@ public class SysMenuController extends BaseController
     @RequiresPermissions("system:menu:edit")
     @Log(title = "菜单管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@Validated @RequestBody SysMenu menu)
-    {
-        if (!menuService.checkMenuNameUnique(menu))
-        {
+    public AjaxResult edit(@Validated @RequestBody SysMenu menu) {
+        if (!menuService.checkMenuNameUnique(menu)) {
             return error("修改菜单'" + menu.getMenuName() + "'失败,菜单名称已存在");
-        }
-        else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath()))
-        {
+        } else if (UserConstants.YES_FRAME.equals(menu.getIsFrame()) && !StringUtils.ishttp(menu.getPath())) {
             return error("修改菜单'" + menu.getMenuName() + "'失败,地址必须以http(s)://开头");
-        }
-        else if (menu.getId().equals(menu.getParentId()))
-        {
+        } else if (menu.getId().equals(menu.getParentId())) {
             return error("修改菜单'" + menu.getMenuName() + "'失败,上级菜单不能选择自己");
         }
         menu.setUpdateBy(SecurityUtils.getUsername());
@@ -126,14 +111,11 @@ public class SysMenuController extends BaseController
     @RequiresPermissions("system:menu:remove")
     @Log(title = "菜单管理", businessType = BusinessType.DELETE)
     @DeleteMapping("/{menuId}")
-    public AjaxResult remove(@PathVariable("menuId") Long menuId)
-    {
-        if (menuService.hasChildByMenuId(menuId))
-        {
+    public AjaxResult remove(@PathVariable("menuId") Long menuId) {
+        if (menuService.hasChildByMenuId(menuId)) {
             return warn("存在子菜单,不允许删除");
         }
-        if (menuService.checkMenuExistRole(menuId))
-        {
+        if (menuService.checkMenuExistRole(menuId)) {
             return warn("菜单已分配,不允许删除");
         }
         return toAjax(menuService.deleteMenuById(menuId));
@@ -145,10 +127,9 @@ public class SysMenuController extends BaseController
      * @return 路由信息
      */
     @GetMapping("getRouters")
-    public AjaxResult getRouters()
-    {
+    public AjaxResult getRouters() {
         LoginUser loginUser = SecurityUtils.getLoginUser();
-        List<SysMenu> menus = menuService.selectMenuTreeByUserId(loginUser.getUserid(),loginUser.getPlatformType());
+        List<SysMenu> menus = menuService.selectMenuTreeByUserId(loginUser.getUserid(), loginUser.getPlatformType());
         return success(menuService.buildMenus(menus));
     }
 }

+ 3 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysOrgServiceImpl.java

@@ -160,6 +160,9 @@ public class SysOrgServiceImpl extends ServiceImpl<SysOrgMapper, SysOrg> impleme
     @Async
     public void batchSaveOrUpdate(List<SysOrg> orgList) {
         saveOrUpdateBatch(orgList);
+        //刷新机构缓存
+        this.clearOrgCache();
+        this.loadingOrgCache();
     }
 
     /**

+ 14 - 0
soc-modules/soc-modules-system/src/main/java/com/xunmei/system/service/impl/SysWorkTimeSetServiceImpl.java

@@ -8,6 +8,7 @@ import cn.hutool.core.date.DateField;
 import cn.hutool.core.date.DateTime;
 import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.util.ObjectUtil;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.xunmei.common.core.utils.DateUtils;
@@ -446,6 +447,10 @@ public class SysWorkTimeSetServiceImpl extends ServiceImpl<SysWorkTimeSetMapper,
             }
             return workTime;
         }, true);
+
+
+        workTimeService.remove(new LambdaQueryWrapper<SysWorkTime>().eq(SysWorkTime::getOrgId,orgId).ge(SysWorkTime::getYmdDate,workTimeList.get(0).getDate()).eq(SysWorkTime::getIsManual,0));
+        List<SysWorkTime> exit = workTimeService.getBaseMapper().selectList(new LambdaQueryWrapper<SysWorkTime>().eq(SysWorkTime::getOrgId, orgId).ge(SysWorkTime::getYmdDate, workTimeList.get(0).getDate()).eq(SysWorkTime::getIsManual, 1));
         //去掉workTimeList中orgId和ymd相同的数据
         List<SysWorkTime> list1 = workTimeList.stream().filter(s -> {
             return list.stream().noneMatch(f -> f.getOrgId().equals(s.getOrgId()) && f.getYmdDate().equals(s.getYmd().getDate()));
@@ -457,6 +462,7 @@ public class SysWorkTimeSetServiceImpl extends ServiceImpl<SysWorkTimeSetMapper,
 //        }
         for (SysWorkTime s :
                 list1) {
+
             s.setYmdDate(s.getDate());
             s.setYmdDay(Long.valueOf(s.getYmd().getDay()));
             s.setYmdHalfyear(Long.valueOf(s.getYmd().getHalfyear()));
@@ -466,6 +472,14 @@ public class SysWorkTimeSetServiceImpl extends ServiceImpl<SysWorkTimeSetMapper,
             s.setYmdQuarter(Long.valueOf(s.getYmd().getQuarter()));
             s.setYmdWeek(Long.valueOf(s.getYmd().getWeek()));
             s.setYmdYear(Long.valueOf(s.getYmd().getYear()));
+
+            //如果已存在手动添加的作息则跳过
+            for (SysWorkTime s2 :
+                    exit) {
+                if (s.getYmdDate().compareTo(s2.getYmdDate()) == 0) {
+                    BeanUtils.copyProperties(s2,s);
+                }
+            }
         }
         workTimeService.saveOrUpdateBatch(list1);
 

+ 2 - 3
soc-modules/soc-modules-system/src/main/resources/bootstrap.yml

@@ -13,19 +13,18 @@ spring:
   cloud:
     nacos:
       discovery:
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
+        namespace: 083dc0cf-7829-4914-9d5c-d48f1a31015d
         # 服务注册地址
         server-addr: 10.87.10.54:8848
       config:
+        namespace: 083dc0cf-7829-4914-9d5c-d48f1a31015d
         # 配置中心地址
         server-addr: 10.87.10.54:8848
         # 配置文件格式
         file-extension: yml
-
         # 共享配置
         shared-configs:
           - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
-        namespace: 13d6af5d-c288-40d6-b1ee-4fc370665aba
 logging:
   file:
     name: logs/${spring.application.name}/info.log

+ 4 - 1
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysOrgMapper.xml

@@ -655,8 +655,11 @@
         <if test="  org.checkSub != null and org.checkSub == false">
             and o.path like concat('%',#{org.path})
         </if>
+        ORDER BY o.update_time DESC
     </select>
     <select id="getOrgIdByTaskId" resultType="java.lang.Long">
-        SELECT org_id FROM core_monitoring_retrieval_task cmrt WHERE id=#{taskId}
+        SELECT org_id
+        FROM core_monitoring_retrieval_task cmrt
+        WHERE id = #{taskId}
     </select>
 </mapper>

+ 1 - 0
soc-modules/soc-modules-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -480,5 +480,6 @@
             <!-- 结束时间检索 -->
             AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{info.params.endTime},'%y%m%d')
         </if>
+        ORDER BY u.update_time DESC
     </select>
 </mapper>