xm
2024-06-14 722af26bc6fec32bb289b1df51a9016a4935610f
提交 | 用户 | 时间
722af2 1 package com.dl.common.translation.impl;
X 2
3 import com.dl.common.annotation.TranslationType;
4 import com.dl.common.constant.TransConstant;
5 import com.dl.common.core.service.DeptService;
6 import com.dl.common.translation.TranslationInterface;
7 import lombok.AllArgsConstructor;
8 import org.springframework.stereotype.Component;
9
10 /**
11  * 部门翻译实现
12  *
13  * @author Lion Li
14  */
15 @Component
16 @AllArgsConstructor
17 @TranslationType(type = TransConstant.DEPT_ID_TO_NAME)
18 public class DeptNameTranslationImpl implements TranslationInterface<String> {
19
20     private final DeptService deptService;
21
22     @Override
23     public String translation(Object key, String other) {
24         return deptService.selectDeptNameByIds(key.toString());
25     }
26 }