commit
This commit is contained in:
@@ -146,10 +146,10 @@ public class SysHomeController {
|
||||
|
||||
@At
|
||||
@SaCheckLogin
|
||||
@ApiOperation("电脑端快速入口")
|
||||
@ApiOperation("电脑端推荐应用")
|
||||
@Ok("json")
|
||||
public Result listQuickEntry(String platform) {
|
||||
List<Sys_menu> list = sysMenuService.query(Cnd.where(Sys_menu::getIsQuickEntry, "=", 1)
|
||||
public Result listRecommendApp(String platform) {
|
||||
List<Sys_menu> list = sysMenuService.query(Cnd.where(Sys_menu::getIsRecommendApp, "=", 1)
|
||||
.and(Sys_menu::getDisabled, "=", 0)
|
||||
.and(Sys_menu::getShowit, "=", 1)
|
||||
.and(Sys_menu::getPlatform, "=", platform)
|
||||
|
||||
@@ -38,6 +38,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@IocBean
|
||||
@At("/platform/sys/menu")
|
||||
@@ -422,11 +423,16 @@ public class SysMenuController {
|
||||
@At
|
||||
@Ok("json")
|
||||
@SaCheckPermission("sys.manager.menu")
|
||||
@ApiOperation("更新快捷入口")
|
||||
public Result updateQuickEntry(@Param("menuIds") String[] menuIds, String platform) {
|
||||
sysMenuService.update(Chain.make("isQuickEntry", 0), Cnd.where("id", "is not", null).and("platform", "=", platform));
|
||||
@ApiOperation("更新首页推荐应用或服务")
|
||||
public Result updateRecommendSetting(@Param("menuIds") String[] menuIds, String platform, String type) {
|
||||
String column = "";
|
||||
switch (type) {
|
||||
case "app" -> column = "isRecommendApp";
|
||||
case "service" -> column = "isRecommendService";
|
||||
}
|
||||
sysMenuService.update(Chain.make(column, 0), Cnd.where("id", "is not", null).and("platform", "=", platform));
|
||||
if (ArrayUtil.isNotEmpty(menuIds)) {
|
||||
sysMenuService.update(Chain.make("isQuickEntry", 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform));
|
||||
sysMenuService.update(Chain.make(column, 1), Cnd.where("id", "in", menuIds).and("platform", "=", platform));
|
||||
}
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user