疯狂的狮子li
2023-01-31 bff9720b6fa86fcced776601f4d318ea26b7265f
ruoyi-common/ruoyi-common-translation/src/main/java/com/ruoyi/common/translation/core/impl/UserNameTranslationImpl.java
@@ -6,7 +6,7 @@
import org.springframework.stereotype.Component;
/**
 * 翻译接口 (实现类需标注 {@link com.ruoyi.common.translation.annotation.TranslationType} 注解标明翻译类型)
 * 用户名翻译实现
 *
 * @author Lion Li
 */
@@ -14,13 +14,8 @@
@TranslationType(type = TransConstant.USER_ID_TO_NAME)
public class UserNameTranslationImpl implements TranslationInterface {
    /**
     * 翻译
     *
     * @param key 需要被翻译的键
     * @return 返回键对应的值
     */
    public String translation(Object key) {
    public String translation(Object key, String other) {
        // todo 待实现
        if (key instanceof Long id) {
            return "admin";
        }