Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

LiFei 4 лет назад
Родитель
Сommit
4b7a31291f

+ 5 - 0
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/common/zhutils/PayConst.java

@@ -18,6 +18,11 @@ public class PayConst {
     public static String SUCCESS = "SUC0000";
 
     /**
+     * 请求状态-等待审批
+     */
+    public static String AUT = "AUT";
+
+    /**
      * 请求状态-银行处理中
      */
     public static String NTE = "NTE";

+ 19 - 14
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwpayaccount/mapper/xml/HlwPayRecordMapper.xml

@@ -27,11 +27,13 @@
         FROM
         hlw_pay_record a
         left join hlw_payment p on p.id = a.payment_id
-        WHERE
-        p.statement_url IS NULL
-        AND a.payment_detail_id IS NULL
-        AND p.status = 3
-        AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) = 1
+        <where>
+            p.statement_url IS NULL
+            AND a.payment_detail_id IS NULL
+            AND p.status = 3
+            AND p.is_statement = 1
+            AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) &gt;= 1
+        </where>
         GROUP BY a.id
 	</select>
 
@@ -43,10 +45,12 @@
         hlw_pay_record a
         left join hlw_payment p on p.id = a.payment_id
         left join hlw_payment_detail pd on pd.payment_id = p.id and pd.status = 3
-        WHERE
-        pd.statement_url IS NULL
-        AND a.payment_detail_id IS NULL
-        AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) = 1
+        <where>
+            pd.statement_url IS NULL
+            AND a.payment_detail_id IS NULL
+            AND p.is_statement = 1
+            AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) &gt;= 1
+        </where>
         GROUP BY a.id
 	</select>
 
@@ -57,11 +61,12 @@
         FROM
         hlw_pay_record a
         left join hlw_payment_detail pd on pd.id = a.payment_detail_id and pd.status = 3
-        WHERE
-        pd.statement_url IS NULL
-        AND a.payment_detail_id IS NOT NULL
-        AND pd.is_supplement_payment = 1
-        AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) = 1
+        <where>
+            pd.statement_url IS NULL
+            AND a.payment_detail_id IS NOT NULL
+            AND pd.is_supplement_payment = 1
+            AND TO_DAYS(NOW()) - TO_DAYS(a.create_time) &gt;= 1
+        </where>
         GROUP BY a.id
 	</select>
 

+ 5 - 0
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwpayment/entity/HlwPayment.java

@@ -100,6 +100,11 @@ public class HlwPayment implements Serializable {
     private String statementUrl;
 
     /**
+     * 是否对账单(0: 否;1:是),历史数据默认0
+     */
+    private Integer isStatement;
+
+    /**
      * 状态(0:打回 1:待支付 2:支付中 3:已支付)
      */
     @ApiModelProperty(value = "状态(0:打回 1:待支付 2:支付中 3:已支付)")

+ 3 - 3
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/hlwpayment/service/impl/HlwPaymentServiceImpl.java

@@ -450,7 +450,7 @@ public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPaym
             //业务参考号
             String yurref = jsonObjectBody.getString("yurref");
             //银行处理返回成功
-            if (PayConst.NTE.equals(reqsta)) {
+            if (PayConst.NTE.equals(reqsta) || PayConst.AUT.equals(reqsta)) {
                 //获取当前登录用户
                 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
                 for (int i = 0; i < hlwPaymentDetailList.size(); i++) {
@@ -737,7 +737,7 @@ public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPaym
             //业务参考号
             String yurref = jsonObjectBody.getString("yurref");
             //银行处理返回成功
-            if (PayConst.NTE.equals(reqsta)) {
+            if (PayConst.NTE.equals(reqsta) || PayConst.AUT.equals(reqsta)) {
                 //获取当前登录用户
                 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
                 for (int i = 0; i < hlwPaymentDetailList.size(); i++) {
@@ -1102,7 +1102,7 @@ public class HlwPaymentServiceImpl extends ServiceImpl<HlwPaymentMapper, HlwPaym
             //业务参考号
             String yurref = jsonObjectBody.getString("yurref");
             //银行处理返回成功
-            if (PayConst.NTE.equals(reqsta)) {
+            if (PayConst.NTE.equals(reqsta) || PayConst.AUT.equals(reqsta)) {
                 //获取当前登录用户
                 LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
                 for (int i = 0; i < hlwPaymentDetailList.size(); i++) {

+ 2 - 0
happy-cloud-wisdom/happy-cloud-wisdom-biz/src/main/java/org/jeecg/modules/utils/PayRsaCommon.java

@@ -210,6 +210,8 @@ public class PayRsaCommon {
             String code = RandomRequest.getRandom(8);
             String yurref = code + System.currentTimeMillis();
             jsonObjectRequest2.put("yurref", yurref);
+            //网银审批标志
+            jsonObjectRequest2.put("grtflg", "Y");
             jsonArrayRequest2.add(jsonObjectRequest2);
             /**
              * 明细信息