Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-operation-api
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-operation-api
Commits
795ec807
Commit
795ec807
authored
Jul 06, 2023
by
黄智
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
81f49e5b
5b952906
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
4 deletions
+16
-4
src/bean/entity/alert_list.go
src/bean/entity/alert_list.go
+2
-0
src/bean/vo/request/work_order.go
src/bean/vo/request/work_order.go
+2
-2
src/service/alert_list.go
src/service/alert_list.go
+7
-1
src/service/work_order.go
src/service/work_order.go
+5
-1
No files found.
src/bean/entity/alert_list.go
View file @
795ec807
...
...
@@ -18,6 +18,8 @@ type AlertList struct {
PushCount
int
`json:"push_count"`
// 推送次数
LastPushTime
jsontime
.
Time
`json:"last_push_time"`
// 最近推送时间
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'"`
// 创建人
CreatedAt
jsontime
.
Time
`json:"created_at" xorm:"'created_at'"`
// 创建时间
UpdatedBy
string
`json:"updated_by" xorm:"'updated_by'"`
// 更新人
...
...
src/bean/vo/request/work_order.go
View file @
795ec807
...
...
@@ -13,7 +13,7 @@ type AddWorkOrderReq struct {
// 推送对象
type
PushObj
struct
{
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
{
SystemAccount
string
`json:"system_account" binding:"required"`
// 账号
...
...
src/service/alert_list.go
View file @
795ec807
...
...
@@ -42,7 +42,9 @@ func (a *AlertListSvc) GetDataById(req request.DetailAlertList) (resp response.A
NotificationCount
:
3
,
PushCount
:
3
,
LastPushTime
:
now
,
Status
:
0
,
Status
:
2
,
IsDisposed
:
1
,
DisposalContent
:
"已处置完毕,已做恢复操作"
,
CreatedBy
:
"admin"
,
CreatedAt
:
now
,
UpdatedBy
:
"admin"
,
...
...
@@ -74,6 +76,8 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL
PushCount
:
3
,
LastPushTime
:
now
,
Status
:
2
,
IsDisposed
:
1
,
DisposalContent
:
"处置为未恢复"
,
CreatedBy
:
"admin"
,
CreatedAt
:
now
,
UpdatedBy
:
"admin"
,
...
...
@@ -99,6 +103,8 @@ func (a *AlertListSvc) List(req request.ListAlertList) (resp response.AlertListL
PushCount
:
1
,
LastPushTime
:
now
,
Status
:
1
,
IsDisposed
:
1
,
DisposalContent
:
"处置内容为已恢复"
,
CreatedBy
:
"admin"
,
CreatedAt
:
now
,
UpdatedBy
:
"admin"
,
...
...
src/service/work_order.go
View file @
795ec807
...
...
@@ -170,11 +170,15 @@ func (w *WorkOrderManageSvc) DetailsWorkOrderManage(id int) (taskManageRes respo
//查询任务详情
var
workOrder
entity
.
WorkOrder
finder
:=
db
.
Table
(
"work_order_manage"
)
.
Where
(
"id = ?"
,
id
)
_
,
err
=
finder
.
Get
(
&
workOrder
)
has
,
err
:
=
finder
.
Get
(
&
workOrder
)
if
err
!=
nil
{
err
=
resp
.
DbSelectError
.
WithError
(
err
)
return
}
if
!
has
{
err
=
resp
.
DbSelectError
.
WithError
(
errors
.
New
(
"查询为空"
))
return
}
err
=
json
.
Unmarshal
([]
byte
(
workOrder
.
PushObj
),
&
taskManageRes
.
PushObj
)
if
err
!=
nil
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment