Accept Merge Request #190: (su -> mark)
Merge Request: 优化饿鲜达 Created By: @苏尹岚 Accepted By: @苏尹岚 URL: https://rosydev.coding.net/p/jx-callback/d/jx-callback/git/merge/190
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/wxpayapi"
|
||||
|
||||
@@ -652,7 +653,7 @@ func PayForPopluarMan(ctx *jxcontext.Context, vendorOrderID, userID string, pric
|
||||
if user == nil {
|
||||
return fmt.Errorf("未找到此用户!用户ID:[%v]\n", userID)
|
||||
}
|
||||
auth, err := dao.GetUserBindAuthInfo(db, userID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||
auth, err := dao.GetUserBindAuthInfo(db, userID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "", "wx4b5930c13f8b1170")
|
||||
if len(auth) == 0 {
|
||||
return fmt.Errorf("未找到此用户的微信验证方式!用户ID:[%v]\n", userID)
|
||||
}
|
||||
@@ -678,8 +679,8 @@ func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
||||
errMsg string
|
||||
errCode string
|
||||
db = dao.GetDB()
|
||||
fromDateStr = time.Now().AddDate(0, 0, -5).Format("2006-1-2") + " 00:00:00"
|
||||
toDateStr = time.Now().AddDate(0, 0, -5).Format("2006-1-2") + " 23:59:59"
|
||||
fromDateStr = time.Now().AddDate(0, 0, -1).Format("2006-1-2") + " 00:00:00"
|
||||
toDateStr = time.Now().AddDate(0, 0, -1).Format("2006-1-2") + " 23:59:59"
|
||||
mapResult = make(map[string]interface{})
|
||||
)
|
||||
result, err := dao.GetOrdersForJxPay(db, utils.Str2Time(fromDateStr), utils.Str2Time(toDateStr))
|
||||
@@ -698,7 +699,7 @@ func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
||||
return err
|
||||
}
|
||||
user2, err := dao.GetUserByID(db, "mobile", user.ParentMobile)
|
||||
auths, err := dao.GetUserBindAuthInfo(db, user2.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||
auths, err := dao.GetUserBindAuthInfo(db, user2.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "", "wx4b5930c13f8b1170")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -726,7 +727,7 @@ func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
||||
}
|
||||
if user2.ParentMobile != "" {
|
||||
user3, err := dao.GetUserByID(db, "mobile", user2.ParentMobile)
|
||||
auths, err := dao.GetUserBindAuthInfo(db, user3.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "")
|
||||
auths, err := dao.GetUserBindAuthInfo(db, user3.UserID, model.AuthBindTypeAuth, []string{"weixinmini"}, "", "", "wx4b5930c13f8b1170")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -763,6 +764,7 @@ func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
||||
errCode = model.ErrCodeSuccess
|
||||
}
|
||||
err = event.AddOperateEvent(ctx, ctx.GetTrackInfo(), cms.BuildDiffData(mapResult), errCode, errMsg, 0, "AutoPayForPopluarMan")
|
||||
globals.SugarLogger.Debugf("每日订单打款:[%v]", cms.BuildDiffData(mapResult))
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user