Authored by chaogeng

活动url处理

package com.yoho.activity.queue.service.impl;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.apache.commons.lang.StringUtils;
... ... @@ -92,7 +93,11 @@ public class ActivitySettingServiceImpl implements IActivitySettingService {
// 设置活动BO属性
rspBO.setActivityId(activity.getId());
rspBO.setActivityName(activity.getActivityName());
rspBO.setActivityDesc(activity.getActivityDesc());
try {
rspBO.setActivityDesc(URLEncoder.encode(activity.getActivityDesc(), "UTF-8"));
} catch (UnsupportedEncodingException e) {
logger.error("generateActivityRspBO: encode activity desc fail", e);
}
if(beginTime > 0){
rspBO.setBeginTime(DateUtils.long2DateStr(beginTime * 1000L, DATE_TIME_FORMAT));
}
... ...