- 去掉调试代码(门店状态报警只发老板)
This commit is contained in:
@@ -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{}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user