|
@@ -520,7 +520,6 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
sqlAppendArgs = append(sqlAppendArgs, comSqlArgs...)
|
|
|
var count int64
|
|
|
start := (in.Current_page - 1) * in.Page_size
|
|
|
- end := start + in.Page_size
|
|
|
args := []interface{}{in.PositionId, in.PositionId, in.PositionId}
|
|
|
args = append(args, sqlAppendArgs...)
|
|
|
sqlAppend2 := ""
|
|
@@ -530,7 +529,7 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
newArgs = append(newArgs, sqlAppendArgs...)
|
|
|
count = CrmMysql.CountBySql(`select count(1) as count from crm.connection a where a.position_id=?`+sqlAppend1, newArgs...)
|
|
|
sqlAppend2 = ` limit ?,?`
|
|
|
- args = append(args, start, end)
|
|
|
+ args = append(args, start, in.Page_size)
|
|
|
itemArgs := []interface{}{in.PositionId}
|
|
|
itemArgs = append(itemArgs, comSqlArgs...)
|
|
|
items := CrmMysql.SelectBySql(`SELECT itype,SUM(1) AS sum FROM crm.connection WHERE position_id=?`+comSqlAppend+` GROUP BY itype`, itemArgs...)
|
|
@@ -737,6 +736,7 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
|
|
|
if !dbPaging {
|
|
|
count = int64(len(csList.List))
|
|
|
if count > 0 && start < count {
|
|
|
+ end := start + in.Page_size
|
|
|
if end > count {
|
|
|
end = count
|
|
|
}
|