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.OssService;
6 import com.dl.common.translation.TranslationInterface;
7 import lombok.AllArgsConstructor;
8 import org.springframework.stereotype.Component;
9
10 /**
11  * OSS翻译实现
12  *
13  * @author Lion Li
14  */
15 @Component
16 @AllArgsConstructor
17 @TranslationType(type = TransConstant.OSS_ID_TO_URL)
18 public class OssUrlTranslationImpl implements TranslationInterface<String> {
19
20     private final OssService ossService;
21
22     @Override
23     public String translation(Object key, String other) {
24         return ossService.selectUrlByIds(key.toString());
25     }
26 }