Passed
Push — v6 ( 68f5c0...1bc81c )
by 光春
04:57
created

JinBaoService::createStrParam()   A

Complexity

Conditions 5
Paths 3

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 9
rs 9.6111
cc 5
nc 3
nop 0
1
<?php
2
3
// +----------------------------------------------------------------------
4
// | ThinkLibrary 6.0 for ThinkPhP 6.0
5
// +----------------------------------------------------------------------
6
// | 版权所有 2017~2020 [ https://www.dtapp.net ]
7
// +----------------------------------------------------------------------
8
// | 官方网站: https://gitee.com/liguangchun/ThinkLibrary
9
// +----------------------------------------------------------------------
10
// | 开源协议 ( https://mit-license.org )
11
// +----------------------------------------------------------------------
12
// | gitee 仓库地址 :https://gitee.com/liguangchun/ThinkLibrary
13
// | github 仓库地址 :https://github.com/GC0202/ThinkLibrary
14
// | gitlab 仓库地址 :https://gitlab.com/liguangchun/thinklibrary
15
// | weixin 仓库地址 :https://git.weixin.qq.com/liguangchun/ThinkLibrary
16
// | huaweicloud 仓库地址 :https://codehub-cn-south-1.devcloud.huaweicloud.com/composer00001/ThinkLibrary.git
17
// | Packagist 地址 :https://packagist.org/packages/liguangchun/think-library
18
// +----------------------------------------------------------------------
19
20
namespace DtApp\ThinkLibrary\service\pinduoduo;
21
22
use DtApp\ThinkLibrary\exception\DtaException;
23
use DtApp\ThinkLibrary\Service;
24
use think\exception\HttpException;
25
26
/**
27
 * 进宝
28
 * Class JinBaoService
29
 * @package DtApp\ThinkLibrary\service\PinDuoDuo
30
 */
