| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- 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);
- }
- }
|