新版订单消耗系统

AccountConfig.php 612B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: shensong
  5. * Date: 2020/12/23
  6. * Time: 16:26
  7. */
  8. namespace App\Models;
  9. use Illuminate\Database\Eloquent\Model;
  10. class AccountConfig extends Model
  11. {
  12. protected $table = 'account_config';
  13. public $timestamps = false;
  14. protected $hidden = ['is_delete', 'created_at', 'updated_at'];
  15. protected static $unguarded = true;
  16. public static function getOperatorAccountIdList($userName, $month) {
  17. return self::query()->where('is_delete', 0)->where('month', $month.'-01')
  18. ->where('operator', $userName)->select('advertiser_id')->get();
  19. }
  20. }