ソースを参照

pcweb接口
1.查客户资料
2.查机构列表
3.查充值/提现

zou.yingbin 4 年 前
コミット
44368ca09d
10 ファイル変更1142 行追加1 行削除
  1. 109 0
      controllers/qhjPCWeb/qryQhjPCWeb.go
  2. 9 1
      db/checkConnection.go
  3. 223 0
      docs/docs.go
  4. 223 0
      docs/swagger.json
  5. 146 0
      docs/swagger.yaml
  6. 13 0
      models/ermcpCommon.go
  7. 395 0
      models/qhjPCWeb.go
  8. 10 0
      routers/router.go
  9. 9 0
      token/token.go
  10. 5 0
      utils/sqlUtils.go

+ 109 - 0
controllers/qhjPCWeb/qryQhjPCWeb.go

@@ -0,0 +1,109 @@
+/**
+* @Author: zou.yingbin
+* @Create  : 2021/6/24 10:32
+* @Modify  : 2021/6/24 10:32
+ */
+
+package qhjPCWeb
+
+import (
+	"github.com/gin-gonic/gin"
+	"mtp2_if/global/app"
+	"mtp2_if/models"
+)
+
+// QuerySubArea
+// @Summary 查询子机构列表
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Success 200 {array} models.QhjMgrSubArea
+// @Failure 500 {object} app.Response
+// @Router /QhjMgr/QuerySubArea [get]
+// @Tags 大连千海金(PCWeb)
+func QuerySubArea(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		USERID int64 `form:"userid" binding:"required"` // 用户id
+	}{}
+	a.DoBindReq(&req)
+	m := models.QhjMgrSubArea{USERID: req.USERID}
+	a.DoGetDataI(&m)
+}
+
+// QueryCustomerInfo
+// @Summary 查询客户资料
+// @Produce json
+// @Security ApiKeyAuth
+// @Param userid query int true "用户ID"
+// @Param querytype query int true "查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用"
+// @Param userinfotype query int false "客户类型 1-个人 2-企业"
+// @Param customername query string false "客户名称(模糊匹配)"
+// @Param nickname query string false "昵称(模糊匹配)"
+// @Param includesub query int false "是否包含子级 1-包含"
+// @Success 200 {array} models.QhjCustomer
+// @Failure 500 {object} app.Response
+// @Router /QhjMgr/QueryCustomerInfo [get]
+// @Tags 大连千海金(PCWeb)
+func QueryCustomerInfo(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		USERID       int64  `form:"userid" binding:"required"`                // 用户id
+		QUERYTYPE    int32  `form:"querytype" binding:"required,min=1,max=4"` // 查询类型
+		USERINFOTYPE int32  `form:"userinfotype"`                             // 客户类型
+		CUSTOMERNAME string `form:"customername"`                             // 客户名称
+		NICKNAME     string `form:"nickname"`                                 // 昵称
+		INCLUDESUB   int32  `form:"includesub"`                               // 是否包含子级
+	}{}
+	a.DoBindReq(&req)
+	m := models.QhjMgrCustomer{USERID: req.USERID, USERINFOTYPE: req.USERINFOTYPE, QUERYTYPE: req.QUERYTYPE,
+		CUSTOMERNAME: req.CUSTOMERNAME, NICKNAME: req.NICKNAME, IncludeSub: req.INCLUDESUB}
+	a.DoGetDataI(&m)
+}
+
+// QueryAccountInOutApply
+// @Summary 查询充值提现
+// @Produce json
+// @Security ApiKeyAuth
+// @Param querytype query int true "查询类型 1-提现(出金) 2-充值(出金)"
+// @Param applystatus query int true "状态 1-待审核 2-审核通过 3-审核拒绝"
+// @Param begindate query string false "申请起始日期(格式yyyymmdd)"
+// @Param enddate query string false "申请截止日期(格式yyyymmdd)"
+// @Param likename query string false "模糊搜索名称"
+// @Success 200 {array} models.QhjAccountOutInApply
+// @Failure 500 {object} app.Response
+// @Router /QhjMgr/QueryAccountInOutApply [get]
+// @Tags 大连千海金(PCWeb)
+func QueryAccountInOutApply(c *gin.Context) {
+	a := app.GinUtils{Gin: app.Gin{C: c}}
+	req := struct {
+		BEGINDATE   string `form:"begindate"`   // 开始申请日期
+		ENDDATE     string `form:"enddate"`     // 结束申请日期
+		LIKENAME    string `form:"likename"`    // 模糊搜索名称
+		QUERYTYPE   int32  `form:"querytype"`   // 查询类型
+		APPLYSTATUS int32  `form:"applystatus"` // 状态 1-待审核 2-审核通过 3-审核拒绝
+	}{}
+	a.DoBindReq(&req)
+	a.CheckParamF(func() bool {
+		if len(req.BEGINDATE) > 0 && len(req.BEGINDATE) != 8 {
+			return false
+		}
+		if len(req.ENDDATE) > 0 && len(req.ENDDATE) != 8 {
+			return false
+		}
+		for i := range req.BEGINDATE {
+			if req.BEGINDATE[i] < '0' || req.BEGINDATE[i] > '9' {
+				return false
+			}
+		}
+		for i := range req.ENDDATE {
+			if req.ENDDATE[i] < '0' || req.ENDDATE[i] > '9' {
+				return false
+			}
+		}
+		return true
+	})
+	m := models.QhjMgrAccountOutInApply{BeginDate: req.BEGINDATE, EndDate: req.ENDDATE, FilterName: req.LIKENAME,
+		QUERYTYPE: req.QUERYTYPE, STATUS: req.APPLYSTATUS}
+	a.DoGetDataI(&m)
+}

+ 9 - 1
db/checkConnection.go

@@ -1,9 +1,17 @@
 package db
 
-import "time"
+import (
+	"runtime"
+	"time"
+)
 
 // StartCheckConnection 自动重连数据库(5S), dbType = 0 - oracle; 1 - mysql; 2 - mongodb
 func StartCheckConnection(dbType int) {
+	// windows 方便调试不做ping检测
+	if runtime.GOOS == "windows" {
+		return
+	}
+
 	switch dbType {
 	case 0: // oracle
 		for {

+ 223 - 0
docs/docs.go

@@ -7924,6 +7924,188 @@ var doc = `{
                 }
             }
         },
+        "/QhjMgr/QueryAccountInOutApply": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询充值提现",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "查询类型 1-提现(出金) 2-充值(出金)",
+                        "name": "querytype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "状态 1-待审核 2-审核通过 3-审核拒绝",
+                        "name": "applystatus",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请起始日期(格式yyyymmdd)",
+                        "name": "begindate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请截止日期(格式yyyymmdd)",
+                        "name": "enddate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "模糊搜索名称",
+                        "name": "likename",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjAccountOutInApply"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/QhjMgr/QueryCustomerInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询客户资料",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用",
+                        "name": "querytype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "客户类型 1-个人 2-企业",
+                        "name": "userinfotype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "客户名称(模糊匹配)",
+                        "name": "customername",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "昵称(模糊匹配)",
+                        "name": "nickname",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "是否包含子级 1-包含",
+                        "name": "includesub",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjCustomer"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/QhjMgr/QuerySubArea": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询子机构列表",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjMgrSubArea"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Quote/QueryHistoryDatas": {
             "get": {
                 "security": [
@@ -22457,6 +22639,47 @@ var doc = `{
                 }
             }
         },
+        "models.QhjMgrSubArea": {
+            "type": "object",
+            "properties": {
+                "accountname": {
+                    "description": "账户名称(机构名称)",
+                    "type": "string"
+                },
+                "memberuserid": {
+                    "description": "所属会员ID",
+                    "type": "integer"
+                },
+                "parenttopuser": {
+                    "description": "上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的\"ParentTopUser\"]",
+                    "type": "string"
+                },
+                "parentuserid": {
+                    "description": "所属机构ID",
+                    "type": "integer"
+                },
+                "rootuserid": {
+                    "description": "根用户ID",
+                    "type": "string"
+                },
+                "subaccountlevel": {
+                    "description": "子账户层数",
+                    "type": "integer"
+                },
+                "subarealevelpath": {
+                    "description": "子机构层级路径(逗号分隔,首尾加逗号)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "usertype": {
+                    "description": "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)",
+                    "type": "integer"
+                }
+            }
+        },
         "models.QhjParentAreaList": {
             "type": "object",
             "properties": {

+ 223 - 0
docs/swagger.json

@@ -7908,6 +7908,188 @@
                 }
             }
         },
+        "/QhjMgr/QueryAccountInOutApply": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询充值提现",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "查询类型 1-提现(出金) 2-充值(出金)",
+                        "name": "querytype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "状态 1-待审核 2-审核通过 3-审核拒绝",
+                        "name": "applystatus",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请起始日期(格式yyyymmdd)",
+                        "name": "begindate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "申请截止日期(格式yyyymmdd)",
+                        "name": "enddate",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "模糊搜索名称",
+                        "name": "likename",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjAccountOutInApply"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/QhjMgr/QueryCustomerInfo": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询客户资料",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用",
+                        "name": "querytype",
+                        "in": "query",
+                        "required": true
+                    },
+                    {
+                        "type": "integer",
+                        "description": "客户类型 1-个人 2-企业",
+                        "name": "userinfotype",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "客户名称(模糊匹配)",
+                        "name": "customername",
+                        "in": "query"
+                    },
+                    {
+                        "type": "string",
+                        "description": "昵称(模糊匹配)",
+                        "name": "nickname",
+                        "in": "query"
+                    },
+                    {
+                        "type": "integer",
+                        "description": "是否包含子级 1-包含",
+                        "name": "includesub",
+                        "in": "query"
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjCustomer"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
+        "/QhjMgr/QuerySubArea": {
+            "get": {
+                "security": [
+                    {
+                        "ApiKeyAuth": []
+                    }
+                ],
+                "produces": [
+                    "application/json"
+                ],
+                "tags": [
+                    "大连千海金(PCWeb)"
+                ],
+                "summary": "查询子机构列表",
+                "parameters": [
+                    {
+                        "type": "integer",
+                        "description": "用户ID",
+                        "name": "userid",
+                        "in": "query",
+                        "required": true
+                    }
+                ],
+                "responses": {
+                    "200": {
+                        "description": "OK",
+                        "schema": {
+                            "type": "array",
+                            "items": {
+                                "$ref": "#/definitions/models.QhjMgrSubArea"
+                            }
+                        }
+                    },
+                    "500": {
+                        "description": "Internal Server Error",
+                        "schema": {
+                            "$ref": "#/definitions/app.Response"
+                        }
+                    }
+                }
+            }
+        },
         "/Quote/QueryHistoryDatas": {
             "get": {
                 "security": [
@@ -22441,6 +22623,47 @@
                 }
             }
         },
+        "models.QhjMgrSubArea": {
+            "type": "object",
+            "properties": {
+                "accountname": {
+                    "description": "账户名称(机构名称)",
+                    "type": "string"
+                },
+                "memberuserid": {
+                    "description": "所属会员ID",
+                    "type": "integer"
+                },
+                "parenttopuser": {
+                    "description": "上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的\"ParentTopUser\"]",
+                    "type": "string"
+                },
+                "parentuserid": {
+                    "description": "所属机构ID",
+                    "type": "integer"
+                },
+                "rootuserid": {
+                    "description": "根用户ID",
+                    "type": "string"
+                },
+                "subaccountlevel": {
+                    "description": "子账户层数",
+                    "type": "integer"
+                },
+                "subarealevelpath": {
+                    "description": "子机构层级路径(逗号分隔,首尾加逗号)",
+                    "type": "string"
+                },
+                "userid": {
+                    "description": "用户ID",
+                    "type": "integer"
+                },
+                "usertype": {
+                    "description": "账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)",
+                    "type": "integer"
+                }
+            }
+        },
         "models.QhjParentAreaList": {
             "type": "object",
             "properties": {

+ 146 - 0
docs/swagger.yaml

@@ -9850,6 +9850,36 @@ definitions:
         description: 用户名称
         type: string
     type: object
+  models.QhjMgrSubArea:
+    properties:
+      accountname:
+        description: 账户名称(机构名称)
+        type: string
+      memberuserid:
+        description: 所属会员ID
+        type: integer
+      parenttopuser:
+        description: 上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的"ParentTopUser"]
+        type: string
+      parentuserid:
+        description: 所属机构ID
+        type: integer
+      rootuserid:
+        description: 根用户ID
+        type: string
+      subaccountlevel:
+        description: 子账户层数
+        type: integer
+      subarealevelpath:
+        description: 子机构层级路径(逗号分隔,首尾加逗号)
+        type: string
+      userid:
+        description: 用户ID
+        type: integer
+      usertype:
+        description: 账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)
+        type: integer
+    type: object
   models.QhjParentAreaList:
     properties:
       accountname:
@@ -18505,6 +18535,122 @@ paths:
       summary: 查询收货地址信息
       tags:
       - 大连千海金
+  /QhjMgr/QueryAccountInOutApply:
+    get:
+      parameters:
+      - description: 查询类型 1-提现(出金) 2-充值(出金)
+        in: query
+        name: querytype
+        required: true
+        type: integer
+      - description: 状态 1-待审核 2-审核通过 3-审核拒绝
+        in: query
+        name: applystatus
+        required: true
+        type: integer
+      - description: 申请起始日期(格式yyyymmdd)
+        in: query
+        name: begindate
+        type: string
+      - description: 申请截止日期(格式yyyymmdd)
+        in: query
+        name: enddate
+        type: string
+      - description: 模糊搜索名称
+        in: query
+        name: likename
+        type: string
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjAccountOutInApply'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询充值提现
+      tags:
+      - 大连千海金(PCWeb)
+  /QhjMgr/QueryCustomerInfo:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      - description: 查询类型 1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用
+        in: query
+        name: querytype
+        required: true
+        type: integer
+      - description: 客户类型 1-个人 2-企业
+        in: query
+        name: userinfotype
+        type: integer
+      - description: 客户名称(模糊匹配)
+        in: query
+        name: customername
+        type: string
+      - description: 昵称(模糊匹配)
+        in: query
+        name: nickname
+        type: string
+      - description: 是否包含子级 1-包含
+        in: query
+        name: includesub
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjCustomer'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询客户资料
+      tags:
+      - 大连千海金(PCWeb)
+  /QhjMgr/QuerySubArea:
+    get:
+      parameters:
+      - description: 用户ID
+        in: query
+        name: userid
+        required: true
+        type: integer
+      produces:
+      - application/json
+      responses:
+        "200":
+          description: OK
+          schema:
+            items:
+              $ref: '#/definitions/models.QhjMgrSubArea'
+            type: array
+        "500":
+          description: Internal Server Error
+          schema:
+            $ref: '#/definitions/app.Response'
+      security:
+      - ApiKeyAuth: []
+      summary: 查询子机构列表
+      tags:
+      - 大连千海金(PCWeb)
   /Quote/QueryHistoryDatas:
     get:
       parameters:

+ 13 - 0
models/ermcpCommon.go

@@ -9,6 +9,7 @@ package models
 
 import (
 	"encoding/hex"
+	"fmt"
 	"mtp2_if/utils"
 )
 
@@ -49,3 +50,15 @@ func DecodeStr(condition bool, strTrue, strFalse string) string {
 	}
 	return strFalse
 }
+
+// InStr
+func InStr(param ...interface{}) string {
+	var str string
+	for i := range param {
+		if len(str) > 0 {
+			str += ","
+		}
+		str += fmt.Sprintf("%v", param[i])
+	}
+	return str
+}

+ 395 - 0
models/qhjPCWeb.go

@@ -0,0 +1,395 @@
+/**
+* @Author: zou.yingbin
+* @Create  : 2021/6/24 10:07
+* @Modify  : 2021/6/24 10:07
+ */
+
+package models
+
+import (
+	"fmt"
+	"mtp2_if/db"
+	"mtp2_if/mtpcache"
+	"mtp2_if/utils"
+)
+
+// QhjMgrSubArea 子机构列表
+type QhjMgrSubArea struct {
+	PARENTTOPUSER    string `json:"parenttopuser"  xorm:"PARENTTOPUSER"`       // 上级顶级机构 [092=0,1时,默认为1, 092=2时若自已为顶级,则填入自己,自己不为顶级,填入ParentUserID的"ParentTopUser"]
+	SUBACCOUNTLEVEL  int32  `json:"subaccountlevel"  xorm:"SUBACCOUNTLEVEL"`   // 子账户层数
+	ROOTUSERID       string `json:"rootuserid"  xorm:"ROOTUSERID"`             // 根用户ID
+	USERID           int64  `json:"userid"  xorm:"USERID"`                     // 用户ID
+	USERTYPE         int32  `json:"usertype"  xorm:"USERTYPE"`                 // 账户类型 -  1:交易所 2:机构 3:会员子机构 4:经纪人 5:投资者 6:客户 7:企业成员(云平台)
+	ACCOUNTNAME      string `json:"accountname"  xorm:"ACCOUNTNAME"`           // 账户名称(机构名称)
+	PARENTUSERID     int64  `json:"parentuserid"  xorm:"PARENTUSERID"`         // 所属机构ID
+	SUBAREALEVELPATH string `json:"subarealevelpath"  xorm:"SUBAREALEVELPATH"` // 子机构层级路径(逗号分隔,首尾加逗号)
+	MEMBERUSERID     int64  `json:"memberuserid"  xorm:"MEMBERUSERID"`         // 所属会员ID
+}
+
+func (r *QhjMgrSubArea) calc() {
+
+}
+
+func (r *QhjMgrSubArea) buildSql() string {
+	var sqlId utils.SQLVal = "select t.userid," +
+		"       t.accountname," +
+		"       t.parentuserid," +
+		"       t.rootuserid," +
+		"       t.memberuserid," +
+		"       t.parenttopuser," +
+		"       t.subarealevelpath," +
+		"       t.subaccountlevel," +
+		"       t.usertype" +
+		"  from useraccount t" +
+		" where 1 = 1"
+	sqlId.And("t.usertype", 2)
+	sqlId.Join(fmt.Sprintf("and t.userid != %v", r.USERID))
+	sqlId.Join(fmt.Sprintf(" and t.subarealevelpath like ',%%%v%%,'", r.USERID))
+	return sqlId.String()
+}
+
+// GetDataEx 获取子机构列表
+func (r *QhjMgrSubArea) GetDataEx() (interface{}, error) {
+	sData := make([]QhjMgrSubArea, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// QhjMgrCustomer 客户资料
+type QhjMgrCustomer struct {
+	USERID            int64  `json:"userid"  xorm:"'USERID'"`                       // 用户ID
+	MEMBERUSERID      int64  `json:"memberuserid"  xorm:"'MEMBERUSERID'"`           // 所属机构ID(所属会员)
+	PARENTUSERID      int64  `json:"parentuserid"  xorm:"'PARENTUSERID'"`           // 上级机构(所属机构)
+	USERINFOTYPE      int32  `json:"userinfotype"  xorm:"'USERINFOTYPE'"`           // 客户类型 1-个人 2-企业
+	CUSTOMERNAME      string `json:"customername"  xorm:"'CUSTOMERNAME'"`           // 客户名称
+	CARDTYPE          int32  `json:"cardtype"  xorm:"'CARDTYPE'"`                   // 证件类型
+	CARDNUM           string `json:"cardnum"  xorm:"'CARDNUM'"`                     // 证件号码
+	MOBILE            string `json:"mobile"  xorm:"'MOBILE'"`                       // 手机号码
+	TELPHONE          string `json:"telphone"  xorm:"'TELPHONE'"`                   // 联系电话
+	ADDRESS           string `json:"address"  xorm:"'ADDRESS'"`                     // 通讯地址
+	REMARK            string `json:"remark"  xorm:"'REMARK'"`                       // 备注
+	STATUS            int32  `json:"status"  xorm:"'STATUS'"`                       // 账户状态 -  1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销
+	STATUSDESC        string `json:"statusdesc"`                                    // 账户状态中文描述
+	ATTACHMENT1       string `json:"attachment1"  xorm:"'ATTACHMENT1'"`             // 附件1
+	CARDFRONTPHOTOURL string `json:"cardfrontphotourl"  xorm:"'CARDFRONTPHOTOURL'"` // 证件正面图片地址
+	CARDBACKPHOTOURL  string `json:"cardbackphotourl"  xorm:"'CARDBACKPHOTOURL'"`   // 证件反面图片地址
+	COUNTRYID         int32  `json:"countryid"  xorm:"'COUNTRYID'"`                 // 国家
+	PROVINCEID        int32  `json:"provinceid"  xorm:"'PROVINCEID'"`               // 省
+	CITYID            int32  `json:"cityid"  xorm:"'CITYID'"`                       // 市
+	DISTRICTID        int32  `json:"districtid"  xorm:"'DISTRICTID'"`               // 区域
+	CREATETIME        string `json:"createtime"  xorm:"'CREATETIME'"`               // 创建时间
+	MODIFYTIME        string `json:"modifytime"  xorm:"'MODIFYTIME'"`               // 修改时间
+	AUDITTIME         string `json:"audittime"  xorm:"'AUDITTIME'"`                 // 审核时间
+	NICKNAME          string `json:"nickname"  xorm:"'NICKNAME'"`                   // 昵称
+	TAXPAYERNUM       string `json:"taxpayernum"  xorm:"'taxpayernum'"`             // 纳税人识别号
+	LEGALPERSONNAME   string `json:"legalpersonname"  xorm:"'legalpersonname'"`     // 法人姓名(企业)
+	CONTACTNAME       string `json:"contactname"  xorm:"'contactname'"`             // 联系人
+	EMAIL             string `json:"email"  xorm:"'EMAIL'"`                         // 邮件
+	USERNAME          string `json:"username"  xorm:"'USERNAME'"`                   // 用户名称
+	LOGINCODE         string `json:"logincode"  xorm:"'LOGINCODE'"`                 // 登录账号(代码)
+
+	COUNTRYNAME    string `json:"countryname"`    // 国家名称
+	CITYNAME       string `json:"cityname"`       // 城市名称
+	PROVINCENAME   string `json:"provincename"`   // 省名称
+	DISTRICTNAME   string `json:"districtname"`   // 地区名称
+	CARDTYPENAME   string `json:"cardtypename"`   // 证件类型名称
+	MEMBERUSERNAME string `json:"memberusername"` // 所属会员名称
+	PARENTUSERNAME string `json:"parentusername"` //所属机构名称
+
+	QUERYTYPE  int32 `json:"-"` // 查询类型(1:未提交(网上开户表) 2:待审核(网上开户表) 3:正常 4:停用)
+	IncludeSub int32 `json:"-"` // 包子机构客户 1-包含
+}
+
+func (r *QhjMgrCustomer) calc() {
+	r.MEMBERUSERNAME = mtpcache.GetUserNameByUserId(r.MEMBERUSERID)
+	if len(r.USERNAME) == 0 {
+		r.USERNAME = mtpcache.GetUserNameByUserId(r.USERID)
+	}
+	r.PARENTUSERNAME = mtpcache.GetUserNameByUserId(r.PARENTUSERID)
+	r.COUNTRYNAME = mtpcache.GetDivisionName(r.COUNTRYID)
+	r.CITYNAME = mtpcache.GetDivisionName(r.CITYID)
+	r.PROVINCENAME = mtpcache.GetDivisionName(r.PROVINCEID)
+	r.DISTRICTNAME = mtpcache.GetDivisionName(r.DISTRICTID)
+
+	switch r.QUERYTYPE {
+	case 1, 2: // 网上开户表
+		r.ADDRESS = DecryptField(r.ADDRESS)
+		r.TELPHONE = DecryptField(r.TELPHONE)
+	case 3, 4: // 正式表
+		r.TELPHONE = DecryptField(r.TELPHONE)
+	}
+	r.CARDNUM = DecryptField(r.CARDNUM)
+	r.MOBILE = DecryptField(r.MOBILE)
+	r.EMAIL = DecryptField(r.EMAIL)
+}
+
+func (r *QhjMgrCustomer) level() int32 {
+	if r.IncludeSub > 0 {
+		// 层级, 最多20层
+		return 20
+	}
+	return 1
+}
+
+func (r *QhjMgrCustomer) buildSql() string {
+	if r.QUERYTYPE == 1 || r.QUERYTYPE == 2 {
+		return r.buildSqlWskh()
+	}
+	return r.buildSqlNormal()
+}
+
+func (r *QhjMgrCustomer) buildSqlWskh() string {
+	var sqlId utils.SQLVal = "select *" +
+		"  from (select t.userid," +
+		"               t.memberareaid MEMBERUSERID," +
+		"               t.USERINFOTYPE," +
+		"               t.username," +
+		"               t.CUSTOMERNAME," +
+		"               t.NICKNAME," +
+		"               t.CARDTYPE," +
+		"               t.CARDNUM," +
+		"               t.mobilephone MOBILE," +
+		"               t.TELPHONE," +
+		"               t.cardaddress ADDRESS," +
+		"               t.REMARK," +
+		"               t.ATTACHMENT1," +
+		"               t.CARDFRONTPHOTOURL," +
+		"               t.CARDBACKPHOTOURL," +
+		"               t.userstate status," +
+		"               t.countryid," +
+		"               t.provinceid," +
+		"               t.districtid," +
+		"               to_char(t.createtime, 'yyyy-mm-dd hh24:mi:ss') createtime," +
+		"               t.cityid," +
+		"               to_char(t.modifiedtime, 'yyyy-mm-dd hh24:mi:ss') modifytime," +
+		"               to_char(t.auditime, 'yyyy-mm-dd hh24:mi:ss') audittime," +
+		"               t.taxpayernum," +
+		"               t.legalpersonname," +
+		"               t.contactname," +
+		"               t.email," +
+		"               t.areaid parentuserid," +
+		"               t.logincode," +
+		"               t.usertype" +
+		"          from wskh_userinfo t" +
+		"         start with t.areaid = %v" +
+		"        connect by prior t.userid = t.areaid" +
+		"               and t.usertype in (2, 6)" +
+		"               and level = %v) a" +
+		" where 1 = 1" +
+		"   and a.usertype != 2" +
+		"   and a.status in (%v)"
+	status := DecodeStr(r.QUERYTYPE == 1, "1", "2,4,5")
+	sqlId.FormatParam(r.USERID, r.level(), status)
+	sqlId.AndEx("a.USERINFOTYPE", r.USERINFOTYPE, r.USERINFOTYPE > 0)
+	sqlId.JoinEx(len(r.CUSTOMERNAME) > 0, fmt.Sprintf(` and a.customername like '%%%v%%'`, r.CUSTOMERNAME))
+	sqlId.JoinEx(len(r.NICKNAME) > 0, fmt.Sprintf(` and a.nickname like '%%%v%%'`, r.NICKNAME))
+	return sqlId.String()
+}
+
+func (r *QhjMgrCustomer) buildSqlNormal() string {
+	var sqlId utils.SQLVal = "with tmp as" +
+		" (select t.userid, wm_concat(t.logincode) logincode" +
+		"    from loginaccount t" +
+		"   group by t.userid)" +
+		"select a.*," +
+		"       k.logincode," +
+		"       u.USERINFOTYPE," +
+		"       u.CUSTOMERNAME," +
+		"       u.NICKNAME," +
+		"       u.CARDTYPEID CARDTYPE," +
+		"       u.CARDNUM," +
+		"       u.MOBILE," +
+		"       u.TELPHONE," +
+		"       u.ADDRESS," +
+		"       u.REMARK," +
+		"       u.ATTACHMENT1," +
+		"       u.CARDFRONTPHOTOURL," +
+		"       u.CARDBACKPHOTOURL," +
+		"       u.countryid," +
+		"       u.provinceid," +
+		"       u.districtid," +
+		"       u.taxpayernum," +
+		"       u.legalpersonname," +
+		"       u.contactname," +
+		"       u.email," +
+		"       u.cityid" +
+		"  from (select t.userid," +
+		"               t.usertype," +
+		"               t.parentuserid," +
+		"               t.memberuserid," +
+		"               t.accountstatus status," +
+		"               to_char(t.createtime, 'yyyy-mm-dd hh24:mi:ss') createtime," +
+		"               to_char(t.modifytime, 'yyyy-mm-dd hh24:mi:ss') modifytime," +
+		"               to_char(t.audittime, 'yyyy-mm-dd hh24:mi:ss') audittime" +
+		"          from useraccount t where 1=1 and t.usertype = 6 %v" +
+		"         ) a" +
+		"  left join tmp k" +
+		"    on a.userid = k.userid" +
+		"  left join userinfo u" +
+		"    on a.userid = u.userid" +
+		" where 1 = 1"
+	status := DecodeStr(r.QUERYTYPE == 3, "4", "6")
+	var sqlParam utils.SQLVal
+	sqlParam.And("t.accountstatus", status)
+	if r.IncludeSub == 1 {
+		sqlParam.Join(fmt.Sprintf(" and t.subarealevelpath like '%%,%v,%%'", r.USERID))
+	} else {
+		sqlParam.And("t.parentuserid", r.USERID)
+	}
+	sqlId.FormatParam(sqlParam.String())
+	sqlId.AndEx("u.USERINFOTYPE", r.USERINFOTYPE, r.USERINFOTYPE > 0)
+	sqlId.JoinEx(len(r.CUSTOMERNAME) > 0, fmt.Sprintf(` and u.customername like '%%%v%%'`, r.CUSTOMERNAME))
+	sqlId.JoinEx(len(r.NICKNAME) > 0, fmt.Sprintf(` and u.nickname like '%%%v%%'`, r.NICKNAME))
+	return sqlId.String()
+}
+
+// GetDataEx 获取客户资料
+func (r *QhjMgrCustomer) GetDataEx() (interface{}, error) {
+	sData := make([]QhjMgrCustomer, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].QUERYTYPE = r.QUERYTYPE
+		sData[i].calc()
+	}
+	return sData, err
+}
+
+// QhjMgrAccountOutInApply 充值提现(出入金)
+type QhjMgrAccountOutInApply struct {
+	EXECUTETYPE         int32   `json:"executetype"  xorm:"EXECUTETYPE"`                 // 申请类型 - 1:出金 2:入金 3: 单边账调整:入金; 4:单边账调整:出金 5:外部母账户调整:入金 6:外部母账户调整:出金 7:外部子账户:入金 8:外部子账户:出金
+	AMOUNT              float64 `json:"amount"  xorm:"AMOUNT"`                           // 金额
+	CURRENCY            string  `json:"currency"  xorm:"CURRENCY"`                       // 币种
+	CHARGE              float64 `json:"charge"  xorm:"CHARGE"`                           // 手续费
+	ACCOUNTPWD          string  `json:"accountpwd"  xorm:"ACCOUNTPWD"`                   // 资金密码
+	UPDATETIME          string  `json:"updatetime"  xorm:"UPDATETIME"`                   // 更新时间(申请时间)
+	BANKID              string  `json:"bankid"  xorm:"BANKID"`                           // 银行编号
+	BRANCHBANKID        string  `json:"branchbankid"  xorm:"BRANCHBANKID"`               // 银行支行号
+	BRANCHBANKNAME      string  `json:"branchbankname"  xorm:"BRANCHBANKNAME"`           // 银行支行名称
+	BANKACCOUNTNO       string  `json:"bankaccountno"  xorm:"BANKACCOUNTNO"`             // 银行卡号
+	BANKACCOUNTNAME     string  `json:"bankaccountname"  xorm:"BANKACCOUNTNAME"`         // 银行账户名
+	EXTENDINFO          string  `json:"extendinfo"  xorm:"EXTENDINFO"`                   // 扩展信息
+	AUDITID             int64   `json:"auditid"  xorm:"AUDITID"`                         // 审核人
+	AUDITTIME           string  `json:"audittime"  xorm:"AUDITTIME"`                     // 审核时间
+	REMARK              string  `json:"remark"  xorm:"REMARK"`                           // 备注
+	NETADDR             string  `json:"netaddr"  xorm:"NETADDR"`                         // 调转网址
+	ACCOUNTTICKET       string  `json:"accountticket"  xorm:"ACCOUNTTICKET"`             // 最新账户服务流水号
+	CHECKERRORFLAG      int32   `json:"checkerrorflag"  xorm:"CHECKERRORFLAG"`           // 对账差错标志 - 1:为单边账;其它为正常出入金
+	REMARK2             string  `json:"remark2"  xorm:"REMARK2"`                         // 备注(失败原因)
+	REAUDITID           int64   `json:"reauditid"  xorm:"REAUDITID"`                     // 复审人
+	REAUDITTIME         string  `json:"reaudittime"  xorm:"REAUDITTIME"`                 // 复审时间
+	REAUDITREMARK       string  `json:"reauditremark"  xorm:"REAUDITREMARK"`             // 复审备注
+	APPLYREMARK         string  `json:"applyremark"  xorm:"APPLYREMARK"`                 // 申请备注
+	RELATEDORDERID      string  `json:"relatedorderid"  xorm:"RELATEDORDERID"`           // 三方关联ID
+	CAPAMOUNTOUT        float64 `json:"capamountout"  xorm:"CAPAMOUNTOUT"`               // 出金(劣后本金) - 外部子账户
+	INFAMOUNT           float64 `json:"infamount"  xorm:"INFAMOUNT"`                     // 劣后金额(自有)
+	PRIAMOUNT           float64 `json:"priamount"  xorm:"PRIAMOUNT"`                     // 优先金额(授信)
+	BANK_APPLY_TICKET   string  `json:"bank_apply_ticket"  xorm:"BANK_APPLY_TICKET"`     // 银行申请流水
+	CERTIFICATEPHOTOURL string  `json:"certificatephotourl"  xorm:"CERTIFICATEPHOTOURL"` // 凭证地址
+	SOUCREAMOUNT        float64 `json:"soucreamount"  xorm:"SOUCREAMOUNT"`               // 原始出入金金额
+	SOUCRECURRENCYID    int64   `json:"soucrecurrencyid"  xorm:"SOUCRECURRENCYID"`       // 原始出入金币种
+	ACCOUNTCODE         string  `json:"accountcode"  xorm:"ACCOUNTCODE"`                 // 资金账号
+	CUSBANKID           string  `json:"cusbankid"  xorm:"CUSBANKID"`                     // 托管银行编号
+	TRADEDATE           string  `json:"tradedate"  xorm:"TRADEDATE"`                     // 交易日(yyyyMMdd)
+	EXCHTICKET          string  `json:"exchticket"  xorm:"EXCHTICKET"`                   // 银行服务流水号
+	EXTOPERATEID        int64   `json:"extoperateid"  xorm:"EXTOPERATEID"`               // 交易服务流水号
+	BANKTICKET          string  `json:"bankticket"  xorm:"BANKTICKET"`                   // 银行流水
+	APPLYSTATUS         int32   `json:"applystatus"  xorm:"APPLYSTATUS"`                 // 申请状态 - 1:待审核 2:待复审 3:初审拒绝 4:交易冻结中 5:交易解冻中 6:交易解冻扣款中 7:交易入金中 8:交易冻结/解冻/扣款中(银行发起出金时用) 9:银行出金中 10:银行入金中 11:成功 12:失败 13:银行审核中  14:账户服务入金失败; 15:账户服务解冻失败; 16:账户服务解冻扣款失败; 17:账户服务出金失败 18:复审通过 19:复审拒绝 20:提交审核,账户冻结中 21:审核拒绝,账户解冻中;22: 待审核,账户服务解冻回滚中; 23:待复审,账户服务解冻回滚中; 24: 审核通过,账户冻结金额检查中;25: 复审通过,账户冻结金额检查中;
+	USERID              int64   `json:"userid"  xorm:"'USERID'"`                         // 用户id
+	LOGINCODE           string  `json:"logincode"  xorm:"'LOGINCODE'"`                   // 登录账号(账号)
+	USERINFOTYPE        int32   `json:"userinfotype"  xorm:"'USERINFOTYPE'"`             // 账户类型 1-个人 2-企业
+	ACCOUNTNAME         string  `json:"accountname"  xorm:"'ACCOUNTNAME'"`               // 用户名称(名称)
+
+	QUERYTYPE  int32  `json:"-"` // 查询类型 1-提现 2-充值
+	STATUS     int32  `json:"-"` // 查询状态 1-待审核 2-审核通过 3-审核拒绝
+	BeginDate  string `json:"-"` // 开始日期(yyyymmdd)
+	EndDate    string `json:"-"` // 结束日期(yyyymmdd)
+	FilterName string `json:"-"` // 账户(模糊匹配)
+}
+
+func (r *QhjMgrAccountOutInApply) calc() {
+
+}
+
+func (r *QhjMgrAccountOutInApply) buildSql() string {
+	var sqlId utils.SQLVal = "with tmp as(select t.userid, wm_concat(t.logincode) logincode from loginaccount t group by t.userid)" +
+		"SELECT t.EXECUTETYPE," +
+		"       t.AMOUNT," +
+		"       t.CURRENCY," +
+		"       t.CHARGE," +
+		"       t.ACCOUNTPWD," +
+		"       to_char(t.UPDATETIME, 'yyyy-mm-dd hh24:mi:ss') UPDATETIME," +
+		"       t.BANKID," +
+		"       t.BRANCHBANKID," +
+		"       t.BRANCHBANKNAME," +
+		"       t.BANKACCOUNTNO," +
+		"       t.BANKACCOUNTNAME," +
+		"       t.EXTENDINFO," +
+		"       t.AUDITID," +
+		"       to_char(t.AUDITTIME, 'yyyy-mm-dd hh24:mi:ss') AUDITTIME," +
+		"       t.REMARK," +
+		"       t.NETADDR," +
+		"       t.ACCOUNTTICKET," +
+		"       t.CHECKERRORFLAG," +
+		"       t.REMARK2," +
+		"       t.REAUDITID," +
+		"       to_char(t.REAUDITTIME, 'yyyy-mm-dd hh24:mi:ss') REAUDITTIME," +
+		"       t.REAUDITREMARK," +
+		"       t.APPLYREMARK," +
+		"       t.RELATEDORDERID," +
+		"       t.CAPAMOUNTOUT," +
+		"       t.INFAMOUNT," +
+		"       t.PRIAMOUNT," +
+		"       t.BANK_APPLY_TICKET," +
+		"       to_char(t.CERTIFICATEPHOTOURL) CERTIFICATEPHOTOURL," +
+		"       t.SOUCREAMOUNT," +
+		"       t.SOUCRECURRENCYID," +
+		"       t.ACCOUNTCODE," +
+		"       t.CUSBANKID," +
+		"       t.TRADEDATE," +
+		"       t.EXCHTICKET," +
+		"       t.EXTOPERATEID," +
+		"       t.BANKTICKET," +
+		"       t.APPLYSTATUS," +
+		"       ta.userid," +
+		"       u.accountname," +
+		"       ui.userinfotype," +
+		"       tmp.logincode" +
+		"  FROM BANK_ACCOUNTOUTINAPPLY t" +
+		"  INNER JOIN TAACCOUNT ta on t.accountcode=to_char(ta.accountid)" +
+		"  INNER JOIN USERACCOUNT u on ta.relateduserid=u.userid" +
+		"  INNER JOIN USERINFO ui on u.userid=ui.userid" +
+		"  LEFT JOIN tmp on u.userid=tmp.userid" +
+		" WHERE 1 = 1"
+	sqlId.And("EXECUTETYPE", r.QUERYTYPE)
+	switch r.STATUS {
+	case 1:
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", InStr(1, 2))
+	case 2:
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", InStr(11, 18, 24, 25))
+	case 3:
+		sqlId.JoinFormat(" and t.APPLYSTATUS in(%v)", InStr(3, 12, 21))
+	}
+	if len(r.BeginDate) > 0 {
+		sqlId.Join(fmt.Sprintf(" and t.TRADEDATE >= %v", r.BeginDate))
+	}
+	if len(r.EndDate) > 0 {
+		sqlId.Join(fmt.Sprintf(" and t.TRADEDATE <= %v", r.EndDate))
+	}
+	if len(r.FilterName) > 0 {
+		sqlId.Join(fmt.Sprintf(" and (tmp.logincode like '%%%v%%' or u.accountname like '%%%v%%')", r.FilterName, r.FilterName))
+	}
+	return sqlId.String()
+}
+
+// GetDataEx 获取充值提现(出入金)
+func (r *QhjMgrAccountOutInApply) GetDataEx() (interface{}, error) {
+	sData := make([]QhjMgrAccountOutInApply, 0)
+	err := db.GetEngine().SQL(r.buildSql()).Find(&sData)
+	for i := range sData {
+		sData[i].calc()
+	}
+	return sData, err
+}

+ 10 - 0
routers/router.go

@@ -14,6 +14,7 @@ import (
 	"mtp2_if/controllers/market"
 	"mtp2_if/controllers/order"
 	"mtp2_if/controllers/qhj"
+	"mtp2_if/controllers/qhjPCWeb"
 	"mtp2_if/controllers/quote"
 	"mtp2_if/controllers/search"
 	"mtp2_if/controllers/szdz"
@@ -474,6 +475,15 @@ func InitRouter() *gin.Engine {
 		qhjR.GET("QueryParentAreaList", qhj.QueryParentAreaList)
 	}
 
+	// *************************千海金(PCWeb)*****************************
+	qhjPCWebR := apiR.Group("QhjMgr")
+	qhjPCWebR.Use(token.Auth())
+	{
+		qhjPCWebR.GET("QuerySubArea", qhjPCWeb.QuerySubArea)
+		qhjPCWebR.GET("QueryCustomerInfo", qhjPCWeb.QueryCustomerInfo)
+		qhjPCWebR.GET("QueryAccountInOutApply", qhjPCWeb.QueryAccountInOutApply)
+	}
+
 	return r
 }
 

+ 9 - 0
token/token.go

@@ -3,9 +3,11 @@ package token
 import (
 	"errors"
 	"fmt"
+	"mtp2_if/config"
 	"mtp2_if/global/e"
 	"mtp2_if/rediscli"
 	"net/http"
+	"runtime"
 	"strings"
 
 	"github.com/gin-gonic/gin"
@@ -45,6 +47,13 @@ func Auth() gin.HandlerFunc {
 		// 	return
 		// }
 
+		// windows下方便开发调试, 不做token校验
+		if config.SerCfg.GetDebugMode() &&
+			runtime.GOOS == "windows" {
+			c.Next()
+			return
+		}
+
 		var code int
 		var data interface{}
 

+ 5 - 0
utils/sqlUtils.go

@@ -78,3 +78,8 @@ func (r *SQLVal) JoinEx(bJoin bool, condition string) {
 		r.Join(condition)
 	}
 }
+
+// JoinFormat
+func (r *SQLVal) JoinFormat(strFmt string, param ...interface{}) {
+	*r += SQLVal(fmt.Sprintf(strFmt, param...))
+}