初始化代码

This commit is contained in:
2025-12-22 14:32:54 +08:00
parent e27ab90d9f
commit d02b31a8b9
1459 changed files with 240973 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
<?php
namespace app\admin\model;
use app\BaseModel;
use think\Model;
class WxUpload extends BaseModel
{
//定义表名
protected $name = 'longbing_card_wx_upload';
protected $resultSetType = 'collection';
/**
* @author chenniang
* @DataTime: 2020-03-18 12:23
* @功能说明:查找配置
*/
public function settingInfo($dis,$field='*'){
$data = $this->where($dis)->find();
if(empty($data)){
$this->insert($dis);
}
return $this->where($dis)->field($field)->find()->toArray();
}
/**
* @author chenniang
* @DataTime: 2020-06-08 18:49
* @功能说明:添加
*/
public function settingAdd($data){
$res = $this->insert($data);
return $res;
}
/**
* @author chenniang
* @DataTime: 2020-03-18 12:24
* @功能说明:配置编辑
*/
public function settingUpdate($dis,$data){
$data['app_id'] = !empty($data['app_id'])?implode(',',$data['app_id']):'';
$res = $this->where($dis)->update($data);
return $res;
}
}