|
|
@@ -11,22 +11,16 @@ import (
|
|
|
"go.uber.org/zap"
|
|
|
)
|
|
|
|
|
|
-// AddUser 实名认证添加用户
|
|
|
-// @Summary 实名认证添加用户
|
|
|
+// AddUser 查询用户电子签记录表
|
|
|
+// @Summary 查询用户电子签记录表
|
|
|
// @Security ApiKeyAuth
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
-// @Param data body request.AddUserReq true "入参"
|
|
|
-// @Success 200 {object} response.Response{msg=string} "出参"
|
|
|
-// @Router /Account/AddUser [post]
|
|
|
+// @Success 200 {object} response.Response{data=[]account.Useresignrecord,msg=string} "出参"
|
|
|
+// @Router /Account/QueryUserESignRecord [get]
|
|
|
// @Tags 账户服务
|
|
|
-func AddUser(c *gin.Context) {
|
|
|
+func QueryUserESignRecord(c *gin.Context) {
|
|
|
g := utils.GinUtils{C: c}
|
|
|
- r := request.AddUserReq{}
|
|
|
- g.BindJsonReq(&r)
|
|
|
- if g.Err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
|
|
|
// 获取请求账号信息
|
|
|
claims := g.GetClaims()
|
|
|
@@ -34,24 +28,30 @@ func AddUser(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if err := signService.AddUser(r, claims.UserID); err == nil {
|
|
|
- response.Ok(g.C)
|
|
|
+ if rsp, err := signService.QueryUserESignRecord(claims.UserID); err == nil {
|
|
|
+ response.OkWithDetailed(rsp, "查询成功", g.C)
|
|
|
} else {
|
|
|
global.M2A_LOG.Error(err.Error(), zap.Error(err))
|
|
|
response.FailWithMessage(err.Error(), c)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// AddUser 查询用户电子签记录表
|
|
|
-// @Summary 查询用户电子签记录表
|
|
|
+// AddUser 实名认证添加用户
|
|
|
+// @Summary 实名认证添加用户
|
|
|
// @Security ApiKeyAuth
|
|
|
// @accept application/json
|
|
|
// @Produce application/json
|
|
|
-// @Success 200 {object} response.Response{data=[]account.Useresignrecord,msg=string} "出参"
|
|
|
-// @Router /Account/QueryUserESignRecord [get]
|
|
|
+// @Param data body request.AddUserReq true "入参"
|
|
|
+// @Success 200 {object} response.Response{msg=string} "出参"
|
|
|
+// @Router /Account/AddUser [post]
|
|
|
// @Tags 账户服务
|
|
|
-func QueryUserESignRecord(c *gin.Context) {
|
|
|
+func AddUser(c *gin.Context) {
|
|
|
g := utils.GinUtils{C: c}
|
|
|
+ r := request.AddUserReq{}
|
|
|
+ g.BindJsonReq(&r)
|
|
|
+ if g.Err != nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
// 获取请求账号信息
|
|
|
claims := g.GetClaims()
|
|
|
@@ -59,8 +59,8 @@ func QueryUserESignRecord(c *gin.Context) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- if rsp, err := signService.QueryUserESignRecord(claims.UserID); err == nil {
|
|
|
- response.OkWithDetailed(rsp, "查询成功", g.C)
|
|
|
+ if err := signService.AddUser(r, claims.UserID); err == nil {
|
|
|
+ response.Ok(g.C)
|
|
|
} else {
|
|
|
global.M2A_LOG.Error(err.Error(), zap.Error(err))
|
|
|
response.FailWithMessage(err.Error(), c)
|