1234567891011121314151617181920212223242526 |
- <?php
- namespace Modules\Channel\Services\WechatOpenPlatform;
- use Illuminate\Support\Facades\DB;
- class WechatOpenPlatformService
- {
- public static function getComponentInfoByCompanyUid($companyUid) {
- return DB::table('wechat_open_platform_infos')
- ->where([
- 'company_uid' => $companyUid,
- 'is_enabled' => 1,
- ])->orderBy('id', 'desc')
- ->first();
- }
- public static function getComponentInfoByAppid($componentAppid) {
- return DB::table('wechat_open_platform_infos')
- ->where([
- 'app_id' => $componentAppid,
- 'is_enabled' => 1,
- ])->orderBy('id', 'desc')
- ->first();
- }
- }
|