1
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user