mirror of https://gitee.com/stylefeng/roses
【7.1.6】增加应用排序功能
parent
1f035deb54
commit
79557723fe
|
@ -100,6 +100,12 @@ public class SysAppRequest extends BaseRequest {
|
|||
@ChineseDescription("状态:1-启用,2-禁用")
|
||||
private Integer statusFlag;
|
||||
|
||||
/**
|
||||
* 排序-升序
|
||||
*/
|
||||
@ChineseDescription("排序-升序")
|
||||
private Integer appSort;
|
||||
|
||||
/**
|
||||
* 设置为默认状态
|
||||
*/
|
||||
|
|
|
@ -81,4 +81,9 @@ public class SysAppResult extends BaseEntity {
|
|||
@ChineseDescription("是否删除:Y-已删除,N-未删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 排序-升序
|
||||
*/
|
||||
@ChineseDescription("排序-升序")
|
||||
private Integer appSort;
|
||||
}
|
||||
|
|
|
@ -93,4 +93,10 @@ public class SysApp extends BaseEntity {
|
|||
@ChineseDescription("是否删除:Y-已删除,N-未删除")
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 排序-升序
|
||||
*/
|
||||
@TableField("app_sort")
|
||||
@ChineseDescription("排序-升序")
|
||||
private Integer appSort;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue