12345678910111213141516171819 |
- <?php
- namespace App\Models;
- class UserModel extends BaseModel
- {
- protected $table = "user";
- /**
- * 根据公众号openId获取用户
- * @param $accountOpenId string 公众号openId
- */
- public static function findByAccountOpenId($accountOpenId)
- {
- return self::query()->where("user_open_id",$accountOpenId)->first();
- }
- }
|