This commit is contained in:
邹宗楠
2022-06-02 14:40:22 +08:00
parent 6ffd572c59
commit 3173f8e5b3
3 changed files with 6 additions and 3 deletions

View File

@@ -50,6 +50,8 @@ func UpdateStoreOperatorConfig() {
globals.SugarLogger.Debug("Marshal err :", err)
return
}
globals.SugarLogger.Debug("=============222222",userData)
globals.SugarLogger.Debug("=============222222",string(byteData))
if err := dao.UpdateOperatorConfig(string(byteData)); err != nil {
globals.SugarLogger.Debug("update new_config err :", err)
return

View File

@@ -186,7 +186,7 @@ func Init() {
})
ScheduleTimerFuncByInterval(func() {
cms.UpdateStoreOperatorConfig()
}, 10*time.Second, 5*time.Minute)
}, 10*time.Second, 2*time.Minute)
ScheduleTimerFuncByInterval(func() {
defsch.FixedScheduler.ConfirmSelfTakeOrders(jxcontext.AdminCtx, []int{model.VendorIDJD}, time.Now().Add(-48*time.Hour), time.Now().Add(-30*time.Minute), true, true)

View File

@@ -3,6 +3,7 @@ package dao
import (
"fmt"
"git.rosy.net.cn/baseapi/utils/errlist"
"time"
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/model"
@@ -62,7 +63,7 @@ func GetSysConfigAsInt64(db *DaoDB, key string) (value int64, err error) {
// 修改配置
func UpdateOperatorConfig(param string) error {
sql := `UPDATE new_config c SET c.value = ? WHERE c.type = ? AND c.key = ?`
_, err := ExecuteSQL(GetDB(), sql, []interface{}{param, "Sys", "FZR"})
sql := `UPDATE new_config c SET c.value = ?,c.updated_at = ? WHERE c.type = ? AND c.key = ?`
_, err := ExecuteSQL(GetDB(), sql, []interface{}{param, time.Now(), "Sys", "FZR"})
return err
}