Bläddra i källkod

Merge branch 'master' of http://git.ds-bay.com/project/kmall-pt-general

yangbo 4 år sedan
förälder
incheckning
246b4e3ee6

+ 24 - 0
kmall-admin/src/main/java/com/kmall/admin/annotation/NoRepeatSubmit.java

@@ -0,0 +1,24 @@
+package com.kmall.admin.annotation;
+
+import org.springframework.stereotype.Component;
+
+import java.lang.annotation.*;
+
+/**
+ * 自定义防重复提交注解
+ * @author  hj
+ * @createDate 2021-04-29
+ */
+@Inherited
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Component
+public @interface NoRepeatSubmit {
+
+    /**
+     * 默认时间  默认1秒钟
+     * @return
+     */
+    int lockTime() default 1000;
+}

+ 76 - 0
kmall-admin/src/main/java/com/kmall/admin/aop/RepeatSubmitAspect.java

@@ -0,0 +1,76 @@
+package com.kmall.admin.aop;
+
+import com.kmall.admin.annotation.NoRepeatSubmit;
+import com.kmall.common.utils.RRException;
+import com.kmall.manager.manager.redis.JedisUtil;
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.context.request.RequestContextHolder;
+import org.springframework.web.context.request.ServletRequestAttributes;
+
+import javax.servlet.http.HttpServletRequest;
+import java.util.Calendar;
+import java.util.Objects;
+
+/**
+ * @author  hj
+ * @createDate 2021-04-29
+ */
+@Aspect
+@Component
+@SuppressWarnings("all")
+public class RepeatSubmitAspect {
+    private final static Logger logger = LoggerFactory.getLogger(RepeatSubmitAspect.class);
+    public static final String KEYPREX = "noRpeat:user:";
+
+    /**
+     * 进行接口防重复操作处理
+     *
+     * @param pjp
+     * @param noRepeatSubmit
+     * @return
+     */
+    @Around("execution(* com.kmall.admin.controller.*.*(..)) && @annotation(noRepeatSubmit) ")
+    public Object around(ProceedingJoinPoint pjp, NoRepeatSubmit noRepeatSubmit) throws Throwable {
+        try {
+            //获取request
+            HttpServletRequest request = ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest();
+            //拿到token和请求路径
+            StringBuilder sb = new StringBuilder();
+//            sb.append(KEYPREX).append(request.getHeader("token").toString()).append(request.getRequestURI().toString());
+            sb.append(KEYPREX).append(request.getRequestURI().toString());
+            //获取现在时间
+//            long now = System.currentTimeMillis();
+            long now = Calendar.getInstance().getTimeInMillis();
+            if (JedisUtil.exists(sb.toString())) {
+                //上次请求时间
+//                long lastTime = Long.valueOf(redisTemplate.opsForValue().get(sb.toString()).toString());
+                long lastTime = Long.valueOf(JedisUtil.get(sb.toString()).toString());
+                // 如果现在距离上次提交时间小于设置的默认时间 则 判断为重复提交  否则 正常提交 -> 进入业务处理
+                if ((now - lastTime) > noRepeatSubmit.lockTime()) {
+                    //重新记录时间 10分钟过期时间
+//                    redisTemplate.opsForValue().set(sb.toString(), String.valueOf(now), 10, TimeUnit.MINUTES);
+                    JedisUtil.set(sb.toString(), String.valueOf(now), 10);
+                    //处理业务
+                    Object result = pjp.proceed();
+                    return result;
+                } else {
+                    throw new RRException("点击的太快了,请慢一点!");
+                }
+            } else {
+                //第一次操作
+                JedisUtil.set(sb.toString(), String.valueOf(now), 10);
+//                redisTemplate.opsForValue().set(sb.toString(),String.valueOf(now),10, TimeUnit.MINUTES);
+                Object result = pjp.proceed();
+                return result;
+            }
+        } catch (Throwable e) {
+            logger.error("校验表单重复提交时异常: {}", e.getMessage());
+            throw new RRException("校验重复提交时异常");
+        }
+    }
+}

+ 4 - 34
kmall-admin/src/main/java/com/kmall/admin/controller/MallPaymentOrderDataController.java

@@ -1,15 +1,12 @@
 package com.kmall.admin.controller;
 
+import com.kmall.admin.annotation.NoRepeatSubmit;
 import com.kmall.admin.entity.MallPaymentOrderDataEntity;
 import com.kmall.admin.service.MallPaymentOrderDataService;
 import com.kmall.admin.utils.ParamUtils;
-import com.kmall.common.constant.Dict;
-import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.PageUtils;
 import com.kmall.common.utils.Query;
 import com.kmall.common.utils.R;
