AccountCompany.php 455 B

12345678910111213141516171819
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class AccountCompany extends Base
  9. {
  10. public static function IsOpenAccount($supplierNo){
  11. return self::alias("a")->leftJoin("account b" ,"b.id=a.account_id")
  12. ->where([ ['a.is_del', '=', 0],
  13. ['a.status', '=', 1],
  14. ['b.level', '=', 3]])->where(["companyCode"=>$supplierNo])->findOrEmpty()->isEmpty();
  15. }
  16. }