developrelease_toaliyun_real
| @@ -111,6 +111,10 @@ public class WxMerchantTradeDailyController extends BaseController { | |||||
| wxMerchantTradeDaily = new WxMerchantTradeDailyVo(); | wxMerchantTradeDaily = new WxMerchantTradeDailyVo(); | ||||
| } | } | ||||
| wxMerchantTradeDaily.setTenantId(getTenantId()); | wxMerchantTradeDaily.setTenantId(getTenantId()); | ||||
| if (wxMerchantTradeDaily.getReportDate() == null) { | |||||
| SimpleDateFormat fmt = new SimpleDateFormat("yyyy-MM-dd"); | |||||
| wxMerchantTradeDaily.setReportDate(fmt.format(new Date())); | |||||
| } | |||||
| wxMerchantTradeDaily.setSortColumns(WxMerchantTradeDailyVo.Field.MerchantId_DESC); | wxMerchantTradeDaily.setSortColumns(WxMerchantTradeDailyVo.Field.MerchantId_DESC); | ||||
| wxMerchantTradeDailyService.exportData(wxMerchantTradeDaily, request, response); | wxMerchantTradeDailyService.exportData(wxMerchantTradeDaily, request, response); | ||||
| } | } | ||||
| @@ -31,7 +31,7 @@ public class OrderExpiringSchedule { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| private final int NORMAL_TIME_OUT = 15 * 60 * 1000; //普通券 必须15分钟内支付 | private final int NORMAL_TIME_OUT = 15 * 60 * 1000; //普通券 必须15分钟内支付 | ||||
| private final int PRESS_TIME_OUT = 15 * 60 * 1000; //砍价券 必须60分钟内支付 | |||||
| private final int PRESS_TIME_OUT = 60 * 60 * 1000; //砍价券 必须60分钟内支付 | |||||
| @Autowired | @Autowired | ||||
| WxOrderMapper wxOrderMapper; | WxOrderMapper wxOrderMapper; | ||||
| @@ -8,6 +8,8 @@ import lombok.ToString; | |||||
| import javax.persistence.Id; | import javax.persistence.Id; | ||||
| import javax.persistence.Transient; | import javax.persistence.Transient; | ||||
| import java.math.BigDecimal; | |||||
| import java.math.RoundingMode; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| @@ -35,9 +37,20 @@ public class WxMerchantTradeDailyVo extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "b用户id", name = "bUserId") | @io.swagger.annotations.ApiModelProperty(value = "b用户id", name = "bUserId") | ||||
| private Long bUserId; | private Long bUserId; | ||||
| @Excel(name = "解单金额(元)", width = 20, orderNum = "3") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "交易额", name = "tradeAmt") | @io.swagger.annotations.ApiModelProperty(value = "交易额", name = "tradeAmt") | ||||
| private Integer tradeAmt; | private Integer tradeAmt; | ||||
| @Excel(name = "解单金额(元)", width = 20, orderNum = "3") | |||||
| @Transient | |||||
| private String tradeAmtStr; | |||||
| public String getTradeAmtStr() { | |||||
| if (tradeAmt != null) { | |||||
| return new BigDecimal(tradeAmt).divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN).toPlainString(); | |||||
| } | |||||
| return null; | |||||
| } | |||||
| @io.swagger.annotations.ApiModelProperty(value = "解单提交日期", name = "createDate") | @io.swagger.annotations.ApiModelProperty(value = "解单提交日期", name = "createDate") | ||||
| private Date createDate; | private Date createDate; | ||||
| @@ -45,7 +58,7 @@ public class WxMerchantTradeDailyVo extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "解单更新日期", name = "updateDate") | @io.swagger.annotations.ApiModelProperty(value = "解单更新日期", name = "updateDate") | ||||
| private Date updateDate; | private Date updateDate; | ||||
| @Excel(name = "解单日期", width = 20, orderNum = "1", format = "yyyy-MM-dd") | |||||
| @Excel(name = "解单日期", width = 20, orderNum = "1") | |||||
| @io.swagger.annotations.ApiModelProperty(value = "解单日期", name = "reportDate") | @io.swagger.annotations.ApiModelProperty(value = "解单日期", name = "reportDate") | ||||
| private String reportDate; | private String reportDate; | ||||
| @@ -65,6 +78,14 @@ public class WxMerchantTradeDailyVo extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "b端用户姓名", name = "bUserName") | @io.swagger.annotations.ApiModelProperty(value = "b端用户姓名", name = "bUserName") | ||||
| private String bUserName; | private String bUserName; | ||||
| public String getbUserPhone() { | |||||
| return bUserPhone; | |||||
| } | |||||
| public void setbUserPhone(String bUserPhone) { | |||||
| this.bUserPhone = bUserPhone; | |||||
| } | |||||
| @Excel(name = "联系电话", width = 20, orderNum = "7") | @Excel(name = "联系电话", width = 20, orderNum = "7") | ||||
| @io.swagger.annotations.ApiModelProperty(value = "B端用户手机号", name = "bUserPhone") | @io.swagger.annotations.ApiModelProperty(value = "B端用户手机号", name = "bUserPhone") | ||||
| private String bUserPhone; | private String bUserPhone; | ||||
| @@ -75,6 +96,7 @@ public class WxMerchantTradeDailyVo extends BaseEntity { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "凭证", name = "proof") | @io.swagger.annotations.ApiModelProperty(value = "凭证", name = "proof") | ||||
| private String proof; | private String proof; | ||||
| @Transient | @Transient | ||||
| private Integer isToday; | private Integer isToday; | ||||
| @@ -177,8 +177,9 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||||
| //没有商户ID导出全部数据 | //没有商户ID导出全部数据 | ||||
| String name = "解单数据"; | String name = "解单数据"; | ||||
| if (wxMerchantTradeDailyVo.getMerchantId() == null) { | if (wxMerchantTradeDailyVo.getMerchantId() == null) { | ||||
| String title = wxMerchantTradeDailyVo.getReportDate() + "商户解单数据"; | |||||
| String title = "商户解单数据"; | |||||
| List<WxMerchantTradeDailyVo> list = wxMerchantTradeDailyMapper.findListVo(wxMerchantTradeDailyVo); | List<WxMerchantTradeDailyVo> list = wxMerchantTradeDailyMapper.findListVo(wxMerchantTradeDailyVo); | ||||
| list.parallelStream().forEach(t -> t.setReportDate(wxMerchantTradeDailyVo.getReportDate())); | |||||
| excelService.exportExcel(list, title, name, WxMerchantTradeDailyVo.class, name + ".xlsx", response, false); | excelService.exportExcel(list, title, name, WxMerchantTradeDailyVo.class, name + ".xlsx", response, false); | ||||
| } else { | } else { | ||||
| WxMerchantTradeDaily wxMerchantTradeDaily = new WxMerchantTradeDaily(); | WxMerchantTradeDaily wxMerchantTradeDaily = new WxMerchantTradeDaily(); | ||||
| @@ -186,10 +187,6 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||||
| wxMerchantTradeDaily.setMerchantId(wxMerchantTradeDailyVo.getMerchantId()); | wxMerchantTradeDaily.setMerchantId(wxMerchantTradeDailyVo.getMerchantId()); | ||||
| List<WxMerchantTradeDailyVo> list = wxMerchantTradeDailyMapper.findListVoOfMonth(wxMerchantTradeDaily); | List<WxMerchantTradeDailyVo> list = wxMerchantTradeDailyMapper.findListVoOfMonth(wxMerchantTradeDaily); | ||||
| String title = "近30天解单数据"; | String title = "近30天解单数据"; | ||||
| if (!list.isEmpty()) { | |||||
| String merchantName = list.get(0).getMerchantName(); | |||||
| title = merchantName + title; | |||||
| } | |||||
| excelService.exportExcel(list, title, name, WxMerchantTradeDailyVo.class, name + ".xlsx", response, false); | excelService.exportExcel(list, title, name, WxMerchantTradeDailyVo.class, name + ".xlsx", response, false); | ||||
| } | } | ||||
| } | } | ||||
| @@ -329,8 +326,4 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||||
| } | } | ||||
| } | } | ||||