diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/CUserBaseInfoT.java b/mallinkService/src/main/java/com/iformall/domain/vo/CUserBaseInfoT.java index eb1fa8085..3b136c354 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/CUserBaseInfoT.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/CUserBaseInfoT.java @@ -51,6 +51,10 @@ public class CUserBaseInfoT implements Serializable { @Excel(name="标签",width = 20,orderNum = "10") private String tagNames; + @Transient + @Excel(name="成长值",width = 20,orderNum = "11") + private Integer poins; + public String getName() { return name; } @@ -130,4 +134,12 @@ public class CUserBaseInfoT implements Serializable { public void setTagNames(String tagNames) { this.tagNames = tagNames; } + + public Integer getPoins() { + return poins; + } + + public void setPoins(Integer poins) { + this.poins = poins; + } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java index 066fcb4bd..1aaedfece 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -179,6 +179,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { Cell updateDateCellTwo = rowtwo.createCell(7); Cell createDateCellTwo = rowtwo.createCell(8); Cell tagCellTwo = rowtwo.createCell(9); + Cell scoreCellTwo = rowtwo.createCell(10); nameCellTwo.setCellValue("姓名"); sexCellTwo.setCellValue("性别"); @@ -190,6 +191,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo.setCellValue("上次活跃时间"); createDateCellTwo.setCellValue("注册时间"); tagCellTwo.setCellValue("标签"); + scoreCellTwo.setCellValue("成长值"); for (int i = 0; i < memberlist.size(); i++) { rowtwo = sheetTwo.createRow(i + 1); @@ -203,6 +205,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo = rowtwo.createCell(7); createDateCellTwo = rowtwo.createCell(8); tagCellTwo = rowtwo.createCell(9); + scoreCellTwo = rowtwo.createCell(10); WxCUserBasicInfo entity = memberlist.get(i); @@ -249,6 +252,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { } } } + // 成长值 + scoreCellTwo.setCellValue(entity.getPoins()); } @@ -322,6 +327,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { Cell updateDateCellTwo = rowtwo.createCell(7); Cell createDateCellTwo = rowtwo.createCell(8); Cell tagCellTwo = rowtwo.createCell(9); + Cell scoreCellTwo = rowtwo.createCell(10); nameCellTwo.setCellValue("姓名"); sexCellTwo.setCellValue("性别"); @@ -333,6 +339,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo.setCellValue("上次活跃时间"); createDateCellTwo.setCellValue("注册时间"); tagCellTwo.setCellValue("标签"); + scoreCellTwo.setCellValue("成长值"); { rowtwo = sheetTwo.createRow(1); nameCellTwo = rowtwo.createCell(0); @@ -345,6 +352,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo = rowtwo.createCell(7); createDateCellTwo = rowtwo.createCell(8); tagCellTwo = rowtwo.createCell(9); + scoreCellTwo = rowtwo.createCell(10); nameCellTwo.setCellValue("例子1"); sexCellTwo.setCellValue("保密"); phoneCellTwo.setCellValue("13900010001"); @@ -355,6 +363,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo.setCellValue("2018-08-10"); createDateCellTwo.setCellValue("2018-08-10"); tagCellTwo.setCellValue("附近住户"); + scoreCellTwo.setCellValue(100); } { rowtwo = sheetTwo.createRow(2); @@ -378,6 +387,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo.setCellValue("2018-08-10"); createDateCellTwo.setCellValue("2018-08-10"); tagCellTwo.setCellValue("男/附近住户"); + scoreCellTwo.setCellValue(200); } { rowtwo = sheetTwo.createRow(3); @@ -401,6 +411,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { updateDateCellTwo.setCellValue("2018-08-10"); createDateCellTwo.setCellValue("2018-08-10"); tagCellTwo.setCellValue("女/附近住户"); + scoreCellTwo.setCellValue(110); } FileOutputStream fileOut = new FileOutputStream(file); @@ -485,6 +496,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { userBase.setTagNames(uBase.getTagNames()); + userBase.setPoins(uBase.getPoins()); + return userBase; } @@ -498,7 +511,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { ImportParams params = new ImportParams(); IExcelDataHandler handler = new UserExcelHandler(); - handler.setNeedHandlerFields(new String[]{"姓名", "性别", "手机号", "微信昵称", "学历", "生日", "地址", "上次活跃时间", "注册时间", "标签"});// 注意这里对应的是excel的列名。也就是对象上指定的列名。 + handler.setNeedHandlerFields(new String[]{"姓名", "性别", "手机号", "微信昵称", "学历", "生日", "地址", "上次活跃时间", "注册时间", "标签", "成长值"});// 注意这里对应的是excel的列名。也就是对象上指定的列名。 params.setDataHandler(handler); //params.setVerifyHandler(); // 需要验证 @@ -541,6 +554,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { oldUserBase.setBirthdate(userBase.getBirthdate()); oldUserBase.setAddress(userBase.getAddress()); oldUserBase.setUpdateDate(new Date()); + oldUserBase.setPoins(userBase.getPoins()); oldUserBase.setCreateDate(userBase.getCreateDate()); } else { // check c_user 是否存在