mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-03 11:05:58 +00:00
update 优化 !pr164 代码结构与修复一些问题
This commit is contained in:
@@ -58,13 +58,6 @@ public class PageQuery implements Serializable {
|
||||
*/
|
||||
public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE;
|
||||
|
||||
public static final PageQuery DEFAULT_PAGE = new PageQuery(DEFAULT_PAGE_NUM, DEFAULT_PAGE_SIZE);
|
||||
|
||||
private PageQuery(Integer pageNum, Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
this.pageNum = pageNum;
|
||||
}
|
||||
|
||||
public <T> Page<T> build() {
|
||||
Integer pageNum = ObjectUtil.defaultIfNull(getPageNum(), DEFAULT_PAGE_NUM);
|
||||
Integer pageSize = ObjectUtil.defaultIfNull(getPageSize(), DEFAULT_PAGE_SIZE);
|
||||
|
@@ -21,6 +21,11 @@ public class NicknameTranslationImpl implements TranslationInterface<String> {
|
||||
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
return remoteUserService.selectNicknameById(Long.valueOf(String.valueOf(key)));
|
||||
if (key instanceof Long id) {
|
||||
return remoteUserService.selectNicknameByIds(id.toString());
|
||||
} else if (key instanceof String ids) {
|
||||
return remoteUserService.selectNicknameByIds(ids);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user