mirror of
https://github.com/lzh-1625/go_process_manager.git
synced 2025-10-16 13:00:52 +08:00
update gin handle
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package api
|
package api
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"reflect"
|
"reflect"
|
||||||
|
|
||||||
"github.com/lzh-1625/go_process_manager/internal/app/constants"
|
"github.com/lzh-1625/go_process_manager/internal/app/constants"
|
||||||
@@ -10,17 +9,6 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
|
|
||||||
func rOk(ctx *gin.Context, message string, data any) {
|
|
||||||
jsonData := map[string]any{
|
|
||||||
"code": 0,
|
|
||||||
"msg": message,
|
|
||||||
}
|
|
||||||
if data != nil {
|
|
||||||
jsonData["data"] = data
|
|
||||||
}
|
|
||||||
ctx.JSON(http.StatusOK, jsonData)
|
|
||||||
}
|
|
||||||
|
|
||||||
func getRole(ctx *gin.Context) constants.Role {
|
func getRole(ctx *gin.Context) constants.Role {
|
||||||
if v, ok := ctx.Get(constants.CTXFLG_ROLE); ok {
|
if v, ok := ctx.Get(constants.CTXFLG_ROLE); ok {
|
||||||
return v.(constants.Role)
|
return v.(constants.Role)
|
||||||
@@ -39,3 +27,40 @@ func isAdmin(ctx *gin.Context) bool {
|
|||||||
func hasOprPermission(ctx *gin.Context, uuid int, op constants.OprPermission) bool {
|
func hasOprPermission(ctx *gin.Context, uuid int, op constants.OprPermission) bool {
|
||||||
return isAdmin(ctx) || reflect.ValueOf(repository.PermissionRepository.GetPermission(getUserName(ctx), uuid)).FieldByName(string(op)).Bool()
|
return isAdmin(ctx) || reflect.ValueOf(repository.PermissionRepository.GetPermission(getUserName(ctx), uuid)).FieldByName(string(op)).Bool()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Response struct {
|
||||||
|
StatusCode int
|
||||||
|
Code int
|
||||||
|
Data any
|
||||||
|
Msg string
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewResponse() *Response {
|
||||||
|
return &Response{StatusCode: 200}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Response) SetStatusCode(code int) *Response {
|
||||||
|
r.StatusCode = code
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Response) SetDate(data any) *Response {
|
||||||
|
r.Data = data
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Response) SetCode(code int) *Response {
|
||||||
|
r.Code = code
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
|
||||||
|
func (r *Response) SetMessage(msg any) *Response {
|
||||||
|
if str, ok := msg.(string); ok {
|
||||||
|
r.Msg = str
|
||||||
|
} else {
|
||||||
|
if err, ok := msg.(error); ok {
|
||||||
|
r.Msg = err.Error()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
@@ -2,6 +2,7 @@ package api
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/lzh-1625/go_process_manager/internal/app/logic"
|
"github.com/lzh-1625/go_process_manager/internal/app/logic"
|
||||||
|
"github.com/lzh-1625/go_process_manager/internal/app/model"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
)
|
)
|
||||||
@@ -10,10 +11,8 @@ type configApi struct{}
|
|||||||
|
|
||||||
var ConfigApi = new(configApi)
|
var ConfigApi = new(configApi)
|
||||||
|
|
||||||
func (c *configApi) GetSystemConfiguration(ctx *gin.Context, _ any) error {
|
func (c *configApi) GetSystemConfiguration(ctx *gin.Context, _ any) []model.SystemConfigurationVo {
|
||||||
result := logic.ConfigLogic.GetSystemConfiguration()
|
return logic.ConfigLogic.GetSystemConfiguration()
|
||||||
rOk(ctx, "Operation successful!", result)
|
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *configApi) SetSystemConfiguration(ctx *gin.Context, _ any) (err error) {
|
func (c *configApi) SetSystemConfiguration(ctx *gin.Context, _ any) (err error) {
|
||||||
|
@@ -11,27 +11,25 @@ type file struct{}
|
|||||||
|
|
||||||
var FileApi = new(file)
|
var FileApi = new(file)
|
||||||
|
|
||||||
func (f *file) FilePathHandler(ctx *gin.Context, req model.FilePathHandlerReq) (err error) {
|
func (f *file) FilePathHandler(ctx *gin.Context, req model.FilePathHandlerReq) []model.FileStruct {
|
||||||
rOk(ctx, "Operation successful!", logic.FileLogic.GetFileAndDirByPath(req.Path))
|
return logic.FileLogic.GetFileAndDirByPath(req.Path)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *file) FileWriteHandler(ctx *gin.Context, _ any) (err error) {
|
func (f *file) FileWriteHandler(ctx *gin.Context, _ any) (err error) {
|
||||||
path := ctx.PostForm("filePath")
|
path := ctx.PostForm("filePath")
|
||||||
fi, err := ctx.FormFile("data")
|
fi, err := ctx.FormFile("data")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return err
|
||||||
}
|
}
|
||||||
fiReader, _ := fi.Open()
|
fiReader, _ := fi.Open()
|
||||||
err = logic.FileLogic.UpdateFileData(path, fiReader, fi.Size)
|
err = logic.FileLogic.UpdateFileData(path, fiReader, fi.Size)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *file) FileReadHandler(ctx *gin.Context, req model.FileReadHandlerReq) (err error) {
|
func (f *file) FileReadHandler(ctx *gin.Context, req model.FileReadHandlerReq) any {
|
||||||
bytes, err := logic.FileLogic.ReadFileFromPath(req.FilePath)
|
bytes, err := logic.FileLogic.ReadFileFromPath(req.FilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return err
|
||||||
}
|
}
|
||||||
rOk(ctx, "Operation successful!", string(bytes))
|
return string(bytes)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
@@ -16,9 +16,9 @@ type logApi struct{}
|
|||||||
|
|
||||||
var LogApi = new(logApi)
|
var LogApi = new(logApi)
|
||||||
|
|
||||||
func (a *logApi) GetLog(ctx *gin.Context, req model.GetLogReq) (err error) {
|
func (a *logApi) GetLog(ctx *gin.Context, req model.GetLogReq) any {
|
||||||
if isAdmin(ctx) {
|
if isAdmin(ctx) {
|
||||||
rOk(ctx, "Query successful!", logic.LogLogicImpl.Search(req, req.FilterName...))
|
return logic.LogLogicImpl.Search(req, req.FilterName...)
|
||||||
} else {
|
} else {
|
||||||
processNameList := repository.PermissionRepository.GetProcessNameByPermission(getUserName(ctx), constants.OPERATION_LOG)
|
processNameList := repository.PermissionRepository.GetProcessNameByPermission(getUserName(ctx), constants.OPERATION_LOG)
|
||||||
filterName := slices.DeleteFunc(req.FilterName, func(s string) bool {
|
filterName := slices.DeleteFunc(req.FilterName, func(s string) bool {
|
||||||
@@ -30,12 +30,10 @@ func (a *logApi) GetLog(ctx *gin.Context, req model.GetLogReq) (err error) {
|
|||||||
if len(filterName) == 0 {
|
if len(filterName) == 0 {
|
||||||
return errors.New("no information found")
|
return errors.New("no information found")
|
||||||
}
|
}
|
||||||
rOk(ctx, "Query successful!", logic.LogLogicImpl.Search(req, filterName...))
|
return logic.LogLogicImpl.Search(req, filterName...)
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *logApi) GetRunningLog(ctx *gin.Context, _ any) error {
|
func (a *logApi) GetRunningLog(ctx *gin.Context, _ any) int {
|
||||||
rOk(ctx, "Query successful!", logic.Loghandler.GetRunning())
|
return logic.Loghandler.GetRunning()
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
@@ -15,8 +15,6 @@ func (p *permissionApi) EditPermssion(ctx *gin.Context, req model.Permission) (e
|
|||||||
return repository.PermissionRepository.EditPermssion(req)
|
return repository.PermissionRepository.EditPermssion(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *permissionApi) GetPermissionList(ctx *gin.Context, req model.GetPermissionListReq) (err error) {
|
func (p *permissionApi) GetPermissionList(ctx *gin.Context, req model.GetPermissionListReq) any {
|
||||||
result := repository.PermissionRepository.GetPermssionList(req.Account)
|
return repository.PermissionRepository.GetPermssionList(req.Account)
|
||||||
rOk(ctx, "Query successful!", result)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
@@ -17,7 +17,7 @@ type procApi struct{}
|
|||||||
|
|
||||||
var ProcApi = new(procApi)
|
var ProcApi = new(procApi)
|
||||||
|
|
||||||
func (p *procApi) CreateNewProcess(ctx *gin.Context, req model.Process) (err error) {
|
func (p *procApi) CreateNewProcess(ctx *gin.Context, req model.Process) any {
|
||||||
index, err := repository.ProcessRepository.AddProcessConfig(req)
|
index, err := repository.ProcessRepository.AddProcessConfig(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -28,10 +28,9 @@ func (p *procApi) CreateNewProcess(ctx *gin.Context, req model.Process) (err err
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
logic.ProcessCtlLogic.AddProcess(req.Uuid, proc)
|
logic.ProcessCtlLogic.AddProcess(req.Uuid, proc)
|
||||||
rOk(ctx, "Operation successful!", gin.H{
|
return gin.H{
|
||||||
"id": req.Uuid,
|
"id": req.Uuid,
|
||||||
})
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *procApi) DeleteNewProcess(ctx *gin.Context, req model.ProcessUuidReq) (err error) {
|
func (p *procApi) DeleteNewProcess(ctx *gin.Context, req model.ProcessUuidReq) (err error) {
|
||||||
@@ -84,13 +83,12 @@ func (p *procApi) KillAllProcess(ctx *gin.Context, _ any) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *procApi) GetProcessList(ctx *gin.Context, _ any) (err error) {
|
func (p *procApi) GetProcessList(ctx *gin.Context, _ any) any {
|
||||||
if isAdmin(ctx) {
|
if isAdmin(ctx) {
|
||||||
rOk(ctx, "Query successful!", logic.ProcessCtlLogic.GetProcessList())
|
return logic.ProcessCtlLogic.GetProcessList()
|
||||||
} else {
|
} else {
|
||||||
rOk(ctx, "Query successful!", logic.ProcessCtlLogic.GetProcessListByUser(getUserName(ctx)))
|
return logic.ProcessCtlLogic.GetProcessListByUser(getUserName(ctx))
|
||||||
}
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *procApi) UpdateProcessConfig(ctx *gin.Context, req model.Process) (err error) {
|
func (p *procApi) UpdateProcessConfig(ctx *gin.Context, req model.Process) (err error) {
|
||||||
@@ -99,13 +97,12 @@ func (p *procApi) UpdateProcessConfig(ctx *gin.Context, req model.Process) (err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *procApi) GetProcessConfig(ctx *gin.Context, req model.ProcessUuidReq) (err error) {
|
func (p *procApi) GetProcessConfig(ctx *gin.Context, req model.ProcessUuidReq) any {
|
||||||
data, err := repository.ProcessRepository.GetProcessConfigById(req.Uuid)
|
data, err := repository.ProcessRepository.GetProcessConfigById(req.Uuid)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
rOk(ctx, "success", data)
|
return data
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *procApi) ProcessControl(ctx *gin.Context, req model.ProcessUuidReq) (err error) {
|
func (p *procApi) ProcessControl(ctx *gin.Context, req model.ProcessUuidReq) (err error) {
|
||||||
@@ -118,9 +115,9 @@ func (p *procApi) ProcessControl(ctx *gin.Context, req model.ProcessUuidReq) (er
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *procApi) ProcessCreateShare(ctx *gin.Context, req model.ProcessShare) (err error) {
|
func (p *procApi) ProcessCreateShare(ctx *gin.Context, req model.ProcessShare) any {
|
||||||
token := utils.UnwarpIgnore(uuid.NewRandom()).String()
|
token := utils.UnwarpIgnore(uuid.NewRandom()).String()
|
||||||
if err = repository.WsShare.AddShareData(model.WsShare{
|
if err := repository.WsShare.AddShareData(model.WsShare{
|
||||||
ExpireTime: time.Now().Add(time.Minute * time.Duration(req.Minutes)),
|
ExpireTime: time.Now().Add(time.Minute * time.Duration(req.Minutes)),
|
||||||
Write: req.Write,
|
Write: req.Write,
|
||||||
Token: token,
|
Token: token,
|
||||||
@@ -129,8 +126,7 @@ func (p *procApi) ProcessCreateShare(ctx *gin.Context, req model.ProcessShare) (
|
|||||||
}); err != nil {
|
}); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
rOk(ctx, "Operation successful!", gin.H{
|
return gin.H{
|
||||||
"token": token,
|
"token": token,
|
||||||
})
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
@@ -11,27 +11,22 @@ type pushApi struct{}
|
|||||||
|
|
||||||
var PushApi = new(pushApi)
|
var PushApi = new(pushApi)
|
||||||
|
|
||||||
func (p *pushApi) GetPushList(ctx *gin.Context, __ any) (err error) {
|
func (p *pushApi) GetPushList(ctx *gin.Context, __ any) any {
|
||||||
rOk(ctx, "Query successful!", repository.PushRepository.GetPushList())
|
return repository.PushRepository.GetPushList()
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *pushApi) GetPushById(ctx *gin.Context, req model.PushIdReq) (err error) {
|
func (p *pushApi) GetPushById(ctx *gin.Context, req model.PushIdReq) any {
|
||||||
rOk(ctx, "Query successful!", repository.PushRepository.GetPushConfigById(req.Id))
|
return repository.PushRepository.GetPushConfigById(req.Id)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *pushApi) AddPushConfig(ctx *gin.Context, req model.Push) (err error) {
|
func (p *pushApi) AddPushConfig(ctx *gin.Context, req model.Push) (err error) {
|
||||||
err = repository.PushRepository.AddPushConfig(req)
|
return repository.PushRepository.AddPushConfig(req)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *pushApi) UpdatePushConfig(ctx *gin.Context, req model.Push) (err error) {
|
func (p *pushApi) UpdatePushConfig(ctx *gin.Context, req model.Push) (err error) {
|
||||||
err = repository.PushRepository.UpdatePushConfig(req)
|
return repository.PushRepository.UpdatePushConfig(req)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (p *pushApi) DeletePushConfig(ctx *gin.Context, req model.PushIdReq) (err error) {
|
func (p *pushApi) DeletePushConfig(ctx *gin.Context, req model.PushIdReq) (err error) {
|
||||||
err = repository.PushRepository.DeletePushConfig(req.Id)
|
return repository.PushRepository.DeletePushConfig(req.Id)
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
@@ -16,19 +16,16 @@ func (t *taskApi) CreateTask(ctx *gin.Context, req model.Task) (err error) {
|
|||||||
return logic.TaskLogic.CreateTask(req)
|
return logic.TaskLogic.CreateTask(req)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *taskApi) GetTaskById(ctx *gin.Context, req model.TaskIdReq) (err error) {
|
func (t *taskApi) GetTaskById(ctx *gin.Context, req model.TaskIdReq) any {
|
||||||
result, err := repository.TaskRepository.GetTaskById(req.Id)
|
result, err := repository.TaskRepository.GetTaskById(req.Id)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
rOk(ctx, "Operation successful!", result)
|
return result
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *taskApi) GetTaskList(ctx *gin.Context, _ any) (err error) {
|
func (t *taskApi) GetTaskList(ctx *gin.Context, _ any) any {
|
||||||
result := logic.TaskLogic.GetAllTaskJob()
|
return logic.TaskLogic.GetAllTaskJob()
|
||||||
rOk(ctx, "Operation successful!", result)
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *taskApi) DeleteTaskById(ctx *gin.Context, req model.TaskIdReq) (err error) {
|
func (t *taskApi) DeleteTaskById(ctx *gin.Context, req model.TaskIdReq) (err error) {
|
||||||
|
@@ -18,20 +18,19 @@ var UserApi = new(userApi)
|
|||||||
|
|
||||||
const DEFAULT_ROOT_PASSWORD = "root"
|
const DEFAULT_ROOT_PASSWORD = "root"
|
||||||
|
|
||||||
func (u *userApi) LoginHandler(ctx *gin.Context, req model.LoginHandlerReq) (err error) {
|
func (u *userApi) LoginHandler(ctx *gin.Context, req model.LoginHandlerReq) any {
|
||||||
if !u.checkLoginInfo(req.Account, req.Password) {
|
if !u.checkLoginInfo(req.Account, req.Password) {
|
||||||
return errors.New("incorrect username or password")
|
return errors.New("incorrect username or password")
|
||||||
}
|
}
|
||||||
token, err := utils.GenToken(req.Account)
|
token, err := utils.GenToken(req.Account)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return err
|
||||||
}
|
}
|
||||||
rOk(ctx, "Operation successful!", gin.H{
|
return gin.H{
|
||||||
"token": token,
|
"token": token,
|
||||||
"username": req.Account,
|
"username": req.Account,
|
||||||
"role": repository.UserRepository.GetUserByName(req.Account).Role,
|
"role": repository.UserRepository.GetUserByName(req.Account).Role,
|
||||||
})
|
}
|
||||||
return
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *userApi) CreateUser(ctx *gin.Context, req model.User) (err error) {
|
func (u *userApi) CreateUser(ctx *gin.Context, req model.User) (err error) {
|
||||||
@@ -74,9 +73,8 @@ func (u *userApi) DeleteUser(ctx *gin.Context, req model.User) (err error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *userApi) GetUserList(ctx *gin.Context, _ any) error {
|
func (u *userApi) GetUserList(ctx *gin.Context, _ any) any {
|
||||||
rOk(ctx, "Query successful!", repository.UserRepository.GetUserList())
|
return repository.UserRepository.GetUserList()
|
||||||
return nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *userApi) checkLoginInfo(account, password string) bool {
|
func (u *userApi) checkLoginInfo(account, password string) bool {
|
||||||
|
@@ -197,13 +197,10 @@ func (w *wsApi) startWsConnect(wci *WsConnetInstance, cancel context.CancelFunc,
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetWsShareList(ctx *gin.Context) {
|
func GetWsShareList(ctx *gin.Context, _ any) any {
|
||||||
rOk(ctx, "Operation successful!", logic.WsSahreLogic.GetWsShareList())
|
return logic.WsSahreLogic.GetWsShareList()
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeleteWsShareById(ctx *gin.Context) {
|
func DeleteWsShareById(ctx *gin.Context, _ any) any {
|
||||||
if err := logic.WsSahreLogic.DeleteById(ctx.GetInt("id")); err != nil {
|
return logic.WsSahreLogic.DeleteById(ctx.GetInt("id"))
|
||||||
return
|
|
||||||
}
|
|
||||||
rOk(ctx, "Operation successful!", nil)
|
|
||||||
}
|
}
|
||||||
|
@@ -150,7 +150,7 @@ const (
|
|||||||
Query
|
Query
|
||||||
)
|
)
|
||||||
|
|
||||||
func bind[T any](fn func(*gin.Context, T) error, bindOption int) func(*gin.Context) {
|
func bind[T any, R any](fn func(*gin.Context, T) R, bindOption int) func(*gin.Context) {
|
||||||
return func(ctx *gin.Context) {
|
return func(ctx *gin.Context) {
|
||||||
var req T
|
var req T
|
||||||
if bindOption&Body != 0 {
|
if bindOption&Body != 0 {
|
||||||
@@ -171,15 +171,31 @@ func bind[T any](fn func(*gin.Context, T) error, bindOption int) func(*gin.Conte
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err := fn(ctx, req)
|
result := fn(ctx, req)
|
||||||
if err != nil {
|
switch v := any(result).(type) {
|
||||||
rErr(ctx, err)
|
case error:
|
||||||
|
if v != nil {
|
||||||
|
rErr(ctx, v)
|
||||||
|
return
|
||||||
|
} else {
|
||||||
|
ctx.JSON(200, gin.H{
|
||||||
|
"code": 0,
|
||||||
|
"message": "success",
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
case api.Response:
|
||||||
|
ctx.JSON(v.StatusCode, gin.H{
|
||||||
|
"data": v.Data,
|
||||||
|
"msg": v.Msg,
|
||||||
|
"code": v.Code,
|
||||||
|
})
|
||||||
return
|
return
|
||||||
}
|
default:
|
||||||
if !ctx.Writer.Written() {
|
|
||||||
ctx.JSON(200, gin.H{
|
ctx.JSON(200, gin.H{
|
||||||
"code": 0,
|
"code": 0,
|
||||||
"message": "success",
|
"message": "success",
|
||||||
|
"data": v,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user