Vue mysql 变量赋值, 获取数组

    let sql = `select consignor_Id from Base_Agent_Rate where agent_Id = ? group by consignor_Id
                      UNION ALL
                      SELECT consignor_Id FROM Base_Agent_RateTwo WHERE agent_Id =? group by consignor_Id
            `;
            let agentRate = await this.dbRead.query(sql, [userInfo.consignor_Id, userInfo.consignor_Id]);           --- 多条
            let consignorids = agentRate.map(item => item.consignor_Id);
            where = {
              consignor_Id: In(consignorids)
            }

  

原文地址:https://www.cnblogs.com/lvqianqian/p/13528324.html