同步菜市物料到果园收工,加到果园每晚上的任务中
This commit is contained in:
@@ -4462,11 +4462,9 @@ func SyncMatterC4ToGy(ctx *jxcontext.Context, isContinueWhenError, isAsync bool)
|
||||
AND deleted_at = ?
|
||||
`
|
||||
sqlParams := []interface{}{v.SpecQuality, v.SpecUnit, v.EclpID, ctx.GetUserName(), v.EclpID, utils.DefaultTimeValue}
|
||||
if num1, err := dao.ExecuteSQL(db, sql, sqlParams); err != nil {
|
||||
if _, err = dao.ExecuteSQL(db, sql, sqlParams); err != nil {
|
||||
dao.Rollback(db)
|
||||
return retVal, err
|
||||
} else {
|
||||
fmt.Println("test11111111111111111111111111111", num1)
|
||||
}
|
||||
}
|
||||
if skuName != nil {
|
||||
@@ -4480,11 +4478,9 @@ func SyncMatterC4ToGy(ctx *jxcontext.Context, isContinueWhenError, isAsync bool)
|
||||
`
|
||||
sqlParams := []interface{}{skuName.Name, skuName.Img, skuName.Img2, skuName.DescImg, skuName.Unit, skuName.Price,
|
||||
ctx.GetUserName(), v.EclpID, utils.DefaultTimeValue}
|
||||
if num2, err := dao.ExecuteSQL(db, sql, sqlParams); err != nil {
|
||||
if _, err = dao.ExecuteSQL(db, sql, sqlParams); err != nil {
|
||||
dao.Rollback(db)
|
||||
return retVal, err
|
||||
} else {
|
||||
fmt.Println("test22222222222222222222222222222", num2)
|
||||
}
|
||||
}
|
||||
sql = `
|
||||
|
||||
@@ -218,6 +218,11 @@ func Init() {
|
||||
cms.AutoSaleStoreSku(jxcontext.AdminCtx, nil, false)
|
||||
}, autoSaleStoreSkuTimeList)
|
||||
|
||||
if beego.BConfig.RunMode == "jxgy" {
|
||||
ScheduleTimerFunc("SyncMatterC4ToGy", func() {
|
||||
cms.SyncMatterC4ToGy(jxcontext.AdminCtx, true, true)
|
||||
}, dailyWorkTimeList)
|
||||
}
|
||||
if beego.BConfig.RunMode == "beta" {
|
||||
ScheduleTimerFunc("CancelPayTimeOutOrder", func() {
|
||||
localjx.CancelPayTimeOutOrder(jxcontext.AdminCtx)
|
||||
|
||||
Reference in New Issue
Block a user