浏览代码

update

master
dengbiao 3 周前
父节点
当前提交
875c40f4a9
共有 4 个文件被更改,包括 181 次插入15 次删除
  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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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 查看文件

@@ -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:


正在加载...
取消
保存