Browse Source

update

master
dengbiao 1 month ago
parent
commit
875c40f4a9
4 changed files with 181 additions and 15 deletions
  1. +10
    -6
      app/hdl/institutional_management/public_platoon/hdl_basic.go
  2. +64
    -3
      docs/docs.go
  3. +64
    -3
      docs/swagger.json
  4. +43
    -3
      docs/swagger.yaml

+ 10
- 6
app/hdl/institutional_management/public_platoon/hdl_basic.go View File

@@ -16,7 +16,7 @@ import (
// @Accept json
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Success 200 {object} map[string]interface{} "用户数据"
// @Success 200 {object} public_platoon.GetPublicPlatoonBasicResp "具体数据"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/publicPlatoon/getBasic [get]
func GetPublicPlatoonBasic(c *gin.Context) {
@@ -27,7 +27,8 @@ func GetPublicPlatoonBasic(c *gin.Context) {
return
}

resp := public_platoon.GetPublicPlatoonBasicResp{
var resp public_platoon.GetPublicPlatoonBasicResp
resp = public_platoon.GetPublicPlatoonBasicResp{
IsOpen: publicPlatoonBasic.IsOpen,
OriginatorUid: publicPlatoonBasic.OriginatorUid,
SeveralTimes: publicPlatoonBasic.SeveralTimes,
@@ -48,7 +49,7 @@ func GetPublicPlatoonBasic(c *gin.Context) {
// @Produce json
// @param Authorization header string true "验证参数Bearer和token空格拼接"
// @Param req body interface{} true "公排设置表单内容"
// @Success 200 {object} map[string]interface{} "修改数据条数"
// @Success 200 {string} "success"
// @Failure 400 {object} md.Response "具体错误"
// @Router /api/publicPlatoon/getBasic [post]
func UpdatePublicPlatoonBasic(c *gin.Context) {
@@ -72,11 +73,14 @@ func UpdatePublicPlatoonBasic(c *gin.Context) {
}

publicPlatoonBasicDb := implement.NewPublicPlatoonBasicSettingDb(db.Db)
update, err := publicPlatoonBasicDb.PublicPlatoonBasicSettingUpdate(1, setting, "")
updateAffected, err := publicPlatoonBasicDb.PublicPlatoonBasicSettingUpdate(1, setting, "")
if err != nil {
e.OutErr(c, e.ERR_DB_ORM, err)
return
}

e.OutSuc(c, update, nil)
if updateAffected <= 0 {
e.OutErr(c, e.ERR_DB_ORM, "更新数据表失败")
return
}
e.OutSuc(c, "success", nil)
}

+ 64
- 3
docs/docs.go View File

@@ -105,6 +105,42 @@ const docTemplate = `{
},
"/api/publicPlatoon/getBasic": {
"get": {
"description": "公排基础设置(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"公排管理"
],
"summary": "制度中心-公排管理-公排基础设置(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/public_platoon.GetPublicPlatoonBasicResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
},
"post": {
"description": "公排基础设置(修改)",
"consumes": [
"application/json"
@@ -134,10 +170,9 @@ const docTemplate = `{
],
"responses": {
"200": {
"description": "修改数据条数",
"description": "success",
"schema": {
"type": "object",
"additionalProperties": true
"type": "string"
}
},
"400": {
@@ -195,6 +230,32 @@ const docTemplate = `{
"example": "具体错误原因"
}
}
},
"public_platoon.GetPublicPlatoonBasicResp": {
"type": "object",
"properties": {
"is_open": {
"type": "integer"
},
"is_self_active_get_team_revenue": {
"type": "integer"
},
"originator_uid": {
"type": "integer"
},
"several_rows": {
"type": "integer"
},
"several_times": {
"type": "integer"
},
"system_punish_replace": {
"type": "integer"
},
"system_punish_replace_value": {
"type": "integer"
}
}
}
},
"securityDefinitions": {


+ 64
- 3
docs/swagger.json View File

@@ -98,6 +98,42 @@
},
"/api/publicPlatoon/getBasic": {
"get": {
"description": "公排基础设置(获取)",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"公排管理"
],
"summary": "制度中心-公排管理-公排基础设置(获取)",
"parameters": [
{
"type": "string",
"description": "验证参数Bearer和token空格拼接",
"name": "Authorization",
"in": "header",
"required": true
}
],
"responses": {
"200": {
"description": "具体数据",
"schema": {
"$ref": "#/definitions/public_platoon.GetPublicPlatoonBasicResp"
}
},
"400": {
"description": "具体错误",
"schema": {
"$ref": "#/definitions/md.Response"
}
}
}
},
"post": {
"description": "公排基础设置(修改)",
"consumes": [
"application/json"
@@ -127,10 +163,9 @@
],
"responses": {
"200": {
"description": "修改数据条数",
"description": "success",
"schema": {
"type": "object",
"additionalProperties": true
"type": "string"
}
},
"400": {
@@ -188,6 +223,32 @@
"example": "具体错误原因"
}
}
},
"public_platoon.GetPublicPlatoonBasicResp": {
"type": "object",
"properties": {
"is_open": {
"type": "integer"
},
"is_self_active_get_team_revenue": {
"type": "integer"
},
"originator_uid": {
"type": "integer"
},
"several_rows": {
"type": "integer"
},
"several_times": {
"type": "integer"
},
"system_punish_replace": {
"type": "integer"
},
"system_punish_replace_value": {
"type": "integer"
}
}
}
},
"securityDefinitions": {


+ 43
- 3
docs/swagger.yaml View File

@@ -30,6 +30,23 @@ definitions:
example: 具体错误原因
type: string
type: object
public_platoon.GetPublicPlatoonBasicResp:
properties:
is_open:
type: integer
is_self_active_get_team_revenue:
type: integer
originator_uid:
type: integer
several_rows:
type: integer
several_times:
type: integer
system_punish_replace:
type: integer
system_punish_replace_value:
type: integer
type: object
host: localhost:4001
info:
contact:
@@ -98,6 +115,30 @@ paths:
- 登录
/api/publicPlatoon/getBasic:
get:
consumes:
- application/json
description: 公排基础设置(获取)
parameters:
- description: 验证参数Bearer和token空格拼接
in: header
name: Authorization
required: true
type: string
produces:
- application/json
responses:
"200":
description: 具体数据
schema:
$ref: '#/definitions/public_platoon.GetPublicPlatoonBasicResp'
"400":
description: 具体错误
schema:
$ref: '#/definitions/md.Response'
summary: 制度中心-公排管理-公排基础设置(获取)
tags:
- 公排管理
post:
consumes:
- application/json
description: 公排基础设置(修改)
@@ -116,10 +157,9 @@ paths:
- application/json
responses:
"200":
description: 修改数据条数
description: success
schema:
additionalProperties: true
type: object
type: string
"400":
description: 具体错误
schema:


Loading…
Cancel
Save