From 752e00503f672ddfe2066afb6c235721a3a912b5 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期二, 19 十一月 2024 10:25:55 +0800
Subject: [PATCH] 2024.11.19 各项修正

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt
index 96887b0..484abfd 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/Impl/ConfigServiceImpl.kt
@@ -1,6 +1,6 @@
 package cn.flightfeather.supervision.lightshare.service.Impl
 
-import cn.flightfeather.supervision.common.exception.ResponseErrorException
+import cn.flightfeather.supervision.common.exception.BizException
 import cn.flightfeather.supervision.domain.entity.CommitmentTemplate
 import cn.flightfeather.supervision.domain.entity.SceneType
 import cn.flightfeather.supervision.domain.entity.UserConfig
@@ -27,6 +27,7 @@
         val result = if (config == null || config.ucSceneRange == null) {
             val types = sceneTypeMapper.selectByExample(Example(SceneType::class.java).apply {
                 createCriteria().andIsNull("scTag")
+                orderBy("scIndex")
             })
             if (types.isNotEmpty()) {
                 types.map { Pair(it?.scId.toString(), it?.scName) }
@@ -37,6 +38,7 @@
             config.ucSceneRange?.split(";")?.let {sr ->
                 sceneTypeMapper.selectByExample(Example(SceneType::class.java).apply {
                     createCriteria().andIn("scId", sr)
+                    orderBy("scIndex")
                 }).map { Pair(it?.scId.toString(), it?.scName) }
             }
         }
@@ -56,7 +58,7 @@
                 .andIn("ctSceneTypeId", condition.sceneTypes)
         }).let {
             if (it.isEmpty()) {
-                throw ResponseErrorException("鏃犵浉鍏虫壙璇轰功妯℃澘")
+                throw BizException("鏃犵浉鍏虫壙璇轰功妯℃澘")
             }
             return it[0]
         }

--
Gitblit v1.9.3