-import com.kmall.common.utils.RRException;
-import com.kmall.common.utils.excel.ExcelUtil;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -19,8 +16,6 @@ import org.springframework.web.multipart.MultipartFile;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -36,8 +31,6 @@ import java.util.Map;
 public class MallPaymentOrderDataController {
     @Autowired
     private MallPaymentOrderDataService mall2PaymentOrderDataService;
-    @Autowired
-    private ExcelUtil excelUtil;
 
     /**
      * 查看列表
@@ -124,42 +117,19 @@ public class MallPaymentOrderDataController {
     @RequiresPermissions("mallpaymentorderdata:upload")
     @ResponseBody
     public R upload(@RequestParam("file") MultipartFile file,@RequestParam Map<String, Object> params) throws Exception {
-
-        List<MallPaymentOrderDataEntity> list = new ArrayList<>();
         String payFlag = params.get("payFlag").toString();
-        try {
-            if (file.isEmpty()) {
-                throw new RRException("上传文件不能为空");
-            }
-            MallPaymentOrderDataEntity mallPaymentOrderDataEntity = new MallPaymentOrderDataEntity();
-            Map<String, Object> beans = new HashMap<String, Object>();
-            beans.put("MallPaymentOrderDataEntity", mallPaymentOrderDataEntity);
-            beans.put("MallPaymentOrderDataEntityList", list);
-            if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
-                excelUtil.readExcel(JxlsXmlTemplateName.WX_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
-            }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
-                excelUtil.readExcel(JxlsXmlTemplateName.ALI_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
-            }
-        }catch (Exception e) {
-            e.printStackTrace();
-            return R.error("导入失败!");
-        }
-        try {
-            mall2PaymentOrderDataService.saveUploadExcel(list, payFlag);
-        } catch (Exception e) {
-            e.printStackTrace();
-            return R.error(e.getMessage());
-        }
+        mall2PaymentOrderDataService.saveUploadExcel(file, payFlag);
         return R.ok("导入成功!");
     }
 
     /**
      * System Format 导出请求
      */
+    @NoRepeatSubmit
     @RequestMapping(value = "exportDataFormat")
     @RequiresPermissions("mallpaymentorderdata:exportDataFormat")
     @ResponseBody
-    public R exportSystemFormat(@RequestParam Map<String, Object> params, HttpServletResponse response, HttpServletRequest request) throws ParseException {
+    public R exportSystemFormat(@RequestParam Map<String, Object> params, HttpServletResponse response, HttpServletRequest request) throws Exception {
 
         params = ParamUtils.setTimeMap(params);
         mall2PaymentOrderDataService.exportDataFormatList(params,response);

+ 234 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/AliPaymentOrderDto.java

@@ -0,0 +1,234 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+public class AliPaymentOrderDto implements Serializable {
+    private static final long serialVersionUID = 1731952263436733954L;
+
+    private  String aliid;
+    /**
+     * 商户名称
+     */
+    private String merchantName;
+    /**
+     * 商户订单号
+     */
+    private String outTradeNo;
+    /**
+     * 支付金额(wx订单金额 zfb收入)
+     */
+    private String payMoney;
+    /**
+     * 退款金额(wx退款金额  zfb支出)
+     */
+    private String refundMoney;
+    /**
+     * 支付类型(wx交易类型 zfb账务类型)
+     */
+    private String payType;
+    /**
+     * 付款类型(wx付款银行 zfb支付渠道)
+     */
+    private String paymentType;
+    /**
+     * 交易订单号(wx订单号,zfb交易号)
+     */
+    private String transactionOrder;
+
+    /**
+     * 时间
+     */
+    private String timeStr;
+    /**
+     * 流水号
+     */
+    private String serialNumber;
+    /**
+     * 对方账户
+     */
+    private String oppositeAccount;
+    /**
+     * 对方名称
+     */
+    private String otherName;
+    /**
+     * 银行订单号
+     */
+    private String bankOrder;
+    /**
+     * 业务基础订单号
+     */
+    private String businessBasicOrder;
+    /**
+     * 业务账单来源
+     */
+    private String businessBillingSource;
+    /**
+     * 业务订单号
+     */
+    private String businessOrder;
+    /**
+     * 业务描述
+     */
+    private String businessDescription;
+    /**
+     * 备注
+     */
+    private String remark;
+    /**
+     * 付款备注
+     */
+    private String paymentNotes;
+
+    public String getAliid() {
+        return aliid;
+    }
+
+    public void setAliid(String aliid) {
+        this.aliid = aliid;
+    }
+
+    public String getMerchantName() {
+        return merchantName;
+    }
+
+    public void setMerchantName(String merchantName) {
+        this.merchantName = merchantName;
+    }
+
+    public String getOutTradeNo() {
+        return outTradeNo;
+    }
+
+    public void setOutTradeNo(String outTradeNo) {
+        this.outTradeNo = outTradeNo;
+    }
+
+    public String getPayMoney() {
+        return payMoney;
+    }
+
+    public void setPayMoney(String payMoney) {
+        this.payMoney = payMoney;
+    }
+
+    public String getRefundMoney() {
+        return refundMoney;
+    }
+
+    public void setRefundMoney(String refundMoney) {
+        this.refundMoney = refundMoney;
+    }
+
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    public String getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(String paymentType) {
+        this.paymentType = paymentType;
+    }
+
+    public String getTransactionOrder() {
+        return transactionOrder;
+    }
+
+    public void setTransactionOrder(String transactionOrder) {
+        this.transactionOrder = transactionOrder;
+    }
+
+    public String getTimeStr() {
+        return timeStr;
+    }
+
+    public void setTimeStr(String timeStr) {
+        this.timeStr = timeStr;
+    }
+
+    public String getSerialNumber() {
+        return serialNumber;
+    }
+
+    public void setSerialNumber(String serialNumber) {
+        this.serialNumber = serialNumber;
+    }
+
+    public String getOppositeAccount() {
+        return oppositeAccount;
+    }
+
+    public void setOppositeAccount(String oppositeAccount) {
+        this.oppositeAccount = oppositeAccount;
+    }
+
+    public String getOtherName() {
+        return otherName;
+    }
+
+    public void setOtherName(String otherName) {
+        this.otherName = otherName;
+    }
+
+    public String getBankOrder() {
+        return bankOrder;
+    }
+
+    public void setBankOrder(String bankOrder) {
+        this.bankOrder = bankOrder;
+    }
+
+    public String getBusinessBasicOrder() {
+        return businessBasicOrder;
+    }
+
+    public void setBusinessBasicOrder(String businessBasicOrder) {
+        this.businessBasicOrder = businessBasicOrder;
+    }
+
+    public String getBusinessBillingSource() {
+        return businessBillingSource;
+    }
+
+    public void setBusinessBillingSource(String businessBillingSource) {
+        this.businessBillingSource = businessBillingSource;
+    }
+
+    public String getBusinessOrder() {
+        return businessOrder;
+    }
+
+    public void setBusinessOrder(String businessOrder) {
+        this.businessOrder = businessOrder;
+    }
+
+    public String getBusinessDescription() {
+        return businessDescription;
+    }
+
+    public void setBusinessDescription(String businessDescription) {
+        this.businessDescription = businessDescription;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getPaymentNotes() {
+        return paymentNotes;
+    }
+
+    public void setPaymentNotes(String paymentNotes) {
+        this.paymentNotes = paymentNotes;
+    }
+}

+ 271 - 0
kmall-admin/src/main/java/com/kmall/admin/dto/WxPaymentOrderDto.java

@@ -0,0 +1,271 @@
+package com.kmall.admin.dto;
+
+import java.io.Serializable;
+
+public class WxPaymentOrderDto implements Serializable {
+    private static final long serialVersionUID = 4563229331408755581L;
+    /**
+     * 商户名称
+     */
+    private String merchantName;
+    /**
+     * 商户订单号
+     */
+    private String outTradeNo;
+    /**
+     * 支付金额(wx订单金额 zfb收入)
+     */
+    private String payMoney;
+    /**
+     * 退款金额(wx退款金额  zfb支出)
+     */
+    private String refundMoney;
+    /**
+     * 支付类型(wx交易类型 zfb账务类型)
+     */
+    private String payType;
+    /**
+     * 付款类型(wx付款银行 zfb支付渠道)
+     */
+    private String paymentType;
+    /**
+     * 交易订单号(wx订单号,zfb交易号)
+     */
+    private String transactionOrder;
+    /**
+     * 时间
+     */
+    private String timeStr;
+    /**
+     * 商家数据包,原样返回
+     */
+    private String attach;
+    /**
+     * 交易状态
+     */
+    private String transactionStatus;
+    /**
+     * 货币种类
+     */
+    private String currencyType;
+    /**
+     * 应结订单金额
+     */
+    private String amountOrder;
+    /**
+     * 微信退款单号
+     */
+    private String refundId;
+    /**
+     * 商户退款单号
+     */
+    private String merRefundNumber;
+    /**
+     * 退款状态
+     */
+    private String refundStatus;
+    /**
+     * 代金券
+     */
+    private String cashCoupon;
+    /**
+     * 充值券退款金额
+     */
+    private String refundRechargpCoupon;
+    /**
+     * 手续费
+     */
+    private String feeCharge;
+    /**
+     * 费率
+     */
+    private String rate;
+    /**
+     * 退款类型
+     */
+    private String refundType;
+    /**
+     * 申请退款金额
+     */
+    private String applyRefundAmount;
+    /**
+     * 费率备注
+     */
+    private String rateRemark;
+
+    public String getMerchantName() {
+        return merchantName;
+    }
+
+    public void setMerchantName(String merchantName) {
+        this.merchantName = merchantName;
+    }
+
+    public String getOutTradeNo() {
+        return outTradeNo;
+    }
+
+    public void setOutTradeNo(String outTradeNo) {
+        this.outTradeNo = outTradeNo;
+    }
+
+    public String getPayMoney() {
+        return payMoney;
+    }
+
+    public void setPayMoney(String payMoney) {
+        this.payMoney = payMoney;
+    }
+
+    public String getRefundMoney() {
+        return refundMoney;
+    }
+
+    public void setRefundMoney(String refundMoney) {
+        this.refundMoney = refundMoney;
+    }
+
+    public String getPayType() {
+        return payType;
+    }
+
+    public void setPayType(String payType) {
+        this.payType = payType;
+    }
+
+    public String getPaymentType() {
+        return paymentType;
+    }
+
+    public void setPaymentType(String paymentType) {
+        this.paymentType = paymentType;
+    }
+
+    public String getTransactionOrder() {
+        return transactionOrder;
+    }
+
+    public void setTransactionOrder(String transactionOrder) {
+        this.transactionOrder = transactionOrder;
+    }
+
+    public String getTimeStr() {
+        return timeStr;
+    }
+
+    public void setTimeStr(String timeStr) {
+        this.timeStr = timeStr;
+    }
+
+    public String getAttach() {
+        return attach;
+    }
+
+    public void setAttach(String attach) {
+        this.attach = attach;
+    }
+
+    public String getTransactionStatus() {
+        return transactionStatus;
+    }
+
+    public void setTransactionStatus(String transactionStatus) {
+        this.transactionStatus = transactionStatus;
+    }
+
+    public String getCurrencyType() {
+        return currencyType;
+    }
+
+    public void setCurrencyType(String currencyType) {
+        this.currencyType = currencyType;
+    }
+
+    public String getAmountOrder() {
+        return amountOrder;
+    }
+
+    public void setAmountOrder(String amountOrder) {
+        this.amountOrder = amountOrder;
+    }
+
+    public String getRefundId() {
+        return refundId;
+    }
+
+    public void setRefundId(String refundId) {
+        this.refundId = refundId;
+    }
+
+    public String getMerRefundNumber() {
+        return merRefundNumber;
+    }
+
+    public void setMerRefundNumber(String merRefundNumber) {
+        this.merRefundNumber = merRefundNumber;
+    }
+
+    public String getRefundStatus() {
+        return refundStatus;
+    }
+
+    public void setRefundStatus(String refundStatus) {
+        this.refundStatus = refundStatus;
+    }
+
+    public String getCashCoupon() {
+        return cashCoupon;
+    }
+
+    public void setCashCoupon(String cashCoupon) {
+        this.cashCoupon = cashCoupon;
+    }
+
+    public String getRefundRechargpCoupon() {
+        return refundRechargpCoupon;
+    }
+
+    public void setRefundRechargpCoupon(String refundRechargpCoupon) {
+        this.refundRechargpCoupon = refundRechargpCoupon;
+    }
+
+    public String getFeeCharge() {
+        return feeCharge;
+    }
+
+    public void setFeeCharge(String feeCharge) {
+        this.feeCharge = feeCharge;
+    }
+
+    public String getRate() {
+        return rate;
+    }
+
+    public void setRate(String rate) {
+        this.rate = rate;
+    }
+
+    public String getRefundType() {
+        return refundType;
+    }
+
+    public void setRefundType(String refundType) {
+        this.refundType = refundType;
+    }
+
+    public String getRateRemark() {
+        return rateRemark;
+    }
+
+    public void setRateRemark(String rateRemark) {
+        this.rateRemark = rateRemark;
+    }
+
+    public String getApplyRefundAmount() {
+        return applyRefundAmount;
+    }
+
+    public void setApplyRefundAmount(String applyRefundAmount) {
+        this.applyRefundAmount = applyRefundAmount;
+    }
+}

+ 3 - 0
kmall-admin/src/main/java/com/kmall/admin/service/MallPaymentOrderDataService.java

@@ -2,6 +2,7 @@ package com.kmall.admin.service;
 
 
 import com.kmall.admin.entity.MallPaymentOrderDataEntity;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
@@ -80,6 +81,8 @@ public interface MallPaymentOrderDataService {
      */
     int saveUploadExcel(List<MallPaymentOrderDataEntity> list,String payFlag);
 
+    void saveUploadExcel(MultipartFile file, String payFlag);
+
     /**
      * 导出支付宝、微信流水账单
      * @param map

+ 166 - 38
kmall-admin/src/main/java/com/kmall/admin/service/impl/MallPaymentOrderDataServiceImpl.java

@@ -1,18 +1,21 @@
 package com.kmall.admin.service.impl;
 
 import com.kmall.admin.dao.MallPaymentOrderDataDao;
+import com.kmall.admin.dto.AliPaymentOrderDto;
+import com.kmall.admin.dto.WxPaymentOrderDto;
 import com.kmall.admin.entity.MallPaymentOrderDataEntity;
-import com.kmall.admin.entity.compared.PayOrderInfoEntity;
 import com.kmall.admin.fromcomm.entity.SysUserEntity;
 import com.kmall.admin.service.MallPaymentOrderDataService;
-import com.kmall.admin.service.SaleRecordService;
 import com.kmall.admin.utils.ShiroUtils;
 import com.kmall.common.constant.Dict;
+import com.kmall.common.constant.JxlsXmlTemplateName;
 import com.kmall.common.utils.RRException;
 import com.kmall.common.utils.excel.ExcelExport;
+import com.kmall.common.utils.excel.ExcelUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletResponse;
 import java.util.*;
@@ -30,6 +33,9 @@ public class MallPaymentOrderDataServiceImpl implements MallPaymentOrderDataServ
     @Autowired
     private MallPaymentOrderDataDao mall2PaymentOrderDataDao;
 
+    @Autowired
+    private ExcelUtil excelUtil;
+
     @Override
     public MallPaymentOrderDataEntity queryObject(Integer payOrderId) {
         return mall2PaymentOrderDataDao.queryObject(payOrderId);
@@ -72,7 +78,6 @@ public class MallPaymentOrderDataServiceImpl implements MallPaymentOrderDataServ
         if (list!=null && list.size()>0) {
             for (MallPaymentOrderDataEntity  paymentOrderDataEntity : list) {
 
-
                 //判断wx要进行截取
                 if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
                     try {
@@ -118,46 +123,169 @@ public class MallPaymentOrderDataServiceImpl implements MallPaymentOrderDataServ
     }
 
     @Override
-    public void exportDataFormatList(Map<String, Object> map, HttpServletResponse response) {
-        List<MallPaymentOrderDataEntity> mallList = mall2PaymentOrderDataDao.queryListData(map);
-        String payFlag = map.get("payFlag").toString();
-        String itemName = null;
-        String[] header = null;
-        LinkedHashMap<String, Object> headerMap = null;
-        if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
-            //初始化 第一行数据信息
-            itemName = Dict.payFlag.item_weixin.getItemName();
-            header = new String[]{"Time Str","Transaction Order", "OutTrade No", "Pay Type", "Transaction Status", "Payment Type","Currency Type","Amount Order","Cash Coupon","Refund Id",
-                    "MerRefund Number", "Refund Money", "Refund RechargpCoupon", "Refund Type", "Refund Status", "Merchant Name","Attach", "Fee Charge", "Rate", "Pay Money",
-                    "ApplyRefund Amount","Rate Remark"};
-            //初始化 第二行数据信息
-            headerMap = initHeaderWxMap();
-        }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
-            //初始化 第一行数据信息
-            itemName = Dict.payFlag.item_alipay.getItemName();
-            header = new String[]{"Time Str","Transaction Order", "Serial Number", "OutTrade No", "Pay Type", "Pay Money","Refund Money","payment Type","Opposite Account","Other Name",
-                    "Bank Order ", "Merchant Name", "Remark", "BusinessBasic Order", "Business Order", "BusinessBilling Source","Business Description", "Payment Notes"};
-            //初始化 第二行数据信息
-            headerMap = initHeaderAliMap();
+    public void saveUploadExcel(MultipartFile file, String payFlag) {
+        List<WxPaymentOrderDto> wxPaymentOrderDtoList = new ArrayList<>();
+        List<AliPaymentOrderDto> aliPaymentOrderDtoList = new ArrayList<>();
+        try {
+            if (file.isEmpty()) {
+                throw new RRException("上传文件不能为空");
+            }
+            if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
+
+                WxPaymentOrderDto wxPaymentOrderDto = new WxPaymentOrderDto();
+                Map<String, Object> beans = new HashMap<String, Object>();
+                beans.put("WxPaymentOrderDto", wxPaymentOrderDto);
+                beans.put("WxPaymentOrderDtoList", wxPaymentOrderDtoList);
+                excelUtil.readExcel(JxlsXmlTemplateName.WX_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
+            }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
+
+                AliPaymentOrderDto aliPaymentOrderDto = new AliPaymentOrderDto();
+                Map<String, Object> beans = new HashMap<String, Object>();
+                beans.put("AliPaymentOrderDto", aliPaymentOrderDto);
+                beans.put("AliPaymentOrderDtoList", aliPaymentOrderDtoList);
+                excelUtil.readExcel(JxlsXmlTemplateName.ALI_PAYMENT_ORDER_DTO_List, beans, file.getInputStream());
+            }
+        }catch (Exception e) {
+            e.printStackTrace();
+            throw new RRException("导入失败!");
         }
-        // excel 表单名字
-        ExcelExport ee = new ExcelExport(itemName+"账单");
-        List<Map<String, Object>> list = new LinkedList<>();
-        list.add(headerMap);
-        for (MallPaymentOrderDataEntity orderDataEntity : mallList) {
-            LinkedHashMap<String, Object> mapLinked = new LinkedHashMap<>(24);
+
+        try {
             if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
-                //渲染表单数据
-                mapLinked = initHeaderWxMap(orderDataEntity);
+                saveWxData(wxPaymentOrderDtoList,payFlag);
             }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
-                //渲染表单数据
-                mapLinked = initHeaderAliMap(orderDataEntity);
+                saveAliData(aliPaymentOrderDtoList,payFlag);
+            }
+
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RRException(e.getMessage());
+        }
+    }
+
+    private void saveWxData(List<WxPaymentOrderDto> list,String payFlag){
+        List<MallPaymentOrderDataEntity> insertList = new ArrayList<>();
+        SysUserEntity sysUserEntity = ShiroUtils.getUserEntity();
+        if (list!=null && list.size()>0) {
+            for (WxPaymentOrderDto wxPaymentOrderDto : list) {
+
+                try {
+                    wxPaymentOrderDto.setTimeStr(wxPaymentOrderDto.getTimeStr().split("`")[1].toString());
+                    wxPaymentOrderDto.setTransactionOrder(wxPaymentOrderDto.getTransactionOrder().split("`")[1].toString());
+                    wxPaymentOrderDto.setOutTradeNo(wxPaymentOrderDto.getOutTradeNo().split("`")[1].toString());
+                    wxPaymentOrderDto.setAmountOrder(wxPaymentOrderDto.getAmountOrder().split("`")[1].toString());
+                    wxPaymentOrderDto.setMerchantName(wxPaymentOrderDto.getMerchantName().split("`")[1].toString());
+                    wxPaymentOrderDto.setPayMoney(wxPaymentOrderDto.getPayMoney().split("`")[1].toString());
+                    wxPaymentOrderDto.setRefundMoney(wxPaymentOrderDto.getRefundMoney().split("`")[1].toString());
+                    wxPaymentOrderDto.setRefundId(wxPaymentOrderDto.getRefundId().split("`")[1].toString());
+                    wxPaymentOrderDto.setCashCoupon(wxPaymentOrderDto.getCashCoupon().split("`")[1].toString());
+                    wxPaymentOrderDto.setMerRefundNumber(wxPaymentOrderDto.getMerRefundNumber().split("`")[1].toString());
+                    wxPaymentOrderDto.setRefundRechargpCoupon(wxPaymentOrderDto.getRefundRechargpCoupon().split("`")[1].toString());
+                    wxPaymentOrderDto.setFeeCharge(wxPaymentOrderDto.getFeeCharge().split("`")[1].toString());
+                    wxPaymentOrderDto.setRate(wxPaymentOrderDto.getRate().split("`")[1].toString());
+                    wxPaymentOrderDto.setApplyRefundAmount(wxPaymentOrderDto.getApplyRefundAmount().split("`")[1].toString());
+                } catch (Exception e) {
+                    throw new RRException("导入的数据不是微信账单!");
+                }
+                String outTradeNo = wxPaymentOrderDto.getOutTradeNo();
+                String timeStr = wxPaymentOrderDto.getTimeStr();
+                Map<String, Object> map = new HashMap<>();
+                map.put("timeStr",timeStr);
+                map.put("outTradeNo",outTradeNo);
+
+                //根据时间和商户订单号来判断当前数据是否有重复录入
+                List<MallPaymentOrderDataEntity> timeAndTnoData = mall2PaymentOrderDataDao.queryListTimeAndTnoData(map);
+                if (timeAndTnoData.size()>0) {
+                    throw new RRException("数据有重复,请检查导入数据的正确性!");
+                }
+
+                MallPaymentOrderDataEntity mallPaymentOrderDataEntity = new MallPaymentOrderDataEntity();
+                BeanUtils.copyProperties(wxPaymentOrderDto,mallPaymentOrderDataEntity);
+                mallPaymentOrderDataEntity.setCreaterSn(sysUserEntity.getUsername());
+                mallPaymentOrderDataEntity.setCreateTime(new Date());
+                mallPaymentOrderDataEntity.setPayFlag(payFlag);
+                insertList.add(mallPaymentOrderDataEntity);
+            }
+            mall2PaymentOrderDataDao.saveBatch(insertList);
+        }else {
+            throw new RRException("导入数据信息为空,请看模版再重新导入!");
+        }
+    }
+    private void saveAliData(List<AliPaymentOrderDto> list,String payFlag){
+        List<MallPaymentOrderDataEntity> insertList = new ArrayList<>();
+        SysUserEntity sysUserEntity = ShiroUtils.getUserEntity();
+        if (list!=null && list.size()>0) {
+            for (AliPaymentOrderDto aliPaymentOrderDto : list) {
+
+                String outTradeNo = aliPaymentOrderDto.getOutTradeNo();
+                String timeStr = aliPaymentOrderDto.getTimeStr();
+                Map<String, Object> map = new HashMap<>();
+                map.put("timeStr",timeStr);
+                map.put("outTradeNo",outTradeNo);
+
+                //根据时间和商户订单号来判断当前数据是否有重复录入
+                List<MallPaymentOrderDataEntity> timeAndTnoData = mall2PaymentOrderDataDao.queryListTimeAndTnoData(map);
+                if (timeAndTnoData.size()>0) {
+                    throw new RRException("数据有重复,请检查导入数据的正确性!");
+                }
+                MallPaymentOrderDataEntity mallPaymentOrderDataEntity = new MallPaymentOrderDataEntity();
+                BeanUtils.copyProperties(aliPaymentOrderDto,mallPaymentOrderDataEntity);
+                mallPaymentOrderDataEntity.setCreaterSn(sysUserEntity.getUsername());
+                mallPaymentOrderDataEntity.setCreateTime(new Date());
+                mallPaymentOrderDataEntity.setPayFlag(payFlag);
+                insertList.add(mallPaymentOrderDataEntity);
+            }
+            mall2PaymentOrderDataDao.saveBatch(insertList);
+        }else {
+            throw new RRException("导入数据信息为空,请看模版再重新导入!");
+        }
+    }
+    @Override
+    public void exportDataFormatList(Map<String, Object> map, HttpServletResponse response) {
+        try {
+            List<MallPaymentOrderDataEntity> mallList = mall2PaymentOrderDataDao.queryListData(map);
+            String payFlag = map.get("payFlag").toString();
+            String itemName = null;
+            String[] header = null;
+            LinkedHashMap<String, Object> headerMap = null;
+            if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
+                //初始化 第一行数据信息
+                itemName = Dict.payFlag.item_weixin.getItemName();
+                header = new String[]{"Time Str","Transaction Order", "OutTrade No", "Pay Type", "Transaction Status", "Payment Type","Currency Type","Amount Order","Cash Coupon","Refund Id",
+                        "MerRefund Number", "Refund Money", "Refund RechargpCoupon", "Refund Type", "Refund Status", "Merchant Name","Attach", "Fee Charge", "Rate", "Pay Money",
+                        "ApplyRefund Amount","Rate Remark"};
+                //初始化 第二行数据信息
+                headerMap = initHeaderWxMap();
+            }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
+                //初始化 第一行数据信息
+                itemName = Dict.payFlag.item_alipay.getItemName();
+                header = new String[]{"Time Str","Transaction Order", "Serial Number", "OutTrade No", "Pay Type", "Pay Money","Refund Money","payment Type","Opposite Account","Other Name",
+                        "Bank Order ", "Merchant Name", "Remark", "BusinessBasic Order", "Business Order", "BusinessBilling Source","Business Description", "Payment Notes"};
+                //初始化 第二行数据信息
+                headerMap = initHeaderAliMap();
+            }
+            // excel 表单名字
+            ExcelExport ee = new ExcelExport(itemName+"账单");
+            List<Map<String, Object>> list = new LinkedList<>();
+            list.add(headerMap);
+            for (MallPaymentOrderDataEntity orderDataEntity : mallList) {
+                LinkedHashMap<String, Object> mapLinked = new LinkedHashMap<>(24);
+                if (Dict.payFlag.item_weixin.getItem().equals(payFlag)) {
+                    //渲染表单数据
+                    mapLinked = initHeaderWxMap(orderDataEntity);
+                }else if (Dict.payFlag.item_alipay.getItem().equals(payFlag)){
+                    //渲染表单数据
+                    mapLinked = initHeaderAliMap(orderDataEntity);
+                }
+                list.add(mapLinked);
             }
-            list.add(mapLinked);
+            //渲染excel表单
+            ee.addSheetByMap(itemName+"账单", list, header);
+            ee.export(response);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new RRException(e.getMessage());
         }
-        //渲染excel表单
-        ee.addSheetByMap(itemName+"账单", list, header);
-        ee.export(response);
     }
 
     private LinkedHashMap<String, Object> initHeaderAliMap() {

+ 22 - 22
kmall-admin/src/main/resources/XmlTemplate/AliPaymentOrderDtoList.xml

@@ -1,29 +1,29 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <workbook>
-    <worksheet name="Sheet1">
+    <worksheet name="zfb">
         <section startRow="0" endRow="0"/>
-        <loop startRow="1" endRow="1" items="MallPaymentOrderDataEntityList" var="MallPaymentOrderDataEntity"
-              varType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+        <loop startRow="1" endRow="1" items="AliPaymentOrderDtoList" var="AliPaymentOrderDto"
+              varType="com.kmall.admin.dto.AliPaymentOrderDto">
             <section startRow="1" endRow="1">
-                <mapping row="1" col="0">MallPaymentOrderDataEntity.aliid</mapping>
-                <mapping row="1" col="1">MallPaymentOrderDataEntity.timeStr</mapping>
-                <mapping row="1" col="2">MallPaymentOrderDataEntity.transactionOrder</mapping>
-                <mapping row="1" col="3">MallPaymentOrderDataEntity.serialNumber</mapping>
-                <mapping row="1" col="4">MallPaymentOrderDataEntity.outTradeNo</mapping>
-                <mapping row="1" col="5">MallPaymentOrderDataEntity.payType</mapping>
-                <mapping row="1" col="6">MallPaymentOrderDataEntity.payMoney</mapping>
-                <mapping row="1" col="7">MallPaymentOrderDataEntity.refundMoney</mapping>
-                <mapping row="1" col="8">MallPaymentOrderDataEntity.paymentType</mapping>
-                <mapping row="1" col="9">MallPaymentOrderDataEntity.oppositeAccount</mapping>
-                <mapping row="1" col="10">MallPaymentOrderDataEntity.otherName</mapping>
-                <mapping row="1" col="11">MallPaymentOrderDataEntity.bankOrder</mapping>
-                <mapping row="1" col="12">MallPaymentOrderDataEntity.merchantName</mapping>
-                <mapping row="1" col="13">MallPaymentOrderDataEntity.remark</mapping>
-                <mapping row="1" col="14">MallPaymentOrderDataEntity.businessBasicOrder</mapping>
-                <mapping row="1" col="15">MallPaymentOrderDataEntity.businessOrder</mapping>
-                <mapping row="1" col="16">MallPaymentOrderDataEntity.businessBillingSource</mapping>
-                <mapping row="1" col="17">MallPaymentOrderDataEntity.businessDescription</mapping>
-                <mapping row="1" col="18">MallPaymentOrderDataEntity.paymentNotes</mapping>
+                <mapping row="1" col="0">AliPaymentOrderDto.aliid</mapping>
+                <mapping row="1" col="1">AliPaymentOrderDto.timeStr</mapping>
+                <mapping row="1" col="2">AliPaymentOrderDto.transactionOrder</mapping>
+                <mapping row="1" col="3">AliPaymentOrderDto.serialNumber</mapping>
+                <mapping row="1" col="4">AliPaymentOrderDto.outTradeNo</mapping>
+                <mapping row="1" col="5">AliPaymentOrderDto.payType</mapping>
+                <mapping row="1" col="6">AliPaymentOrderDto.payMoney</mapping>
+                <mapping row="1" col="7">AliPaymentOrderDto.refundMoney</mapping>
+                <mapping row="1" col="8">AliPaymentOrderDto.paymentType</mapping>
+                <mapping row="1" col="9">AliPaymentOrderDto.oppositeAccount</mapping>
+                <mapping row="1" col="10">AliPaymentOrderDto.otherName</mapping>
+                <mapping row="1" col="11">AliPaymentOrderDto.bankOrder</mapping>
+                <mapping row="1" col="12">AliPaymentOrderDto.merchantName</mapping>
+                <mapping row="1" col="13">AliPaymentOrderDto.remark</mapping>
+                <mapping row="1" col="14">AliPaymentOrderDto.businessBasicOrder</mapping>
+                <mapping row="1" col="15">AliPaymentOrderDto.businessOrder</mapping>
+                <mapping row="1" col="16">AliPaymentOrderDto.businessBillingSource</mapping>
+                <mapping row="1" col="17">AliPaymentOrderDto.businessDescription</mapping>
+                <mapping row="1" col="18">AliPaymentOrderDto.paymentNotes</mapping>
             </section>
             <loopbreakcondition>
                 <rowcheck offset="0">

+ 25 - 25
kmall-admin/src/main/resources/XmlTemplate/WxPaymentOrderDtoList.xml

@@ -1,32 +1,32 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <workbook>
-    <worksheet name="Sheet1">
+    <worksheet name="wx">
         <section startRow="0" endRow="0"/>
-        <loop startRow="1" endRow="1" items="MallPaymentOrderDataEntityList" var="MallPaymentOrderDataEntity"
-              varType="com.kmall.admin.entity.MallPaymentOrderDataEntity">
+        <loop startRow="1" endRow="1" items="WxPaymentOrderDtoList" var="WxPaymentOrderDto"
+              varType="com.kmall.admin.dto.WxPaymentOrderDto">
             <section startRow="1" endRow="1">
-                <mapping row="1" col="0">MallPaymentOrderDataEntity.timeStr</mapping>
-                <mapping row="1" col="1">MallPaymentOrderDataEntity.transactionOrder</mapping>
-                <mapping row="1" col="2">MallPaymentOrderDataEntity.outTradeNo</mapping>
-                <mapping row="1" col="3">MallPaymentOrderDataEntity.payType</mapping>
-                <mapping row="1" col="4">MallPaymentOrderDataEntity.transactionStatus</mapping>
-                <mapping row="1" col="5">MallPaymentOrderDataEntity.paymentType</mapping>
-                <mapping row="1" col="6">MallPaymentOrderDataEntity.currencyType</mapping>
-                <mapping row="1" col="7">MallPaymentOrderDataEntity.amountOrder</mapping>
-                <mapping row="1" col="8">MallPaymentOrderDataEntity.cashCoupon</mapping>
-                <mapping row="1" col="9">MallPaymentOrderDataEntity.refundId</mapping>
-                <mapping row="1" col="10">MallPaymentOrderDataEntity.merRefundNumber</mapping>
-                <mapping row="1" col="11">MallPaymentOrderDataEntity.refundMoney</mapping>
-                <mapping row="1" col="12">MallPaymentOrderDataEntity.refundRechargpCoupon</mapping>
-                <mapping row="1" col="13">MallPaymentOrderDataEntity.refundType</mapping>
-                <mapping row="1" col="14">MallPaymentOrderDataEntity.refundStatus</mapping>
-                <mapping row="1" col="15">MallPaymentOrderDataEntity.merchantName</mapping>
-                <mapping row="1" col="16">MallPaymentOrderDataEntity.attach</mapping>
-                <mapping row="1" col="17">MallPaymentOrderDataEntity.feeCharge</mapping>
-                <mapping row="1" col="18">MallPaymentOrderDataEntity.rate</mapping>
-                <mapping row="1" col="19">MallPaymentOrderDataEntity.payMoney</mapping>
-                <mapping row="1" col="20">MallPaymentOrderDataEntity.applyRefundAmount</mapping>
-                <mapping row="1" col="21">MallPaymentOrderDataEntity.rateRemark</mapping>
+                <mapping row="1" col="0">WxPaymentOrderDto.timeStr</mapping>
+                <mapping row="1" col="1">WxPaymentOrderDto.transactionOrder</mapping>
+                <mapping row="1" col="2">WxPaymentOrderDto.outTradeNo</mapping>
+                <mapping row="1" col="3">WxPaymentOrderDto.payType</mapping>
+                <mapping row="1" col="4">WxPaymentOrderDto.transactionStatus</mapping>
+                <mapping row="1" col="5">WxPaymentOrderDto.paymentType</mapping>
+                <mapping row="1" col="6">WxPaymentOrderDto.currencyType</mapping>
+                <mapping row="1" col="7">WxPaymentOrderDto.amountOrder</mapping>
+                <mapping row="1" col="8">WxPaymentOrderDto.cashCoupon</mapping>
+                <mapping row="1" col="9">WxPaymentOrderDto.refundId</mapping>
+                <mapping row="1" col="10">WxPaymentOrderDto.merRefundNumber</mapping>
+                <mapping row="1" col="11">WxPaymentOrderDto.refundMoney</mapping>
+                <mapping row="1" col="12">WxPaymentOrderDto.refundRechargpCoupon</mapping>
+                <mapping row="1" col="13">WxPaymentOrderDto.refundType</mapping>
+                <mapping row="1" col="14">WxPaymentOrderDto.refundStatus</mapping>
+                <mapping row="1" col="15">WxPaymentOrderDto.merchantName</mapping>
+                <mapping row="1" col="16">WxPaymentOrderDto.attach</mapping>
+                <mapping row="1" col="17">WxPaymentOrderDto.feeCharge</mapping>
+                <mapping row="1" col="18">WxPaymentOrderDto.rate</mapping>
+                <mapping row="1" col="19">WxPaymentOrderDto.payMoney</mapping>
+                <mapping row="1" col="20">WxPaymentOrderDto.applyRefundAmount</mapping>
+                <mapping row="1" col="21">WxPaymentOrderDto.rateRemark</mapping>
             </section>
             <loopbreakcondition>
                 <rowcheck offset="0">

+ 3 - 3
kmall-admin/src/main/webapp/WEB-INF/page/sale/sale.html

@@ -218,9 +218,9 @@
                                                 <input autocomplete="off" type="text" class="form-control"  ref="customIDCard"  id="customIDCard" />
                                             </div>
                                             <div class="form-group">
-                                                <label class="control-label">寄送方式:&nbsp;&nbsp;</label>
-                                                <span class="control-label">快递柜打包:&nbsp;&nbsp;<input autocomplete="off" type="radio" @click="sendDiva" ref="status" name="status" value="1" checked="checked"/></span>&nbsp;&nbsp;
-                                                <span class="control-label">寄送到家:&nbsp;&nbsp;<input autocomplete="off" type="radio" @click="sendDivb" ref="status" name="status" value="0" /></span>
+                                                <label class="control-label">寄送方式:&nbsp;&nbsp;</label>&nbsp;&nbsp;&nbsp;
+                                                <span class="control-label"><input autocomplete="off" type="radio" @click="sendDiva" ref="status" name="status" value="1" checked="checked"/>&nbsp;:&nbsp;&nbsp;快递柜打包</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                                                <span class="control-label"><input autocomplete="off" type="radio" @click="sendDivb" ref="status" name="status" value="0" />&nbsp;:&nbsp;&nbsp;寄送到家</span>
                                             </div>
                                             <div class="form-group sendShow" style="border-bottom: 1px solid #e5e5e5;">
                                                 <h4 class="modal-title">收件人信息</h4>

+ 27 - 2
kmall-admin/src/main/webapp/js/sale/sale.js

@@ -968,6 +968,31 @@ let vm = new Vue({
             this.userInfo.customName = this.$refs.customName.value ;
             this.userInfo.customIDCard =  this.$refs.customIDCard.value ;
             this.userInfo.customPhone = this.$refs.customPhone.value;
+            var status = $('input:radio:checked').val();
+            var cmbCity = $('#cmbCity').val();
+            var cmbProvince = $('#cmbProvince').val();
+            var cmbArea = $('#cmbArea').val();
+            var addrUser = $('#addrUser').val();
+            // console.log('城市三级联动的值:'+cmbProvince+'|'+cmbCity+'|'+cmbArea+'|'+addrUser);
+
+            if (status == 0) {
+                if (cmbCity =="请选择"){
+                    alert("请选择省!");
+                    return ;
+                }
+                if (cmbProvince =="请选择"){
+                    alert("请选择市!");
+                    return ;
+                }
+                if (cmbArea =="请选择"){
+                    alert("请选择区!");
+                    return ;
+                }
+                if (addrUser == "") {
+                    alert("请填写详细地址!");
+                    return ;
+                }
+            }
             if(this.$refs.couponSn)
                 this.userInfo.couponSn = this.$refs.couponSn.value;
             var idcardReg = /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/;
@@ -1278,9 +1303,9 @@ function openWebSocket() {
         //kmall测试环境
         // webSocket = new WebSocket("ws://183.62.225.124:8080/ws/server/"+storeId);
         //kmall正式环境
-        webSocket = new WebSocket("ws://8.135.102.238:8080//ws/server/"+storeId);
+        // webSocket = new WebSocket("ws://8.135.102.238:8080/ws/server/"+storeId);
         //kmall本地环境
-        // webSocket = new WebSocket("ws://127.0.0.1:9090//ws/server/"+163);
+        webSocket = new WebSocket("ws://127.0.0.1:50/ws/server/"+163);
         // webSocket = new WebSocket("wss://cb.k1net.cn/ws/server/"+storeId);
         if (webSocket.readyState === webSocket.CONNECTING) {
             console.log('1.连接正在打开......');

+ 48 - 33
kmall-admin/src/main/webapp/js/shop/mallpaymentorderdata.js

@@ -1,3 +1,4 @@
+
 $(function () {
     $("#jqGrid").jqGrid({
         url: '../mallpaymentorderdata/list',
@@ -6,11 +7,11 @@ $(function () {
 			{label: '编号', name: 'payOrderId', index: 'pay_order_id', key: true, hidden: true},
 			{label: '商品名称', name: 'merchantName', index: 'merchant_name', width: 80},
 			{label: '商户订单号', name: 'outTradeNo', index: 'out_trade_no', width: 80},
-			{label: '微信订单/支付宝交易号', name: 'transactionOrder', index: 'transaction_order', width: 80},
-			{label: '支付金额', name: 'payMoney', index: 'pay_money', width: 80},
-			{label: '退款金额', name: 'refundMoney', index: 'refund_money', width: 80},
+			{label: '微信订单/支付宝交易号', name: 'transactionOrder', index: 'transaction_order', width: 80},
+			{label: '订单/收入金额', name: 'payMoney', index: 'pay_money', width: 80},
+			{label: '退款/支出金额', name: 'refundMoney', index: 'refund_money', width: 80},
 			{label: '支付方式', name: 'payFlag', index: 'pay_flag', width: 80},
-			{label: '入账/交易时间', name: 'timeStr', index: 'time_str', width: 80},
+			{label: '交易/入账时间', name: 'timeStr', index: 'time_str', width: 80},
 			{label: '添加人', name: 'createrSn', index: 'creater_sn', width: 80},
 			{label: '上传时间', name: 'createTime', index: 'create_time', width: 80, formatter: function (value) {
 					return transDate(value,'yyyy-MM-dd hh:mm:ss');
@@ -56,6 +57,7 @@ $(function () {
 
 let vm = new Vue({
 	el: '#rrapp',
+
 	data: {
         showList: true,
         title: null,
@@ -72,7 +74,8 @@ let vm = new Vue({
 			payFlag: '',
 			startTime:'',
 			endTime:'',
-		}
+		},
+		flag : true,
 	},
 	methods: {
 		query: function () {
@@ -281,37 +284,49 @@ let vm = new Vue({
 			});
 		},
 		exportDataFormat : function () {
+			if (vm.flag){
+				vm.flag = false;
+				var params = {};
+				params.payFlag=vm.q.payFlag;
+				params.startTime=vm.q.startTime;
+				params.endTime=vm.q.endTime;
+				if(!params.payFlag){
+					alert("请选择支付类型");
+					return ;
+				}
+				if(!params.startTime || !params.endTime){
+					alert("请选择创建订单时间");
+					return ;
+				}
+				let startDateTime = Date.parse(new Date(params.startTime));
+				let endDateTime = Date.parse(new Date(params.endTime));
+				if(startDateTime > endDateTime){
+					alert("创建订单开始时间不能大于创建订单结束时间");
+					return ;
+				}
 
-			var params = {};
-			params.payFlag=vm.q.payFlag;
-			params.startTime=vm.q.startTime;
-			params.endTime=vm.q.endTime;
-			if(!params.payFlag){
-				alert("请选择支付类型");
-				return ;
-			}
-			if(!params.startTime || !params.endTime){
-				alert("请选择创建订单时间");
-				return ;
-			}
-			let startDateTime = Date.parse(new Date(params.startTime));
-			let endDateTime = Date.parse(new Date(params.endTime));
-			if(startDateTime > endDateTime){
-				alert("创建订单开始时间不能大于创建订单结束时间");
-				return ;
-			}
-
-			let day = Math.abs(parseInt((endDateTime - startDateTime)/1000/3600/24));
-			if(day > 30 || Object.is(day,NaN)){
-				alert("导出时间不能相差大于30天");
+				let day = Math.abs(parseInt((endDateTime - startDateTime)/1000/3600/24));
+				if(day > 30 || Object.is(day,NaN)){
+					alert("导出时间不能相差大于30天");
+					return ;
+				}
+				const msg = this.$Message.loading({
+					content: 'Loading...',
+					duration: 0
+				});
+				confirm('确认导出账单吗?', function () {
+					setTimeout(msg, 1000);
+					exportFile('#rrapp', '../mallpaymentorderdata/exportDataFormat', params);
+					alert('操作成功,正在导出,请勿重复点击!', function (index) {
+						$("#jqGrid").trigger("reloadGrid");
+					});
+				});
+				vm.flag = true
+			}else {
+				alert("点击的太快了,请慢一点!");
+				vm.flag = true
 				return ;
 			}
-			const msg = this.$Message.loading({
-				content: 'Loading...',
-				duration: 0
-			});
-			exportFile('#rrapp', '../mallpaymentorderdata/exportDataFormat', params);
-			setTimeout(msg, 1000);
 		},
 	},
 	mounted() {

+ 3 - 0
kmall-admin/src/main/webapp/statics/dist/js7_jsAddress.js

@@ -62,6 +62,9 @@ var addressInit = function(_cmbProvince, _cmbCity, _cmbArea, defaultProvince, de
 	cmbProvince.onchange = changeProvince;
 }
 var provinceList = [
+{name:'请选择', cityList:[
+		{name:'请选择', areaList:['请选择']}
+	]},
 {name:'北京', cityList:[		   
 {name:'市辖区', areaList:['东城区','西城区','崇文区','宣武区','朝阳区','丰台区','石景山区','海淀区','门头沟区','房山区','通州区','顺义区','昌平区','大兴区','怀柔区','平谷区']},		   
 {name:'县', areaList:['密云县','延庆县']}

BIN
kmall-admin/src/main/webapp/statics/file/ali_yyyy_mm_dd_v1.0.0.xls


BIN
kmall-admin/src/main/webapp/statics/file/wx_yyyy_mm_dd_v1.0.0.xls


+ 9 - 9
kmall-manager/src/main/java/com/kmall/manager/manager/redis/JedisProperties.java

@@ -14,15 +14,15 @@ public class JedisProperties implements Serializable {
     private String host;
     private String port;
     private Pool pool;
-//    private String password;
-
-//    public String getPassword() {
-//        return password;
-//    }
-//
-//    public void setPassword(String password) {
-//        this.password = password;
-//    }
+    private String password;
+
+    public String getPassword() {
+        return password;
+    }
+
+    public void setPassword(String password) {
+        this.password = password;
+    }
 
     public String getKeyPrefix() {
         return keyPrefix;

+ 1 - 1
kmall-manager/src/main/resources/spring/spring-redis.xml

@@ -21,7 +21,7 @@
         <property name="keyPrefix" value="${redis.prod.keyPrefix}"/>
         <property name="host" value="${redis.prod.host}"/>
         <property name="port" value="${redis.prod.port}"/>
-<!--        <property name="password" value="${redis.prod.password}"/>-->
+        <property name="password" value="${redis.prod.password}"/>
         <property name="pool">
             <bean class="com.kmall.manager.manager.redis.JedisProperties$Pool">
                 <property name="maxIdle" value="${redis.prod.pool.maxIdle}"/>