自动排序号优化

This commit is contained in:
thinkgem
2024-04-08 10:24:27 +08:00
parent 6d0d134ea2
commit 11168f4356
2 changed files with 2 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public class PostController extends BaseController {
@RequestMapping(value = "form")
public String form(Post post, Model model) {
if(post.getIsNewRecord()){
post.setPostSort((int)postService.findCount(post) * 10);
post.setPostSort(((int)postService.findCount(post) + 1) * 10);
}
// 查询岗位所关联的角色信息
if (StringUtils.isNotBlank(post.getPostCode())){

View File

@@ -82,7 +82,7 @@ public class RoleController extends BaseController {
@RequestMapping(value = "form")
public String form(Role role, String op, Model model) {
if(role.getIsNewRecord()){
role.setRoleSort((int)roleService.findCount(role) * 10);
role.setRoleSort(((int)roleService.findCount(role) + 1) * 10);
role.setUserType(User.USER_TYPE_EMPLOYEE);
role.setIsSys(Global.NO);
role.setIsShow(Global.SHOW);