WechatAccountModel.php 512 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Models;
  3. class WechatAccountModel extends BaseModel
  4. {
  5. protected $table = "wechat_account";
  6. public static function findByWechatAppCode($code)
  7. {
  8. return self::query()->where("wechat_app_code",$code)->first();
  9. }
  10. /**
  11. * 获取微信公众号信息
  12. * @param $wechatAppId string 微信公众号appId
  13. */
  14. public static function findByWechatAppId($wechatAppId)
  15. {
  16. return self::query()->where("wechat_app_id",$wechatAppId)->first();
  17. }
  18. }