|
|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
|
|
|
@@ -33,6 +34,7 @@ import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
import java.util.concurrent.TimeUnit; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Service |
|
|
|
public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
@@ -148,6 +150,14 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
|
|
|
|
public void exportData(WxCUserBasicInfo basicInfo, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
List<WxCUserBasicInfoVo> list = wxCUserBasicInfoMapper.findVoList(basicInfo); |
|
|
|
List<WxTags> tagList = wxTagsMapper.findListAll(); |
|
|
|
Map<Long, String> tagMap = tagList.stream().collect(Collectors.toMap(WxTags::getId, WxTags::getName)); |
|
|
|
list.stream().filter(u->u.getTags()!=null).forEach(u->{ |
|
|
|
logger.debug("$$$$$ID:" + u.getId().toString()); |
|
|
|
List<Long> ids = JSONObject.parseArray(u.getTags(), Long.class); |
|
|
|
String tagNames = StringUtils.join(ids.stream().map(id->tagMap.get(id)).collect(Collectors.toList()),"/"); |
|
|
|
u.setTagNames(tagNames); |
|
|
|
}); |
|
|
|
excelService.exportExcel(list,null,"会员信息",WxCUserBasicInfoVo.class,"会员信息数据.xls",response); |
|
|
|
} |
|
|
|
/* |
|
|
|
@@ -166,8 +176,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
|
|
WxTags wxTagsQ = new WxTags(); |
|
|
|
List<WxTags> tagList = wxTagsMapper.findList(wxTagsQ); |
|
|
|
|
|
|
|
|
|
|
|
List<Long> tagIdList = new ArrayList<Long>(); |
|
|
|
|
|
|
|
|