commit
continuous-integration/drone/push Build is passing Details

master
黄海 4 years ago
parent 7db18a98e9
commit af460b0e16

@ -6,12 +6,10 @@
<component name="ChangeListManager">
<list default="true" id="19c8c37d-a056-451c-a29d-fb612b9a3e2f" name="Default Changelist" comment="commit">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Tools/XltraSwag.go" beforeDir="false" afterPath="$PROJECT_DIR$/Tools/XltraSwag.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Business/FileRelate/FileRelateController/FileReleateController.go" beforeDir="false" afterPath="$PROJECT_DIR$/Business/FileRelate/FileRelateController/FileReleateController.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/docs.go" beforeDir="false" afterPath="$PROJECT_DIR$/docs/docs.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/swagger.json" beforeDir="false" afterPath="$PROJECT_DIR$/docs/swagger.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/swagger.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/docs/swagger.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/go.mod" beforeDir="false" afterPath="$PROJECT_DIR$/go.mod" afterDir="false" />
<change beforePath="$PROJECT_DIR$/go.sum" beforeDir="false" afterPath="$PROJECT_DIR$/go.sum" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/main.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
@ -60,7 +58,7 @@
<property name="go.modules.go.list.on.any.changes.was.set" value="true" />
<property name="go.sdk.automatically.set" value="true" />
<property name="go.tried.to.enable.integration.vgo.integrator" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/Utils/CommonUtil" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
@ -69,9 +67,9 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="E:\Work\dsMin\dsSzxy" />
<recent name="E:\Work\dsMin\dsSzxy\Utils\CommonUtil" />
<recent name="E:\Work\dsMin\dsSzxy\Tools" />
<recent name="E:\Work\dsMin\dsSzxy" />
<recent name="E:\Work\dsMin\dsSzxy\Utils" />
<recent name="E:\Work\dsMin\dsSzxy\Utils\SsdbUtil" />
</key>

