From 72f9852d424a6a36b015f52a7ed983625ab1daae Mon Sep 17 00:00:00 2001 From: gazebo Date: Thu, 19 Sep 2019 16:31:24 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=8E=BB=E6=8E=89=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=88=E9=97=A8=E5=BA=97=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E6=8A=A5=E8=AD=A6=E5=8F=AA=E5=8F=91=E8=80=81=E6=9D=BF=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- business/jxstore/cms/store.go | 3 --- business/jxstore/cms/store_test.go | 4 ++-- business/jxutils/ddmsg/ddmsg.go | 4 ++-- business/jxutils/msg/msg.go | 2 +- business/model/common.go | 8 ++++---- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 9a9aa6940..81bb6f7b4 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -1683,9 +1683,6 @@ func SendAlarmVendorSnapshot(ctx *jxcontext.Context, parentTask tasksch.ITask, p task := tasksch.NewParallelTask("SendAlarmVendorSnapshot", tasksch.NewParallelConfig().SetIsContinueWhenError(true), ctx, func(task *tasksch.ParallelTask, batchItemList []interface{}, params ...interface{}) (retVal interface{}, err error) { user := batchItemList[0].(*model.User) - if user.GetMobile() != "18048531223" { - return nil, nil - } var excelURL string if user.Type&model.UserTypeOperator != 0 { var dataList []map[string]interface{} diff --git a/business/jxstore/cms/store_test.go b/business/jxstore/cms/store_test.go index e934e2886..bb39605e4 100644 --- a/business/jxstore/cms/store_test.go +++ b/business/jxstore/cms/store_test.go @@ -20,8 +20,8 @@ func TestGetStoresVendorSnapshot(t *testing.T) { func TestSendAlarmVendorSnapshot(t *testing.T) { db := dao.GetDB() - prevSnapshotList, _ := dao.GetVendorStoreSnapshot(db, utils.Str2Time("2019-09-17 08:00:00")) - curSnapshotList, _ := dao.GetVendorStoreSnapshot(db, utils.Str2Time("2019-09-17 10:00:00")) + prevSnapshotList, _ := dao.GetVendorStoreSnapshot(db, utils.Str2Time("2019-09-19 11:00:00")) + curSnapshotList, _ := dao.GetVendorStoreSnapshot(db, utils.Str2Time("2019-09-19 15:00:00")) err := SendAlarmVendorSnapshot(jxcontext.AdminCtx, nil, prevSnapshotList, curSnapshotList) if err != nil { t.Fatal(err) diff --git a/business/jxutils/ddmsg/ddmsg.go b/business/jxutils/ddmsg/ddmsg.go index 767e27269..5c1a3b6d3 100644 --- a/business/jxutils/ddmsg/ddmsg.go +++ b/business/jxutils/ddmsg/ddmsg.go @@ -12,7 +12,7 @@ import ( ) func SendDDUserMessage(msgType, ddUserID, title, content string) (err error) { - globals.SugarLogger.Debugf("SendDDUserMessage ddUserID:%s, title:%s, content:%s", ddUserID, title, content) + globals.SugarLogger.Debugf("SendDDUserMessage ddUserID:%s, title:%s", ddUserID, title) if globals.IsProductEnv() { if msgType == dingdingapi.MsgTyeText { err = api.DingDingAPI.CorpAsyncSendSimple(ddUserID, content) @@ -24,7 +24,7 @@ func SendDDUserMessage(msgType, ddUserID, title, content string) (err error) { } func SendUserMessage(msgType, userID, title, content string) (err error) { - globals.SugarLogger.Debugf("SendUserMessage userID:%s, title:%s, content:%s", userID, title, content) + globals.SugarLogger.Debugf("SendUserMessage userID:%s, title:%s", userID, title) authList, err := auth2.GetUserBindAuthInfo(userID) findOneMethod := false if err == nil { diff --git a/business/jxutils/msg/msg.go b/business/jxutils/msg/msg.go index d732764bd..8265d5da2 100644 --- a/business/jxutils/msg/msg.go +++ b/business/jxutils/msg/msg.go @@ -19,7 +19,7 @@ const weixinTemplateID4StoreStatusChanged = "Fl0vOnBKTQqRFx3-shGKxdCnxMdQXNeODzg // todo msgType不依赖于钉钉 func SendUserMessage(msgType string, user *model.User, title, content string) (err error) { userID := user.GetID() - globals.SugarLogger.Debugf("SendUserMessage userID:%s, title:%s, content:%s", userID, title, content) + globals.SugarLogger.Debugf("SendUserMessage userID:%s, title:%s", userID, title) authList, err := auth2.GetUserBindAuthInfo(userID) findOneMethod := false if err == nil { diff --git a/business/model/common.go b/business/model/common.go index 6f1f886c3..d5dd49904 100644 --- a/business/model/common.go +++ b/business/model/common.go @@ -18,8 +18,8 @@ type DataResource struct { ResoureType string `orm:"size(48)" json:"resoureType"` // 资料的mime type Name string `orm:"size(48);index" json:"name"` - MainURL string `orm:"size(1024);column(main_url);index" json:"mainURL"` - QiniuURL string `orm:"size(1024);column(qiniu_url);index" json:"qiniuURL"` - EbaiURL string `orm:"size(1024);column(ebai_url);index" json:"ebaiURL"` - MtwmURL string `orm:"size(1024);column(mtwm_url);index" json:"mtwmURL"` + MainURL string `orm:"size(512);column(main_url);index" json:"mainURL"` + QiniuURL string `orm:"size(512);column(qiniu_url);index" json:"qiniuURL"` + EbaiURL string `orm:"size(512);column(ebai_url);index" json:"ebaiURL"` + MtwmURL string `orm:"size(512);column(mtwm_url);index" json:"mtwmURL"` }