在Strapi中,可以使用QueryBuilder来构建SQL查询语句。根据给定的SQL语句,以下是使用Strapi构建的等效查询:

const nowTime = new Date(); // 当前时间
const data = {
  user_id: 123 // 用户ID
};

const query = strapi.query('quota-records')
  .model.query(qb => {
    qb.select('a.*')
      .from('quota_records as a')
      .leftJoin('quota_records_user_links as b', 'a.id', 'b.quota_record_id')
      .whereRaw(`date_trunc('day', a.created_at)::date = '${nowTime}'`)
      .andWhere('a.source', 'share')
      .andWhere('b.user_id', data.user_id)
      .orderBy('a.created_at');
  })
  .fetchAll();

console.log(query); // 执行查询

请注意,${nowTime}和${data.user_id}是变量,你需要根据实际情况进行替换。此外,还需要根据你的Strapi配置和数据模型进行适当的调整