From c2acaa186ddc2913552402720956e1b385165822 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 27 Mar 2025 16:35:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/task/init.go | 3 ++- app/task/svc/svc_tik_tok_chanxuan.go | 33 +++++++++++++++++----------- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/app/task/init.go b/app/task/init.go index 42481d0..de98934 100644 --- a/app/task/init.go +++ b/app/task/init.go @@ -83,6 +83,8 @@ func doTask(fnName string) func() { // 增加自动任务队列 func initTasks() { + jobs[taskMd.ZhimengCronTikTokChanxuan] = taskTikTokCsjpChanxuan // + jobs[taskMd.ZhimengCronWphOrder] = taskWphOrder // jobs[taskMd.ZhimengCronWphRefundOrder] = taskWphRefundOrder // @@ -96,7 +98,6 @@ func initTasks() { jobs[taskMd.ZhimengCronTikTokCsjp] = taskTikTokCsjp // jobs[taskMd.ZhimengCronTikTokCsjpActivity] = taskTikTokCsjpActivity // jobs[taskMd.ZhimengCronTikTokCsjpLive] = taskTikTokCsjpLive // - jobs[taskMd.ZhimengCronTikTokChanxuan] = taskTikTokCsjpChanxuan // jobs[taskMd.ZhimengCronTikTokChanxuanSettle] = taskTikTokCsjpChanxuanSettle // jobs[taskMd.ZhimengCronTikTokChanxuanPay] = taskTikTokCsjpChanxuanPay // diff --git a/app/task/svc/svc_tik_tok_chanxuan.go b/app/task/svc/svc_tik_tok_chanxuan.go index 68d7268..0e7b48d 100644 --- a/app/task/svc/svc_tik_tok_chanxuan.go +++ b/app/task/svc/svc_tik_tok_chanxuan.go @@ -116,22 +116,30 @@ func OrdersTikTokChanxuanGet(page, pageSize int, sTime, eTime int64, userId stri if v.VipMsg == "" { continue } - vipMsg := utils.Base62Decode(v.VipMsg) - if vipMsg == 0 { - continue - } - vipMsgStr := utils.IntToStr(vipMsg) - - orderTypeStr := vipMsgStr[0:1] orderType := 0 - if orderTypeStr == "2" { - orderType = 1 + mid := "" + uid := "" + one := db.GetGuideOrderByOid(utils.AnyToString(v.OrderId), "csjp") + if one != nil { + orderType = one.IsShare + mid = utils.IntToStr(one.Uid) + uid = utils.IntToStr(one.StationUid) + } else { + vipMsg := utils.Base62Decode(v.VipMsg) + if vipMsg == 0 { + continue + } + vipMsgStr := utils.IntToStr(vipMsg) + orderTypeStr := vipMsgStr[0:1] + if orderTypeStr == "2" { + orderType = 1 + } + mid = uuidMap[utils.StrToInt(vipMsgStr[1:5])] + uid = vipMsgStr[5:] } - mid := uuidMap[utils.StrToInt(vipMsgStr[1:5])] - if mid == "" { + if mid == "" || uid == "" { continue } - uid := vipMsgStr[5:] var ord = &model.GuideOrder{ Oid: utils.StrToInt64(utils.OrderUUID(utils.StrToInt(uid))), Uid: utils.StrToInt(mid), @@ -160,7 +168,6 @@ func OrdersTikTokChanxuanGet(page, pageSize int, sTime, eTime int64, userId stri if utils.AnyToInt64(v.ActivistType) == 1 { ord.Status = "订单退款" } - one := db.GetGuideOrderByOne(ord.PvdOid, utils.IntToStr(ord.Uid), ord.Pvd) if one == nil { insertOne, err := db.ZhimengDb.InsertOne(ord) fmt.Println(insertOne)