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