Parcourir la source

Merge branch 'v2' of https://git.qianqiusoft.com/qianqiusoft/light-apiengine into v2

huangrf il y a 5 ans
Parent
commit
84414bf5da
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      controllers/partial/SystemController.go
  2. 1 1
      utils/page_util.go

+ 1 - 1
controllers/partial/SystemController.go

@@ -277,7 +277,7 @@ func System_AddUser(c *entitys.CtrlContext) {
 	}
 	user_id := c.Ctx.GetString("user_id")
 	user.Id = sysutils.NewUUID()
-	user.Name = user.LoginId
+	user.Name = user.Name
 	user.CreateTime = models.NowLocal()
 	user.LastUpdateTime = time.Now().UnixNano()
 	user.CreateBy = user_id

+ 1 - 1
utils/page_util.go

@@ -48,7 +48,7 @@ func PageSearch(engine *xorm.Engine, controllername string, apiname string, tabl
 	} else if records%int64(rows) == 0 {
 		totalPageSize = records / int64(rows)
 	} else {
-		totalPageSize = records / int64(rows+1)
+		totalPageSize = records / int64(rows) + 1
 	}
 
 	presult := models.PageResult{}