Commit 53fb7dc0 by guojuxing

应用市场一级页面新增的时候排序取值修改

parent b95c572f
......@@ -556,7 +556,12 @@ public class MenuApiServiceImpl implements MenuApiService {
*/
private void setNormalFieldValue(MenuDTO menuDTO) {
//sort
int maxSort = menuService.getMaxSortByParentId(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, menuDTO.getProject());
int maxSort;
if (MenuProjectConstants.DEFAULT_PROJECT.equals(menuDTO.getProject())) {
maxSort = menuService.getMaxSortByParentId(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, menuDTO.getProject());
} else {
maxSort = menuService.getMaxSortByParentId(MenuLevelConstants.FIRST_LEVEL_PARENT_ID, null);
}
menuDTO.setSort(maxSort + 1);
//level
menuDTO.setLevel(1);
......
......@@ -288,7 +288,9 @@
from tab_sys_menu
where status=1
and parent_id = #{parentId}
and project = #{project}
<if test="project != null">
and project = #{project}
</if>
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment