Sfoglia il codice sorgente

二维码支付加入 状态

Your Name 2 anni fa
parent
commit
ccd3861b14

+ 38 - 16
java110-bean/src/main/java/com/java110/dto/onlinePayRefund/OnlinePayRefundDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.onlinePayRefund;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,11 +16,13 @@ import java.util.Date;
 public class OnlinePayRefundDto extends PageDto implements Serializable {
 
     private String refundFee;
-private String busiId;
-private String payId;
-private String state;
-private String message;
-private String refundId;
+    private String busiId;
+    private String payId;
+    private String state;
+    private String message;
+    private String refundId;
+
+    private String communityId;
 
 
     private Date createTime;
@@ -30,37 +33,48 @@ private String refundId;
     public String getRefundFee() {
         return refundFee;
     }
-public void setRefundFee(String refundFee) {
+
+    public void setRefundFee(String refundFee) {
         this.refundFee = refundFee;
     }
-public String getBusiId() {
+
+    public String getBusiId() {
         return busiId;
     }
-public void setBusiId(String busiId) {
+
+    public void setBusiId(String busiId) {
         this.busiId = busiId;
     }
-public String getPayId() {
+
+    public String getPayId() {
         return payId;
     }
-public void setPayId(String payId) {
+
+    public void setPayId(String payId) {
         this.payId = payId;
     }
-public String getState() {
+
+    public String getState() {
         return state;
     }
-public void setState(String state) {
+
+    public void setState(String state) {
         this.state = state;
     }
-public String getMessage() {
+
+    public String getMessage() {
         return message;
     }
-public void setMessage(String message) {
+
+    public void setMessage(String message) {
         this.message = message;
     }
-public String getRefundId() {
+
+    public String getRefundId() {
         return refundId;
     }
-public void setRefundId(String refundId) {
+
+    public void setRefundId(String refundId) {
         this.refundId = refundId;
     }
 
@@ -80,4 +94,12 @@ public void setRefundId(String refundId) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getCommunityId() {
+        return communityId;
+    }
+
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
 }

+ 8 - 0
java110-bean/src/main/java/com/java110/po/onlinePayRefund/OnlinePayRefundPo.java

@@ -36,6 +36,8 @@ public class OnlinePayRefundPo implements Serializable {
     private String message;
     private String refundId;
 
+    private String communityId;
+
     public String getRefundFee() {
         return refundFee;
     }
@@ -92,5 +94,11 @@ public class OnlinePayRefundPo implements Serializable {
         this.refundId = refundId;
     }
 
+    public String getCommunityId() {
+        return communityId;
+    }
 
+    public void setCommunityId(String communityId) {
+        this.communityId = communityId;
+    }
 }

+ 12 - 3
java110-db/src/main/resources/mapper/acct/OnlinePayRefundV1ServiceDaoImplMapper.xml

@@ -8,9 +8,9 @@
     <!-- 保存线上退费信息 add by wuxw 2018-07-03 -->
     <insert id="saveOnlinePayRefundInfo" parameterType="Map">
         insert into online_pay_refund(
-        refund_fee,busi_id,pay_id,state,message,refund_id
+        refund_fee,busi_id,pay_id,state,message,refund_id,community_id
         ) values (
-        #{refundFee},#{busiId},#{payId},#{state},#{message},#{refundId}
+        #{refundFee},#{busiId},#{payId},#{state},#{message},#{refundId},#{communityId}
         )
     </insert>
 
@@ -18,7 +18,7 @@
     <!-- 查询线上退费信息 add by wuxw 2018-07-03 -->
     <select id="getOnlinePayRefundInfo" parameterType="Map" resultType="Map">
         select t.refund_fee,t.refund_fee refundFee,t.busi_id,t.busi_id busiId,t.status_cd,t.status_cd
-        statusCd,t.pay_id,t.pay_id payId,t.state,t.message,t.refund_id,t.refund_id refundId
+        statusCd,t.pay_id,t.pay_id payId,t.state,t.message,t.refund_id,t.refund_id refundId,t.community_id communityId
         from online_pay_refund t
         where 1 =1
         <if test="refundFee !=null and refundFee != ''">
@@ -42,6 +42,9 @@
         <if test="refundId !=null and refundId != ''">
             and t.refund_id= #{refundId}
         </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
         order by t.create_time desc
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
@@ -75,6 +78,9 @@
         <if test="refundId !=null and refundId != ''">
             and t.refund_id= #{refundId}
         </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
     </update>
 
@@ -104,6 +110,9 @@
         <if test="refundId !=null and refundId != ''">
             and t.refund_id= #{refundId}
         </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
 
     </select>

+ 5 - 4
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/UpdateReturnPayFeeCmd.java

@@ -363,14 +363,14 @@ public class UpdateReturnPayFeeCmd extends Cmd {
             feeDiscountDto.setDiscountId(payFeeConfigDiscount.getDiscountId());
             List<FeeDiscountDto> feeDiscountDtos = feeDiscountInnerServiceSMOImpl.queryFeeDiscounts(feeDiscountDto);
             //Assert.listOnlyOne(feeDiscountDtos, "查询打折优惠表错误");
-            if(feeDiscountDtos == null || feeDiscountDtos.size() < 1){
+            if (feeDiscountDtos == null || feeDiscountDtos.size() < 1) {
                 continue;
             }
             FeeDiscountRuleDto feeDiscountRuleDto = new FeeDiscountRuleDto();
             feeDiscountRuleDto.setRuleId(feeDiscountDtos.get(0).getRuleId());
             List<FeeDiscountRuleDto> feeDiscountRuleDtos = feeDiscountRuleInnerServiceSMOImpl.queryFeeDiscountRules(feeDiscountRuleDto);
             //Assert.listOnlyOne(feeDiscountRuleDtos, "查询规则表错误");
-            if(feeDiscountRuleDtos == null || feeDiscountRuleDtos.size() < 1){
+            if (feeDiscountRuleDtos == null || feeDiscountRuleDtos.size() < 1) {
                 continue;
             }
             //获取实现方式
@@ -387,8 +387,8 @@ public class UpdateReturnPayFeeCmd extends Cmd {
             feeDiscountSpecDto.setSpecId(SPEC_RATE); //赠送规则
             //查询打折规格
             List<FeeDiscountSpecDto> feeDiscountSpecDtos = feeDiscountSpecInnerServiceSMOImpl.queryFeeDiscountSpecs(feeDiscountSpecDto);
-           // Assert.listOnlyOne(feeDiscountSpecDtos, "查询打折规格表错误!");
-            if(feeDiscountSpecDtos == null || feeDiscountSpecDtos.size() < 1){
+            // Assert.listOnlyOne(feeDiscountSpecDtos, "查询打折规格表错误!");
+            if (feeDiscountSpecDtos == null || feeDiscountSpecDtos.size() < 1) {
                 continue;
             }
             //获取赠送月份
@@ -629,6 +629,7 @@ public class UpdateReturnPayFeeCmd extends Cmd {
         onlinePayRefundPo.setMessage("待退费");
         onlinePayRefundPo.setBusiId(feeDetailDto.getDetailId());
         onlinePayRefundPo.setRefundFee(feeDetailDto.getReceivedAmount());
+        onlinePayRefundPo.setCommunityId(feeDetailDto.getCommunityId());
         onlinePayRefundV1InnerServiceSMOImpl.saveOnlinePayRefund(onlinePayRefundPo);
     }
 }

+ 8 - 5
service-job/src/main/java/com/java110/job/adapt/returnMoney/bbg/ReturnPayFeeBbgMoneyAdapt.java

@@ -111,11 +111,7 @@ public class ReturnPayFeeBbgMoneyAdapt extends DatabusAdaptImpl {
         if (onlinePayDtos == null || onlinePayDtos.size() < 1) {
             return;
         }
-
         String communityId = "";
-
-        String mchtNo_SM4 = CommunitySettingFactory.getValue(communityId, "mchtNo_SM4");
-
         // todo 查询退费明细
         OnlinePayRefundDto onlinePayRefundDto = new OnlinePayRefundDto();
         onlinePayRefundDto.setPayId(onlinePayDtos.get(0).getPayId());
@@ -124,14 +120,21 @@ public class ReturnPayFeeBbgMoneyAdapt extends DatabusAdaptImpl {
         String tranNo = GenerateCodeFactory.getGeneratorId("11");
         if(onlinePayRefundDtos != null && onlinePayRefundDtos.size() >0){
             tranNo = onlinePayRefundDtos.get(0).getRefundId();
+            communityId = onlinePayRefundDtos.get(0).getCommunityId();
         }
 
 
+
+        String mchtNo_SM4 = CommunitySettingFactory.getValue(communityId, "mchtNo_SM4");
+
+
+
+
         Map<String, Object> params = new HashMap<>();
         params.put("version", VERSION);// 版本号 1.0
         params.put("mcht_no", mchtNo_SM4);// 收款商户编号
         params.put("tran_no", tranNo);// 商户流水
-        params.put("org_tran_no", onlinePayDtos.get(0).getTransactionId());// 原平台流水
+        params.put("org_tran_no", onlinePayDtos.get(0).getOrderId());// 原平台流水
         params.put("device_ip", "172.0.0.1");// 设备发起交易IP
         params.put("amt", onlinePayDtos.get(0).getRefundFee());// 交易金额
         params.put("ware_name", onlinePayDtos.get(0).getPayName());// 摘要备注