新增: 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user