|
@@ -5,6 +5,7 @@ import (
|
|
|
"fmt"
|
|
|
"github.com/medivhzhan/weapp/v2"
|
|
|
"hongze/hongze_mfyx/models"
|
|
|
+ "hongze/hongze_mfyx/models/order"
|
|
|
"hongze/hongze_mfyx/services"
|
|
|
"hongze/hongze_mfyx/utils"
|
|
|
"strconv"
|
|
@@ -485,10 +486,22 @@ func (this *WechatCommonController) WxpayRefundsNotify() {
|
|
|
item.Result = string(body)
|
|
|
//fmt.Println(item.Result)
|
|
|
//return
|
|
|
- go models.AddCygxShanghaiCompanyLog(item)
|
|
|
itemNotify := services.WxDecodeNotify(body)
|
|
|
if itemNotify.OutTradeNo != "" {
|
|
|
- //go services.HandleOrderRefundHandle(itemNotify)
|
|
|
+ go services.HandleOrderRefundHandle(itemNotify)
|
|
|
+ }
|
|
|
+
|
|
|
+ outTradeNo := itemNotify.OutTradeNo
|
|
|
+ orderDetail, e := order.GetCygxOrderDetailByOrderCode(outTradeNo)
|
|
|
+ if e != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ //go AddCygxOrderPayment(itemCallback) // 记录支付交易信息
|
|
|
+
|
|
|
+ //修改过状态的不再二次处理
|
|
|
+ if orderDetail.OrderStatus != 3 {
|
|
|
+ go models.AddCygxShanghaiCompanyLog(item)
|
|
|
}
|
|
|
br.Data = itemNotify
|
|
|
br.Ret = 200
|