瀏覽代碼

feat:xiugai

wangchuanjin 1 年之前
父節點
當前提交
9306d2d336
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      api/internal/service/network.go

+ 3 - 1
api/internal/service/network.go

@@ -521,7 +521,9 @@ func (n *network) List(in *types.NetWorkListReq) *types.Reply {
 		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)
-		items := CrmMysql.SelectBySql(`SELECT itype,SUM(1) AS sum FROM crm.connection WHERE position_id=?`+comSqlAppend+` GROUP BY itype`, comSqlArgs...)
+		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...)
 		if items != nil {
 			for _, v := range *items {
 				switch Int64All(v["itype"]) {