40 行
1.3 KiB
PHP
可执行文件
40 行
1.3 KiB
PHP
可执行文件
<?php
|
||
|
||
namespace Common\Model;
|
||
//[1.5.52]
|
||
|
||
/**
|
||
* 商户插件
|
||
* Class RetailPlugMerchantModel
|
||
* @package Common\Model
|
||
*/
|
||
class RetailPlugMerchantModel extends BaseModel
|
||
{
|
||
protected $tableName = 'plug_merchant';
|
||
const ID = 'id'; //int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||
const PLUG_ID = 'plug_id'; //int(11) DEFAULT NULL COMMENT '插件id',
|
||
const ADD_TIME = 'addtime'; //int(11) DEFAULT NULL COMMENT '数据添加时间。',
|
||
const OPEN_TIME = 'opentime'; //int(11) DEFAULT NULL COMMENT '开启时间',
|
||
const MERCHANT_ID = 'merchant_id'; //int(11) DEFAULT NULL COMMENT '商户id',
|
||
const M_STATUS = 'm_status'; //tinyint(1) DEFAULT NULL COMMENT '状态:1,可用,2,不可用;',
|
||
const STATUS = 'status'; //tinyint(1) DEFAULT '1' COMMENT '商户是否开启插件 1:开启 2:关闭',
|
||
|
||
/**
|
||
* 查询商户是否拥有插件的权限
|
||
* @param $param
|
||
* [
|
||
* merchant_id
|
||
* identification_arr 插件唯一标识集合
|
||
* ]
|
||
* @return mixed
|
||
*/
|
||
public function plug_permissions($fields, $where)
|
||
{
|
||
$list = $this->alias('m')
|
||
->join('ls_plug as p on p.id=m.plug_id')
|
||
->field($fields)
|
||
->where($where)
|
||
->select();
|
||
return $list;
|
||
}
|
||
} |