每日订单打款测试,2020-02-13 9.30
This commit is contained in:
@@ -6,6 +6,8 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
"git.rosy.net.cn/jx-callback/business/jxstore/event"
|
||||||
|
|
||||||
"git.rosy.net.cn/jx-callback/business/jxstore/report"
|
"git.rosy.net.cn/jx-callback/business/jxstore/report"
|
||||||
@@ -91,6 +93,9 @@ var (
|
|||||||
sendSecKillWarnList = []string{
|
sendSecKillWarnList = []string{
|
||||||
"9:00:00",
|
"9:00:00",
|
||||||
}
|
}
|
||||||
|
autoPayForPopluarManList = []string{
|
||||||
|
"9:30:00",
|
||||||
|
}
|
||||||
|
|
||||||
autoSaleStoreSkuTimeList = []string{
|
autoSaleStoreSkuTimeList = []string{
|
||||||
cms.AutoSaleAtStr,
|
cms.AutoSaleAtStr,
|
||||||
@@ -170,6 +175,9 @@ func Init() {
|
|||||||
ScheduleTimerFunc("每日报警心跳", func() {
|
ScheduleTimerFunc("每日报警心跳", func() {
|
||||||
globals.SugarLogger.Warnf("每日报警心跳,这不是报警。启动时间:%s", cms.GetServiceInfo(jxcontext.AdminCtx)["startupTime"])
|
globals.SugarLogger.Warnf("每日报警心跳,这不是报警。启动时间:%s", cms.GetServiceInfo(jxcontext.AdminCtx)["startupTime"])
|
||||||
}, dailyHeartbeat)
|
}, dailyHeartbeat)
|
||||||
|
ScheduleTimerFunc("AutoPayForPopluarMan", func() {
|
||||||
|
localjx.AutoPayForPopluarMan(jxcontext.AdminCtx)
|
||||||
|
}, autoPayForPopluarManList)
|
||||||
}
|
}
|
||||||
ScheduleTimerFunc("AutoSaleStoreSku", func() {
|
ScheduleTimerFunc("AutoSaleStoreSku", func() {
|
||||||
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)
|
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)
|
||||||
|
|||||||
@@ -656,14 +656,14 @@ func PayForPopluarMan(ctx *jxcontext.Context, vendorOrderID, userID string, pric
|
|||||||
//自动打款给市场推广人
|
//自动打款给市场推广人
|
||||||
func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
||||||
var (
|
var (
|
||||||
|
errMsg string
|
||||||
db = dao.GetDB()
|
db = dao.GetDB()
|
||||||
fromDateStr = time.Now().AddDate(0, 0, -1).Format("2006-1-2") + " 00:00:00"
|
fromDateStr = time.Now().AddDate(0, 0, -2).Format("2006-1-2") + " 00:00:00"
|
||||||
toDateStr = time.Now().AddDate(0, 0, -1).Format("2006-1-2") + " 23:59:59"
|
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))
|
result, err := dao.GetOrdersForJxPay(db, utils.Str2Time(fromDateStr), utils.Str2Time(toDateStr))
|
||||||
for _, goods := range result {
|
for _, goods := range result {
|
||||||
var (
|
var (
|
||||||
errMsg string
|
|
||||||
param = &wxpayapi.TransfersParam{
|
param = &wxpayapi.TransfersParam{
|
||||||
CheckName: wxpayapi.CheckName,
|
CheckName: wxpayapi.CheckName,
|
||||||
PartnerTradeNo: goods.VendorOrderID,
|
PartnerTradeNo: goods.VendorOrderID,
|
||||||
@@ -713,9 +713,8 @@ func AutoPayForPopluarMan(ctx *jxcontext.Context) (err error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
user, _ := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913")
|
user, _ := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913")
|
||||||
noticeMsg := err.Error()
|
if user != nil && errMsg != "" {
|
||||||
if user != nil && err != nil {
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "每日打款错误", errMsg)
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "每日打款错误", noticeMsg)
|
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user