同步商品水印改为只打标机
This commit is contained in:
@@ -713,12 +713,14 @@ func buildSetFinishHook(task tasksch.ITask, ctx *jxcontext.Context) {
|
|||||||
globals.SugarLogger.Debugf("同步错误发送钉钉消息失败, authinfo [%v] , [%v]", *authInfo, err)
|
globals.SugarLogger.Debugf("同步错误发送钉钉消息失败, authinfo [%v] , [%v]", *authInfo, err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if time.Now().Hour() >= 20 || time.Now().Hour() < 7 {
|
if len(task.GetFailedList()) > 1 {
|
||||||
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
|
if time.Now().Hour() >= 20 || time.Now().Hour() < 7 {
|
||||||
user, err := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913")
|
downloadURL, _, _ := WirteToExcelBySyncFailed(task)
|
||||||
noticeMsg += fmt.Sprintf("[详情点我]%s/billshow/?normal=true&path=%s \n", globals.BackstageHost, downloadURL)
|
user, err := dao.GetUserByID(dao.GetDB(), "mobile", "18160030913")
|
||||||
if user != nil && err == nil {
|
noticeMsg += fmt.Sprintf("[详情点我]%s/billshow/?normal=true&path=%s \n", globals.BackstageHost, downloadURL)
|
||||||
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "同步错误返回", noticeMsg)
|
if user != nil && err == nil {
|
||||||
|
ddmsg.SendUserMessage(dingdingapi.MsgTyeText, user.UserID, "同步错误返回", noticeMsg)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1235,9 +1237,12 @@ func SyncSkuExperfixAndWatermark(ctx *jxcontext.Context) (err error) {
|
|||||||
for _, v := range skuIDs {
|
for _, v := range skuIDs {
|
||||||
OnUpdateThing(ctx, db, nil, int64(v), model.ThingTypeSku)
|
OnUpdateThing(ctx, db, nil, int64(v), model.ThingTypeSku)
|
||||||
}
|
}
|
||||||
CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, true, true, ctx.GetUserName())
|
// CurVendorSync.SyncSkus(ctx, db, nil, skuIDs, true, true, ctx.GetUserName())
|
||||||
} else {
|
} else {
|
||||||
CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{skuExinfo.VendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, true, true)
|
if len(skuIDs) > 0 {
|
||||||
|
SetStoreSkuSyncStatus2(db, nil, []int{skuExinfo.VendorID}, skuIDs, model.SyncFlagModifiedMask)
|
||||||
|
}
|
||||||
|
// CurVendorSync.SyncStoresSkus2(ctx, nil, 0, db, []int{skuExinfo.VendorID}, nil, false, skuIDs, nil, model.SyncFlagModifiedMask, true, true)
|
||||||
}
|
}
|
||||||
return retVal, err
|
return retVal, err
|
||||||
}, skuExinfos)
|
}, skuExinfos)
|
||||||
|
|||||||
@@ -390,6 +390,9 @@ func doDailyWork2() {
|
|||||||
func doDailyWork() {
|
func doDailyWork() {
|
||||||
globals.SugarLogger.Debug("doDailyWork")
|
globals.SugarLogger.Debug("doDailyWork")
|
||||||
|
|
||||||
|
//同步商品额外前缀和水印图(打标记)
|
||||||
|
cms.SyncSkuExperfixAndWatermark(jxcontext.AdminCtx)
|
||||||
|
|
||||||
dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus)
|
dao.SetStoresMapSyncStatus(dao.GetDB(), nil, nil, model.SyncFlagStoreStatus)
|
||||||
cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), nil, nil, true, true)
|
cms.CurVendorSync.SyncStore2(jxcontext.AdminCtx, dao.GetDB(), nil, nil, true, true)
|
||||||
|
|
||||||
@@ -419,8 +422,6 @@ func doDailyWork() {
|
|||||||
orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, time.Now().AddDate(0, 0, -3).Format("20060102"), time.Now().Format("20060102"))
|
orderman.RefreshJdShopOrdersEarningPrice(jxcontext.AdminCtx, time.Now().AddDate(0, 0, -3).Format("20060102"), time.Now().Format("20060102"))
|
||||||
//同步上架京东商城待售商品
|
//同步上架京东商城待售商品
|
||||||
cms.RefreshJdsSkusStatus(jxcontext.AdminCtx)
|
cms.RefreshJdsSkusStatus(jxcontext.AdminCtx)
|
||||||
//同步商品额外前缀和水印图
|
|
||||||
cms.SyncSkuExperfixAndWatermark(jxcontext.AdminCtx)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func RefreshRealMobile(ctx *jxcontext.Context, vendorID int, fromTime, toTime time.Time, isAsync, isContinueWhenError bool) (hint string, err error) {
|
func RefreshRealMobile(ctx *jxcontext.Context, vendorID int, fromTime, toTime time.Time, isAsync, isContinueWhenError bool) (hint string, err error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user