1
This commit is contained in:
@@ -9,9 +9,8 @@ import (
|
||||
|
||||
// 更新门店负责人信息
|
||||
func UpdateStoreOperatorConfig() {
|
||||
globals.SugarLogger.Debug("======测试输出")
|
||||
db := dao.GetDB()
|
||||
store, err := dao.GetStoreList(db, nil, nil, nil, nil, nil, "")
|
||||
store, err := dao.GetStoreList(db, nil, nil, []int{-1, 0, 1}, nil, nil, "")
|
||||
if err != nil {
|
||||
globals.SugarLogger.Debug("定时任务,获取所有门店信息错误")
|
||||
return
|
||||
@@ -50,8 +49,6 @@ 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
|
||||
@@ -59,12 +56,12 @@ func UpdateStoreOperatorConfig() {
|
||||
return
|
||||
}
|
||||
|
||||
func Map2Slice(param map[string]string) [][]interface{}{
|
||||
func Map2Slice(param map[string]string) [][]interface{} {
|
||||
if len(param) <= 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
result := make([][]interface{}, len(param), 0)
|
||||
result := make([][]interface{}, 0, 0)
|
||||
for k, v := range param {
|
||||
phone, _ := strconv.Atoi(v)
|
||||
result = append(result, []interface{}{k, phone})
|
||||
|
||||
@@ -151,3 +151,7 @@ func TestQueryPageStores2(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestUpdate(t *testing.T) {
|
||||
UpdateStoreOperatorConfig()
|
||||
}
|
||||
Reference in New Issue
Block a user