广丰卷烟厂数采质量分析系统
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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<String> {
 
    private final JudgeService judgeService;
 
    @Override
    public String translation(Object key, String other) {
        if(key == null) return  "";
        return judgeService.selectJudgeNameByCode(key.toString());
    }
}