diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java index ebd4df0ea..5e8588d1f 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxCUserBasicInfoController.java @@ -55,7 +55,16 @@ public class WxCUserBasicInfoController extends BaseController { @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) public ResultData list(@ModelAttribute WxCUserBasicInfo wxCUserBasicInfo, Integer pageNum, Integer pageSize) { - if (null == wxCUserBasicInfo) wxCUserBasicInfo = new WxCUserBasicInfo(); + if (null == wxCUserBasicInfo) { + wxCUserBasicInfo = new WxCUserBasicInfo(); + } else { + if (StringUtils.isBlank(wxCUserBasicInfo.getPhone())) { + wxCUserBasicInfo.setPhone(null); + } + if (StringUtils.isBlank(wxCUserBasicInfo.getName())) { + wxCUserBasicInfo.setName(null); + } + } String tenantId = getTenantId(); wxCUserBasicInfo.setTenantId(tenantId); PageInfo page = wxCUserBasicInfoService.listAsPage(wxCUserBasicInfo, pageNum, pageSize); diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxCUserBasicInfo.java b/mallinkService/src/main/java/com/iformall/domain/po/WxCUserBasicInfo.java index 071bb2963..524ed1aff 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxCUserBasicInfo.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxCUserBasicInfo.java @@ -105,6 +105,7 @@ public class WxCUserBasicInfo implements Serializable { @Transient private String tagIds; @Transient + @Excel(name="标签",width = 20,orderNum = "9") private String tagNames; @Transient private long count; 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 e54f70961..01a73040a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCUserBasicInfoServiceImpl.java @@ -134,6 +134,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { Cell addrCellTwo = rowtwo.createCell(6); Cell updateDateCellTwo = rowtwo.createCell(7); Cell createDateCellTwo = rowtwo.createCell(8); + Cell tagCellTwo = rowtwo.createCell(9); nameCellTwo.setCellValue("姓名"); sexCellTwo.setCellValue("性别"); @@ -144,6 +145,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { addrCellTwo.setCellValue("地址"); updateDateCellTwo.setCellValue("上次活跃时间"); createDateCellTwo.setCellValue("注册时间"); + tagCellTwo.setCellValue("标签"); for (int i = 0; i < memberlist.size(); i++) { rowtwo = sheetTwo.createRow(i + 1); @@ -156,6 +158,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { addrCellTwo = rowtwo.createCell(6); updateDateCellTwo = rowtwo.createCell(7); createDateCellTwo = rowtwo.createCell(8); + tagCellTwo = rowtwo.createCell(9); WxCUserBasicInfo entity = memberlist.get(i); @@ -173,6 +176,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { addrCellTwo.setCellValue(entity.getAddress()); updateDateCellTwo.setCellValue(sdf.format(entity.getUpdateDate())); createDateCellTwo.setCellValue(sdf.format(entity.getCreateDate())); + } @@ -244,6 +248,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { Cell addrCellTwo = rowtwo.createCell(6); Cell updateDateCellTwo = rowtwo.createCell(7); Cell createDateCellTwo = rowtwo.createCell(8); + Cell tagCellTwo = rowtwo.createCell(9); nameCellTwo.setCellValue("姓名"); sexCellTwo.setCellValue("性别"); @@ -254,6 +259,7 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService { addrCellTwo.setCellValue("地址"); updateDateCellTwo.setCellValue("上次活跃时间"); createDateCellTwo.setCellValue("注册时间"); + tagCellTwo.setCellValue("标签"); FileOutputStream fileOut = new FileOutputStream(file); workbook.write(fileOut);