Kaynağa Gözat

1、修改建行支付回调,农行支付回调
2、修改项目银行缴费设置

Bingo 4 yıl önce
ebeveyn
işleme
df37f5f57e

+ 2 - 1
src/main/java/com/chuanghai/smartschool/tuitionpayment/controller/PayController.java

@@ -114,7 +114,8 @@ public class PayController {
      */
     @GetMapping("jxnxs/success")
     public String jxnxsSuccess(@RequestParam("ord_no") String orderNo) {
-        String url = payService.jxnxsSuccess(orderNo);
+        String secondOrderNo = "1";
+        String url = payService.jxnxsSuccess(orderNo, secondOrderNo);
         return "redirect:" + url;
     }
 }

+ 2 - 1
src/main/java/com/chuanghai/smartschool/tuitionpayment/controller/PayDetailBankController.java

@@ -71,10 +71,11 @@ public class PayDetailBankController {
     @PostMapping("saveOrUpdateBank")
     public CommonResult<T> updatePayDetailBank(@RequestBody JSONObject jsonObject){
         PayDetailBank payDetailBank = JSONObject.toJavaObject(jsonObject, PayDetailBank.class);
+        System.out.println(payDetailBank);
         if (payDetailBank.getId() == null) {
             throw new RRException(BizCodeEnume.ID_IS_NULL, "ID字段为空");
         }
-        payDetailBankService.saveOrUpdate(payDetailBank);
+       payDetailBankService.saveOrUpdate(payDetailBank);
         return CommonResult.ok();
     }
 

+ 1 - 1
src/main/java/com/chuanghai/smartschool/tuitionpayment/controller/PayOrderController.java

@@ -179,7 +179,7 @@ public class PayOrderController {
         BigDecimal totalAmount = BigDecimal.ZERO;
         if (orderlist.size() > 0) {
             for (int i = 0; i < orderlist.size(); i++) {
-                totalAmount = totalAmount.add(orderlist.get(i).getRealPayAmount());
+                totalAmount = totalAmount.add(orderlist.get(i).getRealPayAmount()).setScale(2,BigDecimal.ROUND_HALF_UP);
             }
         }
         Integer totalCount = orderlist.size();

+ 47 - 38
src/main/java/com/chuanghai/smartschool/tuitionpayment/controller/PayableInfoController.java

@@ -396,7 +396,7 @@ public class PayableInfoController {
 
                 PayableInfoEntity one = payableInfoService.getOne(wrapper);
                 if (one != null) {
-                    boolean alreadyPay = payOrderService.isAlreadyPay(one.getStudentNo(), one.getPaymentItem(), one.getYears(), one.getNotPaySize(),null,null);
+                    boolean alreadyPay = payOrderService.isAlreadyPay(one.getStudentNo(), one.getPaymentItem(), one.getYears(), one.getNotPaySize(), null, null);
                     if (alreadyPay) {
                         DeletePayableInfoTO to = new DeletePayableInfoTO();
                         BeanUtils.copyProperties(one, to);
@@ -699,37 +699,46 @@ public class PayableInfoController {
 //    }
 
 
+
+
     /**
-     * 查询学生的基本信息
+     * 查询用户的基本信息
      *
+     * @param cardNumber
+     * @param name
      * @return
      */
     @GetMapping("/queryStudentInfo")
-    public CommonResult<PayableInfoStudentResultVO> queryStudentInfo(String cardNumber) {
-        PayableInfoStudentResultVO payableInfoStudentResultVO;
-
-        try {
-            String url = "https://chtech.ncjti.edu.cn/lamp/recordApi/consume/queryByIdCard";
-            MultiValueMap<String, Object> map = new LinkedMultiValueMap<>();
-            map.add("idCard", cardNumber);
-
-            RestTemplate restTemplate = new RestTemplate();
-            HttpHeaders headers = new HttpHeaders();
-            headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
+    public CommonResult<PayableInfoStudentResultVO>  queryStudentInfo(String cardNumber, String name) {
+        PayableInfoStudentResultVO payableInfoStudentResultVO = new PayableInfoStudentResultVO();
+        QueryWrapper<PayableInfoEntity> wrapper = new QueryWrapper<>();
+        QueryWrapper<PayableInfoWaterEntity> wrapper1 = new QueryWrapper<>();
+        wrapper.eq("student_no", cardNumber)
+                .eq("student_name", name);
+        wrapper1.eq("student_no", cardNumber)
+                .eq("student_name", name);
+        List<PayableInfoWaterEntity> waterList = payableInfoWaterService.list(wrapper1);
+        if (waterList.size() > 0) {
+            waterList.forEach(water -> {
+                payableInfoStudentResultVO.setMajor(water.getCollegeName() + water.getClassName());
+            });
+        }
 
-            HttpEntity<MultiValueMap<String, Object>> request = new HttpEntity<>(map, headers);
-            ResponseEntity<String> responseEntity = restTemplate.postForEntity(url, request, String.class);
-            JSONObject jsonObj = JSON.parseObject(responseEntity.getBody());
-            JSONObject jsonResult = JSONObject.parseObject(jsonObj.get("result").toString());
-            payableInfoStudentResultVO = JSONObject.toJavaObject(jsonResult, PayableInfoStudentResultVO.class);
+        List<PayableInfoEntity> infoList = payableInfoService.list(wrapper);
+        if (infoList.size() > 0) {
+            infoList.forEach(info -> {
 
-        } catch (Exception e) {
-            return CommonResult.fail("0000", "信息获取失败!");
+                if (info.getCollegeName() != null || info.getClassName() != null) {
+                }
+                payableInfoStudentResultVO.setMajor(info.getCollegeName() + info.getClassName());
+            });
         }
+        payableInfoStudentResultVO.setIdCard(cardNumber);
+        payableInfoStudentResultVO.setStudentName(name);
 
         return CommonResult.ok().setResult(payableInfoStudentResultVO);
-    }
 
+    }
 
     /**
      * 根据订单编号修改相应的缴费订单
@@ -743,18 +752,18 @@ public class PayableInfoController {
         PayOrderEntity one = payOrderService.getOne(wrapper);
         String parentOrderNo = "";
         BigDecimal parentOrderLone = BigDecimal.ZERO.setScale(2, BigDecimal.ROUND_HALF_UP);
-        if (one.getParentOrder() == null) {
-//            if (one.getNotPaySize() == 0) {
-//                one.setStatus("2");
-//            } else {
-//                one.setStatus("3");
-//            }
-        } else {
-            parentOrderNo = one.getParentOrder();
-            PayOrderEntity byOrderNo = payOrderService.getByOrderNo(parentOrderNo);
-
-            one.setStatus("2");
-        }
+//        if (one.getParentOrder() == null) {
+////            if (one.getNotPaySize() == 0) {
+////                one.setStatus("2");
+////            } else {
+////                one.setStatus("3");
+////            }
+//        } else {
+//            parentOrderNo = one.getParentOrder();
+//            PayOrderEntity byOrderNo = payOrderService.getByOrderNo(parentOrderNo);
+//
+//            one.setStatus("2");
+//        }
 
 
         //payOrderService.updateById(one);
@@ -812,7 +821,7 @@ public class PayableInfoController {
                     if (StringUtils.hasText(payOrderList.get(i).getPayDetail())) {
                         payDetail1 += payOrderList.get(i).getPayDetail() + "/";
                     }
-                   // PayInfoDetailVO payInfoDetailVO = (PayInfoDetailVO) queryPayInfoDetail(String.valueOf(pInfo.getId()), pInfo.getPaymentItem(), payDetail1).getData();
+                    // PayInfoDetailVO payInfoDetailVO = (PayInfoDetailVO) queryPayInfoDetail(String.valueOf(pInfo.getId()), pInfo.getPaymentItem(), payDetail1).getData();
                     payOrderLoan = payOrderLoan.add(payOrderList.get(i).getPayOrderLoan()).setScale(2, BigDecimal.ROUND_HALF_UP);
 
                 }
@@ -846,9 +855,9 @@ public class PayableInfoController {
                 }
                 notPayDetail1 = notPayDetail1.endsWith("/") == true ? notPayDetail1.substring(0, notPayDetail1.length() - 1) : notPayDetail1;
             }
-            System.out.println(payOrderList.size());
-            System.out.println(payDetail1+"-------------------------payDetail1-------------------------");
-            System.out.println(notPayDetail1+"-------------------notPayDetail1-----------------------");
+//            System.out.println(payOrderList.size());
+//            System.out.println(payDetail1 + "-------------------------payDetail1-------------------------");
+//            System.out.println(notPayDetail1 + "-------------------notPayDetail1-----------------------");
 
             pInfo.setNotPayDetail(notPayDetail1);
             pInfo.setNotPaySize(notPaySize);
@@ -866,7 +875,7 @@ public class PayableInfoController {
             }
             pInfo.setPayOrderLoan(payOrderLoan);
             one.setNotPayDetail(notPayDetail1);
-            System.out.println(pInfo);
+//            System.out.println(pInfo);
             payOrderService.updateById(one);
             payableInfoService.updateById(pInfo);
         }

+ 42 - 1
src/main/java/com/chuanghai/smartschool/tuitionpayment/controller/WechatController.java

@@ -104,7 +104,7 @@ public class WechatController {
 
             // System.out.println("redirect:" + wechatConfig.getFontendUrl() + "/#/pages/Pay/pay/?openId=" + openid);
             return "redirect:" + wechatConfig.getFontendUrl() + "/#/" + state + "/?openId=" + openid;
-           // return "redirect:" + "http://192.168.161.182:8080/jiaofei/jiaofeiH5/" + state + "/?openId=" + openid;
+            // return "redirect:" + "http://192.168.161.182:8080/jiaofei/jiaofeiH5/" + state + "/?openId=" + openid;
         } catch (Exception e) {
             return "redirect:" + wechatConfig.getFontendUrl() + "/error/?errorMsg=获取用户openId失败";
         }
@@ -174,6 +174,47 @@ public class WechatController {
         }
     }
 
+//    /**
+//     * 查询用户的基本信息
+//     *
+//     * @param cardNumber
+//     * @param name
+//     * @return
+//     */
+//    public PayableInfoStudentResultVO queryStudentInfo(String cardNumber, String name) {
+//        PayableInfoStudentResultVO payableInfoStudentResultVO = new PayableInfoStudentResultVO();
+//        QueryWrapper<PayableInfoEntity> wrapper = new QueryWrapper<>();
+//        QueryWrapper<PayableInfoWaterEntity> wrapper1 = new QueryWrapper<>();
+//        wrapper.eq("student_no", cardNumber)
+//                .eq("student_name", name);
+//        wrapper1.eq("student_no", cardNumber)
+//                .eq("student_name", name);
+//        List<PayableInfoWaterEntity> waterList = payableInfoWaterService.list(wrapper1);
+//        if (waterList.size() > 0) {
+//            waterList.forEach(water -> {
+//                payableInfoStudentResultVO.setIdCard(cardNumber);
+//                payableInfoStudentResultVO.setStudentName(name);
+//                payableInfoStudentResultVO.setMajor(water.getCollegeName() + water.getClassName());
+//            });
+//        }
+//
+//        List<PayableInfoEntity> infoList = payableInfoService.list(wrapper);
+//        if (infoList.size() > 0) {
+//            infoList.forEach(info -> {
+//                payableInfoStudentResultVO.setIdCard(cardNumber);
+//                payableInfoStudentResultVO.setStudentName(name);
+//                if (info.getCollegeName() != null || info.getClassName() != null) {
+//
+//                }
+//                payableInfoStudentResultVO.setMajor(info.getCollegeName() + info.getClassName());
+//            });
+//        }
+//
+//
+//        return payableInfoStudentResultVO;
+
+//
+//    }
 
     public PayableInfoStudentResultVO queryStudent() {
         PayableInfoStudentResultVO payableInfoStudentResultVO = new PayableInfoStudentResultVO();

+ 3 - 2
src/main/java/com/chuanghai/smartschool/tuitionpayment/entity/PayableInfoEntity.java

@@ -132,8 +132,9 @@ public class PayableInfoEntity implements Serializable {
 	/**
 	 * 支付银行账户
 	 */
-	@ColumnWidth(25)
-	@ExcelProperty("银行账户")
+	@ExcelIgnore
+//	@ColumnWidth(25)
+//	@ExcelProperty("银行账户")
 	private String payableAccount ;
 
 	/**

+ 10 - 3
src/main/java/com/chuanghai/smartschool/tuitionpayment/listener/aliexcel/MyPayableInfoImportListener.java

@@ -5,7 +5,6 @@ import com.alibaba.excel.event.AnalysisEventListener;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.chuanghai.smartschool.tuitionpayment.entity.PayableInfoEntity;
 import com.chuanghai.smartschool.tuitionpayment.service.PayableInfoService;
-import com.chuanghai.smartschool.tuitionpayment.service.PayableInfoWaterService;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.ArrayList;
@@ -59,12 +58,20 @@ public class MyPayableInfoImportListener extends AnalysisEventListener<PayableIn
      * @param itemName 缴费项目
      */
     public void drop(String itemName) {
+        System.out.println(itemName);
         QueryWrapper<PayableInfoEntity> wrapper = new QueryWrapper<>();
         wrapper.eq("payment_item", itemName);
         List<PayableInfoEntity> infoEntityList = payableInfoService.list(wrapper);
-        if (infoEntityList.size() >0){
+        infoEntityList.forEach(ss->{
+            System.out.println(ss);
+        });
+        if (infoEntityList.size() > 0){
             List<Long> idList = infoEntityList.stream().map(PayableInfoEntity::getId).collect(Collectors.toList());
-            payableInfoService.removeByIds(idList);
+            idList.forEach(dd->{
+                System.out.println(dd);
+            });
+            boolean b = payableInfoService.removeByIds(idList);
+            System.out.println(b);
         }
 
     }

+ 1 - 1
src/main/java/com/chuanghai/smartschool/tuitionpayment/service/PayService.java

@@ -17,7 +17,7 @@ public interface PayService {
 
     boolean jxnxsNotify(HttpServletRequest request);
 
-    String jxnxsSuccess(String orderNo);
+    String jxnxsSuccess( String orderNo, String secondOrderNo);
 
     Map<String, String> queryJXNXSOrderStatus(String orderNo);
 }

+ 1 - 0
src/main/java/com/chuanghai/smartschool/tuitionpayment/service/impl/PayOrderServiceImpl.java

@@ -827,6 +827,7 @@ public class PayOrderServiceImpl extends ServiceImpl<PayOrderDao, PayOrderEntity
 
         wrapper.eq(StringUtils.hasText(queryTO.getPayYear()), "pay_year", queryTO.getPayYear())
                 .eq(StringUtils.hasText(queryTO.getItemName()), "pay_item", queryTO.getItemName())
+                .eq(StringUtils.hasText(queryTO.getPayStatus()),"status", queryTO.getPayStatus())
                 .select("ifnull(sum(real_pay_amount), 0) as total,count(id) as count");
         List<PayOrderEntity> list = this.payOrderService.list(wrapper);
 

+ 21 - 6
src/main/java/com/chuanghai/smartschool/tuitionpayment/service/impl/PayServiceImpl.java

@@ -196,7 +196,6 @@ public class PayServiceImpl implements PayService {
         if (verifySigature) { // 验签成功
             if ("Y".equalsIgnoreCase(success)) { // success 返回 Y 代表支付成功
                 updateOrderStatus(orderNo, payment);
-
                 payOrderService.queryOrderStatus(orderNo);
                 PayOrderEntity byOrderNo = payOrderService.getByOrderNo(orderNo);
                 //判断本订单的状态是否成功,成功就修改缴费订单的状态值
@@ -266,6 +265,22 @@ public class PayServiceImpl implements PayService {
         return wechatConfig.getFontendUrl() + "/#/pages/payState/payState?orderNo=" + parameterMap.get("ORDERID")[0]+"&secondOrderNo="+parameterMap.get("REMARK1")[0];
     }
 
+    public static void main(String[] args) throws JsonProcessingException {
+        //联合建行
+      //  String paramStr = "{\"ord_no\":\"1547912460571332610\",\"amount\":\"1\",\"out_no\":\"1547912460571332610\",\"rand_str\":\"aj9tBMXszcpXisyKKq8Qp7UOWRgml7vvrEZ3rWw09VYrowc8XkYnsTboLsL6zhB1WA4nxAoGvn8TUk2RE1f7VqvGThMsyouuYySw9hcEElyyFBqkCGry6XeZe1sMpXho\",\"sign\":\"19994536a5357105d0cb9271ebb9850f\",\"pay_time\":\"20220715195451\",\"status\":\"1\",\"timestamp\":\"1657886107\"}";
+        //单次
+        String paramStr = "{\"ord_no\":\"1547912827262554114\",\"amount\":\"1\",\"out_no\":\"1547912827262554114\",\"rand_str\":\"lOI3vMnfK4l1TDKNzJHVmgH3QsYythHO5pRBbfQWjcYcQI0psIlPZ3SPwRoZ95NevFQGUGDdTBqKkq9M8vC7zvX5nl4wqSLWxBDsigFcS5Wdv60EBCLb7Igu3l1udMqL\",\"sign\":\"34ec273ef52fbb335c9521c1b8dfc419\",\"pay_time\":\"20220715195604\",\"status\":\"1\",\"timestamp\":\"1657886181\"}";
+
+        ObjectMapper mapper = new ObjectMapper();
+        HashMap<String, String> hashMap = mapper.readValue(paramStr, new TypeReference<HashMap>() {
+        });
+       // 原先
+        System.out.println(JXNXSPayUtil.verifySign(hashMap, "611764d05a545bb7bb08cbd457f7dac1"));
+
+       //现在
+      // System.out.println(JXNXSPayUtil.verifySign(hashMap, "5a920b634d6486fc2dd4342c6c5787b8"));
+    }
+
     /**
      * 【农商行】支付结果通知
      * @param request
@@ -292,11 +307,11 @@ public class PayServiceImpl implements PayService {
         // "rand_str":"","sign":"","pay_time":"",
         // "status":"1","timestamp":"1629255539", "amount": ""}
         boolean isHandleSuccess = false;
+        System.out.println("w验签--------------------------verifySign-----------------" + verifySign);
         if (verifySign) {
             String orderNo = params.get("out_no");
             String status = params.get("status");
             String amount = params.get("amount"); // 分
-
             if ("1".equals(status)) {
                 isHandleSuccess = true;
                 String realPayAmount = new BigDecimal(amount).divide(new BigDecimal(100)).setScale(2, BigDecimal.ROUND_UP).toString(); // 分转成元
@@ -325,8 +340,8 @@ public class PayServiceImpl implements PayService {
      * @return
      */
     @Override
-    public String jxnxsSuccess(String orderNo) {
-        return wechatConfig.getFontendUrl() + "/#/pages/payState/payState?orderNo=" + orderNo;
+    public String jxnxsSuccess(String orderNo, String secondOrderNo) {
+        return wechatConfig.getFontendUrl() + "/#/pages/payState/payState?orderNo=" + orderNo +"&secondOrderNo=" + secondOrderNo;
     }
 
     /**
@@ -432,9 +447,9 @@ public class PayServiceImpl implements PayService {
 
                 // 订单最终支付金额验证成功
                 payOrder.setFinishTime(LocalDateTime.now());
-                //payOrder.setStatus(PayStatus.ALREADY_PAY.getCode());
+                payOrder.setStatus(PayStatus.ALREADY_PAY.getCode());
+                System.out.println(payOrder+   "updateOrderStatusupdateOrde22222222222222222222222222222222222222derStatusupdateOrderStatus");
                 payOrderService.updateById(payOrder);
-                System.out.println("updateOrderStatusupdateOrderStatusupdateOrderStatusupdateOrderStatusupdateOrderStatusupdateOrderStatus");
             }
         }
     }

+ 11 - 15
src/main/java/com/chuanghai/smartschool/tuitionpayment/service/impl/PayableInfoServiceImpl.java

@@ -2,30 +2,26 @@ package com.chuanghai.smartschool.tuitionpayment.service.impl;
 
 import com.alibaba.excel.EasyExcel;
 import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.chuanghai.smartschool.tuitionpayment.common.exception.BizCodeEnume;
 import com.chuanghai.smartschool.tuitionpayment.common.exception.RRException;
+import com.chuanghai.smartschool.tuitionpayment.common.utils.MyQuery;
+import com.chuanghai.smartschool.tuitionpayment.common.utils.PageParam;
+import com.chuanghai.smartschool.tuitionpayment.common.utils.PageUtils;
+import com.chuanghai.smartschool.tuitionpayment.dao.PayableInfoDao;
 import com.chuanghai.smartschool.tuitionpayment.entity.PayItem;
-import com.chuanghai.smartschool.tuitionpayment.entity.PayOrderEntity;
+import com.chuanghai.smartschool.tuitionpayment.entity.PayableInfoEntity;
 import com.chuanghai.smartschool.tuitionpayment.listener.aliexcel.MyPayableInfoImportListener;
 import com.chuanghai.smartschool.tuitionpayment.service.EnablePayLimitByGradeService;
 import com.chuanghai.smartschool.tuitionpayment.service.PayItemService;
 import com.chuanghai.smartschool.tuitionpayment.service.PayOrderService;
+import com.chuanghai.smartschool.tuitionpayment.service.PayableInfoService;
 import com.chuanghai.smartschool.tuitionpayment.to.PayOrderQueryTO;
 import com.chuanghai.smartschool.tuitionpayment.utils.OutputTxt;
-import com.chuanghai.smartschool.tuitionpayment.vo.StudentPayableInfoVO;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.chuanghai.smartschool.tuitionpayment.common.utils.PageUtils;
-import com.chuanghai.smartschool.tuitionpayment.common.utils.MyQuery;
-import com.chuanghai.smartschool.tuitionpayment.common.utils.PageParam;
-
-import com.chuanghai.smartschool.tuitionpayment.dao.PayableInfoDao;
-import com.chuanghai.smartschool.tuitionpayment.entity.PayableInfoEntity;
-import com.chuanghai.smartschool.tuitionpayment.service.PayableInfoService;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 import org.springframework.web.multipart.MultipartFile;
@@ -34,7 +30,6 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.net.URLEncoder;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
@@ -206,7 +201,8 @@ public class PayableInfoServiceImpl extends ServiceImpl<PayableInfoDao, PayableI
         EasyExcel.read(file.getInputStream(),
                 PayableInfoEntity.class,
                 new MyPayableInfoImportListener(this))
-                .sheet().doRead();
+                .sheet()
+                .doRead();
 
     }
 

+ 12 - 20
src/main/java/com/chuanghai/smartschool/tuitionpayment/service/impl/PayableInfoWaterServiceImpl.java

@@ -10,20 +10,15 @@ import com.chuanghai.smartschool.tuitionpayment.common.exception.RRException;
 import com.chuanghai.smartschool.tuitionpayment.common.utils.MyQuery;
 import com.chuanghai.smartschool.tuitionpayment.common.utils.PageParam;
 import com.chuanghai.smartschool.tuitionpayment.common.utils.PageUtils;
-import com.chuanghai.smartschool.tuitionpayment.dao.PayableInfoDao;
 import com.chuanghai.smartschool.tuitionpayment.dao.PayableInfoWaterDao;
 import com.chuanghai.smartschool.tuitionpayment.entity.PayItem;
-import com.chuanghai.smartschool.tuitionpayment.entity.PayOrderEntity;
-import com.chuanghai.smartschool.tuitionpayment.entity.PayableInfoEntity;
 import com.chuanghai.smartschool.tuitionpayment.entity.PayableInfoWaterEntity;
-import com.chuanghai.smartschool.tuitionpayment.enume.PayStatus;
-import com.chuanghai.smartschool.tuitionpayment.listener.aliexcel.MyPayableInfoImportListener;
 import com.chuanghai.smartschool.tuitionpayment.listener.aliexcel.MyPayableInfoWaterImportListener;
-import com.chuanghai.smartschool.tuitionpayment.service.*;
+import com.chuanghai.smartschool.tuitionpayment.service.PayItemService;
+import com.chuanghai.smartschool.tuitionpayment.service.PayableInfoService;
+import com.chuanghai.smartschool.tuitionpayment.service.PayableInfoWaterService;
 import com.chuanghai.smartschool.tuitionpayment.to.PayOrderQueryTO;
 import com.chuanghai.smartschool.tuitionpayment.utils.OutputTxt;
-import com.chuanghai.smartschool.tuitionpayment.vo.StudentPayableInfoVO;
-import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -34,12 +29,9 @@ import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
 import java.math.BigDecimal;
 import java.net.URLEncoder;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 
 
 @Service("payableInfoWaterService")
@@ -61,15 +53,15 @@ public class PayableInfoWaterServiceImpl extends ServiceImpl<PayableInfoWaterDao
     @Override
     public void importByExcel(MultipartFile file) throws IOException {
 
-        // 清除之前的表数据
-        List<PayableInfoWaterEntity> payableInfoWater = payableInfoWaterService.list();
-        if (payableInfoWater.size() > 0){
-            QueryWrapper<PayableInfoWaterEntity> wrapper = new QueryWrapper<>();
-            wrapper.eq("payment_item", payableInfoWater.get(0).getPaymentItem());
-            List<PayableInfoWaterEntity> infoEntityList = payableInfoWaterService.list(wrapper);
-            List<Long> idList = infoEntityList.stream().map(PayableInfoWaterEntity::getId).collect(Collectors.toList());
-            payableInfoWaterService.removeByIds(idList);
-        }
+//        // 清除之前的表数据
+//        List<PayableInfoWaterEntity> payableInfoWater = payableInfoWaterService.list();
+//        if (payableInfoWater.size() > 0){
+//            QueryWrapper<PayableInfoWaterEntity> wrapper = new QueryWrapper<>();
+//            wrapper.eq("payment_item", payableInfoWater.get(0).getPaymentItem());
+//            List<PayableInfoWaterEntity> infoEntityList = payableInfoWaterService.list(wrapper);
+//            List<Long> idList = infoEntityList.stream().map(PayableInfoWaterEntity::getId).collect(Collectors.toList());
+//            payableInfoWaterService.removeByIds(idList);
+//        }
 
 
         EasyExcel.read(file.getInputStream(),

+ 2 - 4
src/main/resources/application.yml

@@ -28,8 +28,6 @@ fontendUrl: https://chtech.ncjti.edu.cn/jiaofei/jiaofeiH5
 
 # 微校相关配置
 weixiao:
-  #appKey: 2DDC9DBF32F28845
-  #appSecret: 97F7E3A65AD8A1C500DDD90F3D57EBE0
   appKey: 580DBB565097446B
   appSecret: 067739D4E6FA31F90E7C08EF278967CF
   fontendUrl: ${fontendUrl}
@@ -61,8 +59,8 @@ ccb:
 
 # 江西农商行相关配置
 jxnxs:
-  openId: 5494ec3310685daa218382619dd20e27
-  openKey: 611764d05a545bb7bb08cbd457f7dac1
+  openId: 6fc31630a4d3de99f5e41debbd35b9f0
+  openKey: 5a920b634d6486fc2dd4342c6c5787b8
 
 logging:
   level: