瀏覽代碼

sys_org添加code字段,page_util.go修改bug

huangyh 6 年之前
父節點
當前提交
4c25cba44e
共有 2 個文件被更改,包括 2 次插入1 次删除
  1. 1 0
      light-apiengine.xml
  2. 1 1
      utils/page_util.go

+ 1 - 0
light-apiengine.xml

@@ -868,6 +868,7 @@
             <column isNull="false" name="name" caption="名称" type="string" size="36" dbtype="varchar(36)"/>
             <column isNull="false" name="full_name" caption="全名" type="string" size="36" dbtype="varchar(36)"/>
             <column isNull="false" name="leader" caption="领导人" type="string" size="36" dbtype="varchar(36)"/>
+            <column isNull="false" name="code" caption="编码" type="string" size="100" dbtype="varchar(100)"/>
             <column name="type" caption="组织类型" type="int32"/>
             <column name="order" caption="排序" type="int32"/>
             <column name="status" caption="状态 0:禁用   1:正常" type="int32"/>

+ 1 - 1
utils/page_util.go

@@ -43,7 +43,7 @@ func PageSearch(engine *xorm.Engine, controllername string, apiname string, tabl
 	records := cresult[0]["records"].(int64)
 
 	var totalPageSize int64 = 0
-	if totalPageSize < int64(rows) {
+	if records < int64(rows) {
 		totalPageSize = 1
 	} else if records%int64(rows) == 0 {
 		totalPageSize = records / int64(rows)