移动判断

beetlsql3-dev
Mlxa0324 2 years ago
parent d72345f1e8
commit e011377a73

@ -1,6 +1,7 @@
package com.ibeetl.jlw.service;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.NumberUtil;
import cn.hutool.core.util.RandomUtil;
import cn.jlw.util.ToolUtils;
@ -191,7 +192,9 @@ public class StudentClientLinkService extends CoreBaseService<StudentClientLink>
*/
public void move(@NotNull(message = "ID不能为空") Long id, @NotNull(message = "移动类型不能为空!") MoveEnum moveType) {
List<StudentClientLink> links = studentClientLinkDao.getByIds(id.toString());
if (CollectionUtil.isNotEmpty(links)) {
Assert.notEmpty(links, "未查询到要移动的元素!");
StudentClientLink studentClientLink = links.get(0);
switch (moveType) {
@ -295,4 +298,3 @@ public class StudentClientLinkService extends CoreBaseService<StudentClientLink>
}
}
}

@ -266,6 +266,16 @@ public class StudentClientLinkController{
return JsonResult.success();
}
/**
* : <br>
*
*
* @param id ID
* @param moveType
* @return {@link JsonResult}
* @Author: 87966
* @Date: 2023/1/9 16:17
*/
@GetMapping(MODEL + "/move.json")
@ResponseBody
public JsonResult move(Long id, MoveEnum moveType) {

Loading…
Cancel
Save