|
|
|
@@ -12,7 +12,6 @@ import com.iformall.domain.vo.CUserBaseInfoT; |
|
|
|
import com.iformall.domain.vo.CUserBaseVo; |
|
|
|
import com.iformall.domain.vo.CUserTagVo; |
|
|
|
import com.iformall.domain.vo.WxCUserBasicInfoVo; |
|
|
|
import com.iformall.enums.EnumAssignTagsTrigger; |
|
|
|
import com.iformall.enums.EnumScoreType; |
|
|
|
import com.iformall.mapper.WxCUserBasicInfoMapper; |
|
|
|
import com.iformall.mapper.WxCUserMapper; |
|
|
|
@@ -26,8 +25,8 @@ import org.apache.commons.io.FileUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.poi.ss.usermodel.Cell; |
|
|
|
import org.apache.poi.ss.usermodel.Row; |
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet; |
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook; |
|
|
|
import org.apache.poi.xssf.streaming.SXSSFSheet; |
|
|
|
import org.apache.poi.xssf.streaming.SXSSFWorkbook; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
@@ -152,7 +151,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
public void exportData(WxCUserBasicInfo basicInfo, HttpServletRequest request, HttpServletResponse response) { |
|
|
|
List<WxCUserBasicInfoVo> memberlist = wxCUserBasicInfoMapper.findVoList(basicInfo); |
|
|
|
|
|
|
|
XSSFWorkbook workbook; |
|
|
|
SXSSFWorkbook workbook; |
|
|
|
String filepath = Constant.fileDirectory; |
|
|
|
File savefile = new File(filepath); |
|
|
|
if (!savefile.exists()) { |
|
|
|
@@ -166,10 +165,12 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
WxTags wxTagsQ = new WxTags(); |
|
|
|
List<WxTags> tagList = wxTagsMapper.findList(wxTagsQ); |
|
|
|
|
|
|
|
List<Long> tagIdList = new ArrayList<Long>(); |
|
|
|
|
|
|
|
try { |
|
|
|
File file = new File(filepath); |
|
|
|
workbook = new XSSFWorkbook(); |
|
|
|
XSSFSheet sheetTwo = workbook.createSheet("会员信息"); |
|
|
|
workbook = new SXSSFWorkbook(100); |
|
|
|
SXSSFSheet sheetTwo = workbook.createSheet("会员信息"); |
|
|
|
Row rowtwo = sheetTwo.createRow(0); |
|
|
|
Cell nameCellTwo = rowtwo.createCell(0); |
|
|
|
Cell sexCellTwo = rowtwo.createCell(1); |
|
|
|
@@ -233,7 +234,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
if (!ids.isEmpty()) { |
|
|
|
String tagNames = ""; |
|
|
|
String tagIds = ""; |
|
|
|
List<Long> tagIdList = new ArrayList<>(); |
|
|
|
tagIdList.clear(); |
|
|
|
for(Long id: ids) { |
|
|
|
for(WxTags tag: tagList) { |
|
|
|
if(id.equals(tag.getId())) { |
|
|
|
@@ -306,7 +307,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
@Override |
|
|
|
public void exportTemplate(HttpServletRequest request, HttpServletResponse response, String tenantId) { |
|
|
|
|
|
|
|
XSSFWorkbook workbook; |
|
|
|
SXSSFWorkbook workbook; |
|
|
|
String filepath = Constant.fileDirectory; |
|
|
|
File savefile = new File(filepath); |
|
|
|
if (!savefile.exists()) { |
|
|
|
@@ -316,9 +317,9 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
filepath = filepath + filename; |
|
|
|
try { |
|
|
|
File file = new File(filepath); |
|
|
|
workbook = new XSSFWorkbook(); |
|
|
|
workbook = new SXSSFWorkbook(100); |
|
|
|
|
|
|
|
XSSFSheet sheetTwo = workbook.createSheet("会员信息"); |
|
|
|
SXSSFSheet sheetTwo = workbook.createSheet("会员信息"); |
|
|
|
|
|
|
|
Row rowtwo = sheetTwo.createRow(0); |
|
|
|
|
|
|
|
@@ -432,20 +433,6 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
private class UserVerifyHandler implements IExcelVerifyHandler<CUserBaseInfoT> { |
|
|
|
@Override |
|
|
|
public ExcelVerifyHandlerResult verifyHandler(CUserBaseInfoT cUserBaseInfoT) { |
|
|
|
if (StringUtils.isBlank(cUserBaseInfoT.getPhone())) { |
|
|
|
return new ExcelVerifyHandlerResult(cUserBaseInfoT); |
|
|
|
} |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
public WxCUserBasicInfo InitUserBaseInfo(CUserBaseInfoT uBase, String tenantId) { |
|
|
|
if (StringUtils.isBlank(uBase.getPhone())) { |
|
|
|
return null; |
|
|
|
@@ -591,13 +578,15 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
//触发自动打标签 |
|
|
|
//触发自动打标签, 晚上会自动打标签,所以去掉导入打标签 |
|
|
|
/* |
|
|
|
if (oldUserBase != null) { |
|
|
|
wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT,oldUserBase); |
|
|
|
} |
|
|
|
else{ |
|
|
|
wxCUserTagsService.triggerAssignTags(EnumAssignTagsTrigger.ASSIGN_TAGS_TRIGGER_IMPORT,userBase); |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
// 成长值 |
|
|
|
if (StringUtils.isNotBlank(uBase.getPoins())) { |
|
|
|
|