feat: support ins pause and enable
This commit is contained in:
@@ -16,6 +16,7 @@ type SendTaskInsService struct {
|
||||
|
||||
PageNum int
|
||||
PageSize int
|
||||
Enable int
|
||||
}
|
||||
|
||||
// ValidateDiffWay 各种发信渠道具体字段校验
|
||||
@@ -77,6 +78,10 @@ func (st *SendTaskInsService) Delete() error {
|
||||
return models.DeleteMsgTaskIns(st.ID)
|
||||
}
|
||||
|
||||
func (st *SendTaskInsService) Update(data map[string]interface{}) error {
|
||||
return models.UpdateMsgTaskIns(st.ID, data)
|
||||
}
|
||||
|
||||
func (st *SendTaskInsService) Count() (int, error) {
|
||||
return models.GetSendTasksTotal(st.Name, st.getMaps())
|
||||
}
|
||||
|
||||
@@ -101,6 +101,12 @@ func (sm *SendMessageService) Send() string {
|
||||
sm.LogsAndStatusMark(fmt.Sprintf("实例类型: %s + %s", ins.WayType, ins.ContentType), sm.Status)
|
||||
sm.LogsAndStatusMark(fmt.Sprintf("实例配置: %s", ins.Config), sm.Status)
|
||||
|
||||
// 暂停了实例的发送
|
||||
if ins.Enable != 1 {
|
||||
sm.LogsAndStatusMark("该实例发送已经被暂停,跳过发送!\n", sm.Status)
|
||||
continue
|
||||
}
|
||||
|
||||
// 发送内容校验绑定
|
||||
typeC, content := sm.GetSendMsg(ins.SendTasksIns)
|
||||
if content == "" {
|
||||
|
||||
Reference in New Issue
Block a user