add: file export for table
This commit is contained in:
@@ -13,7 +13,7 @@ func DataResp(data any) map[string]any {
|
||||
return map[string]any{"code": CODE_SUCC, "data": data}
|
||||
}
|
||||
|
||||
func SuccResp() map[string]any {
|
||||
func SuccMessageResp() map[string]any {
|
||||
return map[string]any{"code": CODE_SUCC, "message": "success"}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,15 @@ func TotalResp(total int64) map[string]any {
|
||||
return map[string]any{"code": CODE_SUCC, "total": total}
|
||||
}
|
||||
|
||||
func TotalDataResp(data any, total int64) map[string]any {
|
||||
func TotalDataResp(data any, total any) map[string]any {
|
||||
return map[string]any{"code": CODE_SUCC, "data": data, "total": total}
|
||||
}
|
||||
|
||||
func SuccResp(va map[string]any) map[string]any {
|
||||
resp := make(map[string]any)
|
||||
resp["code"] = CODE_SUCC
|
||||
for k, v := range va {
|
||||
resp[k] = v
|
||||
}
|
||||
return resp
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user