1234567891011121314151617181920212223242526272829 |
- <?php
- class PostbackKlUpdateTest extends TestInit
- {
- public function testInit()
- {
- $data = \app\main\service\ToutiaoNotifyService::instance()->getKlValue(1, 'tout', 'kl');
- var_dump($data);
- }
- public function testRule()
- {
- $admin_id = 2;
- $mPostBackRule = new \app\admin\model\PostbackRules();
- $data = $mPostBackRule->where('find_in_set(channel_ids,'.$admin_id.')')->order('weight', 'desc')->value('id');
- if (!$data) {
- $data = $mPostBackRule->where('channel_ids', '*')->value('id');
- }
- var_dump($data);
- }
- public function testReferral()
- {
- model('Postbackklreferral')
- ->where('rule_id', 1)
- ->delete();
- }
- }
|