Commit 795ec807 authored by 黄智's avatar 黄智

Merge remote-tracking branch 'origin/dev' into dev

parents 81f49e5b 5b952906
...@@ -18,6 +18,8 @@ type AlertList struct { ...@@ -18,6 +18,8 @@ type AlertList struct {
PushCount int `json:"push_count"` // 推送次数 PushCount int `json:"push_count"` // 推送次数
LastPushTime jsontime.Time `json:"last_push_time"` // 最近推送时间 LastPushTime jsontime.Time `json:"last_push_time"` // 最近推送时间
Status int `json:"status"` // 状态,1:已恢复 2:未恢复 3:已关闭 Status int `json:"status"` // 状态,1:已恢复 2:未恢复 3:已关闭
IsDisposed int `json:"is_disposed"` // 是否处置(工单管理),1:已处置,2:未处置
DisposalContent string `json:"disposal_content"` // 处置内容(工单管理,结果反馈)
CreatedBy string `json:"created_by" xorm:"'created_by'"` // 创建人 CreatedBy string `json:"created_by" xorm:"'created_by'"` // 创建人
CreatedAt jsontime.Time `json:"created_at" xorm:"'created_at'"` // 创建时间 CreatedAt jsontime.Time `json:"created_at" xorm:"'created_at'"` // 创建时间
UpdatedBy string `json:"updated_by" xorm:"'updated_by'"` // 更新人 UpdatedBy string `json:"updated_by" xorm:"'updated_by'"` // 更新人
......
...@@ -12,8 +12,8 @@ type AddWorkOrderReq struct { ...@@ -12,8 +12,8 @@ type AddWorkOrderReq struct {
// 推送对象 // 推送对象
type PushObj struct { type PushObj struct {
PushMethod int `json:"push_method" binding:"oneof=1 2 3"` // 推送方式(1钉钉 2短信 3all) PushMethod int `json:"push_method" binding:"oneof=1 2 3"` // 推送方式(1钉钉 2短信 3all)
UserObj []UserObj `json:"user_obj" binding:"oneof=1 2 3,dive"` // 用户对象 UserObj []UserObj `json:"user_obj" binding:"dive"` // 用户对象
} }
type UserObj struct { type UserObj struct {
SystemAccount string `json:"system_account" binding:"required"` // 账号 SystemAccount string `json:"system_account" binding:"required"` // 账号
......
...@@ -42,7 +42,9 @@ func (a *AlertListSvc) GetDataById(req request.DetailAlertList) (resp response.A ...@@ -42,7 +42,9 @@ func (a *AlertListSvc) GetDataById(req request.DetailAlertList) (resp response.A
NotificationCount: 3, NotificationCount: 3,
PushCount: 3, PushCount: 3,
LastPushTime: now, LastPushTime: now,
Status: 0, Status: 2,
IsDisposed: 1,
DisposalContent: "已处置完毕,已做恢复操作",
CreatedBy: "admin", CreatedBy: "admin",
CreatedAt: now, CreatedAt: now,
UpdatedBy: "admin", UpdatedBy: "admin",
...@@ -74,6 +76,8 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL ...@@ -74,6 +76,8 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL
PushCount: 3, PushCount: 3,
LastPushTime: now, LastPushTime: now,
Status: 2, Status: 2,
IsDisposed: 1,
DisposalContent: "处置为未恢复",
CreatedBy: "admin", CreatedBy: "admin",
CreatedAt: now, CreatedAt: now,
UpdatedBy: "admin", UpdatedBy: "admin",
...@@ -99,6 +103,8 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL ...@@ -99,6 +103,8 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL
PushCount: 1, PushCount: 1,
LastPushTime: now, LastPushTime: now,
Status: 1, Status: 1,
IsDisposed: 1,
DisposalContent: "处置内容为已恢复",
CreatedBy: "admin", CreatedBy: "admin",
CreatedAt: now, CreatedAt: now,
UpdatedBy: "admin", UpdatedBy: "admin",
......
...@@ -170,11 +170,15 @@ func (w *WorkOrderManageSvc) DetailsWorkOrderManage(id int) (taskManageRes respo ...@@ -170,11 +170,15 @@ func (w *WorkOrderManageSvc) DetailsWorkOrderManage(id int) (taskManageRes respo
//查询任务详情 //查询任务详情
var workOrder entity.WorkOrder var workOrder entity.WorkOrder
finder := db.Table("work_order_manage").Where("id = ?", id) finder := db.Table("work_order_manage").Where("id = ?", id)
_, err = finder.Get(&workOrder) has, err := finder.Get(&workOrder)
if err != nil { if err != nil {
err = resp.DbSelectError.WithError(err) err = resp.DbSelectError.WithError(err)
return return
} }
if !has {
err = resp.DbSelectError.WithError(errors.New("查询为空"))
return
}
err = json.Unmarshal([]byte(workOrder.PushObj), &taskManageRes.PushObj) err = json.Unmarshal([]byte(workOrder.PushObj), &taskManageRes.PushObj)
if err != nil { if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment