zhou.xiaoning hai 1 ano
pai
achega
a163acc2bb
Modificáronse 6 ficheiros con 232 adicións e 4 borrados
  1. 28 0
      controllers/asign/auth.go
  2. 4 4
      controllers/guangzuan/tradeService.go
  3. 75 0
      docs/docs.go
  4. 75 0
      docs/swagger.json
  5. 49 0
      docs/swagger.yaml
  6. 1 0
      routers/router.go

+ 28 - 0
controllers/asign/auth.go

@@ -185,3 +185,31 @@ func QueryUsereSignRecords(c *gin.Context) {
 		appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
 	}
 }
+
+// BankCard4 个人意愿核身认证(双录)
+// @Summary  个人意愿核身认证(双录)
+// @Produce  json
+// @Security ApiKeyAuth
+// @accept   application/json
+// @Param    data body     asignService.WillFaceReq true "入参"
+// @Success  200  {object} asignService.WillFaceRsp
+// @Failure  500  {object} app.Response
+// @Router   /Asign/WillFace [post]
+// @Tags     爱签
+func WillFace(c *gin.Context) {
+	appG := app.Gin{C: c}
+
+	// 获取请求参数
+	var req asignService.WillFaceReq
+	if err := appG.C.ShouldBindJSON(&req); err != nil {
+		logger.GetLogger().Errorf(err.Error())
+		appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
+		return
+	}
+
+	if rsp, err := asignService.WillFace(req); err == nil {
+		appG.Response(http.StatusOK, e.SUCCESS, rsp)
+	} else {
+		appG.ResponseByMsg(http.StatusBadRequest, e.ERROR, err.Error(), nil)
+	}
+}

+ 4 - 4
controllers/guangzuan/tradeService.go

@@ -18,8 +18,8 @@ import (
 // @Security Group
 // @Param    userid   query    int    true  "用户ID"
 // @Param    executestatus query    int false "执行状态 - 1:未生效 2:进行中 3:已结束"
-// @Param    page     query    int    false "页码"
-// @Param    pagesize query    int    false "每页条数"
+// @Param    page          query    int false "页码"
+// @Param    pagesize      query    int false "每页条数"
 // @Success  200           {array}  models.GzcjjcorderM
 // @Failure  500     {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrder [get]
@@ -39,8 +39,8 @@ func QueryGZCJJCOrder(c *gin.Context) {
 // @Security Group
 // @Param    userid        query    int true  "用户ID"
 // @Param    orderid  query    string false "单据ID"
-// @Param    page          query    int false "页码"
-// @Param    pagesize      query    int false "每页条数"
+// @Param    page     query    int    false "页码"
+// @Param    pagesize query    int    false "每页条数"
 // @Success  200      {array}  models.GzcjjcorderdetailM
 // @Failure  500           {object} app.Response
 // @Router   /Guangzuan/QueryGZCJJCOrderDetail [get]

+ 75 - 0
docs/docs.go

@@ -663,6 +663,50 @@ const docTemplate = `{
                 }
             }
         },
+        "/Asign/WillFace": {
+            "post": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "爱签"
+                ],
+                "summary": "个人意愿核身认证(双录)",
+                "parameters": [
+                    {
+                        "description": "入参",
+                        "name": "data",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/asign.WillFaceReq"
+                        }
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/asign.WillFaceRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Bank/QueryBankBranChnumInfo": {
             "get": {
                 "security": [
@@ -24269,6 +24313,37 @@ const docTemplate = `{
                 }
             }
         },
+        "asign.WillFaceReq": {
+            "type": "object",
+            "required": [
+                "idCardNo",
+                "realName",
+                "userId"
+            ],
+            "properties": {
+                "idCardNo": {
+                    "description": "身份证号",
+                    "type": "string"
+                },
+                "realName": {
+                    "description": "真实姓名",
+                    "type": "string"
+                },
+                "userId": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "asign.WillFaceRsp": {
+            "type": "object",
+            "properties": {
+                "faceUrl": {
+                    "description": "意愿核身链接",
+                    "type": "string"
+                }
+            }
+        },
         "common.ClientMenu": {
             "type": "object",
             "properties": {

+ 75 - 0
docs/swagger.json

@@ -654,6 +654,50 @@
                 }
             }
         },
+        "/Asign/WillFace": {
+            "post": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "consumes": [
+                    "application/json"
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "爱签"
+                ],
+                "summary": "个人意愿核身认证(双录)",
+                "parameters": [
+                    {
+                        "description": "入参",
+                        "name": "data",
+                        "in": "body",
+                        "required": true,
+                        "schema": {
+                            "$ref": "#/definitions/asign.WillFaceReq"
+                        }
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "$ref": "#/definitions/asign.WillFaceRsp"
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Bank/QueryBankBranChnumInfo": {
             "get": {
                 "security": [
@@ -24260,6 +24304,37 @@
                 }
             }
         },
+        "asign.WillFaceReq": {
+            "type": "object",
+            "required": [
+                "idCardNo",
+                "realName",
+                "userId"
+            ],
+            "properties": {
+                "idCardNo": {
+                    "description": "身份证号",
+                    "type": "string"
+                },
+                "realName": {
+                    "description": "真实姓名",
+                    "type": "string"
+                },
+                "userId": {
+                    "description": "用户ID",
+                    "type": "integer"
+                }
+            }
+        },
+        "asign.WillFaceRsp": {
+            "type": "object",
+            "properties": {
+                "faceUrl": {
+                    "description": "意愿核身链接",
+                    "type": "string"
+                }
+            }
+        },
         "common.ClientMenu": {
             "type": "object",
             "properties": {

+ 49 - 0
docs/swagger.yaml

@@ -512,6 +512,28 @@ definitions:
         description: 爱签合同状态:0:等待签约 1:签约中 2:已签约 3:过期 4:拒签 6:作废 -2:状态异常
         type: integer
     type: object
+  asign.WillFaceReq:
+    properties:
+      idCardNo:
+        description: 身份证号
+        type: string
+      realName:
+        description: 真实姓名
+        type: string
+      userId:
+        description: 用户ID
+        type: integer
+    required:
+    - idCardNo
+    - realName
+    - userId
+    type: object
+  asign.WillFaceRsp:
+    properties:
+      faceUrl:
+        description: 意愿核身链接
+        type: string
+    type: object
   common.ClientMenu:
     properties:
       children:
@@ -31852,6 +31874,33 @@ paths:
       summary: 获取用户信息(测试)
       tags:
       - 爱签
+  /Asign/WillFace:
+    post:
+      consumes:
+      - application/json
+      parameters:
+      - description: 入参
+        in: body
+        name: data
+        required: true
+        schema:
+          $ref: '#/definitions/asign.WillFaceReq'
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            $ref: '#/definitions/asign.WillFaceRsp'
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 个人意愿核身认证(双录)
+      tags:
+      - 爱签
   /Bank/QueryBankBranChnumInfo:
     get:
       parameters:

+ 1 - 0
routers/router.go

@@ -876,6 +876,7 @@ func InitRouter() *gin.Engine {
 		asignR.Use(token.Auth()).POST("CaptchaVerify", asign.CaptchaVerify)
 		asignR.Use(token.Auth()).GET("QueryUsereSignRecords", asign.QueryUsereSignRecords)
 		asignR.Use(token.Auth()).POST("CreateContract", asign.CreateContract)
+		asignR.Use(token.Auth()).POST("WillFace", asign.WillFace)
 	}
 
 	return r