* @Description: 商家数据导出Excel下载
*/
public InputStream getMerchantExcel() throws
IllegalArgumentException, IOException, IllegalAccessException
{
ByteArrayOutputStream baos = new ByteArrayOutputStream();
List<String[]> headNames = new ArrayList<String[]>();
List<String[]> fieldNames = new ArrayList<String[]>();
headNames.add(new String[] { "商家名称", "商家电话", "商家邮箱", "商家地址",
"加盟时间", "商家Logo", "法定代表人", "法定人身份证号码", "法定人电话",
"法定人家庭地址", "法定人现居地址" });
fieldNames.add(new String[]{"merchantName", "merchantPhone","merchantEmail",
"merchantAddress","merchantJoinTime", "merchantLogoUrl","legalName",
"legalIdCard","legalPhone","legalHomeAddress","legalAddress"});
ExportSetInfo setInfo = new ExportSetInfo();
setInfo.setObjsMap(merchantService.getExportData());
setInfo.setFieldNames(fieldNames);
setInfo.setTitles(new String[] { "馋八戒加盟商家信息" });
setInfo.setHeadNames(headNames);
setInfo.setOut(baos);
// 将需要导出的数据输出到baos
ExcelUtil.export2Excel(setInfo);
return new ByteArrayInputStream(baos.toByteArray());
}