Commit d6f9ce4d by guojuxing

微信菜单排序修改

parent 3f6168b9
......@@ -215,7 +215,7 @@ public class AppletWechatMenuApiServiceImpl implements AppletWechatMenuApiServic
List<TabAppletWechatMenu> listByParentId = appletWechatMenuService.listByParentId(record.getEnterpriseId(),
record.getParentMenuId(), record.getAppKey());
if (CollectionUtils.isNotEmpty(listByParentId)) {
boolean isRightSort = sort == null || sort.intValue() < 1 || sort.intValue() > listByParentId.size();
boolean isRightSort = sort == null || sort.intValue() < 1 || sort.intValue() >= listByParentId.size();
if (!isRightSort) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "排序值错误");
}
......@@ -226,7 +226,7 @@ public class AppletWechatMenuApiServiceImpl implements AppletWechatMenuApiServic
appletWechatMenuService.sort(menu.getMenuId(), tempSort + 1);
}
} else {
if (tempSort > currentSort && tempSort < sort) {
if (tempSort >= currentSort && tempSort < sort) {
appletWechatMenuService.sort(menu.getMenuId(), tempSort - 1);
}
}
......
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