xhxu 5 лет назад
Родитель
Сommit
ce11e17a69
2 измененных файлов: 9 добавлений и 7 удалений
  1. +3
    -5
      mallinkService/src/main/java/com/iformall/domain/po/WxCUserFrom.java
  2. +6
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromServiceImpl.java

+ 3
- 5
mallinkService/src/main/java/com/iformall/domain/po/WxCUserFrom.java Просмотреть файл

@@ -3,7 +3,6 @@ package com.iformall.domain.po;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.EnumCUserFrom;
import com.iformall.enums.EnumUserType;
@@ -15,7 +14,6 @@ import lombok.ToString;
import java.util.Date;

@TableName(value = "wx_c_user_from")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@@ -25,12 +23,12 @@ public class WxCUserFrom extends TenantEntity {

@io.swagger.annotations.ApiModelProperty(value="cUserId",name="cUserId")
protected Long cUserId;
@Excel(name = "用户昵称", width = 20, orderNum = "2")
@TableField(exist = false)
@Excel(name = "用户昵称", width = 20, orderNum = "2")
@io.swagger.annotations.ApiModelProperty(value="cUserNickName",name="cUserNickName")
protected String cUserNickName;
@Excel(name = "用户电话", width = 20, orderNum = "3")
@TableField(exist = false)
@Excel(name = "用户电话", width = 20, orderNum = "3")
@io.swagger.annotations.ApiModelProperty(value="cUserPhone",name="cUserPhone")
protected String cUserPhone;

@@ -46,8 +44,8 @@ public class WxCUserFrom extends TenantEntity {

@io.swagger.annotations.ApiModelProperty(value="EnumCUserFrom",name="fromType")
private Integer fromType;
@Excel(name = "来源", width = 20, orderNum = "1")
@TableField(exist = false)
@Excel(name = "来源", width = 20, orderNum = "1")
@io.swagger.annotations.ApiModelProperty(value="fromType描述",name="fromTypeDesc")
private String fromTypeDesc;
public String getFromTypeDesc(){


+ 6
- 2
mallinkService/src/main/java/com/iformall/service/impl/WxCUserFromServiceImpl.java Просмотреть файл

@@ -62,10 +62,14 @@ public class WxCUserFromServiceImpl implements WxCUserFromService, IExcelExportS
String sheetName = "门店/用户分享明细";
if(record.getFromType().equals(EnumCUserFrom.FROM_C_USER_BASIC_INFO.getCode())){
WxCUserBasicInfo wxCUserBasicInfo = wxCUserBasicInfoMapper.selectById(record.getFromId(), record.getFinalTenantId());
sheetName = "用户["+wxCUserBasicInfo.getPhone()+"]分享明细";
if(wxCUserBasicInfo != null){
sheetName = "用户["+wxCUserBasicInfo.getPhone()+"]分享明细";
}
}else if(record.getFromType().equals(EnumCUserFrom.FROM_MERCHANT.getCode())){
WxMerchant wxMerchant = wxMerchantMapper.selectById(record.getFromId());
sheetName = "门店["+wxMerchant.getName()+"]分享明细";
if(wxMerchant != null){
sheetName = "门店["+wxMerchant.getName()+"]分享明细";
}
}
String fileName = sheetName + ".xlsx";
excelService.exportBigExcel(this,record, null, sheetName, WxCUserFrom.class, fileName, response, false);


Загрузка…
Отмена
Сохранить