From cb5eb09bba2e1780b8dba55313dd42e657d5c78d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Thu, 29 Oct 2020 09:50:30 +0800 Subject: [PATCH] job --- business/model/job.go | 2 +- controllers/event_controller.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/business/model/job.go b/business/model/job.go index dc9e74def..74719f598 100644 --- a/business/model/job.go +++ b/business/model/job.go @@ -34,7 +34,7 @@ const ( type Job struct { ModelIDCULD - UserID string `orm:"column(user_id)" json:"thingID"` //发布人ID + UserID string `orm:"column(user_id)" json:"userID"` //发布人ID JobCategoryID int `orm:"column(job_category_id)" json:"jobCategoryID"` //任务类型 JobSpan string `orm:"size(500)" json:"jobSpan"` //任务标签 Title string `orm:"size(255)" json:"title"` //任务标题 diff --git a/controllers/event_controller.go b/controllers/event_controller.go index 4c5271585..d8cc66e64 100644 --- a/controllers/event_controller.go +++ b/controllers/event_controller.go @@ -134,10 +134,10 @@ func (c *EventController) TestWebsocket() { //接受消息 业务逻辑 msgMap[s.GroupID] = s broadcast <- msgMap - go func() { + utils.CallFuncAsync(func() { dao.WrapAddIDCULDEntity(s, "") dao.CreateEntity(db, s) - }() + }) } } }