|
@@ -31,11 +31,6 @@ public class AdvertisementServiceImpl implements AdvertisementService {
|
|
|
@Autowired
|
|
|
private OssProperties ossProperties;
|
|
|
|
|
|
- /**
|
|
|
- * 远程弹窗控制
|
|
|
- */
|
|
|
- private static final String POPUP_CONTROL = "popup control";
|
|
|
-
|
|
|
@Override
|
|
|
public List<AdvertisementVo> list(QueryAdvertisementParam param) {
|
|
|
List<AdvertisementVo> result = new ArrayList<>();
|
|
@@ -60,9 +55,11 @@ public class AdvertisementServiceImpl implements AdvertisementService {
|
|
|
AdvertisementVo vo = new AdvertisementVo();
|
|
|
Advertisements adv = advertisementList.get(0);
|
|
|
BeanUtils.copyProperties(adv,vo);
|
|
|
+ LanguageEnum languageEnum = LanguageEnum.getLanguageByCode(adv.getLanguage());
|
|
|
+ vo.setLanguage(languageEnum.getName());
|
|
|
setExtraInfo(vo,adv);
|
|
|
increaseHit(adv);
|
|
|
- if(POPUP_CONTROL.equals(slug)){
|
|
|
+ if(StringUtils.isEmpty(adv.getImage())){
|
|
|
vo.setImageUrl("");
|
|
|
} else{
|
|
|
vo.setImageUrl(viewUrl + adv.getImage());
|
|
@@ -72,7 +69,13 @@ public class AdvertisementServiceImpl implements AdvertisementService {
|
|
|
for (Advertisements adv : advertisementList) {
|
|
|
AdvertisementVo vo = new AdvertisementVo();
|
|
|
BeanUtils.copyProperties(adv,vo);
|
|
|
- vo.setImageUrl(viewUrl+adv.getImage());
|
|
|
+ LanguageEnum languageEnum = LanguageEnum.getLanguageByCode(adv.getLanguage());
|
|
|
+ vo.setLanguage(languageEnum.getName());
|
|
|
+ if(StringUtils.isEmpty(adv.getImage())){
|
|
|
+ vo.setImageUrl("");
|
|
|
+ } else{
|
|
|
+ vo.setImageUrl(viewUrl + adv.getImage());
|
|
|
+ }
|
|
|
setExtraInfo(vo,adv);
|
|
|
result.add(vo);
|
|
|
}
|