zou.yingbin 4 سال پیش
والد
کامیت
e0248d326c
5فایلهای تغییر یافته به همراه15 افزوده شده و 11 حذف شده
  1. 6 2
      controllers/ermcp/qryErmcp.go
  2. 2 3
      docs/docs.go
  3. 2 3
      docs/swagger.json
  4. 1 2
      docs/swagger.yaml
  5. 4 1
      models/ermcpAccMgr.go

+ 6 - 2
controllers/ermcp/qryErmcp.go

@@ -108,7 +108,7 @@ func QueryContract(c *gin.Context) {
 // @Summary 查询交易模板配置
 // @Produce json
 // @Security ApiKeyAuth
-// @Param areauserid query int true "所属机构id"
+// @Param areauserid query int false "所属机构id, 现在表里id都为1, 不填默认查arearuserid=1的"
 // @Success 200 {array} models.ErmcpTradeConfigTMP
 // @Failure 500 {object} app.Response
 // @Router /Ermcp/QueryTradeConfigTMP [get]
@@ -116,9 +116,13 @@ func QueryContract(c *gin.Context) {
 func QueryTradeConfigTMP(c *gin.Context) {
 	a := app.GinUtils{Gin: app.Gin{C: c}}
 	req := struct {
-		Areauserid int64 `form:"areauserid" binding:"required"` // 机构id
+		Areauserid int64 `form:"areauserid"` // 机构id
 	}{}
 	a.DoBindReq(&req)
+	if req.Areauserid == 0 {
+		// 默认查areauserid=1的
+		req.Areauserid = 1
+	}
 	m := models.ErmcpTradeConfigTMP{AREAUSERID: req.Areauserid}
 	a.DoGetDataI(&m)
 }

+ 2 - 3
docs/docs.go

@@ -3831,10 +3831,9 @@ var doc = `{
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "所属机构id",
+                        "description": "所属机构id, 现在表里id都为1, 不填默认查arearuserid=1的",
                         "name": "areauserid",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 2 - 3
docs/swagger.json

@@ -3815,10 +3815,9 @@
                 "parameters": [
                     {
                         "type": "integer",
-                        "description": "所属机构id",
+                        "description": "所属机构id, 现在表里id都为1, 不填默认查arearuserid=1的",
                         "name": "areauserid",
-                        "in": "query",
-                        "required": true
+                        "in": "query"
                     }
                 ],
                 "responses": {

+ 1 - 2
docs/swagger.yaml

@@ -14379,10 +14379,9 @@ paths:
   /Ermcp/QueryTradeConfigTMP:
     get:
       parameters:
-      - description: 所属机构id
+      - description: 所属机构id, 现在表里id都为1, 不填默认查arearuserid=1的
         in: query
         name: areauserid
-        required: true
         type: integer
       produces:
       - application/json

+ 4 - 1
models/ermcpAccMgr.go

@@ -154,12 +154,15 @@ func (r *ErmcpLoginUser) GetDataEx() (interface{}, error) {
 			} else {
 				// 企业成员usertype=7需根据roletype判断
 				if sDataEx[i].RoleId == 22 && v.hasRoletype(22) {
+					v.ROLENAME = sDataEx[i].ROLENAME
 					sDataEx[i].UserList = append(sDataEx[i].UserList, v)
 				}
 				if sDataEx[i].RoleId == 23 && v.hasRoletype(23) {
-
+					v.ROLENAME = sDataEx[i].ROLENAME
+					sDataEx[i].UserList = append(sDataEx[i].UserList, v)
 				}
 				if sDataEx[i].RoleId == 24 && v.hasRoletype(24) {
+					v.ROLENAME = sDataEx[i].ROLENAME
 					sDataEx[i].UserList = append(sDataEx[i].UserList, v)
 				}
 			}