31
class JinBaoService extends Service
32
{
33
    /**
34
     * 接口地址
35
     * @var
36
     */
37
    private $url = 'http://gw-api.pinduoduo.com/api/router';
38
39
    /**
40
     * API接口名称
41
     * @var string
42
     */
43
    private $type = '';
44
45
    /**
46
     * 开放平台分配的
47
     * @var string
48
     */
49
    private $client_id, $client_secret = '';
50
51
    /**
52
     * 响应格式,即返回数据的格式,JSON或者XML(二选一),默认JSON,注意是大写
53
     * @var string
54
     */
55
    private $data_type = 'JSON';
56
57
    /**
58
     * API协议版本号,默认为V1,可不填
59
     * @var string
60
     */
61
    private $version = 'v1';
62
63
    /**
64
     * 需要发送的的参数
65
     * @var
66
     */
67
    private $param;
68
69
    /**
70
     * 响应内容
71
     * @var
72
     */
73
    private $output;
74
75
    /*
76
     * 配置开放平台分配的clientId
77
     */
78
    public function clientId(string $clientId): self
79
    {
80
        $this->client_id = $clientId;
81
        return $this;
82
    }
83
84
    /**
85
     * 配置开放平台分配的clientSecret
86
     * @param string $clientSecret
87
     * @return $this
88
     */
89
    public function clientSecret(string $clientSecret): self
90
    {
91
        $this->client_secret = $clientSecret;
92
        return $this;
93
    }
94
95
    /**
96
     * 响应格式,即返回数据的格式,JSON或者XML(二选一),默认JSON,注意是大写
97
     * @param string $dataType
98
     * @return $this
99
     */
100
    public function dataType(string $dataType): self
101
    {
102
        $this->data_type = $dataType;
103
        return $this;
104
    }
105
106
    /**
107
     * 请求参数
108
     * @param array $param
109
     * @return $this
110
     */
111
    public function param(array $param): self
112
    {
113
        $this->param = $param;
114
        return $this;
115
    }
116
117
    /**
118
     * 网络请求
119
     * @return $this
120
     * @throws DtaException
121
     */
122
    private function http(): self
123
    {
124
        //生成签名
125
        $sign = $this->createSign();
126
        //组织参数
127
        $strParam = $this->createStrParam();
128
        $strParam .= 'sign=' . $sign;
129
        //访问服务
130
        $url = "{$this->url}?" . $strParam;
131
        $result = file_get_contents($url);
132
        $result = json_decode($result, true);
133
        $this->output = $result;
134
        return $this;
135
    }
136
137
    /**
138
     * 获取配置信息
139
     * @return $this
140
     */
141
    private function getConfig(): self
142
    {
143
        $this->client_id = config('dtapp.pinduoduo.jinbao.client_id');
0 ignored issues
show
Documentation Bug introduced by
It seems like config('dtapp.pinduoduo.jinbao.client_id') can also be of type boolean. However, the property $client_id is declared as type string. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
144
        $this->client_secret = config('dtapp.pinduoduo.jinbao.client_secret');
0 ignored issues
show
Documentation Bug introduced by
It seems like config('dtapp.pinduoduo.jinbao.client_secret') can also be of type boolean. However, the property $client_secret is declared as type string. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
145
        return $this;
146
    }
147
148
    /**
149
     * 获取商品信息 - 多多进宝商品查询
150
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.search
151
     * @return $this
152
     */
153
    public function goodsSearch(): self
154
    {
155
        $this->type = 'pdd.ddk.goods.search';
156
        return $this;
157
    }
158
159
    /**
160
     * 新增推广位 - 创建多多进宝推广位
161
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.pid.generate
162
     * @return $this
163
     */
164
    public function goodsPidGenerate(): self
165
    {
166
        $this->type = 'pdd.ddk.goods.pid.generate';
167
        return $this;
168
    }
169
170
    /**
171
     * 管理推广位 - 查询已经生成的推广位信息
172
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.pid.query
173
     * @return $this
174
     */
175
    public function goodsPidQuery(): self
176
    {
177
        $this->type = 'pdd.ddk.goods.pid.query';
178
        return $this;
179
    }
180
181
    /**
182
     * CPS订单数据 - 查询订单详情
183
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.detail.get
184
     * @return $this
185
     */
186
    public function orderDetailGet(): self
187
    {
188
        $this->type = 'pdd.ddk.order.detail.get';
189
        return $this;
190
    }
191
192
    /**
193
     * CPS订单数据 - 最后更新时间段增量同步推广订单信息
194
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.list.increment.get
195
     * @return $this
196
     */
197
    public function orderListIncrementGet(): self
198
    {
199
        $this->type = 'pdd.ddk.order.list.increment.get';
200
        return $this;
201
    }
202
203
    /**
204
     * CPS订单数据 - 用时间段查询推广订单接口
205
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.order.list.range.get
206
     * @return $this
207
     */
208
    public function orderListRangeGet(): self
209
    {
210
        $this->type = 'pdd.ddk.order.list.range.get';
211
        return $this;
212
    }
213
214
    /**
215
     * CPA效果数据 - 查询CPA数据
216
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.finance.cpa.query
217
     * @return $this
218
     */
219
    public function financeCpaQuery(): self
220
    {
221
        $this->type = 'pdd.ddk.finance.cpa.query';
222
        return $this;
223
    }
224
225
    /**
226
     * 单品推广- 多多进宝推广链接生成
227
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.promotion.url.generate
228
     * @return $this
229
     */
230
    public function goodsPromotionUrlGenerate(): self
231
    {
232
        $this->type = 'pdd.ddk.goods.promotion.url.generate';
233
        return $this;
234
    }
235
236
    /**
237
     * 单品推广- 多多客生成单品推广小程序二维码url
238
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.weapp.qrcode.url.gen
239
     * @return $this
240
     */
241
    public function weAppQrcodeUrlGen(): self
242
    {
243
        $this->type = 'pdd.ddk.weapp.qrcode.url.gen';
244
        return $this;
245
    }
246
247
    /**
248
     * 单品推广- 多多进宝转链接口
249
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.zs.unit.url.gen
250
     * @return $this
251
     */
252
    public function goodsZsUitUrlGen(): self
253
    {
254
        $this->type = 'pdd.ddk.goods.zs.unit.url.gen';
255
        return $this;
256
    }
257
258
    /**
259
     * 活动转链 - 生成多多进宝频道推广
260
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.resource.url.gen
261
     * @return $this
262
     */
263
    public function resourceUrlGen(): self
264
    {
265
        $this->type = 'pdd.ddk.resource.url.gen';
266
        return $this;
267
    }
268
269
    /**
270
     * 活动转链 - 多多进宝主题推广链接生成
271
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.theme.prom.url.generate
272
     * @return $this
273
     */
274
    public function themePromUrlGenerate(): self
275
    {
276
        $this->type = 'pdd.ddk.theme.prom.url.generate';
277
        return $this;
278
    }
279
280
    /**
281
     * 店铺推广 - 多多客生成店铺推广链接
282
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.mall.url.gen
283
     * @return $this
284
     */
285
    public function mallUrlGen(): self
286
    {
287
        $this->type = 'pdd.ddk.mall.url.gen';
288
        return $this;
289
    }
290
291
    /**
292
     * 营销工具 - 生成营销工具推广链接
293
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.rp.prom.url.generate
294
     * @return $this
295
     */
296
    public function rpPromUrlGenerate(): self
297
    {
298
        $this->type = 'pdd.ddk.rp.prom.url.generate';
299
        return $this;
300
    }
301
302
    /**
303
     * 获取商品信息 - 多多进宝商品详情查询
304
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.detail
305
     * @return $this
306
     */
307
    public function goodsDetail(): self
308
    {
309
        $this->type = 'pdd.ddk.goods.detail';
310
        return $this;
311
    }
312
313
    /**
314
     * 获取商品信息 - 查询商品的推广计划
315
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.unit.query
316
     * @return $this
317
     */
318
    public function goodsUnitQuery(): self
319
    {
320
        $this->type = 'pdd.ddk.goods.unit.query';
321
        return $this;
322
    }
323
324
    /**
325
     * 商品&店铺检索 - 获取商品基本信息接口
326
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.basic.info.get
327
     * @return $this
328
     */
329
    public function goodsBasicInfoGet(): self
330
    {
331
        $this->type = 'pdd.ddk.goods.basic.info.get';
332
        return $this;
333
    }
334
335
    /**
336
     * 商品&店铺检索 - 查询优惠券信息
337
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.coupon.info.query
338
     * @return $this
339
     */
340
    public function couponInfoQuery(): self
341
    {
342
        $this->type = 'pdd.ddk.coupon.info.query';
343
        return $this;
344
    }
345
346
    /**
347
     * 商品&店铺检索 - 查询店铺商品
348
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.mall.goods.list.get
349
     * @return $this
350
     */
351
    public function goodsListGet(): self
352
    {
353
        $this->type = 'pdd.ddk.mall.goods.list.get';
354
        return $this;
355
    }
356
357
    /**
358
     * 多多客获取爆款排行商品接口
359
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.top.goods.list.query
360
     * @return $this
361
     */
362
    public function topGoodsListQuery(): self
363
    {
364
        $this->type = 'pdd.ddk.top.goods.list.query';
365
        return $this;
366
    }
367
368
    /**
369
     * 爆品推荐 - 多多进宝商品推荐API
370
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.recommend.get
371
     * @return $this
372
     */
373
    public function goodsRecommendGet(): self
374
    {
375
        $this->type = 'pdd.ddk.goods.recommend.get';
376
        return $this;
377
    }
378
379
    /**
380
     * 爆品推荐 - 多多进宝主题列表查询
381
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.theme.list.get
382
     * @return $this
383
     */
384
    public function themeListGet(): self
385
    {
386
        $this->type = 'pdd.ddk.theme.list.get';
387
        return $this;
388
    }
389
390
    /**
391
     * 活动选品库 - 多多进宝主题商品查询
392
     * https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.theme.goods.search
393
     * @return $this
394
     */
395
    public function themeGoodsSearch(): self
396
    {
397
        $this->type = 'pdd.ddk.theme.goods.search';
398
        return $this;
399
    }
400
401
    /**
402
     * 生成商城-频道推广链接
403
     * https://open.pinduoduo.com/application/document/api?id=pdd.ddk.cms.prom.url.
404
     * @return $this
405
     */
406
    public function cmsPromUrlGenerate(): self
407
    {
408
        $this->type = 'pdd.ddk.cms.prom.url.generate';
409
        return $this;
410
    }
411
412
    /**
413
     * 查询直播间详情
414
     * https://open.pinduoduo.com/application/document/api?id=pdd.ddk.live.detail
415
     * @return $this
416
     */
417
    public function liveDetail(): self
418
    {
419
        $this->type = 'pdd.ddk.live.detail';
420
        return $this;
421
    }
422
423
    /**
424
     * 查询直播间列表
425
     * https://open.pinduoduo.com/application/document/api?id=pdd.ddk.live.list
426
     * @return $this
427
     */
428
    public function liveList(): self
429
    {
430
        $this->type = 'pdd.ddk.live.list';
431
        return $this;
432
    }
433
434
    /**
435
     * 生成直播间推广链接
436
     * https://open.pinduoduo.com/application/document/api?id=pdd.ddk.live.url.gen
437
     * @return $this
438
     */
439
    public function liveUrlGen(): self
440
    {
441
        $this->type = 'pdd.ddk.live.url.gen';
442
        return $this;
443
    }
444
445
    /**
446
     * 多多客生成转盘抽免单url
447
     * https://open.pinduoduo.com/application/document/api?id=pdd.ddk.lottery.url.gen
448
     * @return $this
449
     */
450
    public function lotteryUrlGen(): self
451
    {
452
        $this->type = 'pdd.ddk.lottery.url.gen';
453
        return $this;
454
    }
455
456
    /**
457
     * 查询是否绑定备案
458
     * https://open.pinduoduo.com/application/document/api?id=pdd.ddk.member.authority.query
459
     * @return $this
460
     */
461
    public function memberAuthorityQuery(): self
462
    {
463
        $this->type = 'pdd.ddk.member.authority.query';
464
        return $this;
465
    }
466
467
    /**
468
     * 查询商品标签列表
469
     * https://open.pinduoduo.com/application/document/api?id=pdd.goods.opt.get
470
     * @return $this
471
     */
472
    public function goodsOptGet(): self
473
    {
474
        $this->type = 'pdd.goods.opt.get';
475
        return $this;
476
    }
477
478
    /**
479
     * 自定义接口
480
     * @param string $type
481
     * @return $this
482
     */
483
    public function setMethod($type = ''): self
484
    {
485
        $this->type = $type;
486
        return $this;
487
    }
488
489
490
    /**
491
     * 返回数组数据
492
     * @return array|mixed
493
     * @throws DtaException
494
     */
495
    public function toArray()
496
    {
497
        //首先检测是否支持curl
498
        if (!extension_loaded("curl")) {
499
            throw new HttpException(404, '请开启curl模块!');
500
        }
501
        if (empty($this->client_id)) {
502
            $this->getConfig();
503
        }
504
        if (empty($this->client_id)) {
505
            throw new DtaException('请检查client_id参数');
506
        }
507
        $this->param['type'] = $this->type;
508
        $this->param['client_id'] = $this->client_id;
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->client_id can also be of type boolean. However, the property $client_id is declared as type string. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
509
        $this->param['timestamp'] = time();
510
        $this->param['data_type'] = $this->data_type;
511
        $this->param['version'] = $this->version;
512
        $this->http();
513
        if (isset($this->output['error_response'])) {
514
            // 错误
515
            if (is_array($this->output)) {
516
                return $this->output;
517
            }
518
            if (is_object($this->output)) {
519
                return $this->object2array($this->output);
520
            }
521
            return json_decode($this->output, true);
522
        }
523
        // 正常
524
        if (is_array($this->output)) {
525
            return $this->output;
526
        }
527
        if (is_object($this->output)) {
528
            $this->output = $this->object2array($this->output);
529
            return $this->output;
530
        }
531
        $this->output = json_decode($this->output, true);
532
        return $this->output;
533
    }
534
535
    /**
536
     * @param $object
537
     * @return array
538
     */
539
    private function object2array(&$object): array
540
    {
541
        if (is_object($object)) {
542
            $arr = (array)($object);
543
        } else {
544
            $arr = &$object;
545
        }
546
        if (is_array($arr)) {
547
            foreach ($arr as $varName => $varValue) {
548
                $arr[$varName] = $this->object2array($varValue);
549
            }
550
        }
551
        return $arr;
552
    }
553
554
    /**
555
     * 签名
556
     * @return string
557
     * @throws DtaException
558
     */
559
    private function createSign(): string
560
    {
561
        if (empty($this->client_secret)) {
562
            $this->getConfig();
563
        }
564
        if (empty($this->client_secret)) {
565
            throw new DtaException('请检查client_secret参数}');
566
        }
567
        $sign = $this->client_secret;
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->client_secret can also be of type boolean. However, the property $client_secret is declared as type string. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
568
        ksort($this->param);
569
        foreach ($this->param as $key => $val) {
570
            if ($key !== '' && $val !== '') {
571
                $sign .= $key . $val;
572
            }
573
        }
574
        $sign .= $this->client_secret;
575
        $sign = strtoupper(md5($sign));
576
        return $sign;
577
    }
578
579
    /**
580
     * 组参
581
     * @return string
582
     */
583
    private function createStrParam(): string
584
    {
585
        $strParam = '';
586
        foreach ($this->param as $key => $val) {
587
            if ($key !== '' && $val !== '' && !is_array($val)) {
588
                $strParam .= $key . '=' . urlencode($val) . '&';
589
            }
590
        }
591
        return $strParam;
592
    }
593
594
    /**
595
     * 获取频道ID
596
     * @return array[]
597
     */
598
    public function getChannelTypeList(): array
599
    {
600
        return [
601
            [
602
                // https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.goods.recommend.get
603
                'name' => '商品推荐',
604
                'list' => [
605
                    [
606
                        'name' => '1.9包邮',
607
                        'channel_type' => 0
608
                    ],
609
                    [
610
                        'name' => '今日爆款',
611
                        'channel_type' => 1
612
                    ],
613
                    [
614
                        'name' => '品牌清仓',
615
                        'channel_type' => 2
616
                    ],
617
                    [
618
                        'name' => '相似商品推荐',
619
                        'channel_type' => 3
620
                    ],
621
                    [
622
                        'name' => '猜你喜欢',
623
                        'channel_type' => 4
624
                    ],
625
                    [
626
                        'name' => '实时热销',
627
                        'channel_type' => 5
628
                    ],
629
                    [
630
                        'name' => '实时收益',
631
                        'channel_type' => 6
632
                    ],
633
                    [
634
                        'name' => '今日畅销',
635
                        'channel_type' => 7
636
                    ],
637
                    [
638
                        'name' => '高佣榜单',
639
                        'channel_type' => 8
640
                    ],
641
                ]
642
            ],
643
        ];
644
    }
645
646
    /**
647
     * 获取频道来源ID
648
     * @return array[]
649
     */
650
    public function getResourceTypeList(): array
651
    {
652
        return [
653
            [
654
                // https://jinbao.pinduoduo.com/third-party/api-detail?apiName=pdd.ddk.resource.url.gen
655
                'name' => '频道推广',
656
                'list' => [
657
                    [
658
                        'name' => '限时秒杀',
659
                        'resource_type' => 4
660
                    ],
661
                    [
662
                        'name' => '充值中心',
663
                        'resource_type' => 39997
664
                    ],
665
                    [
666
                        'name' => '转链',
667
                        'resource_type' => 39998
668
                    ],
669
                    [
670
                        'name' => '百亿补贴',
671
                        'resource_type' => 39996
672
                    ],
673
                ]
674
            ],
675
        ];
676
    }
677
}
678