From 7276ab65576ec73b439a40d7f1a3035a534b968c Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 20 十月 2023 19:12:40 +0800
Subject: [PATCH] 停止消费时关闭tcp连接

---
 service/task.go |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)

diff --git a/service/task.go b/service/task.go
index 468509e..fbc355f 100644
--- a/service/task.go
+++ b/service/task.go
@@ -186,3 +186,18 @@
 		SetStartTimeMin(nowTs).
 		SetStatus(model.OrderStatusWaitProcess).First()
 }
+
+// SaveTaskStatusSync 淇濆瓨浠诲姟鍚屾淇℃伅
+func (slf TaskService) SaveTaskStatusSync(db *gorm.DB, record *model.TaskStatusSync) (err error) {
+	return model.NewTaskStatusSyncSearch(db).Create(record)
+}
+
+// GetTaskStatusSync 鑾峰彇寰呭悓姝ヤ换鍔′俊鎭�
+func (slf TaskService) GetTaskStatusSync(limit int) ([]*model.TaskStatusSync, error) {
+	return model.NewTaskStatusSyncSearch(nil).SetOrder("id desc").SetPage(1, limit).FindNotTotal()
+}
+
+// RemoveTaskStatusSync 鍒犻櫎鍚屾瀹岀殑璁板綍
+func (slf TaskService) RemoveTaskStatusSync(ids []uint) (err error) {
+	return model.NewTaskStatusSyncSearch(nil).SetIDs(ids).Delete()
+}

--
Gitblit v1.8.0