|
@@ -1,19 +1,19 @@
|
|
|
package service
|
|
|
|
|
|
import (
|
|
|
- qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
- "app.yhyue.com/moapp/jybase/redis"
|
|
|
- "fmt"
|
|
|
- "jy/src/jfw/modules/subscribepay/src/config"
|
|
|
- "jy/src/jfw/modules/subscribepay/src/entity"
|
|
|
- "jy/src/jfw/modules/subscribepay/src/pay"
|
|
|
- "jy/src/jfw/modules/subscribepay/src/util"
|
|
|
- "log"
|
|
|
- "net/url"
|
|
|
- "strings"
|
|
|
- "time"
|
|
|
+ qutil "app.yhyue.com/moapp/jybase/common"
|
|
|
+ "app.yhyue.com/moapp/jybase/redis"
|
|
|
+ "fmt"
|
|
|
+ "jy/src/jfw/modules/subscribepay/src/config"
|
|
|
+ "jy/src/jfw/modules/subscribepay/src/entity"
|
|
|
+ "jy/src/jfw/modules/subscribepay/src/pay"
|
|
|
+ "jy/src/jfw/modules/subscribepay/src/util"
|
|
|
+ "log"
|
|
|
+ "net/url"
|
|
|
+ "strings"
|
|
|
+ "time"
|
|
|
|
|
|
- "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
+ "app.yhyue.com/moapp/jybase/go-xweb/xweb"
|
|
|
)
|
|
|
|
|
|
type PayCallBackAction struct {
|
|
@@ -142,13 +142,13 @@ func (this *PayCallBackAction) TestPay() {
|
|
|
}
|
|
|
}
|
|
|
go func() {
|
|
|
- orderData := util.Mysql.FindOne("dataexport_order", thisParam.GetPaySuccessOrderQuery(), "filter", "")
|
|
|
+ orderData := util.Mysql.FindOne("dataexport_order", thisParam.GetPaySuccessOrderQuery(), "filter,order_money", "")
|
|
|
if orderData != nil {
|
|
|
//新增保留支付金额字段
|
|
|
filter := qutil.ObjToString((*orderData)["filter"])
|
|
|
lastIndex := strings.LastIndex(filter, "}")
|
|
|
if lastIndex != -1 {
|
|
|
- newFilter := filter[:lastIndex] + strings.Replace(filter[lastIndex:], "}", fmt.Sprintf(`"originalAmount":%d}`, qutil.IntAll((*orderData)["order_money"])), 1)
|
|
|
+ newFilter := filter[:lastIndex] + strings.Replace(filter[lastIndex:], "}", fmt.Sprintf(`,"originalAmount":%d}`, qutil.IntAll((*orderData)["order_money"])), 1)
|
|
|
util.Mysql.Update("dataexport_order", thisParam.GetPaySuccessOrderQuery(), map[string]interface{}{"filter": newFilter})
|
|
|
}
|
|
|
}
|
|
@@ -295,7 +295,7 @@ func (a *PayCallBackAction) AliPayCallback() {
|
|
|
filter := qutil.ObjToString((*orderData)["filter"])
|
|
|
lastIndex := strings.LastIndex(filter, "}")
|
|
|
if lastIndex != -1 {
|
|
|
- newFilter := filter[:lastIndex] + strings.Replace(filter[lastIndex:], "}", fmt.Sprintf(`"originalAmount":%d}`, qutil.IntAll((*orderData)["order_money"])), 1)
|
|
|
+ newFilter := filter[:lastIndex] + strings.Replace(filter[lastIndex:], "}", fmt.Sprintf(`,"originalAmount":%d}`, qutil.IntAll((*orderData)["order_money"])), 1)
|
|
|
util.Mysql.Update("dataexport_order", thisParam.GetPaySuccessOrderQuery(), map[string]interface{}{"filter": newFilter})
|
|
|
}
|
|
|
}
|
|
@@ -421,13 +421,13 @@ func (p *PayCallBackAction) WxPayCallback() {
|
|
|
return false
|
|
|
}
|
|
|
go func() {
|
|
|
- orderData := util.Mysql.FindOne("dataexport_order", thisParam.GetPaySuccessOrderQuery(), "filter", "")
|
|
|
+ orderData := util.Mysql.FindOne("dataexport_order", thisParam.GetPaySuccessOrderQuery(), "filter,order_money", "")
|
|
|
if orderData != nil {
|
|
|
//新增保留支付金额字段
|
|
|
filter := qutil.ObjToString((*orderData)["filter"])
|
|
|
lastIndex := strings.LastIndex(filter, "}")
|
|
|
if lastIndex != -1 {
|
|
|
- newFilter := filter[:lastIndex] + strings.Replace(filter[lastIndex:], "}", fmt.Sprintf(`"originalAmount":%d}`, qutil.IntAll((*orderData)["order_money"])), 1)
|
|
|
+ newFilter := filter[:lastIndex] + strings.Replace(filter[lastIndex:], "}", fmt.Sprintf(`,"originalAmount":%d}`, qutil.IntAll((*orderData)["order_money"])), 1)
|
|
|
util.Mysql.Update("dataexport_order", thisParam.GetPaySuccessOrderQuery(), map[string]interface{}{"filter": newFilter})
|
|
|
}
|
|
|
}
|