快捷菜单
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.czg.controller.admin;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.czg.account.entity.QuickMenu;
|
||||
import com.czg.account.service.QuickMenuService;
|
||||
import com.czg.annotation.SaAdminCheckPermission;
|
||||
@@ -31,12 +32,17 @@ public class QuickMenuController {
|
||||
@SaAdminCheckPermission(parentName = "悬浮窗", value = "quick:list", name = "悬浮窗-列表")
|
||||
@GetMapping
|
||||
public CzgResult<List<QuickMenu>> getQuickList(Integer status) {
|
||||
return CzgResult.success(quickMenuService.list(QueryWrapper.create()
|
||||
.eq(QuickMenu::getShopId, StpKit.USER.getShopId())
|
||||
.eq(QuickMenu::getStatus, status)
|
||||
.orderBy(QuickMenu::getSort, true)
|
||||
)
|
||||
);
|
||||
List<QuickMenu> list = quickMenuService.list(QueryWrapper.create()
|
||||
.eq(QuickMenu::getShopId, StpKit.USER.getShopId())
|
||||
.eq(QuickMenu::getStatus, status)
|
||||
.orderBy(QuickMenu::getSort, true));
|
||||
if (CollUtil.isEmpty(list)) {
|
||||
list = quickMenuService.list(QueryWrapper.create()
|
||||
.eq(QuickMenu::getShopId, 1)
|
||||
.eq(QuickMenu::getStatus, status)
|
||||
.orderBy(QuickMenu::getSort, true));
|
||||
}
|
||||
return CzgResult.success(list);
|
||||
}
|
||||
|
||||
@SaAdminCheckPermission(parentName = "悬浮窗", value = "quick:list", name = "悬浮窗-新增")
|
||||
|
||||
Reference in New Issue
Block a user