@ -41,7 +41,7 @@ func Routers(r *gin.RouterGroup) {
// @Param target_person_id formData string true "目标人ID"
// @Success 200 {object} Model.Res
// @Router /dsSzxy/fileRelate/fileUpload [post]
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"},{"target_group_id":"1,999999999999"},{"target_identity_id":"5",{"target_person_id":"1,999999999999"},{"system_id":"1,20"}]
// @X-IntRangeLimit [{"identity_id":"5"},{"person_id":"1,999999999999"},{"target_group_id":"1,999999999999"},{"target_identity_id":"5"},{"target_person_id":"1,999999999999"},{"system_id":"1,20"}]
// @X-TableName ["t_zhxy_file"]
func fileUpload(c *gin.Context) {
file, err := c.FormFile("file")

@ -0,0 +1,9 @@
package Model
type Res struct {
Success interface{} `json:"success"`
Message interface{} `json:"message,omitempty"` //omitempty有值就输出没值则不输出
List interface{} `json:"list,omitempty"` //omitempty有值就输出没值则不输出
Count interface{} `json:"count,omitempty"` //omitempty有值就输出没值则不输出
ErrorCode interface{} `json:"error_code,omitempty"` //omitempty有值就输出没值则不输出
}

@ -14,7 +14,32 @@ import (
)
var doc = `{
"definitions": null,
"definitions": {
"Model.Res": {
"properties": {
"count": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"error_code": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"list": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"message": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"success": {
"type": "object"
}
},
"type": "object"
}
},
"host": "127.0.0.1:8006",
"info": {
"contact": {
@ -30,7 +55,137 @@ var doc = `{
"title": "智慧校园API",
"version": "1.0"
},
"paths": {},
"paths": {
"/dsSzxy/fileRelate/fileUpdate": {
"post": {
"X-EmptyLimit": [
"file_id",
"file_name"
],
"X-TableName": [
"t_zhxy_file"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"description": "修改文件名称",
"parameters": [
{
"description": "文件ID",
"in": "formData",
"name": "file_id",
"required": true,
"type": "string"
},
{
"description": "文件名称",
"in": "formData",
"name": "file_name",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Model.Res"
}
}
},
"summary": "修改文件名称",
"tags": [
"文件系统管理"
]
}
},
"/dsSzxy/fileRelate/fileUpload": {
"post": {
"X-IntRangeLimit": [
{
"identity_id": "5"
},
{
"person_id": "1,999999999999"
},
{
"target_group_id": "1,999999999999"
},
{
"target_identity_id": "5"
},
{
"target_person_id": "1,999999999999"
},
{
"system_id": "1,20"
}
],
"X-TableName": [
"t_zhxy_file"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"description": "文件上传",
"parameters": [
{
"description": "上传人身份ID",
"in": "formData",
"name": "identity_id",
"required": true,
"type": "string"
},
{
"description": "上传人ID",
"in": "formData",
"name": "person_id",
"required": true,
"type": "string"
},
{
"description": "目标群组ID",
"in": "formData",
"name": "target_group_id",
"required": true,
"type": "string"
},
{
"description": "目标人身份ID",
"in": "formData",
"name": "target_identity_id",
"required": true,
"type": "string"
},
{
"description": "目标人ID",
"in": "formData",
"name": "target_person_id",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Model.Res"
}
}
},
"summary": "文件上传",
"tags": [
"文件系统管理"
]
}
}
},
"swagger": "2.0"
}`

@ -1,5 +1,30 @@
{
"definitions": null,
"definitions": {
"Model.Res": {
"properties": {
"count": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"error_code": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"list": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"message": {
"description": "omitempty有值就输出没值则不输出",
"type": "object"
},
"success": {
"type": "object"
}
},
"type": "object"
}
},
"host": "127.0.0.1:8006",
"info": {
"contact": {
@ -15,6 +40,136 @@
"title": "智慧校园API",
"version": "1.0"
},
"paths": {},
"paths": {
"/dsSzxy/fileRelate/fileUpdate": {
"post": {
"X-EmptyLimit": [
"file_id",
"file_name"
],
"X-TableName": [
"t_zhxy_file"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"description": "修改文件名称",
"parameters": [
{
"description": "文件ID",
"in": "formData",
"name": "file_id",
"required": true,
"type": "string"
},
{
"description": "文件名称",
"in": "formData",
"name": "file_name",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Model.Res"
}
}
},
"summary": "修改文件名称",
"tags": [
"文件系统管理"
]
}
},
"/dsSzxy/fileRelate/fileUpload": {
"post": {
"X-IntRangeLimit": [
{
"identity_id": "5"
},
{
"person_id": "1,999999999999"
},
{
"target_group_id": "1,999999999999"
},
{
"target_identity_id": "5"
},
{
"target_person_id": "1,999999999999"
},
{
"system_id": "1,20"
}
],
"X-TableName": [
"t_zhxy_file"
],
"consumes": [
"application/x-www-form-urlencoded"
],
"description": "文件上传",
"parameters": [
{
"description": "上传人身份ID",
"in": "formData",
"name": "identity_id",
"required": true,
"type": "string"
},
{
"description": "上传人ID",
"in": "formData",
"name": "person_id",
"required": true,
"type": "string"
},
{
"description": "目标群组ID",
"in": "formData",
"name": "target_group_id",
"required": true,
"type": "string"
},
{
"description": "目标人身份ID",
"in": "formData",
"name": "target_identity_id",
"required": true,
"type": "string"
},
{
"description": "目标人ID",
"in": "formData",
"name": "target_person_id",
"required": true,
"type": "string"
}
],
"produces": [
"application/json"
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/Model.Res"
}
}
},
"summary": "文件上传",
"tags": [
"文件系统管理"
]
}
}
},
"swagger": "2.0"
}

@ -1,4 +1,21 @@
definitions: null
definitions:
Model.Res:
properties:
count:
description: omitempty有值就输出没值则不输出
type: object
error_code:
description: omitempty有值就输出没值则不输出
type: object
list:
description: omitempty有值就输出没值则不输出
type: object
message:
description: omitempty有值就输出没值则不输出
type: object
success:
type: object
type: object
host: 127.0.0.1:8006
info:
contact:
@ -11,5 +28,86 @@ info:
url: http://www.apache.org/licenses/LICENSE-2.0.html
title: 智慧校园API
version: "1.0"
paths: {}
paths:
/dsSzxy/fileRelate/fileUpdate:
post:
X-EmptyLimit:
- file_id
- file_name
X-TableName:
- t_zhxy_file
consumes:
- application/x-www-form-urlencoded
description: 修改文件名称
parameters:
- description: 文件ID
in: formData
name: file_id
required: true
type: string
- description: 文件名称
in: formData
name: file_name
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 修改文件名称
tags:
- 文件系统管理
/dsSzxy/fileRelate/fileUpload:
post:
X-IntRangeLimit:
- identity_id: "5"
- person_id: 1,999999999999
- target_group_id: 1,999999999999
- target_identity_id: "5"
- target_person_id: 1,999999999999
- system_id: 1,20
X-TableName:
- t_zhxy_file
consumes:
- application/x-www-form-urlencoded
description: 文件上传
parameters:
- description: 上传人身份ID
in: formData
name: identity_id
required: true
type: string
- description: 上传人ID
in: formData
name: person_id
required: true
type: string
- description: 目标群组ID
in: formData
name: target_group_id
required: true
type: string
- description: 目标人身份ID
in: formData
name: target_identity_id
required: true
type: string
- description: 目标人ID
in: formData
name: target_person_id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/Model.Res'
summary: 文件上传
tags:
- 文件系统管理
swagger: "2.0"

@ -15,6 +15,8 @@ import (
"github.com/gin-gonic/gin"
)
//http://127.0.0.1:8006/swagger/index.html
// @title 智慧校园API
// @version 1.0
// @description 分布式,大并发,高可用

Loading…
Cancel
Save