记得上下班打卡 | git大法好,push需谨慎

Commit 9553eeb8 authored by limingyang's avatar limingyang

导出订单信息

parent e2b08164
...@@ -3,7 +3,7 @@ package com.liquidnet.client.admin.web.controller.zhengzai.tools; ...@@ -3,7 +3,7 @@ package com.liquidnet.client.admin.web.controller.zhengzai.tools;
import com.liquidnet.client.admin.common.core.controller.BaseController; import com.liquidnet.client.admin.common.core.controller.BaseController;
import com.liquidnet.client.admin.common.core.domain.AjaxResult; import com.liquidnet.client.admin.common.core.domain.AjaxResult;
import com.liquidnet.client.admin.common.utils.poi.ExcelUtil; import com.liquidnet.client.admin.common.utils.poi.ExcelUtil;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderExportVo; import com.liquidnet.client.admin.zhengzai.kylin.dto.*;
import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService; import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -45,30 +45,35 @@ public class ExportDataController extends BaseController { ...@@ -45,30 +45,35 @@ public class ExportDataController extends BaseController {
if (null == exportType) { if (null == exportType) {
return error("导出类型有误!"); return error("导出类型有误!");
} }
List<OrderExportVo> list;
if (exportType == 1) {//按订单时间导出信息 if (exportType == 1) {//按订单时间导出信息
if (!timeIsNotNull(beginTime, endTime)) { if (!timeIsNotNull(beginTime, endTime)) {
return error("按时间类型导出,开始时间和结束时间不能为空!"); return error("按时间类型导出,开始时间和结束时间不能为空!");
} }
list = exportService.exportOrderByOrderTime(beginTime, endTime); List<OrderDetailedExportVo> list = exportService.exportOrderByOrderTime(beginTime, endTime);
if (list.size() > 0) {
ExcelUtil<OrderDetailedExportVo> util = new ExcelUtil(OrderDetailedExportVo.class);
return util.exportExcel(list, exportType + "");
}
} else if (exportType == 2) {//按演出时间导出信息 } else if (exportType == 2) {//按演出时间导出信息
if (!timeIsNotNull(beginTime, endTime)) { if (!timeIsNotNull(beginTime, endTime)) {
return error("按时间类型导出,开始时间和结束时间不能为空!"); return error("按时间类型导出,开始时间和结束时间不能为空!");
} }
list = exportService.exportOrderByShowTime(beginTime, endTime); List<OrderDetailedByShowDateExportVo> byShowTimeList = exportService.exportOrderByShowTime(beginTime, endTime);
if (byShowTimeList.size() > 0) {
ExcelUtil<OrderDetailedByShowDateExportVo> util = new ExcelUtil(OrderDetailedByShowDateExportVo.class);
return util.exportExcel(byShowTimeList, exportType + "");
}
} else if (exportType == 3) {//按id导出信息 } else if (exportType == 3) {//按id导出信息
if (!StringUtils.isNotBlank(showId)) { if (!StringUtils.isNotBlank(showId)) {
return error("演出id不能为空!"); return error("演出id不能为空!");
} }
list = exportService.exportOrderByShowId(showId); List<OrderDetailedByShowIdExportVo> byShowIdList = exportService.exportOrderByShowId(showId);
} else { if (byShowIdList.size() > 0) {
return error("查无信息!"); ExcelUtil<OrderDetailedByShowIdExportVo> util = new ExcelUtil(OrderDetailedByShowIdExportVo.class);
} return util.exportExcel(byShowIdList, exportType + "");
if (list.size() == 0) { }
return error("查无信息!");
} }
ExcelUtil<OrderExportVo> util = new ExcelUtil(OrderExportVo.class); return error("查无信息!");
return util.exportExcel(list, exportType + "");
} }
private boolean timeIsNotNull(String beginTime, String endTime) { private boolean timeIsNotNull(String beginTime, String endTime) {
...@@ -88,12 +93,11 @@ public class ExportDataController extends BaseController { ...@@ -88,12 +93,11 @@ public class ExportDataController extends BaseController {
if (!timeIsNotNull(beginTime, endTime)) { if (!timeIsNotNull(beginTime, endTime)) {
return error("开始时间和结束时间不能为空!"); return error("开始时间和结束时间不能为空!");
} }
List<OrderExportVo> list; List<OrderMemberExportVo> list = exportService.exportMemberOrder(beginTime, endTime);
list = exportService.exportMemberOrder(beginTime, endTime);
if (list.size() == 0) { if (list.size() == 0) {
return error("查无信息"); return error("查无信息");
} }
ExcelUtil<OrderExportVo> util = new ExcelUtil(OrderExportVo.class); ExcelUtil<OrderMemberExportVo> util = new ExcelUtil(OrderMemberExportVo.class);
return util.exportExcel(list, "会员订单"); return util.exportExcel(list, "会员订单");
} }
...@@ -110,12 +114,11 @@ public class ExportDataController extends BaseController { ...@@ -110,12 +114,11 @@ public class ExportDataController extends BaseController {
if (!timeIsNotNull(beginTime, endTime)) { if (!timeIsNotNull(beginTime, endTime)) {
return error("开始时间和结束时间不能为空!"); return error("开始时间和结束时间不能为空!");
} }
List<OrderExportVo> list; List<OrderCommodityExportVo> list = exportService.exportCommodityOrder(beginTime, endTime);
list = exportService.exportCommodityOrder(beginTime, endTime);
if (list.size() == 0) { if (list.size() == 0) {
return error("查无信息"); return error("查无信息");
} }
ExcelUtil<OrderExportVo> util = new ExcelUtil(OrderExportVo.class); ExcelUtil<OrderCommodityExportVo> util = new ExcelUtil(OrderCommodityExportVo.class);
return util.exportExcel(list, "商品订单"); return util.exportExcel(list, "商品订单");
} }
......
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.CommodityOrderExportDao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderCommodityExportVo implements Serializable, Cloneable {
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String code;
@Excel(name = "微信/支付宝订单号", cellType = Excel.ColumnType.STRING)
private String paymentId;
@Excel(name = "商品名称", cellType = Excel.ColumnType.STRING)
private String name;
@Excel(name = "支付平台", cellType = Excel.ColumnType.STRING)
private String paymentType;
@Excel(name = "实际支付价格", cellType = Excel.ColumnType.STRING)
private String priceActual;
@Excel(name = "创建时间", cellType = Excel.ColumnType.STRING)
private String createdAt;
@Excel(name = "快递费", cellType = Excel.ColumnType.STRING)
private String priceExpress;
@Excel(name = "退款价格", cellType = Excel.ColumnType.STRING)
private String priceRefund;
@Excel(name = "状态", cellType = Excel.ColumnType.STRING)
private String status;
@Excel(name = "退款时间", cellType = Excel.ColumnType.STRING)
private String refundAt;
private static final OrderCommodityExportVo obj = new OrderCommodityExportVo();
public static OrderCommodityExportVo getNew() {
try {
return (OrderCommodityExportVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new OrderCommodityExportVo();
}
public OrderCommodityExportVo copyCommodityOrderExportVo(CommodityOrderExportDao source) {
this.setCode(source.getCode());
this.setPaymentId(source.getPaymentId());
this.setName(source.getName());
this.setPaymentType(source.getPaymentType());
this.setPriceActual(source.getPriceActual());
this.setCreatedAt(source.getCreatedAt());
this.setPriceExpress(source.getPriceExpress());
this.setPriceRefund(source.getPriceRefund());
this.setStatus(source.getStatus());
this.setRefundAt(source.getRefundAt());
return this;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.OrderExportDao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderDetailedByShowDateExportVo implements Serializable, Cloneable {
@Excel(name = "订单号", cellType = Excel.ColumnType.STRING)
private String orderCode;
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String payCode;
@Excel(name = "微信/支付宝订单号", cellType = Excel.ColumnType.STRING)
private String paymentId;
@Excel(name = "购买名称", cellType = Excel.ColumnType.STRING)
private String performanceTitle;
@Excel(name = "支付平台", cellType = Excel.ColumnType.STRING)
private String paymentType;
@Excel(name = "演出类型", cellType = Excel.ColumnType.STRING)
private String type;
@Excel(name = "票种名称", cellType = Excel.ColumnType.STRING)
private String title1;
@Excel(name = "购票数量", cellType = Excel.ColumnType.STRING)
private String number;
@Excel(name = "场次", cellType = Excel.ColumnType.STRING)
private String title2;
//todo
@Excel(name = "退款时间", cellType = Excel.ColumnType.STRING)
private String updateAt;
@Excel(name = "退款原因", cellType = Excel.ColumnType.STRING)
private String reject;
@Excel(name = "支付金额", cellType = Excel.ColumnType.STRING)
private String priceActual;
@Excel(name = "支付时间", cellType = Excel.ColumnType.STRING)
private String timePay;
private static final OrderDetailedByShowDateExportVo obj = new OrderDetailedByShowDateExportVo();
public static OrderDetailedByShowDateExportVo getNew() {
try {
return (OrderDetailedByShowDateExportVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new OrderDetailedByShowDateExportVo();
}
public OrderDetailedByShowDateExportVo copyOrderExportVo(OrderExportDao source) {
this.setPerformanceTitle(source.getPerformanceTitle());
this.setOrderCode(source.getOrderCode());
this.setPayCode(source.getPayCode());
this.setPaymentId(source.getPaymentId());
this.setPaymentType(source.getPaymentType());
this.setType(source.getType());
this.setTitle1(source.getTitle1());
this.setTitle2(source.getTitle2());
this.setNumber(source.getNumber());
this.setPriceActual(source.getPriceActual());
this.setUpdateAt(source.getRefundAt());
this.setReject(source.getReject());
this.setTimePay(source.getTimePay());
return this;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.OrderExportDao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderDetailedByShowIdExportVo implements Serializable, Cloneable {
@Excel(name = "订单号", cellType = Excel.ColumnType.STRING)
private String orderCode;
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String payCode;
@Excel(name = "微信/支付宝订单号", cellType = Excel.ColumnType.STRING)
private String paymentId;
@Excel(name = "购买名称", cellType = Excel.ColumnType.STRING)
private String performanceTitle;
@Excel(name = "支付平台", cellType = Excel.ColumnType.STRING)
private String paymentType;
@Excel(name = "数量", cellType = Excel.ColumnType.STRING)
private String number;
@Excel(name = "单价", cellType = Excel.ColumnType.STRING)
private String price;
@Excel(name = "支付金额", cellType = Excel.ColumnType.STRING)
private String priceActual;
@Excel(name = "快递费", cellType = Excel.ColumnType.STRING)
private String priceExpress;
@Excel(name = "退票数量", cellType = Excel.ColumnType.STRING)
private String refundNumber;
@Excel(name = "演出类型", cellType = Excel.ColumnType.STRING)
private String type;
@Excel(name = "票种名称", cellType = Excel.ColumnType.STRING)
private String title1;
@Excel(name = "场次", cellType = Excel.ColumnType.STRING)
private String title2;
@Excel(name = "退款时间", cellType = Excel.ColumnType.STRING)
private String updateAt;
@Excel(name = "退款原因", cellType = Excel.ColumnType.STRING)
private String reject;
@Excel(name = "退款金额", cellType = Excel.ColumnType.STRING)
private String priceRefund;
@Excel(name = "支付时间", cellType = Excel.ColumnType.STRING)
private String timePay;
private static final OrderDetailedByShowIdExportVo obj = new OrderDetailedByShowIdExportVo();
public static OrderDetailedByShowIdExportVo getNew() {
try {
return (OrderDetailedByShowIdExportVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new OrderDetailedByShowIdExportVo();
}
public OrderDetailedByShowIdExportVo copyOrderExportVo(OrderExportDao source) {
this.setPerformanceTitle(source.getPerformanceTitle());
this.setOrderCode(source.getOrderCode());
this.setPayCode(source.getPayCode());
this.setPaymentId(source.getPaymentId());
this.setPaymentType(source.getPaymentType());
this.setType(source.getType());
this.setTitle1(source.getTitle1());
this.setTitle2(source.getTitle2());
this.setPrice(source.getPrice());
this.setPriceExpress(source.getPriceExpress());
this.setNumber(source.getNumber());
this.setRefundNumber(source.getRefundNumber());
this.setPriceActual(source.getPriceActual());
this.setPriceRefund(source.getPriceRefund());
this.setUpdateAt(source.getRefundAt());
this.setReject(source.getReject());
this.setTimePay(source.getTimePay());
return this;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.OrderExportDao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderDetailedExportVo implements Serializable, Cloneable {
@Excel(name = "订单号", cellType = Excel.ColumnType.STRING)
private String orderCode;
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String code;
@Excel(name = "微信/支付宝订单号", cellType = Excel.ColumnType.STRING)
private String paymentId;
@Excel(name = "购买名称", cellType = Excel.ColumnType.STRING)
private String performanceTitle;
@Excel(name = "订单状态", cellType = Excel.ColumnType.STRING)
private String status;
@Excel(name = "支付平台", cellType = Excel.ColumnType.STRING)
private String paymentType;
@Excel(name = "演出类型", cellType = Excel.ColumnType.STRING)
private String type;
@Excel(name = "票种名称", cellType = Excel.ColumnType.STRING)
private String title1;
@Excel(name = "场次", cellType = Excel.ColumnType.STRING)
private String title2;
@Excel(name = "单价", cellType = Excel.ColumnType.STRING)
private String price;
@Excel(name = "快递费", cellType = Excel.ColumnType.STRING)
private String priceExpress;
@Excel(name = "购票数", cellType = Excel.ColumnType.STRING)
private String number;
@Excel(name = "退票数", cellType = Excel.ColumnType.STRING)
private String refundNumber;
@Excel(name = "实付金额", cellType = Excel.ColumnType.STRING)
private String priceActual;
@Excel(name = "退款金额", cellType = Excel.ColumnType.STRING)
private String priceRefund;
@Excel(name = "退款时间", cellType = Excel.ColumnType.STRING)
private String refundAt;
@Excel(name = "退款原因", cellType = Excel.ColumnType.STRING)
private String reject;
@Excel(name = "支付时间", cellType = Excel.ColumnType.STRING)
private String timePay;
private static final OrderDetailedExportVo obj = new OrderDetailedExportVo();
public static OrderDetailedExportVo getNew() {
try {
return (OrderDetailedExportVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new OrderDetailedExportVo();
}
public OrderDetailedExportVo copyOrderExportVo(OrderExportDao source) {
this.setOrderCode(source.getOrderCode());
this.setCode(source.getCode());
this.setPaymentId(source.getPaymentId());
this.setPerformanceTitle(source.getPerformanceTitle());
this.setStatus(source.getStatus());
this.setPaymentType(source.getPaymentType());
this.setType(source.getType());
this.setTitle1(source.getTitle1());
this.setTitle2(source.getTitle2());
this.setPrice(source.getPrice());
this.setPriceExpress(source.getPriceExpress());
this.setNumber(source.getNumber());
this.setRefundNumber(source.getRefundNumber());
this.setPriceActual(source.getPriceActual());
this.setPriceRefund(source.getPriceRefund());
this.setRefundAt(source.getRefundAt());
this.setReject(source.getReject());
this.setTimePay(source.getTimePay());
return this;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.dto; package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel; import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.CommodityOrderExportDao;
import com.liquidnet.service.kylin.dao.MemberOrderExportDao;
import com.liquidnet.service.kylin.dao.OrderExportDao; import com.liquidnet.service.kylin.dao.OrderExportDao;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
public class OrderExportVo implements Serializable, Cloneable { public class OrderExportVo implements Serializable, Cloneable{
@Excel(name = "演出名称/购买名称", cellType = Excel.ColumnType.STRING) @Excel(name = "演出名称", cellType = Excel.ColumnType.STRING)
private String performanceTitle; private String performanceTitle;
@Excel(name = "手机号", cellType = Excel.ColumnType.STRING) @Excel(name = "手机号", cellType = Excel.ColumnType.STRING)
private String userMobile; private String userMobile;
@Excel(name = "姓名", cellType = Excel.ColumnType.STRING) @Excel(name = "姓名", cellType = Excel.ColumnType.STRING)
private String userName; private String userName;
@Excel(name = "订单号", cellType = Excel.ColumnType.STRING)
private String orderCode;
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String code;
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String payCode;
@Excel(name = "微信/支付宝订单号", cellType = Excel.ColumnType.STRING)
private String paymentId;
@Excel(name = "状态", cellType = Excel.ColumnType.STRING)
private String status;
@Excel(name = "支付平台", cellType = Excel.ColumnType.STRING)
private String paymentType;
@Excel(name = "演出类型", cellType = Excel.ColumnType.STRING)
private String type;
@Excel(name = "票种名称", cellType = Excel.ColumnType.STRING)
private String title1;
@Excel(name = "场次", cellType = Excel.ColumnType.STRING)
private String title2;
@Excel(name = "单价", cellType = Excel.ColumnType.STRING)
private String price;
@Excel(name = "快递费", cellType = Excel.ColumnType.STRING)
private String priceExpress;
@Excel(name = "购票数", cellType = Excel.ColumnType.STRING)
private String number;
@Excel(name = "退票数", cellType = Excel.ColumnType.STRING)
private String refundNumber;
@Excel(name = "实付金额", cellType = Excel.ColumnType.STRING)
private String priceActual;
@Excel(name = "退款金额", cellType = Excel.ColumnType.STRING)
private String priceRefund;
@Excel(name = "退款时间", cellType = Excel.ColumnType.STRING)
private String refundAt;
@Excel(name = "退款原因", cellType = Excel.ColumnType.STRING)
private String reject;
@Excel(name = "支付时间", cellType = Excel.ColumnType.STRING)
private String timePay;
@Excel(name = "创建时间", cellType = Excel.ColumnType.STRING)
private String createdAt;
@Excel(name = "更新时间", cellType = Excel.ColumnType.STRING)
private String updatedAt;
@Excel(name = "商品名称", cellType = Excel.ColumnType.STRING)
private String name;
private static final OrderExportVo obj = new OrderExportVo(); private static final OrderExportVo obj = new OrderExportVo();
...@@ -75,54 +30,6 @@ public class OrderExportVo implements Serializable, Cloneable { ...@@ -75,54 +30,6 @@ public class OrderExportVo implements Serializable, Cloneable {
this.setPerformanceTitle(source.getPerformanceTitle()); this.setPerformanceTitle(source.getPerformanceTitle());
this.setUserMobile(source.getUserMobile()); this.setUserMobile(source.getUserMobile());
this.setUserName(source.getUserName()); this.setUserName(source.getUserName());
this.setOrderCode(source.getOrderCode());
this.setCode(source.getCode());
this.setPayCode(source.getPayCode());
this.setPaymentId(source.getPaymentId());
this.setStatus(source.getStatus());
this.setPaymentType(source.getPaymentType());
this.setType(source.getType());
this.setTitle1(source.getTitle1());
this.setTitle2(source.getTitle2());
this.setPrice(source.getPrice());
this.setPriceExpress(source.getPriceExpress());
this.setNumber(source.getNumber());
this.setRefundNumber(source.getRefundNumber());
this.setPriceActual(source.getPriceActual());
this.setPriceRefund(source.getPriceRefund());
this.setRefundAt(source.getRefundAt());
this.setReject(source.getReject());
this.setTimePay(source.getTimePay());
return this; return this;
} }
public OrderExportVo copyMemberOrderExportVo(MemberOrderExportDao source) {
this.setCode(source.getPayNo());
this.setPaymentId(source.getPaymentId());
this.setPaymentType(source.getPayType());
this.setStatus(source.getState());
this.setPrice(source.getPrice());
this.setTimePay(source.getPaymentAt());
this.setCreatedAt(source.getCreatedAt());
this.setUpdatedAt(source.getUpdatedAt());
this.setRefundAt(source.getRefundAt());
this.setPriceRefund(source.getRefundPrice());
return this;
}
public OrderExportVo copyCommodityOrderExportVo(CommodityOrderExportDao source) {
this.setCode(source.getCode());
this.setPaymentId(source.getPaymentId());
this.setName(source.getName());
this.setPaymentType(source.getPaymentType());
this.setPriceActual(source.getPriceActual());
this.setCreatedAt(source.getCreatedAt());
this.setPriceExpress(source.getPriceExpress());
this.setPriceRefund(source.getPriceRefund());
this.setStatus(source.getStatus());
this.setRefundAt(source.getRefundAt());
return this;
}
} }
package com.liquidnet.client.admin.zhengzai.kylin.dto;
import com.liquidnet.client.admin.common.annotation.Excel;
import com.liquidnet.service.kylin.dao.MemberOrderExportDao;
import lombok.Data;
import java.io.Serializable;
@Data
public class OrderMemberExportVo implements Serializable, Cloneable {
@Excel(name = "商户订单号", cellType = Excel.ColumnType.STRING)
private String payCode;
@Excel(name = "微信/支付宝订单号", cellType = Excel.ColumnType.STRING)
private String paymentId;
@Excel(name = "支付方式", cellType = Excel.ColumnType.STRING)
private String payType;
@Excel(name = "订单状态", cellType = Excel.ColumnType.STRING)
private String state;
@Excel(name = "价格", cellType = Excel.ColumnType.STRING)
private String price;
@Excel(name = "支付时间", cellType = Excel.ColumnType.STRING)
private String paymentAt;
@Excel(name = "创建时间", cellType = Excel.ColumnType.STRING)
private String createdAt;
@Excel(name = "更新时间", cellType = Excel.ColumnType.STRING)
private String updatedAt;
@Excel(name = "退款时间", cellType = Excel.ColumnType.STRING)
private String refundAt;
@Excel(name = "退款金额", cellType = Excel.ColumnType.STRING)
private String refundPrice;
private static final OrderMemberExportVo obj = new OrderMemberExportVo();
public static OrderMemberExportVo getNew() {
try {
return (OrderMemberExportVo) obj.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return new OrderMemberExportVo();
}
public OrderMemberExportVo copyMemberOrderExportVo(MemberOrderExportDao source) {
this.setPayCode(source.getPayNo());
this.setPaymentId(source.getPaymentId());
this.setPayType(source.getPayType());
this.setState(source.getState());
this.setPrice(source.getPrice());
this.setPaymentAt(source.getPaymentAt());
this.setCreatedAt(source.getCreatedAt());
this.setUpdatedAt(source.getUpdatedAt());
this.setRefundAt(source.getRefundAt());
this.setRefundPrice(source.getRefundPrice());
return this;
}
}
package com.liquidnet.client.admin.zhengzai.kylin.service; package com.liquidnet.client.admin.zhengzai.kylin.service;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderExportVo; import com.liquidnet.client.admin.zhengzai.kylin.dto.*;
import java.util.List; import java.util.List;
...@@ -11,17 +11,17 @@ public interface IExportService { ...@@ -11,17 +11,17 @@ public interface IExportService {
List<OrderExportVo> exportOrderByPerformanceIdPay(String performancesId); List<OrderExportVo> exportOrderByPerformanceIdPay(String performancesId);
//根据订单时间导出信息 //根据订单时间导出信息
List<OrderExportVo> exportOrderByOrderTime(String beginTime, String endTime); List<OrderDetailedExportVo> exportOrderByOrderTime(String beginTime, String endTime);
//根据演出时间导出信息 //根据演出时间导出信息
List<OrderExportVo> exportOrderByShowTime(String beginTime, String endTime); List<OrderDetailedByShowDateExportVo> exportOrderByShowTime(String beginTime, String endTime);
//根据演出id导出信息 //根据演出id导出信息
List<OrderExportVo> exportOrderByShowId(String showId); List<OrderDetailedByShowIdExportVo> exportOrderByShowId(String showId);
//导出会员订单信息 //导出会员订单信息
List<OrderExportVo> exportMemberOrder(String beginTime, String endTime); List<OrderMemberExportVo> exportMemberOrder(String beginTime, String endTime);
//导出商品订单信息 //导出商品订单信息
List<OrderExportVo> exportCommodityOrder(String beginTime, String endTime); List<OrderCommodityExportVo> exportCommodityOrder(String beginTime, String endTime);
} }
package com.liquidnet.client.admin.zhengzai.kylin.service.impl; package com.liquidnet.client.admin.zhengzai.kylin.service.impl;
import com.liquidnet.client.admin.common.exception.BusinessException; import com.liquidnet.client.admin.common.exception.BusinessException;
import com.liquidnet.client.admin.zhengzai.kylin.dto.OrderExportVo; import com.liquidnet.client.admin.zhengzai.kylin.dto.*;
import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService; import com.liquidnet.client.admin.zhengzai.kylin.service.IExportService;
import com.liquidnet.service.kylin.dao.CommodityOrderExportDao; import com.liquidnet.service.kylin.dao.CommodityOrderExportDao;
import com.liquidnet.service.kylin.dao.MemberOrderExportDao; import com.liquidnet.service.kylin.dao.MemberOrderExportDao;
...@@ -45,79 +45,79 @@ public class ExportServiceImpl implements IExportService { ...@@ -45,79 +45,79 @@ public class ExportServiceImpl implements IExportService {
} }
@Override @Override
public List<OrderExportVo> exportOrderByOrderTime(String beginTime, String endTime) { public List<OrderDetailedExportVo> exportOrderByOrderTime(String beginTime, String endTime) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
Date beginDate = sdf.parse(beginTime); Date beginDate = sdf.parse(beginTime);
Date endDate = sdf.parse(endTime); Date endDate = sdf.parse(endTime);
List<OrderExportDao> list = performancesMapper.exportOrderByOrderTime(beginDate,endDate); List<OrderExportDao> list = performancesMapper.exportOrderByOrderTime(beginDate,endDate);
List<OrderExportVo> voList = new ArrayList(); List<OrderDetailedExportVo> voList = new ArrayList();
for (OrderExportDao item :list){ for (OrderExportDao item :list){
voList.add(OrderExportVo.getNew().copyOrderExportVo(item)); voList.add(OrderDetailedExportVo.getNew().copyOrderExportVo(item));
} }
return voList; return voList;
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
throw new BusinessException("导出异常,请联系网站管理员!");
} }
return null;
} }
@Override @Override
public List<OrderExportVo> exportOrderByShowTime(String beginTime, String endTime) { public List<OrderDetailedByShowDateExportVo> exportOrderByShowTime(String beginTime, String endTime) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
Date beginDate = sdf.parse(beginTime); Date beginDate = sdf.parse(beginTime);
Date endDate = sdf.parse(endTime); Date endDate = sdf.parse(endTime);
List<OrderExportDao> list = performancesMapper.exportOrderByShowTime(beginDate,endDate); List<OrderExportDao> list = performancesMapper.exportOrderByShowTime(beginDate,endDate);
List<OrderExportVo> voList = new ArrayList(); List<OrderDetailedByShowDateExportVo> voList = new ArrayList();
for (OrderExportDao item :list){ for (OrderExportDao item :list){
voList.add(OrderExportVo.getNew().copyOrderExportVo(item)); voList.add(OrderDetailedByShowDateExportVo.getNew().copyOrderExportVo(item));
} }
return voList; return voList;
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
return null; throw new BusinessException("导出异常,请联系网站管理员!");
} }
} }
@Override @Override
public List<OrderExportVo> exportOrderByShowId(String showId) { public List<OrderDetailedByShowIdExportVo> exportOrderByShowId(String showId) {
List<OrderExportDao> list = performancesMapper.exportOrderByShowId(showId); List<OrderExportDao> list = performancesMapper.exportOrderByShowId(showId);
List<OrderExportVo> voList = new ArrayList(); List<OrderDetailedByShowIdExportVo> voList = new ArrayList();
for (OrderExportDao item :list){ for (OrderExportDao item :list){
voList.add(OrderExportVo.getNew().copyOrderExportVo(item)); voList.add(OrderDetailedByShowIdExportVo.getNew().copyOrderExportVo(item));
} }
return voList; return voList;
} }
@Override @Override
public List<OrderExportVo> exportMemberOrder(String beginTime, String endTime) { public List<OrderMemberExportVo> exportMemberOrder(String beginTime, String endTime) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
Date beginDate = sdf.parse(beginTime); Date beginDate = sdf.parse(beginTime);
Date endDate = sdf.parse(endTime); Date endDate = sdf.parse(endTime);
List<MemberOrderExportDao> list = performancesMapper.exportMemberOrder(beginDate,endDate); List<MemberOrderExportDao> list = performancesMapper.exportMemberOrder(beginDate,endDate);
List<OrderExportVo> voList = new ArrayList(); List<OrderMemberExportVo> voList = new ArrayList();
for (MemberOrderExportDao item :list){ for (MemberOrderExportDao item :list){
voList.add(OrderExportVo.getNew().copyMemberOrderExportVo(item)); voList.add(OrderMemberExportVo.getNew().copyMemberOrderExportVo(item));
} }
return voList; return voList;
} catch (ParseException e) { } catch (ParseException e) {
e.printStackTrace(); e.printStackTrace();
return null; throw new BusinessException("导出异常,请联系网站管理员!");
} }
} }
@Override @Override
public List<OrderExportVo> exportCommodityOrder(String beginTime, String endTime) { public List<OrderCommodityExportVo> exportCommodityOrder(String beginTime, String endTime) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try { try {
Date beginDate = sdf.parse(beginTime); Date beginDate = sdf.parse(beginTime);
Date endDate = sdf.parse(endTime); Date endDate = sdf.parse(endTime);
List<CommodityOrderExportDao> list = performancesMapper.exportCommodityOrder(beginDate,endDate); List<CommodityOrderExportDao> list = performancesMapper.exportCommodityOrder(beginDate,endDate);
List<OrderExportVo> voList = new ArrayList(); List<OrderCommodityExportVo> voList = new ArrayList();
for (CommodityOrderExportDao item :list){ for (CommodityOrderExportDao item :list){
voList.add(OrderExportVo.getNew().copyCommodityOrderExportVo(item)); voList.add(OrderCommodityExportVo.getNew().copyCommodityOrderExportVo(item));
} }
return voList; return voList;
} catch (ParseException e) { } catch (ParseException e) {
......
...@@ -10,8 +10,6 @@ public class OrderExportDao { ...@@ -10,8 +10,6 @@ public class OrderExportDao {
private String userMobile; private String userMobile;
//名称 //名称
private String userName; private String userName;
//订单号 //订单号
private String orderCode; private String orderCode;
//商户订单号 //商户订单号
......
...@@ -931,7 +931,7 @@ GROUP BY user_mobile; ...@@ -931,7 +931,7 @@ GROUP BY user_mobile;
end as type , end as type ,
kt.title as title1, kt.title as title1,
ktt.title as title2, ktt.title as title2,
kor.updated_at as updated_at, kor.updated_at as refund_at,
kor.reject as reject, kor.reject as reject,
kot.price_refund as price_refund, kot.price_refund as price_refund,
kot.time_pay as time_pay kot.time_pay as time_pay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment