|
|
|
@@ -228,10 +228,16 @@ public class WxCampaignServiceImpl implements WxCampaignService { |
|
|
|
try { |
|
|
|
response.setHeader("Content-type","text/html;charset=utf-8"); |
|
|
|
WxCampaign wxCampaign = wxCampaignMapper.selectByPrimaryKey(id); |
|
|
|
String html = StringUtils.isEmpty(wxCampaign.getHtml()) ? "" : wxCampaign.getHtml(); |
|
|
|
try { |
|
|
|
html = URLDecoder.decode(html, "utf-8"); |
|
|
|
} catch (UnsupportedEncodingException e) { |
|
|
|
logger.info("图文内容解码失败"); |
|
|
|
} |
|
|
|
// 循环取出流中的数据 |
|
|
|
byte[] b = new byte[1024]; |
|
|
|
int len; |
|
|
|
InputStream inStream = new ByteArrayInputStream(wxCampaign.getHtml().getBytes()); |
|
|
|
InputStream inStream = new ByteArrayInputStream(html.getBytes()); |
|
|
|
while ((len = inStream.read(b)) > 0){ |
|
|
|
response.getOutputStream().write(b, 0, len); |
|
|
|
} |
|
|
|
|