|
@@ -2,8 +2,10 @@ package com.kmall.admin.controller.compared;
|
|
|
|
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
|
|
+import com.kmall.admin.dto.AliPaymentOrderDto;
|
|
import com.kmall.admin.dto.GoodsDto;
|
|
import com.kmall.admin.dto.GoodsDto;
|
|
import com.kmall.admin.dto.PayOrderDto;
|
|
import com.kmall.admin.dto.PayOrderDto;
|
|
|
|
+import com.kmall.admin.dto.WxPaymentOrderDto;
|
|
import com.kmall.admin.entity.compared.ImportPayOrderRecordEntity;
|
|
import com.kmall.admin.entity.compared.ImportPayOrderRecordEntity;
|
|
import com.kmall.admin.entity.compared.PayOrderInfoEntity;
|
|
import com.kmall.admin.entity.compared.PayOrderInfoEntity;
|
|
import com.kmall.admin.fromcomm.entity.SysUserEntity;
|
|
import com.kmall.admin.fromcomm.entity.SysUserEntity;
|
|
@@ -123,19 +125,24 @@ public class PayOrderInfoController {
|
|
@RequestMapping("/uploadAlipayOrder")
|
|
@RequestMapping("/uploadAlipayOrder")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public R uploadAlipayOrder(@RequestParam("file") MultipartFile file) {
|
|
public R uploadAlipayOrder(@RequestParam("file") MultipartFile file) {
|
|
- List<PayOrderDto> payOrderDtoList = new ArrayList<>();// 支付订单信息
|
|
|
|
|
|
+// List<PayOrderDto> payOrderDtoList = new ArrayList<>();// 支付订单信息
|
|
|
|
+ List<AliPaymentOrderDto> aliPaymentOrderDtoList = new ArrayList<>();
|
|
|
|
+ AliPaymentOrderDto aliPaymentOrderDto = new AliPaymentOrderDto();
|
|
try {
|
|
try {
|
|
Map<String, Object> beans = new HashMap<String, Object>();
|
|
Map<String, Object> beans = new HashMap<String, Object>();
|
|
- beans.put("PayOrderDtoList", payOrderDtoList);
|
|
|
|
|
|
+// beans.put("PayOrderDtoList", payOrderDtoList);
|
|
if (file.isEmpty()) {
|
|
if (file.isEmpty()) {
|
|
return R.error("文件不能为空!");
|
|
return R.error("文件不能为空!");
|
|
}
|
|
}
|
|
- excelUtil.readExcel(JxlsXmlTemplateName.ALIPAY_PAY_ORDER_DTO_LIST, beans, file.getInputStream());
|
|
|
|
|
|
+ beans.put("AliPaymentOrderDto", aliPaymentOrderDto);
|
|
|
|
+ beans.put("AliPaymentOrderDtoList", aliPaymentOrderDtoList);
|
|
|
|
+ excelUtil.readExcel(JxlsXmlTemplateName.ALI_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
|
|
|
|
+// excelUtil.readExcel(JxlsXmlTemplateName.ALIPAY_PAY_ORDER_DTO_LIST, beans, file.getInputStream());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return R.error("导入失败!");
|
|
return R.error("导入失败!");
|
|
}
|
|
}
|
|
- if(payOrderDtoList == null || payOrderDtoList.size() == 0){
|
|
|
|
|
|
+ if(aliPaymentOrderDtoList == null || aliPaymentOrderDtoList.size() == 0){
|
|
return R.error("报表格式有误");
|
|
return R.error("报表格式有误");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -145,7 +152,8 @@ public class PayOrderInfoController {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
|
|
|
|
- payOrderInfoService.uploadExcel(payOrderDtoList,Dict.payFlag.item_alipay.getItem());
|
|
|
|
|
|
+// payOrderInfoService.uploadExcel(payOrderDtoList,Dict.payFlag.item_alipay.getItem());
|
|
|
|
+ payOrderInfoService.uploadExceAli(aliPaymentOrderDtoList,Dict.payFlag.item_alipay.getItem());
|
|
//上传文件
|
|
//上传文件
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|
|
@@ -167,19 +175,25 @@ public class PayOrderInfoController {
|
|
@RequestMapping("/uploadWXOrder")
|
|
@RequestMapping("/uploadWXOrder")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public R uploadWXOrder(@RequestParam("file") MultipartFile file) {
|
|
public R uploadWXOrder(@RequestParam("file") MultipartFile file) {
|
|
- List<PayOrderDto> payOrderDtoList = new ArrayList<>();// 支付订单信息
|
|
|
|
|
|
+// List<PayOrderDto> payOrderDtoList = new ArrayList<>();// 支付订单信息
|
|
|
|
+ List<WxPaymentOrderDto> wxPaymentOrderDtoList = new ArrayList<>();
|
|
try {
|
|
try {
|
|
|
|
+ WxPaymentOrderDto wxPaymentOrderDto = new WxPaymentOrderDto();
|
|
|
|
+
|
|
Map<String, Object> beans = new HashMap<String, Object>();
|
|
Map<String, Object> beans = new HashMap<String, Object>();
|
|
- beans.put("PayOrderDtoList", payOrderDtoList);
|
|
|
|
|
|
+// beans.put("PayOrderDtoList", payOrderDtoList);
|
|
|
|
+ beans.put("WxPaymentOrderDto", wxPaymentOrderDto);
|
|
|
|
+ beans.put("WxPaymentOrderDtoList", wxPaymentOrderDtoList);
|
|
if (file.isEmpty()) {
|
|
if (file.isEmpty()) {
|
|
return R.error("文件不能为空!");
|
|
return R.error("文件不能为空!");
|
|
}
|
|
}
|
|
- excelUtil.readExcel(JxlsXmlTemplateName.WX_PAY_ORDER_DTO_LIST, beans, file.getInputStream());
|
|
|
|
|
|
+// excelUtil.readExcel(JxlsXmlTemplateName.WX_PAY_ORDER_DTO_LIST, beans, file.getInputStream());
|
|
|
|
+ excelUtil.readExcel(JxlsXmlTemplateName.WX_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return R.error("导入失败!");
|
|
return R.error("导入失败!");
|
|
}
|
|
}
|
|
- if(payOrderDtoList == null || payOrderDtoList.size() == 0){
|
|
|
|
|
|
+ if(wxPaymentOrderDtoList == null || wxPaymentOrderDtoList.size() == 0){
|
|
return R.error("报表格式有误");
|
|
return R.error("报表格式有误");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -188,7 +202,9 @@ public class PayOrderInfoController {
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
- payOrderInfoService.uploadExcel(payOrderDtoList,Dict.payFlag.item_weixin.getItem());
|
|
|
|
|
|
+// payOrderInfoService.uploadExcel(payOrderDtoList,Dict.payFlag.item_weixin.getItem());
|
|
|
|
+
|
|
|
|
+ payOrderInfoService.uploadExceWx(wxPaymentOrderDtoList,Dict.payFlag.item_weixin.getItem());
|
|
//上传文件
|
|
//上传文件
|
|
return R.ok();
|
|
return R.ok();
|
|
}
|
|
}
|