|
|
@@ -7,12 +7,13 @@
|
|
|
package ermcp
|
|
|
|
|
|
import (
|
|
|
- "github.com/gin-gonic/gin"
|
|
|
"mtp2_if/global/app"
|
|
|
"mtp2_if/global/e"
|
|
|
"mtp2_if/logger"
|
|
|
"mtp2_if/models"
|
|
|
"net/http"
|
|
|
+
|
|
|
+ "github.com/gin-gonic/gin"
|
|
|
)
|
|
|
|
|
|
// 查询客户资料请求
|
|
|
@@ -50,3 +51,42 @@ func QueryUserInfo(c *gin.Context) {
|
|
|
appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+// GetErmcpRolefuncMenuReq 获取企业风管终端权限请求参数
|
|
|
+type GetErmcpRolefuncMenuReq struct {
|
|
|
+ LoginID int `form:"loginID" binding:"required"`
|
|
|
+}
|
|
|
+
|
|
|
+// GetErmcpRolefuncMenu 获取企业风管终端权限
|
|
|
+// @Summary 获取企业风管终端权限
|
|
|
+// @Produce json
|
|
|
+// @Security ApiKeyAuth
|
|
|
+// @Param loginID query int true "登录账号"
|
|
|
+// @Success 200 {object} models.Rolefuncmenu
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
+// @Router /Ermcp/GetErmcpRolefuncMenu [get]
|
|
|
+// @Tags 企业风险管理(app)
|
|
|
+func GetErmcpRolefuncMenu(c *gin.Context) {
|
|
|
+ appG := app.Gin{C: c}
|
|
|
+
|
|
|
+ // 获取请求参数
|
|
|
+ var req GetErmcpRolefuncMenuReq
|
|
|
+ if err := appG.C.ShouldBindQuery(&req); err != nil {
|
|
|
+ logger.GetLogger().Errorf("GetErmcpRolefuncMenu failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 获取数据
|
|
|
+ rst, err := models.GetErmcpRolefuncMenu(req.LoginID)
|
|
|
+ if err != nil {
|
|
|
+ // 查询失败
|
|
|
+ logger.GetLogger().Errorf("GetErmcpRolefuncMenu failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_QUERY_FAIL, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 查询成功返回
|
|
|
+ logger.GetLogger().Debugln("GetErmcpRolefuncMenu successed: %v", rst)
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, rst)
|
|
|
+}
|