Эх сурвалжийг харах

fix:删除多余方法&管理列表页获取每次请求均获取数量

duxin 3 жил өмнө
parent
commit
7b3a2c2d9b

+ 0 - 4
rpc/manager/init/init.go

@@ -49,10 +49,6 @@ func init() {
 	//初始NSQ
 	nm := C.Nsq
 	model.InitNsqConfig(&nm)
-
-	//初始Sensitive
-	sm := C.Sensitive
-	model.InitSensitive(&sm)
 	//
 	//初始化日志信息
 	conf.MustLoad(*logFile, &logc)

+ 3 - 3
rpc/manager/internal/logic/infolistlogic.go

@@ -79,11 +79,11 @@ func (l *InfoListLogic) InfoList(in *manager.InfoListReq) (*manager.InfoListResp
 	if in.PageSize <= 0 {
 		in.PageSize = 10
 	}
-	if in.PageIndex == 1 {
-		count = model.Mysql.CountBySql(`SELECT count(1)  from (SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published  from information ` + queryInfo + `
+
+	count = model.Mysql.CountBySql(`SELECT count(1)  from (SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published  from information ` + queryInfo + `
 			union all
 			SELECT id,type,status,phone,contact_person,contact_phone,title,create_time,is_del,published  from supply_info ` + queryInfo + ` ) a`)
-	}
+
 	var offset int
 	if in.PageIndex <= 1 {
 		offset = 0