mirror of
http://git.pig4cloud.com/pig/pigx.git
synced 2026-11-14 22:29:00 +08:00
refactor(app): 底部tabbar 支持优先级排序
This commit is contained in:
1 parent
7b1e95f5ff
commit
59c8d2a672
5 files changed
+12
-2
No files matched your search
+6
@@ -57,6 +57,12 @@ public class AppTabbarEntity extends Model<AppTabbarEntity> {
|
||||
@JsonDeserialize()
|
||||
private String link;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
@Schema(description = "排序值")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
package com.pig4cloud.pigx.app.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.pig4cloud.pigx.app.api.entity.AppTabbarEntity;
|
||||
import com.pig4cloud.pigx.app.service.AppTabbarService;
|
||||
import com.pig4cloud.pigx.common.core.util.R;
|
||||
@@ -37,7 +38,7 @@ public class AppTabbarController {
|
||||
@Operation(summary = "查询导航列表", description = "查询导航列表")
|
||||
@GetMapping("/list")
|
||||
public R list() {
|
||||
return R.ok(tabbarService.list());
|
||||
return R.ok(tabbarService.list(Wrappers.<AppTabbarEntity>lambdaQuery().orderByAsc(AppTabbarEntity::getSortOrder)));
|
||||
}
|
||||
|
||||
@Operation(summary = "更新导航", description = "更新导航")
|
||||
|
||||
+2
-1
@@ -59,7 +59,8 @@ public class AppIndexServiceImpl implements AppIndexService {
|
||||
@Override
|
||||
public Map<String, Object> config() {
|
||||
Map<String, Object> response = new LinkedHashMap<>();
|
||||
List<AppTabbarEntity> tabbarEntityList = appTabbarMapper.selectList(Wrappers.emptyWrapper());
|
||||
List<AppTabbarEntity> tabbarEntityList = appTabbarMapper
|
||||
.selectList(Wrappers.<AppTabbarEntity>lambdaQuery().orderByAsc(AppTabbarEntity::getSortOrder));
|
||||
response.put("tabbar", tabbarEntityList);
|
||||
return response;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user