From d52062883789c7949dbc5397967d9cc5edd6030b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E5=AE=97=E6=A5=A0?= Date: Thu, 2 Jun 2022 15:10:13 +0800 Subject: [PATCH] 1 --- business/jxstore/cms/store_responsible_person_config.go | 9 +++------ business/jxstore/cms/store_test.go | 4 ++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/business/jxstore/cms/store_responsible_person_config.go b/business/jxstore/cms/store_responsible_person_config.go index cdf88195f..387e293a3 100644 --- a/business/jxstore/cms/store_responsible_person_config.go +++ b/business/jxstore/cms/store_responsible_person_config.go @@ -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}) diff --git a/business/jxstore/cms/store_test.go b/business/jxstore/cms/store_test.go index 4d405acd4..700351c9c 100644 --- a/business/jxstore/cms/store_test.go +++ b/business/jxstore/cms/store_test.go @@ -151,3 +151,7 @@ func TestQueryPageStores2(t *testing.T) { }) } } + +func TestUpdate(t *testing.T) { + UpdateStoreOperatorConfig() +} \ No newline at end of file