|
|
|
@@ -53,14 +53,23 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
@Excel(name="客户地址",width = 20,orderNum = "8") |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "客户地址", name = "address") |
|
|
|
private String address; |
|
|
|
@Excel(name="状态",width = 20,replace = {"审核中_0", "审核通过_1", "审核驳回_2","已退单_3"},orderNum = "9") |
|
|
|
@Excel(name="状态",width = 20,replace = {"审核中_0", "审核通过_1", "审核驳回_2","已退单_3"},orderNum = "10") |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "EnumCashBackActivityRecordStatus", name = "auditStatus") |
|
|
|
private Integer auditStatus; |
|
|
|
@TableField(exist = false) |
|
|
|
private List<Integer> auditStatusList; |
|
|
|
@Excel(name="审核内容",width = 20,orderNum = "11") |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "审核内容", name = "auditRemark") |
|
|
|
private String auditRemark; |
|
|
|
@Excel(name="提交时间",width = 20,format="yyyy-MM-dd HH:mm:ss", orderNum = "16") |
|
|
|
@Excel(name="审核时间",width = 20,format="yyyy-MM-dd HH:mm:ss",orderNum = "12") |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "审核时间", name = "auditTime") |
|
|
|
private Date auditTime; |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "审核人", name = "auditBy") |
|
|
|
private Long auditBy; |
|
|
|
@Excel(name="审核人",width = 20,orderNum = "13") |
|
|
|
@TableField(exist = false) |
|
|
|
private String auditByName; |
|
|
|
@Excel(name="提交时间",width = 20,format="yyyy-MM-dd HH:mm:ss", orderNum = "9") |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "创建时间", name = "createDate") |
|
|
|
private Date createDate; |
|
|
|
@TableField(exist = false) |
|
|
|
@@ -69,6 +78,14 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
private Date createDateEnd; |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "更新时间", name = "updateDate") |
|
|
|
private Date updateDate; |
|
|
|
@Excel(name="提交时间",width = 20,format="yyyy-MM-dd HH:mm:ss", orderNum = "14") |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "发奖时间", name = "sendTime") |
|
|
|
private Date sendTime; |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "发奖人", name = "sendBy") |
|
|
|
private Long sendBy; |
|
|
|
@Excel(name="发奖人",width = 20,orderNum = "15") |
|
|
|
@TableField(exist = false) |
|
|
|
private String sendByName; |
|
|
|
@io.swagger.annotations.ApiModelProperty(value = "签名图片", name = "updateDate") |
|
|
|
private String signImg; |
|
|
|
@Excel(name="中奖信息",width = 20, orderNum = "16") |
|
|
|
@@ -86,6 +103,8 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
private List<WxRaffleActivityRecordItem> recordItemList; |
|
|
|
@TableField(exist = false) |
|
|
|
private Map<String,Integer> recordItemIdCountMap; |
|
|
|
@TableField(exist = false) |
|
|
|
private Map<String,String> recordItemJiangQuanCountMap; |
|
|
|
|
|
|
|
public String generateItemDetaiJson() { |
|
|
|
if (null != recordItemList && recordItemList.size() > 0 ) { |
|
|
|
@@ -104,6 +123,7 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
public void generateItemIds() { |
|
|
|
if (null != recordItemList && recordItemList.size() > 0 ) { |
|
|
|
recordItemIdCountMap = new HashMap<String,Integer>(); |
|
|
|
recordItemJiangQuanCountMap = new HashMap<String,String>(); |
|
|
|
for (int i = 0 ; i < recordItemList.size() ; i++) { |
|
|
|
WxRaffleActivityRecordItem ri = recordItemList.get(i); |
|
|
|
String key = this.id+"&"+ri.getItemId(); |
|
|
|
@@ -114,6 +134,14 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
}else { |
|
|
|
recordItemIdCountMap.put(key, 1); |
|
|
|
} |
|
|
|
|
|
|
|
if (recordItemJiangQuanCountMap.containsKey(key)) { |
|
|
|
String jq = recordItemJiangQuanCountMap.get(key); |
|
|
|
jq = jq + ","+ri.getCode(); |
|
|
|
recordItemJiangQuanCountMap.put(key, jq); |
|
|
|
}else { |
|
|
|
recordItemJiangQuanCountMap.put(key, ri.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -127,20 +155,27 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
excelTitle.put("cusName", "客户姓名"); |
|
|
|
excelTitle.put("phone", "客户电话"); |
|
|
|
excelTitle.put("address", "客户地址"); |
|
|
|
excelTitle.put("createDate", "提交时间"); |
|
|
|
excelTitle.put("auditStatus", "状态"); |
|
|
|
excelTitle.put("auditRemark", "审核内容"); |
|
|
|
excelTitle.put("createDate", "提交时间"); |
|
|
|
excelTitle.put("auditTime", "审核时间"); |
|
|
|
excelTitle.put("auditByName", "审核人"); |
|
|
|
|
|
|
|
if (null != itemMap) { |
|
|
|
for (Iterator<Long> it = itemMap.keySet().iterator();it.hasNext();) { |
|
|
|
Long itemId = it.next(); |
|
|
|
WxRaffleActivityItem item = itemMap.get(itemId); |
|
|
|
excelTitle.put(String.valueOf(item.getId()),item.getName()); |
|
|
|
excelTitle.put(String.valueOf(item.getId())+"_jiangquan",item.getName()+"_奖券编码"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
excelTitle.put("sendTime", "发奖时间"); |
|
|
|
excelTitle.put("sendByName", "发奖人"); |
|
|
|
return excelTitle; |
|
|
|
} |
|
|
|
|
|
|
|
public Map<String,Object> generateExcelData(Map<Long,WxRaffleActivityItem> itemMap) { |
|
|
|
public Map<String,Object> generateExcelData(Map<Long,WxRaffleActivityItem> itemMap,Map<Long,MallUserInfo> mallUserMap) { |
|
|
|
Map<String,Object> excelObject = new HashMap<String,Object>(); |
|
|
|
excelObject.put("activityName", activityName); |
|
|
|
excelObject.put("merchantName", merchantName); |
|
|
|
@@ -149,12 +184,23 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
excelObject.put("cusName", cusName); |
|
|
|
excelObject.put("phone", phone); |
|
|
|
excelObject.put("address", address); |
|
|
|
excelObject.put("createDate", DateUtils.date2String(createDate)); |
|
|
|
EnumCashBackActivityRecordStatus status = EnumCashBackActivityRecordStatus.getEnum(auditStatus); |
|
|
|
if (null != status ) { |
|
|
|
excelObject.put("auditStatus", status.getMessage()); |
|
|
|
} |
|
|
|
excelObject.put("auditRemark", auditRemark); |
|
|
|
excelObject.put("createDate", DateUtils.date2String(createDate)); |
|
|
|
if (null != auditTime) { |
|
|
|
excelObject.put("auditTime", DateUtils.date2String(auditTime)); |
|
|
|
} |
|
|
|
|
|
|
|
if (null != auditBy) { |
|
|
|
MallUserInfo mu = mallUserMap.get(auditBy); |
|
|
|
if (null != mu) { |
|
|
|
excelObject.put("auditByName", mu.getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (null != itemMap) { |
|
|
|
for (Iterator<Long> it = itemMap.keySet().iterator();it.hasNext();) { |
|
|
|
Long itemId = it.next(); |
|
|
|
@@ -162,11 +208,24 @@ public class WxRaffleActivityRecord extends TenantEntity { |
|
|
|
String key = this.id+"&"+item.getId(); |
|
|
|
if (null != recordItemIdCountMap && recordItemIdCountMap.containsKey(key)) { |
|
|
|
excelObject.put(String.valueOf(item.getId()), recordItemIdCountMap.get(key)); |
|
|
|
excelObject.put(String.valueOf(item.getId())+"_jiangquan", recordItemJiangQuanCountMap.get(key)); |
|
|
|
}else { |
|
|
|
excelObject.put(String.valueOf(item.getId()), 0); |
|
|
|
excelObject.put(String.valueOf(item.getId())+"_jiangquan", null); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (null != sendTime) { |
|
|
|
excelObject.put("sendTime", DateUtils.date2String(sendTime)); |
|
|
|
} |
|
|
|
|
|
|
|
if (null != sendBy) { |
|
|
|
MallUserInfo mu = mallUserMap.get(sendBy); |
|
|
|
if (null != mu) { |
|
|
|
excelObject.put("sendByName", mu.getName()); |
|
|
|
} |
|
|
|
} |
|
|
|
return excelObject; |
|
|
|
} |
|
|
|
|
|
|
|
|