This commit is contained in:
@jyuhsin
2025-12-23 16:47:25 +08:00
parent 090101d584
commit 967b8e7a8e
3 changed files with 9 additions and 6 deletions
@@ -391,11 +391,11 @@ public class SysMenuController {
@At
@Ok("json")
@SaCheckPermission("sys.manager.menu.edit")
public Object sortDo(@Param("ids") String ids, HttpServletRequest req) {
public Object sortDo(@Param("ids") String ids, @Param("platform") String platform, HttpServletRequest req) {
try {
String[] menuIds = StringUtils.split(ids, ",");
int i = 0;
sysMenuService.execute(Sqls.create("update sys_menu set location=0"));
sysMenuService.execute(Sqls.create("update sys_menu set location=0 where platform = '%s'".formatted(platform)));
for (String s : menuIds) {
if (!Strings.isBlank(s)) {
sysMenuService.update(org.nutz.dao.Chain.make("location", i), Cnd.where("id", "=", s));
@@ -79,8 +79,8 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
WHERE
scu.clubId = c.id
) currentNum,
presidentUser.username AS clubLeader,
secretaryUser.username AS clubSecretary
GROUP_CONCAT(DISTINCT presidentUser.username) AS clubLeader,
GROUP_CONCAT(secretaryUser.username) AS clubSecretary
FROM
sys_club c
LEFT JOIN club_user presidentCu on presidentCu.clubId = c.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_PRESIDENT"')
@@ -105,6 +105,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
cnd.and("c.id", "in", clubIdList);
}
cnd.groupBy("c.id");
cnd.asc("c.clubCode");
sql.setCondition(cnd);
return listPageVO(pageForm, sql, ClubCommonPageVo.class);
@@ -20,11 +20,13 @@ const SYS_MENU_SORT_COMPONENT = {
defaultProps: {
children: "children",
label: "label"
}
},
platform: 'PC'
}
},
methods: {
onOpen(platform) {
this.platform = platform
this.sortDialogVisible = true
this.$axios.post("/platform/sys/menu/menuAll", { platform }).then((res) => {
if (res.code === 0) {
@@ -48,7 +50,7 @@ const SYS_MENU_SORT_COMPONENT = {
})
this.getTreeIds(ids, this.sortMenuData)
this.$axios
.post("/platform/sys/menu/sortDo", { ids: ids.toString() })
.post("/platform/sys/menu/sortDo", { ids: ids.toString(), platform: this.platform })
.then((res) => {
if (res.code === 0) {
this.$message.success(res.msg)