Fix problems modifying personal information,Upgrade route configuration format

This commit is contained in:
zhangwenjian
2020-05-25 21:30:29 +08:00
parent e07cb22255
commit c0b8199c36
18 changed files with 355 additions and 244 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ func InsertDept(c *gin.Context) {
// @Security Bearer
func UpdateDept(c *gin.Context) {
var data models.Dept
err := c.BindWith(&data, binding.JSON)
err := c.BindJSON(&data)
tools.HasError(err, "", -1)
data.UpdateBy = tools.GetUserIdStr(c)
result, err := data.Update(data.DeptId)
+1 -1
View File
@@ -172,7 +172,7 @@ func InsertSysUser(c *gin.Context) {
// @Router /api/v1/sysuser/{userId} [put]
func UpdateSysUser(c *gin.Context) {
var data models.SysUser
err := c.BindWith(&data, binding.JSON)
err := c.Bind(&data)
tools.HasError(err, "数据解析失败", -1)
data.UpdateBy = tools.GetUserIdStr(c)
result, err := data.Update(data.UserId)