Commit 807eb2cf authored by rlgy's avatar rlgy

update

parent 501875bf
......@@ -39,6 +39,8 @@ class CoinMidGuess extends BaseActiveRecord
*/
public static function existsCount($device_id, $address)
{
return self::find()->where(['device_id' => $device_id, 'address' => $address])->count();
$address_count = self::find()->where(['address' => $address])->count();
$driveid_count = self::find()->where(['device_id' => $device_id])->count();
return $address_count > $driveid_count ? $address_count : $driveid_count;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment