Authored by chaogeng

修改背景图

1 package com.yoho.activity.queue.service.impl; 1 package com.yoho.activity.queue.service.impl;
2 2
  3 +import java.util.ArrayList;
3 import java.util.Arrays; 4 import java.util.Arrays;
  5 +import java.util.List;
4 6
5 import org.apache.commons.lang.StringUtils; 7 import org.apache.commons.lang.StringUtils;
6 import org.slf4j.Logger; 8 import org.slf4j.Logger;
@@ -10,6 +12,7 @@ import org.springframework.stereotype.Service; @@ -10,6 +12,7 @@ import org.springframework.stereotype.Service;
10 12
11 import com.yoho.activity.common.utils.DateUtils; 13 import com.yoho.activity.common.utils.DateUtils;
12 import com.yoho.activity.queue.service.IActivitySettingService; 14 import com.yoho.activity.queue.service.IActivitySettingService;
  15 +import com.yoho.core.common.helpers.ImagesHelper;
13 import com.yoho.error.exception.ServiceException; 16 import com.yoho.error.exception.ServiceException;
14 import com.yoho.queue.dal.IDrawlineActivityDAO; 17 import com.yoho.queue.dal.IDrawlineActivityDAO;
15 import com.yoho.queue.dal.IDrawlineActivityLuckydrawDAO; 18 import com.yoho.queue.dal.IDrawlineActivityLuckydrawDAO;
@@ -110,7 +113,15 @@ public class ActivitySettingServiceImpl implements IActivitySettingService { @@ -110,7 +113,15 @@ public class ActivitySettingServiceImpl implements IActivitySettingService {
110 rspBO.setTopBanner(activity.getTopBanner()); 113 rspBO.setTopBanner(activity.getTopBanner());
111 if(StringUtils.isNotEmpty(bgStyle)){ 114 if(StringUtils.isNotEmpty(bgStyle)){
112 String[] bgStyles = bgStyle.split(","); 115 String[] bgStyles = bgStyle.split(",");
113 - rspBO.setBgStyle(Arrays.asList(bgStyles)); 116 + List<String> bgStyleList = new ArrayList<String>();
  117 + if(bgStyles != null && bgStyles.length != 0){
  118 + for(String style : bgStyles){
  119 + String bgStyleStr = ImagesHelper.template(style, "activity", 1);
  120 + bgStyleList.add(bgStyleStr);
  121 + }
  122 + }
  123 +
  124 + rspBO.setBgStyle(bgStyleList);
114 } 125 }
115 return rspBO; 126 return rspBO;
116 } 127 }