WechatOpenPlatformService.php 726 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Modules\Channel\Services\WechatOpenPlatform;
  3. use Illuminate\Support\Facades\DB;
  4. class WechatOpenPlatformService
  5. {
  6. public static function getComponentInfoByCompanyUid($companyUid) {
  7. return DB::table('wechat_open_platform_infos')
  8. ->where([
  9. 'company_uid' => $companyUid,
  10. 'is_enabled' => 1,
  11. ])->orderBy('id', 'desc')
  12. ->first();
  13. }
  14. public static function getComponentInfoByAppid($componentAppid) {
  15. return DB::table('wechat_open_platform_infos')
  16. ->where([
  17. 'app_id' => $componentAppid,
  18. 'is_enabled' => 1,
  19. ])->orderBy('id', 'desc')
  20. ->first();
  21. }
  22. }