|
@@ -15,6 +15,7 @@ import com.szwl.model.excel.OrderTarget;
|
|
|
import com.szwl.model.query.OrderDaoChuParam;
|
|
|
import com.szwl.model.query.Pageable;
|
|
|
import com.szwl.model.query.StatisticsParam;
|
|
|
+import com.szwl.model.utils.DateUtils;
|
|
|
import com.szwl.service.TOrderService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
@@ -138,7 +139,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public List<OrderTarget> findById(TAdmin admin, List<TOrder> list) {
|
|
|
+ public List<OrderTarget> findById(TAdmin admin, List<TOrder> list) throws ParseException {
|
|
|
|
|
|
|
|
|
List<OrderTarget> list1 = new ArrayList<>();
|
|
@@ -150,12 +151,36 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
|
orderTarget.setPrice(order.getPrice());
|
|
|
orderTarget.setClientId(order.getClientId());
|
|
|
orderTarget.setName(admin.getUsername());
|
|
|
- orderTarget.setPayDate(order.getPayDate());
|
|
|
- orderTarget.setRefundDate(order.getRefundDate());
|
|
|
- orderTarget.setStatus(String.valueOf(order.getStatus()));
|
|
|
- orderTarget.setAgencyProportion(String.valueOf(order.getAgencyProportion()));
|
|
|
- orderTarget.setMerchantProportion(String.valueOf(order.getMerchantProportion()));
|
|
|
- orderTarget.setPersonageProportion(String.valueOf(order.getPersonageProportion()));
|
|
|
+ // 格式化时间
|
|
|
+ if(order.getPayDate()!=null) {
|
|
|
+ String formatPayDate = DateUtils.formatDate(order.getPayDate(), DateUtils.PATTERN_yyyy_MM_dd_HH_mm_ss);
|
|
|
+ orderTarget.setPayDate(formatPayDate);
|
|
|
+ }
|
|
|
+ if(order.getRefundDate()!=null) {
|
|
|
+ String formatRefundDate = DateUtils.formatDate(order.getRefundDate(), DateUtils.PATTERN_yyyy_MM_dd_HH_mm_ss);
|
|
|
+ orderTarget.setRefundDate(formatRefundDate);
|
|
|
+ }
|
|
|
+ Integer status = order.getStatus();
|
|
|
+ if (status == 0) {
|
|
|
+ orderTarget.setStatus("未支付");
|
|
|
+ } else if (status == 1) {
|
|
|
+ orderTarget.setStatus("已支付");
|
|
|
+ } else if (status == 3) {
|
|
|
+ orderTarget.setStatus("已退款");
|
|
|
+ } else {
|
|
|
+ orderTarget.setStatus(String.valueOf(status));
|
|
|
+ }
|
|
|
+
|
|
|
+ if (order.getAgencyProportion()!=null) {
|
|
|
+ orderTarget.setAgencyProportion(String.valueOf(order.getAgencyProportion()));
|
|
|
+ }
|
|
|
+ if (order.getMerchantProportion()!=null) {
|
|
|
+ orderTarget.setMerchantProportion(String.valueOf(order.getMerchantProportion()));
|
|
|
+ }
|
|
|
+ if (order.getPersonageProportion()!=null) {
|
|
|
+ orderTarget.setPersonageProportion(String.valueOf(order.getPersonageProportion()));
|
|
|
+ }
|
|
|
+
|
|
|
if ("WEIXIN_NATIVE".equals(order.getFrpCode())) {
|
|
|
orderTarget.setFrp_code("微信主扫支付");
|
|
|
} else if("ALIPAY_NATIVE".equals(order.getFrpCode())){
|
|
@@ -167,6 +192,7 @@ public class TOrderServiceImpl extends ServiceImpl<TOrderMapper, TOrder> impleme
|
|
|
}else {
|
|
|
orderTarget.setFrp_code(order.getFrpCode());
|
|
|
}
|
|
|
+
|
|
|
if(StringUtils.isEmpty(orderTarget.getFrp_code())){
|
|
|
orderTarget.setFrp_code(order.getFrpCode());
|
|
|
}
|