|
|
@@ -1,6 +1,5 @@
|
|
|
package thyyxxk.webserver.service.settings;
|
|
|
|
|
|
-import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
@@ -13,7 +12,7 @@ import thyyxxk.webserver.entity.settings.IntergrationMenu;
|
|
|
import thyyxxk.webserver.entity.settings.IntergrationPlatformRoleMenu;
|
|
|
import thyyxxk.webserver.service.RedisServer;
|
|
|
import thyyxxk.webserver.service.redislike.RedisLikeService;
|
|
|
-import thyyxxk.webserver.utils.DynamicDataUtils;
|
|
|
+import thyyxxk.webserver.utils.DynamicDataUtil;
|
|
|
import thyyxxk.webserver.utils.ResultVoUtil;
|
|
|
import thyyxxk.webserver.utils.TokenUtil;
|
|
|
import thyyxxk.webserver.utils.TreeUtil;
|
|
|
@@ -34,7 +33,9 @@ public class MenuSettingsService {
|
|
|
@Value("${spring.datasource.dynamic.primary}")
|
|
|
private String currentDbName = "";
|
|
|
|
|
|
- public MenuSettingsService(MenuSettingsDao dao, RedisServer redisServer, RedisLikeService redisLikeService) {
|
|
|
+ public MenuSettingsService(MenuSettingsDao dao,
|
|
|
+ RedisServer redisServer,
|
|
|
+ RedisLikeService redisLikeService) {
|
|
|
this.dao = dao;
|
|
|
this.redisServer = redisServer;
|
|
|
this.redisLikeService = redisLikeService;
|
|
|
@@ -43,7 +44,7 @@ public class MenuSettingsService {
|
|
|
public void menuPushRedis() {
|
|
|
String redisProdUrl = "172.16.32.167";
|
|
|
String dbName = redisProdUrl.equals(redisUrl) ? "his" : currentDbName;
|
|
|
- List<IntergrationMenu> list = DynamicDataUtils.changeByName(dbName, dao::getAll);
|
|
|
+ List<IntergrationMenu> list = DynamicDataUtil.db(dbName, dao::getAll);
|
|
|
redisServer.setData("IntergrationPlatformMenu", list);
|
|
|
}
|
|
|
|
|
|
@@ -122,7 +123,6 @@ public class MenuSettingsService {
|
|
|
return menuListByTree(passRule);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
public ResultVo<String> updateMenuSettings(IntergrationMenu menuList) {
|
|
|
if (menuList.getId() == null) {
|
|
|
dao.insert(menuList);
|