|
@@ -252,6 +252,7 @@ func BuyPackageForWx(c *gin.Context, req md.BuyPackageReq) (outTradeNo, total st |
|
|
ReqContent: string(utils.Serialize(req)), |
|
|
ReqContent: string(utils.Serialize(req)), |
|
|
WithDayData: string(utils.Serialize(data)), |
|
|
WithDayData: string(utils.Serialize(data)), |
|
|
PayWay: enum.PayWayForWx, |
|
|
PayWay: enum.PayWayForWx, |
|
|
|
|
|
PrepayId: *result.PrepayId, |
|
|
CreateAt: now.Format("2006-01-02 15:04:05"), |
|
|
CreateAt: now.Format("2006-01-02 15:04:05"), |
|
|
UpdateAt: now.Format("2006-01-02 15:04:05"), |
|
|
UpdateAt: now.Format("2006-01-02 15:04:05"), |
|
|
}) |
|
|
}) |
|
@@ -493,7 +494,7 @@ func DealCentralKitchenForSchoolOrderCallBack(outTradeNo, tradeStatus string) (s |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
func DealCentralKitchenForSchoolOrderCallBackForWx(outTradeNo, tradeStatus string) (state int, err error) { |
|
|
|
|
|
|
|
|
func DealCentralKitchenForSchoolOrderCallBackForWx(outTradeNo, transactionId, tradeStatus string) (state int, err error) { |
|
|
centralKitchenForSchoolPackageOrd := db.CentralKitchenForSchoolPackageOrd{} |
|
|
centralKitchenForSchoolPackageOrd := db.CentralKitchenForSchoolPackageOrd{} |
|
|
centralKitchenForSchoolPackageOrd.Set(outTradeNo) |
|
|
centralKitchenForSchoolPackageOrd.Set(outTradeNo) |
|
|
ord, err := centralKitchenForSchoolPackageOrd.GetCentralKitchenForSchoolPackageOrd() |
|
|
ord, err := centralKitchenForSchoolPackageOrd.GetCentralKitchenForSchoolPackageOrd() |
|
@@ -513,6 +514,7 @@ func DealCentralKitchenForSchoolOrderCallBackForWx(outTradeNo, tradeStatus strin |
|
|
if tradeStatus == "SUCCESS" { |
|
|
if tradeStatus == "SUCCESS" { |
|
|
ord.State = enum2.CentralKitchenForSchoolPackageOrdStateForSuccess |
|
|
ord.State = enum2.CentralKitchenForSchoolPackageOrdStateForSuccess |
|
|
ord.OrdState = enum2.CentralKitchenForSchoolPackageOrdOrdStateForSuccess |
|
|
ord.OrdState = enum2.CentralKitchenForSchoolPackageOrdOrdStateForSuccess |
|
|
|
|
|
ord.TradeNo = transactionId |
|
|
|
|
|
|
|
|
//TODO::将预留数据插入到 `central_kitchen_for_school_user_with_day` |
|
|
//TODO::将预留数据插入到 `central_kitchen_for_school_user_with_day` |
|
|
var data []*model.CentralKitchenForSchoolUserWithDay |
|
|
var data []*model.CentralKitchenForSchoolUserWithDay |
|
@@ -586,7 +588,7 @@ func DealCentralKitchenForSchoolOrderCallBackForWx(outTradeNo, tradeStatus strin |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
_, err = centralKitchenForSchoolPackageOrd.CentralKitchenForSchoolPackageOrdUpdate(ord, "state", "ord_state") |
|
|
|
|
|
|
|
|
_, err = centralKitchenForSchoolPackageOrd.CentralKitchenForSchoolPackageOrdUpdate(ord, "state", "ord_state", "trade_no") |
|
|
if err != nil { |
|
|
if err != nil { |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|