api文档
This commit is contained in:
parent
f3b3544478
commit
9649d389c6
|
@ -31,6 +31,13 @@ type SupplierCreateRequest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SupplierCreate 添加供应商
|
// SupplierCreate 添加供应商
|
||||||
|
// @Summary 创建供应商
|
||||||
|
// @Tags 供应商管理
|
||||||
|
// @Produce json
|
||||||
|
// @Accept json
|
||||||
|
// @Param request body SupplierCreateRequest true "供应商模型"
|
||||||
|
// @Success 200 {object} models.Supplier
|
||||||
|
// @Router /api/v1/supplier/create [post]
|
||||||
func SupplierCreate(c *gin.Context) {
|
func SupplierCreate(c *gin.Context) {
|
||||||
req := new(SupplierCreateRequest)
|
req := new(SupplierCreateRequest)
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
@ -79,6 +86,13 @@ type SupplierUpdateRequest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SupplierUpdate 更新供应商
|
// SupplierUpdate 更新供应商
|
||||||
|
// @Summary 更新供应商
|
||||||
|
// @Tags 供应商管理
|
||||||
|
// @Produce json
|
||||||
|
// @Accept json
|
||||||
|
// @Param request body SupplierUpdateRequest true "供应商模型"
|
||||||
|
// @Success 200 {object} app.Response
|
||||||
|
// @Router /api/v1/supplier/update [post]
|
||||||
func SupplierUpdate(c *gin.Context) {
|
func SupplierUpdate(c *gin.Context) {
|
||||||
req := new(SupplierUpdateRequest)
|
req := new(SupplierUpdateRequest)
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
@ -114,6 +128,13 @@ type SupplierListRequest struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SupplierList 供应商列表
|
// SupplierList 供应商列表
|
||||||
|
// @Summary 供应商列表
|
||||||
|
// @Tags 供应商管理
|
||||||
|
// @Produce json
|
||||||
|
// @Accept json
|
||||||
|
// @Param request body SupplierListRequest true "供应商查询模型"
|
||||||
|
// @Success 200 {array} models.Supplier
|
||||||
|
// @Router /api/v1/supplier/list [post]
|
||||||
func SupplierList(c *gin.Context) {
|
func SupplierList(c *gin.Context) {
|
||||||
req := new(SupplierListRequest)
|
req := new(SupplierListRequest)
|
||||||
if err := c.ShouldBindJSON(&req); err != nil {
|
if err := c.ShouldBindJSON(&req); err != nil {
|
||||||
|
@ -136,6 +157,12 @@ func SupplierList(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SupplierDetail 供应商详情
|
// SupplierDetail 供应商详情
|
||||||
|
// @Summary 供应商详情
|
||||||
|
// @Tags 供应商管理
|
||||||
|
// @Produce json
|
||||||
|
// @Param id path int true "供应商id"
|
||||||
|
// @Success 200 {object} models.Supplier
|
||||||
|
// @Router /api/v1/supplier/detail/{id} [get]
|
||||||
func SupplierDetail(c *gin.Context) {
|
func SupplierDetail(c *gin.Context) {
|
||||||
id := c.Param("id")
|
id := c.Param("id")
|
||||||
|
|
||||||
|
@ -152,6 +179,12 @@ func SupplierDetail(c *gin.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SupplierDel 删除供应商
|
// SupplierDel 删除供应商
|
||||||
|
// @Summary 删除供应商
|
||||||
|
// @Tags 供应商管理
|
||||||
|
// @Produce json
|
||||||
|
// @Param id path int true "供应商id"
|
||||||
|
// @Success 200 {object} app.Response
|
||||||
|
// @Router /api/v1/supplier/delete/{id} [delete]
|
||||||
func SupplierDel(c *gin.Context) {
|
func SupplierDel(c *gin.Context) {
|
||||||
id := c.Param("id")
|
id := c.Param("id")
|
||||||
|
|
||||||
|
|
406
docs/docs.go
406
docs/docs.go
|
@ -1924,6 +1924,164 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/supplier/create": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "创建供应商",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "供应商模型",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/basic.SupplierCreateRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/models.Supplier"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/delete/{id}": {
|
||||||
|
"delete": {
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "删除供应商",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "供应商id",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/app.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/detail/{id}": {
|
||||||
|
"get": {
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "供应商详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "供应商id",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/models.Supplier"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/list": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "供应商列表",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "供应商查询模型",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/basic.SupplierListRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.Supplier"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/update": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "更新供应商",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "供应商模型",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/basic.SupplierUpdateRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/app.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/sys/tables/info": {
|
"/api/v1/sys/tables/info": {
|
||||||
"put": {
|
"put": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -2515,6 +2673,175 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"basic.SupplierCreateRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"address",
|
||||||
|
"area",
|
||||||
|
"bank_account",
|
||||||
|
"city",
|
||||||
|
"contact",
|
||||||
|
"name",
|
||||||
|
"opening_bank",
|
||||||
|
"payment_cycle",
|
||||||
|
"province",
|
||||||
|
"tel"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"account_holder": {
|
||||||
|
"description": "开户人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "地址",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"description": "地区",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"bank_account": {
|
||||||
|
"description": "银行卡号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"description": "城市",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"company_website": {
|
||||||
|
"description": "网站",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"description": "联系人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"description": "邮箱",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"landline": {
|
||||||
|
"description": "固话",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "供应商名称",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"opening_bank": {
|
||||||
|
"description": "开户行",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_cycle": {
|
||||||
|
"description": "支付周期",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"description": "省份",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tax_number": {
|
||||||
|
"description": "税点",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tel": {
|
||||||
|
"description": "手机号",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"basic.SupplierListRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"basic.SupplierUpdateRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"address",
|
||||||
|
"area",
|
||||||
|
"bank_account",
|
||||||
|
"city",
|
||||||
|
"contact",
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"opening_bank",
|
||||||
|
"payment_cycle",
|
||||||
|
"province",
|
||||||
|
"tel"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"account_holder": {
|
||||||
|
"description": "开户人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "地址",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"description": "地区",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"bank_account": {
|
||||||
|
"description": "银行卡号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"description": "城市",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"company_website": {
|
||||||
|
"description": "网站",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"description": "联系人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"description": "邮箱",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"landline": {
|
||||||
|
"description": "固话",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "供应商名称",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"opening_bank": {
|
||||||
|
"description": "开户行",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_cycle": {
|
||||||
|
"description": "支付周期",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"description": "省份",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tax_number": {
|
||||||
|
"description": "税点",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tel": {
|
||||||
|
"description": "手机号",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"models.DictType": {
|
"models.DictType": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -2798,6 +3125,85 @@ const docTemplate = `{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"models.Supplier": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"account_holder": {
|
||||||
|
"description": "开户人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "详细地址",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"description": "区",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"bank_account": {
|
||||||
|
"description": "银行账号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"description": "市",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"company_website": {
|
||||||
|
"description": "网站",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"description": "联系人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"cooperative_business_id": {
|
||||||
|
"description": "合作商id",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"description": "邮件",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"landline": {
|
||||||
|
"description": "固定电话",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "供应商名称",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"description": "编号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"opening_bank": {
|
||||||
|
"description": "开户银行",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_cycle": {
|
||||||
|
"description": "支付周期",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"description": "省",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tax_number": {
|
||||||
|
"description": "税号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tel": {
|
||||||
|
"description": "手机号",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"models.SysCategory": {
|
"models.SysCategory": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
@ -1916,6 +1916,164 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v1/supplier/create": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "创建供应商",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "供应商模型",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/basic.SupplierCreateRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/models.Supplier"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/delete/{id}": {
|
||||||
|
"delete": {
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "删除供应商",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "供应商id",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/app.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/detail/{id}": {
|
||||||
|
"get": {
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "供应商详情",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"type": "integer",
|
||||||
|
"description": "供应商id",
|
||||||
|
"name": "id",
|
||||||
|
"in": "path",
|
||||||
|
"required": true
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/models.Supplier"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/list": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "供应商列表",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "供应商查询模型",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/basic.SupplierListRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"$ref": "#/definitions/models.Supplier"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"/api/v1/supplier/update": {
|
||||||
|
"post": {
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"供应商管理"
|
||||||
|
],
|
||||||
|
"summary": "更新供应商",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "供应商模型",
|
||||||
|
"name": "request",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/basic.SupplierUpdateRequest"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/app.Response"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v1/sys/tables/info": {
|
"/api/v1/sys/tables/info": {
|
||||||
"put": {
|
"put": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@ -2507,6 +2665,175 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"basic.SupplierCreateRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"address",
|
||||||
|
"area",
|
||||||
|
"bank_account",
|
||||||
|
"city",
|
||||||
|
"contact",
|
||||||
|
"name",
|
||||||
|
"opening_bank",
|
||||||
|
"payment_cycle",
|
||||||
|
"province",
|
||||||
|
"tel"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"account_holder": {
|
||||||
|
"description": "开户人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "地址",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"description": "地区",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"bank_account": {
|
||||||
|
"description": "银行卡号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"description": "城市",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"company_website": {
|
||||||
|
"description": "网站",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"description": "联系人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"description": "邮箱",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"landline": {
|
||||||
|
"description": "固话",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "供应商名称",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"opening_bank": {
|
||||||
|
"description": "开户行",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_cycle": {
|
||||||
|
"description": "支付周期",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"description": "省份",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tax_number": {
|
||||||
|
"description": "税点",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tel": {
|
||||||
|
"description": "手机号",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"basic.SupplierListRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"basic.SupplierUpdateRequest": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"address",
|
||||||
|
"area",
|
||||||
|
"bank_account",
|
||||||
|
"city",
|
||||||
|
"contact",
|
||||||
|
"id",
|
||||||
|
"name",
|
||||||
|
"opening_bank",
|
||||||
|
"payment_cycle",
|
||||||
|
"province",
|
||||||
|
"tel"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"account_holder": {
|
||||||
|
"description": "开户人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "地址",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"description": "地区",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"bank_account": {
|
||||||
|
"description": "银行卡号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"description": "城市",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"company_website": {
|
||||||
|
"description": "网站",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"description": "联系人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"description": "邮箱",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"landline": {
|
||||||
|
"description": "固话",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "供应商名称",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"opening_bank": {
|
||||||
|
"description": "开户行",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_cycle": {
|
||||||
|
"description": "支付周期",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"description": "省份",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tax_number": {
|
||||||
|
"description": "税点",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tel": {
|
||||||
|
"description": "手机号",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"models.DictType": {
|
"models.DictType": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
@ -2790,6 +3117,85 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"models.Supplier": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"account_holder": {
|
||||||
|
"description": "开户人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"address": {
|
||||||
|
"description": "详细地址",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"area": {
|
||||||
|
"description": "区",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"bank_account": {
|
||||||
|
"description": "银行账号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"city": {
|
||||||
|
"description": "市",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"company_website": {
|
||||||
|
"description": "网站",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"contact": {
|
||||||
|
"description": "联系人",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"cooperative_business_id": {
|
||||||
|
"description": "合作商id",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"createdAt": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"email": {
|
||||||
|
"description": "邮件",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"id": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"landline": {
|
||||||
|
"description": "固定电话",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"name": {
|
||||||
|
"description": "供应商名称",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"number": {
|
||||||
|
"description": "编号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"opening_bank": {
|
||||||
|
"description": "开户银行",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"payment_cycle": {
|
||||||
|
"description": "支付周期",
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"province": {
|
||||||
|
"description": "省",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tax_number": {
|
||||||
|
"description": "税号",
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tel": {
|
||||||
|
"description": "手机号",
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"models.SysCategory": {
|
"models.SysCategory": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|
|
@ -23,6 +23,134 @@ definitions:
|
||||||
requestId:
|
requestId:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
basic.SupplierCreateRequest:
|
||||||
|
properties:
|
||||||
|
account_holder:
|
||||||
|
description: 开户人
|
||||||
|
type: string
|
||||||
|
address:
|
||||||
|
description: 地址
|
||||||
|
type: string
|
||||||
|
area:
|
||||||
|
description: 地区
|
||||||
|
type: string
|
||||||
|
bank_account:
|
||||||
|
description: 银行卡号
|
||||||
|
type: string
|
||||||
|
city:
|
||||||
|
description: 城市
|
||||||
|
type: string
|
||||||
|
company_website:
|
||||||
|
description: 网站
|
||||||
|
type: string
|
||||||
|
contact:
|
||||||
|
description: 联系人
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
description: 邮箱
|
||||||
|
type: string
|
||||||
|
landline:
|
||||||
|
description: 固话
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: 供应商名称
|
||||||
|
type: string
|
||||||
|
opening_bank:
|
||||||
|
description: 开户行
|
||||||
|
type: string
|
||||||
|
payment_cycle:
|
||||||
|
description: 支付周期
|
||||||
|
type: integer
|
||||||
|
province:
|
||||||
|
description: 省份
|
||||||
|
type: string
|
||||||
|
tax_number:
|
||||||
|
description: 税点
|
||||||
|
type: string
|
||||||
|
tel:
|
||||||
|
description: 手机号
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- address
|
||||||
|
- area
|
||||||
|
- bank_account
|
||||||
|
- city
|
||||||
|
- contact
|
||||||
|
- name
|
||||||
|
- opening_bank
|
||||||
|
- payment_cycle
|
||||||
|
- province
|
||||||
|
- tel
|
||||||
|
type: object
|
||||||
|
basic.SupplierListRequest:
|
||||||
|
properties:
|
||||||
|
name:
|
||||||
|
type: string
|
||||||
|
number:
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
|
basic.SupplierUpdateRequest:
|
||||||
|
properties:
|
||||||
|
account_holder:
|
||||||
|
description: 开户人
|
||||||
|
type: string
|
||||||
|
address:
|
||||||
|
description: 地址
|
||||||
|
type: string
|
||||||
|
area:
|
||||||
|
description: 地区
|
||||||
|
type: string
|
||||||
|
bank_account:
|
||||||
|
description: 银行卡号
|
||||||
|
type: string
|
||||||
|
city:
|
||||||
|
description: 城市
|
||||||
|
type: string
|
||||||
|
company_website:
|
||||||
|
description: 网站
|
||||||
|
type: string
|
||||||
|
contact:
|
||||||
|
description: 联系人
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
description: 邮箱
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
landline:
|
||||||
|
description: 固话
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: 供应商名称
|
||||||
|
type: string
|
||||||
|
opening_bank:
|
||||||
|
description: 开户行
|
||||||
|
type: string
|
||||||
|
payment_cycle:
|
||||||
|
description: 支付周期
|
||||||
|
type: integer
|
||||||
|
province:
|
||||||
|
description: 省份
|
||||||
|
type: string
|
||||||
|
tax_number:
|
||||||
|
description: 税点
|
||||||
|
type: string
|
||||||
|
tel:
|
||||||
|
description: 手机号
|
||||||
|
type: string
|
||||||
|
required:
|
||||||
|
- address
|
||||||
|
- area
|
||||||
|
- bank_account
|
||||||
|
- city
|
||||||
|
- contact
|
||||||
|
- id
|
||||||
|
- name
|
||||||
|
- opening_bank
|
||||||
|
- payment_cycle
|
||||||
|
- province
|
||||||
|
- tel
|
||||||
|
type: object
|
||||||
models.DictType:
|
models.DictType:
|
||||||
properties:
|
properties:
|
||||||
createBy:
|
createBy:
|
||||||
|
@ -220,6 +348,64 @@ definitions:
|
||||||
updatedAt:
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
|
models.Supplier:
|
||||||
|
properties:
|
||||||
|
account_holder:
|
||||||
|
description: 开户人
|
||||||
|
type: string
|
||||||
|
address:
|
||||||
|
description: 详细地址
|
||||||
|
type: string
|
||||||
|
area:
|
||||||
|
description: 区
|
||||||
|
type: string
|
||||||
|
bank_account:
|
||||||
|
description: 银行账号
|
||||||
|
type: string
|
||||||
|
city:
|
||||||
|
description: 市
|
||||||
|
type: string
|
||||||
|
company_website:
|
||||||
|
description: 网站
|
||||||
|
type: string
|
||||||
|
contact:
|
||||||
|
description: 联系人
|
||||||
|
type: string
|
||||||
|
cooperative_business_id:
|
||||||
|
description: 合作商id
|
||||||
|
type: integer
|
||||||
|
createdAt:
|
||||||
|
type: string
|
||||||
|
email:
|
||||||
|
description: 邮件
|
||||||
|
type: string
|
||||||
|
id:
|
||||||
|
type: integer
|
||||||
|
landline:
|
||||||
|
description: 固定电话
|
||||||
|
type: string
|
||||||
|
name:
|
||||||
|
description: 供应商名称
|
||||||
|
type: string
|
||||||
|
number:
|
||||||
|
description: 编号
|
||||||
|
type: string
|
||||||
|
opening_bank:
|
||||||
|
description: 开户银行
|
||||||
|
type: string
|
||||||
|
payment_cycle:
|
||||||
|
description: 支付周期
|
||||||
|
type: integer
|
||||||
|
province:
|
||||||
|
description: 省
|
||||||
|
type: string
|
||||||
|
tax_number:
|
||||||
|
description: 税号
|
||||||
|
type: string
|
||||||
|
tel:
|
||||||
|
description: 手机号
|
||||||
|
type: string
|
||||||
|
type: object
|
||||||
models.SysCategory:
|
models.SysCategory:
|
||||||
properties:
|
properties:
|
||||||
createBy:
|
createBy:
|
||||||
|
@ -1996,6 +2182,107 @@ paths:
|
||||||
summary: 系统信息
|
summary: 系统信息
|
||||||
tags:
|
tags:
|
||||||
- system/系统信息
|
- system/系统信息
|
||||||
|
/api/v1/supplier/create:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- description: 供应商模型
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/basic.SupplierCreateRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Supplier'
|
||||||
|
summary: 创建供应商
|
||||||
|
tags:
|
||||||
|
- 供应商管理
|
||||||
|
/api/v1/supplier/delete/{id}:
|
||||||
|
delete:
|
||||||
|
parameters:
|
||||||
|
- description: 供应商id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/app.Response'
|
||||||
|
summary: 删除供应商
|
||||||
|
tags:
|
||||||
|
- 供应商管理
|
||||||
|
/api/v1/supplier/detail/{id}:
|
||||||
|
get:
|
||||||
|
parameters:
|
||||||
|
- description: 供应商id
|
||||||
|
in: path
|
||||||
|
name: id
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Supplier'
|
||||||
|
summary: 供应商详情
|
||||||
|
tags:
|
||||||
|
- 供应商管理
|
||||||
|
/api/v1/supplier/list:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- description: 供应商查询模型
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/basic.SupplierListRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
items:
|
||||||
|
$ref: '#/definitions/models.Supplier'
|
||||||
|
type: array
|
||||||
|
summary: 供应商列表
|
||||||
|
tags:
|
||||||
|
- 供应商管理
|
||||||
|
/api/v1/supplier/update:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
parameters:
|
||||||
|
- description: 供应商模型
|
||||||
|
in: body
|
||||||
|
name: request
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/basic.SupplierUpdateRequest'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/app.Response'
|
||||||
|
summary: 更新供应商
|
||||||
|
tags:
|
||||||
|
- 供应商管理
|
||||||
/api/v1/sys/tables/info:
|
/api/v1/sys/tables/info:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user