update 优化 !pr164 代码结构与修复一些问题

This commit is contained in:
疯狂的狮子Li
2024-06-03 16:20:43 +08:00
parent 992adc8589
commit bc05aabd5e
40 changed files with 198 additions and 380 deletions

View File

@@ -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);

View File

@@ -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;
}
}