1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- /**
- * MpAdSourceModel.php UTF-8
- *
- *
- * @date : 2021-03-08 11:47
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : luowei <lw@huosdk.com>
- * @version : HUOSDK 9.0
- */
- namespace huomp\model\weixin;
- class MpAdSourceModel extends CommonModel {
- protected $table = 'mp_ad_source';
- protected $pk = 'id';
- /* 开启自动写入时间戳字段 */
- protected $cache_key_prefix = '';
- protected $type
- = [
- 'id' => 'integer',
- 'conf_id' => 'integer',
- 'type' => 'string',
- 'name' => 'string',
- 'description' => 'string',
- 'advertiser_conf_id' => 'integer',
- 'source_id' => 'string',
- 'create_time' => 'integer',
- 'update_time' => 'integer',
- ];
- public function getInfoByConfType($conf_id, $agent_id, $advertiser_conf_id, $type = 'WECHAT_MINI_PROGRAM') {
- $_map = [
- 'conf_id' => $conf_id,
- 'agent_id' => $agent_id,
- 'type' => $type,
- 'advertiser_conf_id' => $advertiser_conf_id
- ];
- $_data = $this->where($_map)
- ->find();
- if (is_object($_data)) {
- $_data = $_data->toArray();
- }
- return $_data;
- }
- }
|