这家伙有点懒,还没写个性签名!
用andOnCondition()可以满足。
return $this->hasMany(Spu::className(),['sku' => 'sku'])->andOnCondition(['sku.account' => 'spu.account']);