【7.1.6】增加应用排序功能

pull/26/head
xixiaowei 2022-01-20 14:11:22 +08:00
parent 1f035deb54
commit 79557723fe
4 changed files with 23 additions and 0 deletions

View File

@ -100,6 +100,12 @@ public class SysAppRequest extends BaseRequest {
@ChineseDescription("状态1-启用2-禁用")
private Integer statusFlag;
/**
* -
*/
@ChineseDescription("排序-升序")
private Integer appSort;
/**
*
*/

View File

@ -81,4 +81,9 @@ public class SysAppResult extends BaseEntity {
@ChineseDescription("是否删除Y-已删除N-未删除")
private String delFlag;
/**
* -
*/
@ChineseDescription("排序-升序")
private Integer appSort;
}

View File

@ -93,4 +93,10 @@ public class SysApp extends BaseEntity {
@ChineseDescription("是否删除Y-已删除N-未删除")
private String delFlag;
/**
* -
*/
@TableField("app_sort")
@ChineseDescription("排序-升序")
private Integer appSort;
}

View File

@ -76,6 +76,11 @@ public class SysAppServiceImpl extends ServiceImpl<SysAppMapper, SysApp> impleme
sysApp.setAppCode(sysAppRequest.getAppCode());
sysApp.setAppIcon(sysAppRequest.getAppIcon());
// 默认排序值
if (sysAppRequest.getAppSort() == null) {
sysApp.setAppSort(999);
}
// 默认不激活
sysApp.setActiveFlag(YesOrNotEnum.N.getCode());
@ -148,6 +153,7 @@ public class SysAppServiceImpl extends ServiceImpl<SysAppMapper, SysApp> impleme
@Override
public PageResult<SysApp> findPage(SysAppRequest sysAppRequest) {
LambdaQueryWrapper<SysApp> wrapper = createWrapper(sysAppRequest);
wrapper.orderByAsc(SysApp::getAppSort);
Page<SysApp> page = this.page(PageFactory.defaultPage(), wrapper);
return PageResultFactory.createPageResult(page);
}