新增: AI工单处理工作台 v1.0
- Go Gin 后端 (19个源文件): 认证、工单CRUD、GLM AI分析、状态流转、备注、操作日志 - Arco Design Vue 前端: 登录、工单列表/详情/创建、AI分析触发与确认 - MySQL 5表: ticket_user/ticket_info/ticket_ai_analysis/ticket_operation_log/ticket_note - 部署: tk.1216.top HTTPS, Nginx反代
This commit is contained in:
28
backend/internal/dto/common.go
Normal file
28
backend/internal/dto/common.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package dto
|
||||
|
||||
type Response struct {
|
||||
Success bool `json:"success"`
|
||||
Retcode int `json:"retcode"`
|
||||
Retinfo string `json:"retinfo"`
|
||||
Result interface{} `json:"result,omitempty"`
|
||||
}
|
||||
|
||||
func Success(data interface{}) Response {
|
||||
return Response{Success: true, Retcode: 0, Retinfo: "", Result: data}
|
||||
}
|
||||
|
||||
func Error(code int, msg string) Response {
|
||||
return Response{Success: false, Retcode: code, Retinfo: msg}
|
||||
}
|
||||
|
||||
func Fail(msg string) Response {
|
||||
return Response{Success: false, Retcode: -1, Retinfo: msg}
|
||||
}
|
||||
|
||||
type UserSession struct {
|
||||
Userid int `json:"userid"`
|
||||
Username string `json:"username"`
|
||||
Account string `json:"account"`
|
||||
Role int16 `json:"role"`
|
||||
Team string `json:"team"`
|
||||
}
|
||||
49
backend/internal/dto/ticket.go
Normal file
49
backend/internal/dto/ticket.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package dto
|
||||
|
||||
type LoginRequest struct {
|
||||
Account string `json:"account" binding:"required"`
|
||||
Password string `json:"password" binding:"required"`
|
||||
}
|
||||
|
||||
type CreateTicketRequest struct {
|
||||
Title string `json:"title" binding:"required"`
|
||||
Content string `json:"content" binding:"required"`
|
||||
Contactname string `json:"contactname" binding:"required"`
|
||||
Contactphone string `json:"contactphone" binding:"required"`
|
||||
Source string `json:"source"`
|
||||
Category string `json:"category"`
|
||||
Priority int16 `json:"priority"`
|
||||
}
|
||||
|
||||
type UpdateTicketRequest struct {
|
||||
Title string `json:"title"`
|
||||
Content string `json:"content"`
|
||||
Contactname string `json:"contactname"`
|
||||
Contactphone string `json:"contactphone"`
|
||||
Category string `json:"category"`
|
||||
Priority int16 `json:"priority"`
|
||||
Handlerid *int `json:"handlerid"`
|
||||
}
|
||||
|
||||
type UpdateStatusRequest struct {
|
||||
Status int16 `json:"status" binding:"required"`
|
||||
}
|
||||
|
||||
type TicketListQuery struct {
|
||||
Status int16 `form:"status"`
|
||||
Category string `form:"category"`
|
||||
Priority int16 `form:"priority"`
|
||||
Keyword string `form:"keyword"`
|
||||
Page int `form:"page"`
|
||||
PageSize int `form:"pageSize"`
|
||||
}
|
||||
|
||||
type ConfirmAnalysisRequest struct {
|
||||
Category string `json:"category"`
|
||||
Priority int16 `json:"priority"`
|
||||
Summary string `json:"summary"`
|
||||
}
|
||||
|
||||
type AddNoteRequest struct {
|
||||
Content string `json:"content" binding:"required"`
|
||||
}
|
||||
Reference in New Issue
Block a user