Vue mysql 变量赋值, 获取数组

时间:2020-08-19 12:54:09   收藏:0   阅读:86
    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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!