+onSysConfigChanged
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
)
|
||||
|
||||
// 带购物平台信息的
|
||||
@@ -579,3 +580,22 @@ func GetStorePriceScoreSnapshot(db *DaoDB, snapDate time.Time) (storePriceScoreS
|
||||
err = GetRows(db, &storePriceScoreSnapshot, sql, sqlParams...)
|
||||
return storePriceScoreSnapshot, err
|
||||
}
|
||||
|
||||
func SetStoreMapSyncStatus(db *DaoDB, vendorID int, storeIDs []int, syncStatus int) (num int64, err error) {
|
||||
globals.SugarLogger.Debugf("SetStoreMapSyncStatus, storeIDs:%v, vendorID:%d", storeIDs, vendorID)
|
||||
|
||||
sql := `
|
||||
UPDATE store_map t1
|
||||
SET t1.sync_status = t1.sync_status | ?
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
syncStatus,
|
||||
}
|
||||
sql += " WHERE t1.deleted_at = ? AND t1.sync_status & ? = 0 AND t1.vendor_id = ?"
|
||||
sqlParams = append(sqlParams, utils.DefaultTimeValue, model.SyncFlagDeletedMask, vendorID)
|
||||
if len(storeIDs) > 0 {
|
||||
sql += " AND t1.store_id IN (" + GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
return ExecuteSQL(db, sql, sqlParams...)
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package model
|
||||
|
||||
import "reflect"
|
||||
|
||||
const (
|
||||
ConfigTypeSys = "Sys"
|
||||
ConfigTypePricePack = "PricePack"
|
||||
@@ -17,12 +15,6 @@ const (
|
||||
ConfigSysMtwmSkuBoxFee = "MtwmSkuBoxFee" // 美团外卖单商品打包费
|
||||
)
|
||||
|
||||
type SysConfigLimit struct {
|
||||
ValueType reflect.Kind
|
||||
MinValue int64
|
||||
MaxValue int64
|
||||
}
|
||||
|
||||
var (
|
||||
ConfigTypeName = map[string]string{
|
||||
ConfigTypeSys: "系统",
|
||||
@@ -31,24 +23,6 @@ var (
|
||||
ConfigTypeBank: "银行",
|
||||
ConfigTypeRole: "角色",
|
||||
}
|
||||
|
||||
SysConfigLimitMap = map[string]*SysConfigLimit{
|
||||
ConfigSysEbaiBoxFee: &SysConfigLimit{
|
||||
ValueType: reflect.Int,
|
||||
MinValue: 0,
|
||||
MaxValue: 500,
|
||||
},
|
||||
ConfigSysMtwmBoxFee: &SysConfigLimit{
|
||||
ValueType: reflect.Int,
|
||||
MinValue: 0,
|
||||
MaxValue: 500,
|
||||
},
|
||||
ConfigSysMtwmSkuBoxFee: &SysConfigLimit{
|
||||
ValueType: reflect.Int,
|
||||
MinValue: 0,
|
||||
MaxValue: 50,
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
type NewConfig struct {
|
||||
|
||||
Reference in New Issue
Block a user