first commit
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\CustomerServiceLogic;
|
||||
|
||||
/**
|
||||
* 客服设置
|
||||
* Class CustomerServiceController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class CustomerServiceController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取客服设置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/2/15 12:05 下午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = CustomerServiceLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置客服设置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/2/15 12:11 下午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
CustomerServiceLogic::setConfig($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
124
app/adminapi/controller/setting/LanguageController.php
Normal file
124
app/adminapi/controller/setting/LanguageController.php
Normal file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\LanguageLists;
|
||||
use app\adminapi\logic\setting\LanguageLogic;
|
||||
use app\adminapi\validate\setting\LanguageValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 语言包控制器
|
||||
* Class LanguageController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class LanguageController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取语言包列表
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new LanguageLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new LanguageValidate())->post()->goCheck('add');
|
||||
$result = LanguageLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LanguageLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new LanguageValidate())->post()->goCheck('edit');
|
||||
$result = LanguageLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LanguageLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new LanguageValidate())->post()->goCheck('delete');
|
||||
LanguageLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取语言详情
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 13:59
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new LanguageValidate())->goCheck('detail');
|
||||
$result = LanguageLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 更改状态
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/2/22 10:18
|
||||
*/
|
||||
public function updateStatus()
|
||||
{
|
||||
$params = (new LanguageValidate())->post()->goCheck('status');
|
||||
$result = LanguageLogic::updateStatus($params);
|
||||
if (true === $result) {
|
||||
return $this->success('修改成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LanguageLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取所有语言
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author BD
|
||||
* @date 2024/10/13 10:54
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
$result = LanguageLogic::getAllData();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
}
|
||||
122
app/adminapi/controller/setting/LanguagePagController.php
Normal file
122
app/adminapi/controller/setting/LanguagePagController.php
Normal file
@@ -0,0 +1,122 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\LanguagePagLists;
|
||||
use app\adminapi\logic\setting\LanguagePagLogic;
|
||||
use app\adminapi\validate\setting\LanguagePagValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 语言包控制器
|
||||
* Class LanguagePagController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class LanguagePagController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取语言包列表
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new LanguagePagLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new LanguagePagValidate())->post()->goCheck('add');
|
||||
$result = LanguagePagLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LanguagePagLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new LanguagePagValidate())->post()->goCheck('edit');
|
||||
$result = LanguagePagLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LanguagePagLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new LanguagePagValidate())->post()->goCheck('delete');
|
||||
LanguagePagLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取语言包详情
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new LanguagePagValidate())->goCheck('detail');
|
||||
$result = LanguagePagLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 同步语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function sync()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
LanguagePagLogic::sync($params);
|
||||
return $this->success('同步成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 翻译语言包
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/01/14 13:50
|
||||
*/
|
||||
public function trans()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = LanguagePagLogic::trans($params);
|
||||
if (true === $result) {
|
||||
return $this->success('翻译成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(LanguagePagLogic::getError());
|
||||
}
|
||||
|
||||
}
|
||||
125
app/adminapi/controller/setting/RechargeMethodController.php
Normal file
125
app/adminapi/controller/setting/RechargeMethodController.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\RechargeMethodLists;
|
||||
use app\adminapi\logic\setting\RechargeMethodLogic;
|
||||
use app\adminapi\validate\setting\RechargeMethodValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 充值方式控制器
|
||||
* Class RechargeMethodController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class RechargeMethodController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取充值方式列表
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new RechargeMethodLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加充值方式
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new RechargeMethodValidate())->post()->goCheck('add');
|
||||
$result = RechargeMethodLogic::add($params);
|
||||
if (true === $result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeMethodLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑充值方式
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new RechargeMethodValidate())->post()->goCheck('edit');
|
||||
$result = RechargeMethodLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeMethodLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除充值方式
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new RechargeMethodValidate())->post()->goCheck('delete');
|
||||
RechargeMethodLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取充值方式详情
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/11/30 15:22
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new RechargeMethodValidate())->goCheck('detail');
|
||||
$result = RechargeMethodLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 更改状态
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2323/2/22 10:18
|
||||
*/
|
||||
public function updateStatus()
|
||||
{
|
||||
$params = (new RechargeMethodValidate())->post()->goCheck('status');
|
||||
$result = RechargeMethodLogic::updateStatus($params);
|
||||
if (true === $result) {
|
||||
return $this->success('修改成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RechargeMethodLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取全部充值方式
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author BD
|
||||
* @date 2323/10/13 10:54
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
$result = RechargeMethodLogic::getAllData();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
73
app/adminapi/controller/setting/StorageController.php
Normal file
73
app/adminapi/controller/setting/StorageController.php
Normal file
@@ -0,0 +1,73 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\StorageLogic;
|
||||
use app\adminapi\validate\setting\StorageValidate;
|
||||
use think\response\Json;
|
||||
|
||||
|
||||
/**
|
||||
* 存储设置控制器
|
||||
* Class StorageController
|
||||
* @package app\adminapi\controller\setting\shop
|
||||
*/
|
||||
class StorageController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取存储引擎列表
|
||||
* @return Json
|
||||
* @author BD
|
||||
* @date 2023/4/20 16:13
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->success('获取成功', StorageLogic::lists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 存储配置信息
|
||||
* @return Json
|
||||
* @author BD
|
||||
* @date 2023/4/20 16:19
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$param = (new StorageValidate())->get()->goCheck('detail');
|
||||
return $this->success('获取成功', StorageLogic::detail($param));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置存储参数
|
||||
* @return Json
|
||||
* @author BD
|
||||
* @date 2023/4/20 16:19
|
||||
*/
|
||||
public function setup()
|
||||
{
|
||||
$params = (new StorageValidate())->post()->goCheck('setup');
|
||||
$result = StorageLogic::setup($params);
|
||||
if (true === $result) {
|
||||
return $this->success('配置成功', [], 1, 1);
|
||||
}
|
||||
return $this->success($result, [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 切换存储引擎
|
||||
* @return Json
|
||||
* @author BD
|
||||
* @date 2023/4/20 16:19
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$params = (new StorageValidate())->post()->goCheck('change');
|
||||
StorageLogic::change($params);
|
||||
return $this->success('切换成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\TransactionSettingsLogic;
|
||||
use app\adminapi\validate\setting\TransactionSettingsValidate;
|
||||
|
||||
/**
|
||||
* 交易设置
|
||||
* Class TransactionSettingsController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class TransactionSettingsController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取交易设置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/2/15 11:40 上午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = TransactionSettingsLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置交易设置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/2/15 11:50 上午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new TransactionSettingsValidate())->post()->goCheck('setConfig');
|
||||
TransactionSettingsLogic::setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
99
app/adminapi/controller/setting/dict/DictDataController.php
Normal file
99
app/adminapi/controller/setting/dict/DictDataController.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\dict;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\dict\DictDataLists;
|
||||
use app\adminapi\logic\setting\dict\DictDataLogic;
|
||||
use app\adminapi\validate\dict\DictDataValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 字典数据
|
||||
* Class DictDataController
|
||||
* @package app\adminapi\controller\dictionary
|
||||
*/
|
||||
class DictDataController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取字典数据列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:35
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new DictDataLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加字典数据
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:13
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DictDataValidate())->post()->goCheck('add');
|
||||
DictDataLogic::save($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑字典数据
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:13
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DictDataValidate())->post()->goCheck('edit');
|
||||
DictDataLogic::save($params);
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除字典数据
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:13
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new DictDataValidate())->post()->goCheck('id');
|
||||
DictDataLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取字典详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 17:14
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DictDataValidate())->goCheck('id');
|
||||
$result = DictDataLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
116
app/adminapi/controller/setting/dict/DictTypeController.php
Normal file
116
app/adminapi/controller/setting/dict/DictTypeController.php
Normal file
@@ -0,0 +1,116 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\dict;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\dict\DictTypeLists;
|
||||
use app\adminapi\logic\setting\dict\DictTypeLogic;
|
||||
use app\adminapi\validate\dict\DictTypeValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 字典类型
|
||||
* Class DictTypeController
|
||||
* @package app\adminapi\controller\dict
|
||||
*/
|
||||
class DictTypeController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取字典类型列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 15:50
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new DictTypeLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加字典类型
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:24
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DictTypeValidate())->post()->goCheck('add');
|
||||
DictTypeLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑字典类型
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:25
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DictTypeValidate())->post()->goCheck('edit');
|
||||
DictTypeLogic::edit($params);
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除字典类型
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:25
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new DictTypeValidate())->post()->goCheck('delete');
|
||||
DictTypeLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取字典详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 16:25
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DictTypeValidate())->goCheck('detail');
|
||||
$result = DictTypeLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取字典类型数据
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/10/13 10:46
|
||||
*/
|
||||
public function all()
|
||||
{
|
||||
$result = DictTypeLogic::getAllData();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
39
app/adminapi/controller/setting/system/CacheController.php
Normal file
39
app/adminapi/controller/setting/system/CacheController.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\system\CacheLogic;
|
||||
|
||||
/**
|
||||
* 系统缓存
|
||||
* Class CacheController
|
||||
* @package app\adminapi\controller\setting\system
|
||||
*/
|
||||
class CacheController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 清除系统缓存
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/8 16:34
|
||||
*/
|
||||
public function clear()
|
||||
{
|
||||
CacheLogic::clear();
|
||||
return $this->success('清除成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
69
app/adminapi/controller/setting/system/LogController.php
Normal file
69
app/adminapi/controller/setting/system/LogController.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\system\LogLists;
|
||||
use app\adminapi\logic\setting\system\OperationLogLogic;
|
||||
use app\adminapi\validate\setting\OperationLogValidate;
|
||||
|
||||
/**
|
||||
* 系统日志
|
||||
* Class LogController
|
||||
* @package app\adminapi\controller\setting\system
|
||||
*/
|
||||
class LogController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看系统日志列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2021/8/3 4:25 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new LogLists());
|
||||
}
|
||||
/**
|
||||
* @notes 删除已选择的系统日志
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/15 19:00
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new OperationLogValidate())->post()->goCheck('id');
|
||||
$result = OperationLogLogic::deleteTable($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OperationLogLogic::getError());
|
||||
}
|
||||
/**
|
||||
* @notes 删除系统日志
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/15 19:00
|
||||
*/
|
||||
public function deleteAll()
|
||||
{
|
||||
$result = OperationLogLogic::deleteAll();
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OperationLogLogic::getError());
|
||||
}
|
||||
}
|
||||
42
app/adminapi/controller/setting/system/SystemController.php
Normal file
42
app/adminapi/controller/setting/system/SystemController.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||||
// | 访问官网:https://www.likeadmin.cn
|
||||
// | likeadmin团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeadminTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\system\SystemLogic;
|
||||
|
||||
|
||||
/**
|
||||
* 系统维护
|
||||
* Class SystemController
|
||||
* @package app\adminapi\controller\setting\system
|
||||
*/
|
||||
class SystemController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取系统环境信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/28 18:36
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
$result = SystemLogic::getInfo();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
72
app/adminapi/controller/setting/user/UserController.php
Normal file
72
app/adminapi/controller/setting/user/UserController.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting\user;
|
||||
|
||||
use app\adminapi\{
|
||||
controller\BaseAdminController,
|
||||
logic\setting\user\UserLogic,
|
||||
validate\setting\UserConfigValidate
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* 设置-用户设置控制器
|
||||
* Class UserController
|
||||
* @package app\adminapi\controller\config
|
||||
*/
|
||||
class UserController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取用户设置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/3/29 10:08
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置用户设置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/3/29 10:08
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new UserConfigValidate())->post()->goCheck('user');
|
||||
(new UserLogic())->setConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取注册配置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/3/29 10:08
|
||||
*/
|
||||
public function getRegisterConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getRegisterConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置注册配置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2024/3/29 10:08
|
||||
*/
|
||||
public function setRegisterConfig()
|
||||
{
|
||||
$params = (new UserConfigValidate())->post()->goCheck('register');
|
||||
(new UserLogic())->setRegisterConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
142
app/adminapi/controller/setting/web/WebSettingController.php
Normal file
142
app/adminapi/controller/setting/web/WebSettingController.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting\web;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\web\WebSettingLogic;
|
||||
use app\adminapi\validate\setting\WebSettingValidate;
|
||||
|
||||
/**
|
||||
* 网站设置
|
||||
* Class WebSettingController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class WebSettingController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取网站信息
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 15:44
|
||||
*/
|
||||
public function getWebsite()
|
||||
{
|
||||
$result = WebSettingLogic::getWebsiteInfo();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置网站信息
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 15:45
|
||||
*/
|
||||
public function setWebsite()
|
||||
{
|
||||
$params = (new WebSettingValidate())->post()->goCheck('website');
|
||||
WebSettingLogic::setWebsiteInfo($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取网站配置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 15:44
|
||||
*/
|
||||
public function getWebsiteProject()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = WebSettingLogic::getWebsiteProject($params);
|
||||
if ($result === false) {
|
||||
return $this->fail(WebSettingLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置网站配置
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 15:45
|
||||
*/
|
||||
public function setWebsiteProject()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = WebSettingLogic::setWebsiteProject($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(WebSettingLogic::getError() ?: '操作失败');
|
||||
}
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取国际区号
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 16:10
|
||||
*/
|
||||
public function getRegioncodeAll()
|
||||
{
|
||||
$result = WebSettingLogic::getRegioncodeAll();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取备案信息
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 16:10
|
||||
*/
|
||||
public function getCopyright()
|
||||
{
|
||||
$result = WebSettingLogic::getCopyright();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置备案信息
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/12/28 16:10
|
||||
*/
|
||||
public function setCopyright()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = WebSettingLogic::setCopyright($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(WebSettingLogic::getError() ?: '操作失败');
|
||||
}
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置政策协议
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/2/15 11:00 上午
|
||||
*/
|
||||
public function setAgreement()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
WebSettingLogic::setAgreement($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取政策协议
|
||||
* @return \think\response\Json
|
||||
* @author BD
|
||||
* @date 2023/2/15 11:16 上午
|
||||
*/
|
||||
public function getAgreement()
|
||||
{
|
||||
$result = WebSettingLogic::getAgreement();
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user