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)
            }

  

posted @ 2020-08-19 11:32  小小小菜鸟1  阅读(321)  评论(0编辑  收藏  举报