- 去掉调试代码(门店状态报警只发老板)

This commit is contained in:
gazebo
2019-09-19 16:31:24 +08:00
parent 4917b8fca6
commit 72f9852d42
5 changed files with 9 additions and 12 deletions

View File

@@ -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{}

View File

@@ -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)