commit
b55d8faa67
@ -18,7 +18,8 @@ import org.springframework.stereotype.Component;
|
|||||||
public class DeptNameTranslationImpl implements TranslationInterface<String> {
|
public class DeptNameTranslationImpl implements TranslationInterface<String> {
|
||||||
|
|
||||||
private final DeptService deptService;
|
private final DeptService deptService;
|
||||||
|
|
||||||
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
return deptService.selectDeptNameByIds(key.toString());
|
return deptService.selectDeptNameByIds(key.toString());
|
||||||
}
|
}
|
||||||
|
@ -20,6 +20,7 @@ public class DictTypeTranslationImpl implements TranslationInterface<String> {
|
|||||||
|
|
||||||
private final DictService dictService;
|
private final DictService dictService;
|
||||||
|
|
||||||
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
if (key instanceof String && StringUtils.isNotBlank(other)) {
|
if (key instanceof String && StringUtils.isNotBlank(other)) {
|
||||||
return dictService.getDictLabel(other, key.toString());
|
return dictService.getDictLabel(other, key.toString());
|
||||||
|
@ -19,6 +19,7 @@ public class OssUrlTranslationImpl implements TranslationInterface<String> {
|
|||||||
|
|
||||||
private final OssService ossService;
|
private final OssService ossService;
|
||||||
|
|
||||||
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
return ossService.selectUrlByIds(key.toString());
|
return ossService.selectUrlByIds(key.toString());
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ public class UserNameTranslationImpl implements TranslationInterface<String> {
|
|||||||
|
|
||||||
private final UserService userService;
|
private final UserService userService;
|
||||||
|
|
||||||
|
@Override
|
||||||
public String translation(Object key, String other) {
|
public String translation(Object key, String other) {
|
||||||
if (key instanceof Long) {
|
if (key instanceof Long) {
|
||||||
return userService.selectUserNameById((Long) key);
|
return userService.selectUserNameById((Long) key);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user