package org.dromara.common.translation.core.impl; import lombok.AllArgsConstructor; import org.dromara.common.core.service.JudgeService; import org.dromara.common.core.service.MatService; import org.dromara.common.translation.annotation.TranslationType; import org.dromara.common.translation.constant.TransConstant; import org.dromara.common.translation.core.TranslationInterface; /** * judgeName翻译实现 * * @author zhuguifei */ @AllArgsConstructor @TranslationType(type = TransConstant.JUDGE_CODE_TO_NAME) public class JudgeNameTranslationImpl implements TranslationInterface { private final JudgeService judgeService; @Override public String translation(Object key, String other) { if(key == null) return ""; return judgeService.selectJudgeNameByCode(key.toString()); } }