| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- namespace app\v1\logic\advert;
- use app\v1\logic\center\GameLogic;
- use plugin\saiadmin\basic\BaseLogic;
- use plugin\saiadmin\exception\ApiException;
- use plugin\saiadmin\utils\Helper;
- use app\v1\model\advert\MediaCost;
- use plugin\saiadmin\app\logic\system\SystemUserLogic;
- /**
- * 媒体消耗逻辑层
- */
- class MediaCostLogic extends BaseLogic
- {
- protected $agentSiteLogic;
- protected $agentListLogic;
- protected $gameLogic;
- protected $systemUserLogic;
- /**
- * 构造函数
- */
- public function __construct()
- {
- $this->model = new MediaCost();
- $this->agentSiteLogic = new AgentSiteLogic();
- $this->agentListLogic = new AgentListLogic();
- $this->gameLogic = new GameLogic();
- $this->systemUserLogic = new SystemUserLogic();
- }
- /**
- * 保存媒体消耗
- */
- public function save($data)
- {
- $site_id = $data['site_id'];
- $site_info = $this->agentSiteLogic->read($site_id);
- $auth_id = $site_info['auth_id'];
- $data['auth_id'] = $auth_id;
- $this->model->save($data);
- }
- }
|