Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage
This commit is contained in:
+13
@@ -181,4 +181,17 @@ public class LawsMonthlyReportTitleTemplateEOController extends JeroController<L
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上移下移
|
||||
* @param lawsMonthlyReportTitleTemplateEOS
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "上移下移")
|
||||
@ApiOperation(value="上移下移", notes="上移下移")
|
||||
@PostMapping(value = "/move")
|
||||
public Result<?> move(@RequestBody List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS) {
|
||||
lawsMonthlyReportTitleTemplateEOService.move(lawsMonthlyReportTitleTemplateEOS);
|
||||
return Result.OK("操作成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
-4
@@ -79,10 +79,6 @@ public class LawsMonthlyReportTitleTemplateEO implements Serializable {
|
||||
@TableField(exist = false)
|
||||
private List<LawsMonthlyReportTitleTemplateEO> children = new ArrayList<>();
|
||||
|
||||
//标识(上移-->0,下移-->1)
|
||||
@TableField(exist = false)
|
||||
private String flag;
|
||||
|
||||
//排序
|
||||
private int sort;
|
||||
|
||||
|
||||
+7
-1
@@ -72,7 +72,13 @@ public interface ILawsMonthlyReportTitleTemplateEOService extends IService<LawsM
|
||||
IPage<LawsMonthlyReportTitleTemplateEO> getPageInfo(Integer pageNo,Integer pageSize, QueryWrapper<LawsMonthlyReportTitleTemplateEO> queryWrapper);
|
||||
|
||||
/**
|
||||
* 以及菜单
|
||||
* 一级菜单
|
||||
*/
|
||||
List<LawsMonthlyReportTitleTemplateEO> OneMenuList();
|
||||
|
||||
/**
|
||||
* 上移下移
|
||||
* @param lawsMonthlyReportTitleTemplateEOS
|
||||
*/
|
||||
void move(List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS);
|
||||
}
|
||||
|
||||
+16
@@ -159,6 +159,22 @@ public class LawsMonthlyReportTitleTemplateEOServiceImpl extends ServiceImpl<Law
|
||||
return this.list(wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上移,下移
|
||||
* @param lawsMonthlyReportTitleTemplateEOS
|
||||
*/
|
||||
@Override
|
||||
public void move(List<LawsMonthlyReportTitleTemplateEO> lawsMonthlyReportTitleTemplateEOS) {
|
||||
//上移,下移(交换sort)
|
||||
if(lawsMonthlyReportTitleTemplateEOS.size() == 2){
|
||||
int one = lawsMonthlyReportTitleTemplateEOS.get(0).getSort();
|
||||
int two = lawsMonthlyReportTitleTemplateEOS.get(1).getSort();
|
||||
lawsMonthlyReportTitleTemplateEOS.get(0).setSort(two);
|
||||
lawsMonthlyReportTitleTemplateEOS.get(1).setSort(one);
|
||||
}
|
||||
this.updateBatchById(lawsMonthlyReportTitleTemplateEOS);
|
||||
}
|
||||
|
||||
public Page getPages(Integer currentPage, Integer pageSize, List<LawsMonthlyReportTitleTemplateEO> list){
|
||||
Page page =new Page();
|
||||
if(list==null){
|
||||
|
||||
Reference in New Issue
Block a user