每日订单打款测试,2020-02-13 9.30

This commit is contained in:
苏尹岚
2020-02-13 09:25:57 +08:00
parent 68e690f6db
commit e46e86396c
2 changed files with 13 additions and 6 deletions

View File

@@ -656,14 +656,14 @@ func PayForPopluarMan(ctx *jxcontext.Context, vendorOrderID, userID string, pric
//自动打款给市场推广人
func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
var (
errMsg string
db = dao.GetDB()
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"
fromDateStr = time.Now().AddDate(0, 0, -2).Format("2006-1-2") + " 00:00:00"
toDateStr = time.Now().AddDate(0, 0, -2).Format("2006-1-2") + " 23:59:59"
)
result, err := dao.GetOrdersForJxPay(db, utils.Str2Time(fromDateStr), utils.Str2Time(toDateStr))
for _, goods := range result {
var (
errMsg string
param = &wxpayapi.TransfersParam{
CheckName: wxpayapi.CheckName,
PartnerTradeNo: goods.VendorOrderID,
@@ -713,9 +713,8 @@ func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
}
}
user, _ := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913")
noticeMsg := err.Error()
if user != nil && err != nil {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "每日打款错误", noticeMsg)
if user != nil && errMsg != "" {
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "每日打款错误", errMsg)
}
return err
}