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