|
|
|
@ -29,6 +29,7 @@ import java.math.RoundingMode;
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import static cn.hutool.core.util.ObjectUtil.defaultIfNull;
|
|
|
|
|
import static java.lang.Math.min;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -229,7 +230,7 @@ public class StudentClientLinkService extends CoreBaseService<StudentClientLink>
|
|
|
|
|
case MOVE_LEFT: {
|
|
|
|
|
List<StudentClientLink> result = studentClientLinkDao.createLambdaQuery()
|
|
|
|
|
.andEq(StudentClientLink::getStudentClientLinkType, studentClientLink.getStudentClientLinkType())
|
|
|
|
|
.andLess(StudentClientLink::getStudentClientLinkOrder, studentClientLink.getStudentClientLinkOrder())
|
|
|
|
|
.andLess(StudentClientLink::getStudentClientLinkOrder, defaultIfNull(studentClientLink.getStudentClientLinkOrder(), 50))
|
|
|
|
|
.andEq(StudentClientLink::getStudentClientLinkStatus, 1)
|
|
|
|
|
.andNotEq(StudentClientLink::getStudentClientLinkId, id)
|
|
|
|
|
.desc(StudentClientLink::getStudentClientLinkOrder)
|
|
|
|
@ -264,7 +265,7 @@ public class StudentClientLinkService extends CoreBaseService<StudentClientLink>
|
|
|
|
|
case MOVE_RIGHT: {
|
|
|
|
|
List<StudentClientLink> result = studentClientLinkDao.createLambdaQuery()
|
|
|
|
|
.andEq(StudentClientLink::getStudentClientLinkType, studentClientLink.getStudentClientLinkType())
|
|
|
|
|
.andGreat(StudentClientLink::getStudentClientLinkOrder, studentClientLink.getStudentClientLinkOrder())
|
|
|
|
|
.andGreat(StudentClientLink::getStudentClientLinkOrder, defaultIfNull(studentClientLink.getStudentClientLinkOrder(), 50))
|
|
|
|
|
.andEq(StudentClientLink::getStudentClientLinkStatus, 1)
|
|
|
|
|
.andNotEq(StudentClientLink::getStudentClientLinkId, id)
|
|
|
|
|
.asc(StudentClientLink::getStudentClientLinkOrder)
|
|
|
|
|