50 行
1.3 KiB
PHP
可执行文件
50 行
1.3 KiB
PHP
可执行文件
<?php
|
|
|
|
/**
|
|
* 商家设置的信息模型
|
|
*/
|
|
namespace Common\Model;
|
|
|
|
use Think\Model;
|
|
|
|
class StoreWxconfigModel extends Model
|
|
{
|
|
protected $tableName = 'wxconfig';
|
|
protected $fields = array(
|
|
0 => 'id', // int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
|
|
1=>'storeid',//int(11) DEFAULT NULL COMMENT '门店id',
|
|
2=>'name',//varchar(200) DEFAULT NULL COMMENT '公众号名称'
|
|
3=>'appid', //varchar(32) DEFAULT NULL COMMENT 'appid'
|
|
4=>'appsercet',//varchar(32) DEFAULT NULL appsercet
|
|
5=>'addtime', //添加的时间
|
|
6=>'token', //varchar(32) DEFAULT NULL
|
|
7=>'status',//smallint(1) DEFAULT NULL
|
|
8=>'type',//smallint(1) DEFAULT NULL
|
|
);
|
|
/*
|
|
* 获取这个门店所有的数据库设置
|
|
* @parem $storeid 门店id
|
|
* @return array 门店的数据数组
|
|
*/
|
|
public function getInfo($storeid){
|
|
$countwhere['storeid'] = $storeid;
|
|
$cache = $this->where($countwhere)->find();
|
|
return $cache;
|
|
}
|
|
/*
|
|
* 添加门店微信设置信息
|
|
*/
|
|
public function addwxconfig($item){
|
|
$re = $this->add($item);
|
|
return $re;
|
|
}
|
|
/*
|
|
* 修改门店的信息
|
|
* parem $map 修改的条件
|
|
*/
|
|
public function updatewxconfig($item,$map){
|
|
$re = $this->where($map)->save($item);
|
|
return $re;
|
|
}
|
|
|
|
} |