|
@@ -134,7 +134,9 @@ func (dao *PersonnelDao) BatchExecInsert(ctx context.Context, in []*model.Person
|
|
|
_, err = g.DB().Model(dao.Model()).Data(insertData).Insert()
|
|
|
if err != nil {
|
|
|
g.Log().Error(ctx, "batch insert false, --err:", err)
|
|
|
- utils.SendMsgByWXURL(fmt.Sprintf("人员行为统计数据存储异常。\n错误信息:\n%s", err.Error()), g.Config().MustGet(ctx, "webhookURL").Strings())
|
|
|
+ if webhookSwitch := g.Cfg().MustGet(ctx, "webhookSwitch").Bool(); webhookSwitch {
|
|
|
+ utils.SendMsgByWXURL(fmt.Sprintf("人员行为统计数据存储异常。\n错误信息:\n%s", err.Error()), g.Config().MustGet(ctx, "webhookURL").Strings())
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
return
|