mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-09-08 05:17:42 +00:00
update 按代码规范补全重写注解
This commit is contained in:
@@ -19,6 +19,7 @@ public class DeptNameTranslationImpl implements TranslationInterface<String> {
|
||||
@DubboReference
|
||||
private RemoteDeptService remoteDeptService;
|
||||
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
return remoteDeptService.selectDeptNameByIds(key.toString());
|
||||
}
|
||||
|
@@ -6,7 +6,6 @@ import com.ruoyi.common.translation.annotation.TranslationType;
|
||||
import com.ruoyi.common.translation.constant.TransConstant;
|
||||
import com.ruoyi.common.translation.core.TranslationInterface;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 字典翻译实现
|
||||
@@ -19,6 +18,7 @@ public class DictTypeTranslationImpl implements TranslationInterface<String> {
|
||||
|
||||
private final DictService dictService;
|
||||
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
if (key instanceof String && StringUtils.isNotBlank(other)) {
|
||||
return dictService.getDictLabel(other, key.toString());
|
||||
|
@@ -6,7 +6,6 @@ import com.ruoyi.common.translation.core.TranslationInterface;
|
||||
import com.ruoyi.resource.api.RemoteFileService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* OSS翻译实现
|
||||
@@ -20,6 +19,7 @@ public class OssUrlTranslationImpl implements TranslationInterface<String> {
|
||||
@DubboReference
|
||||
private RemoteFileService ossService;
|
||||
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
return ossService.selectUrlByIds(key.toString());
|
||||
}
|
||||
|
@@ -6,7 +6,6 @@ import com.ruoyi.common.translation.core.TranslationInterface;
|
||||
import com.ruoyi.system.api.RemoteUserService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 用户名翻译实现
|
||||
@@ -20,6 +19,7 @@ public class UserNameTranslationImpl implements TranslationInterface<String> {
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Override
|
||||
public String translation(Object key, String other) {
|
||||
return remoteUserService.selectUserNameById((Long) key);
|
||||
}
|
||||
|
Reference in New Issue
Block a user