| | |
| | | func (uc UserController) SaveAuth(c *gin.Context) { |
| | | var userEditVo UserEditVo |
| | | err := c.BindJSON(&userEditVo) |
| | | if err !=nil || userEditVo.Id =="" || userEditVo.NewPwd =="" || userEditVo.UserName == "" { |
| | | if err !=nil || userEditVo.Id =="" || userEditVo.UserName == "" { |
| | | util.ResponseFormat(c,code.RequestParamError,"") |
| | | return |
| | | } |
| | |
| | | var api dbapi.UserApi |
| | | b, d := api.SaveAuth(paramBody) |
| | | if b { |
| | | auth.SetOutUser(userEditVo.Id) |
| | | util.ResponseFormat(c,code.UpdateSuccess,d) |
| | | } else { |
| | | util.ResponseFormat(c,code.UpdateFail,"保存失败") |