初始版本
This commit is contained in:
45
server/app/adminapi/controller/BaseAdminController.php
Executable file
45
server/app/adminapi/controller/BaseAdminController.php
Executable file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
declare (strict_types=1);
|
||||
|
||||
namespace app\adminapi\controller;
|
||||
|
||||
use think\App;
|
||||
use app\common\controller\BaseLikeAdminController;
|
||||
|
||||
/**
|
||||
* 管理元控制器基类
|
||||
* Class BaseAdminController
|
||||
* @package app\adminapi\controller
|
||||
*/
|
||||
class BaseAdminController extends BaseLikeAdminController
|
||||
{
|
||||
protected int $adminId = 0;
|
||||
protected array $adminInfo = [];
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
if (isset($this->request->adminInfo) && $this->request->adminInfo) {
|
||||
$this->adminInfo = $this->request->adminInfo;
|
||||
$this->adminId = $this->request->adminInfo['admin_id'];
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
72
server/app/adminapi/controller/ConfigController.php
Executable file
72
server/app/adminapi/controller/ConfigController.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller;
|
||||
|
||||
use app\adminapi\logic\auth\AuthLogic;
|
||||
use app\adminapi\logic\ConfigLogic;
|
||||
|
||||
/**
|
||||
* 配置控制器
|
||||
* Class ConfigController
|
||||
* @package app\adminapi\controller
|
||||
*/
|
||||
class ConfigController extends BaseAdminController
|
||||
{
|
||||
public array $notNeedLogin = ['getConfig'];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 基础配置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/31 11:01
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$data = ConfigLogic::getConfig();
|
||||
return $this->data($data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 正版检测
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2023/5/16 11:49 上午
|
||||
*/
|
||||
public function checkLegal()
|
||||
{
|
||||
$data = ConfigLogic::checkLegal();
|
||||
return $this->data($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 检测新版本
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2023/5/25 7:02 下午
|
||||
*/
|
||||
public function checkVersion()
|
||||
{
|
||||
$data = ConfigLogic::checkVersion();
|
||||
return $this->data($data);
|
||||
}
|
||||
}
|
||||
137
server/app/adminapi/controller/FileController.php
Executable file
137
server/app/adminapi/controller/FileController.php
Executable file
@@ -0,0 +1,137 @@
|
||||
<?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;
|
||||
|
||||
|
||||
use app\adminapi\lists\file\FileCateLists;
|
||||
use app\adminapi\lists\file\FileLists;
|
||||
use app\adminapi\logic\FileLogic;
|
||||
use app\adminapi\validate\FileValidate;
|
||||
use think\response\Json;
|
||||
|
||||
/**文件管理
|
||||
* Class FileController
|
||||
* @package app\adminapi\controller
|
||||
*/
|
||||
class FileController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 文件列表
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:30
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new FileLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 文件移动成功
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:30
|
||||
*/
|
||||
public function move()
|
||||
{
|
||||
$params = (new FileValidate())->post()->goCheck('move');
|
||||
FileLogic::move($params);
|
||||
return $this->success('移动成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 重命名文件
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:31
|
||||
*/
|
||||
public function rename()
|
||||
{
|
||||
$params = (new FileValidate())->post()->goCheck('rename');
|
||||
FileLogic::rename($params);
|
||||
return $this->success('重命名成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除文件
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:31
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new FileValidate())->post()->goCheck('delete');
|
||||
FileLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 分类列表
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:31
|
||||
*/
|
||||
public function listCate()
|
||||
{
|
||||
return $this->dataLists(new FileCateLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加文件分类
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:31
|
||||
*/
|
||||
public function addCate()
|
||||
{
|
||||
$params = (new FileValidate())->post()->goCheck('addCate');
|
||||
FileLogic::addCate($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑文件分类
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:31
|
||||
*/
|
||||
public function editCate()
|
||||
{
|
||||
$params = (new FileValidate())->post()->goCheck('editCate');
|
||||
FileLogic::editCate($params);
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除文件分类
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:32
|
||||
*/
|
||||
public function delCate()
|
||||
{
|
||||
$params = (new FileValidate())->post()->goCheck('id');
|
||||
FileLogic::delCate($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
64
server/app/adminapi/controller/LoginController.php
Executable file
64
server/app/adminapi/controller/LoginController.php
Executable file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller;
|
||||
|
||||
use app\adminapi\logic\LoginLogic;
|
||||
use app\adminapi\validate\LoginValidate;
|
||||
|
||||
/**
|
||||
* 管理员登录控制器
|
||||
* Class LoginController
|
||||
* @package app\adminapi\controller
|
||||
*/
|
||||
class LoginController extends BaseAdminController
|
||||
{
|
||||
public array $notNeedLogin = ['account', 'logout'];
|
||||
|
||||
/**
|
||||
* @notes 账号登录
|
||||
* @date 2021/6/30 17:01
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 令狐冲
|
||||
*/
|
||||
public function account()
|
||||
{
|
||||
$params = (new LoginValidate())->post()->goCheck();
|
||||
return $this->data((new LoginLogic())->login($params));
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 退出登录
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 令狐冲
|
||||
* @date 2021/7/8 00:36
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
//退出登录情况特殊,只有成功的情况,也不需要token验证
|
||||
(new LoginLogic())->logout($this->adminInfo);
|
||||
return $this->success();
|
||||
}
|
||||
}
|
||||
41
server/app/adminapi/controller/RegionController.php
Executable file
41
server/app/adminapi/controller/RegionController.php
Executable file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller;
|
||||
|
||||
|
||||
use app\common\logic\RegionLogic;
|
||||
|
||||
class RegionController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 地区
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/4/6 10:51 上午
|
||||
*/
|
||||
public function region()
|
||||
{
|
||||
$result = (new RegionLogic())->region();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
}
|
||||
68
server/app/adminapi/controller/UploadController.php
Executable file
68
server/app/adminapi/controller/UploadController.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller;
|
||||
|
||||
|
||||
use app\common\service\UploadService;
|
||||
use Exception;
|
||||
use think\response\Json;
|
||||
|
||||
/**
|
||||
* 上传文件
|
||||
* Class UploadController
|
||||
* @package app\adminapi\controller
|
||||
*/
|
||||
class UploadController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 上传图片
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 16:27
|
||||
*/
|
||||
public function image()
|
||||
{
|
||||
try {
|
||||
$cid = $this->request->post('cid', 0);
|
||||
$result = UploadService::image($cid);
|
||||
return $this->success('上传成功', $result);
|
||||
} catch (Exception $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 上传视频
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 16:27
|
||||
*/
|
||||
public function video()
|
||||
{
|
||||
try {
|
||||
$cid = $this->request->post('cid', 0);
|
||||
$result = UploadService::video($cid);
|
||||
return $this->success('上传成功', $result);
|
||||
} catch (Exception $e) {
|
||||
return $this->fail($e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
43
server/app/adminapi/controller/WorkbenchController.php
Executable file
43
server/app/adminapi/controller/WorkbenchController.php
Executable file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller;
|
||||
|
||||
use app\adminapi\logic\WorkbenchLogic;
|
||||
|
||||
/**
|
||||
* 工作台
|
||||
* Class WorkbenchCotroller
|
||||
* @package app\adminapi\controller
|
||||
*/
|
||||
class WorkbenchController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 工作台
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 17:01
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$result = WorkbenchLogic::index();
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
105
server/app/adminapi/controller/ad/AdController.php
Executable file
105
server/app/adminapi/controller/ad/AdController.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\ad;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\ad\AdLists;
|
||||
use app\adminapi\logic\ad\AdLogic;
|
||||
use app\adminapi\validate\ad\AdValidate;
|
||||
|
||||
class AdController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 广告列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 6:41 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new AdLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加广告
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 7:00 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new AdValidate())->post()->goCheck('add');
|
||||
(new AdLogic())->add($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查看广告详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 10:14 上午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new AdValidate())->get()->goCheck('detail');
|
||||
$result = (new AdLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑广告
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 10:24 上午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new AdValidate())->post()->goCheck('edit');
|
||||
(new AdLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除广告
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 10:32 上午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new AdValidate())->post()->goCheck('del');
|
||||
(new AdLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改广告状态
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 10:39 上午
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new AdValidate())->post()->goCheck('status');
|
||||
(new AdLogic())->status($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
105
server/app/adminapi/controller/ad/AdPositionController.php
Executable file
105
server/app/adminapi/controller/ad/AdPositionController.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\ad;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\ad\AdPositionLists;
|
||||
use app\adminapi\logic\ad\AdPositionLogic;
|
||||
use app\adminapi\validate\ad\AdPositionValidate;
|
||||
|
||||
class AdPositionController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看广告位列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 4:50 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new AdPositionLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加广告位
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 5:05 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new AdPositionValidate())->post()->goCheck('add');
|
||||
(new AdPositionLogic())->add($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查看广告位详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 5:09 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new AdPositionValidate())->get()->goCheck('detail');
|
||||
$result = (new AdPositionLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑广告位
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 5:13 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new AdPositionValidate())->post()->goCheck('edit');
|
||||
(new AdPositionLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除广告位
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 5:28 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new AdPositionValidate())->post()->goCheck('del');
|
||||
(new AdPositionLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改广告位状态
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/14 5:32 下午
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new AdPositionValidate())->post()->goCheck('status');
|
||||
(new AdPositionLogic())->status($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
131
server/app/adminapi/controller/auth/AdminController.php
Executable file
131
server/app/adminapi/controller/auth/AdminController.php
Executable file
@@ -0,0 +1,131 @@
|
||||
<?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\auth;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\auth\AdminLists;
|
||||
use app\adminapi\validate\auth\AdminValidate;
|
||||
use app\adminapi\logic\auth\AdminLogic;
|
||||
use app\adminapi\validate\auth\editSelfValidate;
|
||||
|
||||
/**
|
||||
* 管理员控制器
|
||||
* Class AdminController
|
||||
* @package app\adminapi\controller\auth
|
||||
*/
|
||||
class AdminController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 查看管理员列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 9:55
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new AdminLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加管理员
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 10:21
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new AdminValidate())->post()->goCheck('add');
|
||||
AdminLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑管理员
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 11:03
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new AdminValidate())->post()->goCheck('edit');
|
||||
$result = AdminLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(AdminLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除管理员
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 11:03
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new AdminValidate())->post()->goCheck('delete');
|
||||
$result = AdminLogic::delete($params);
|
||||
if (true === $result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(AdminLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看管理员详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 11:07
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new AdminValidate())->goCheck('detail');
|
||||
$result = AdminLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取当前管理员信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/31 10:53
|
||||
*/
|
||||
public function mySelf()
|
||||
{
|
||||
$result = AdminLogic::detail(['id' => $this->adminId], 'auth');
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑超级管理员信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/8 17:54
|
||||
*/
|
||||
public function editSelf()
|
||||
{
|
||||
$params = (new editSelfValidate())->post()->goCheck('', ['admin_id' => $this->adminId]);
|
||||
$result = AdminLogic::editSelf($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
127
server/app/adminapi/controller/auth/MenuController.php
Executable file
127
server/app/adminapi/controller/auth/MenuController.php
Executable file
@@ -0,0 +1,127 @@
|
||||
<?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\auth;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\auth\MenuLists;
|
||||
use app\adminapi\logic\auth\MenuLogic;
|
||||
use app\adminapi\validate\auth\MenuValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 系统菜单权限
|
||||
* Class MenuController
|
||||
* @package app\adminapi\controller\setting\system
|
||||
*/
|
||||
class MenuController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取菜单路由
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/29 17:41
|
||||
*/
|
||||
public function route()
|
||||
{
|
||||
$result = MenuLogic::getMenuByAdminId($this->adminId);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取菜单列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/29 17:23
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new MenuLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 菜单详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/30 10:07
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new MenuValidate())->goCheck('detail');
|
||||
return $this->data(MenuLogic::detail($params));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加菜单
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/30 10:07
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new MenuValidate())->post()->goCheck('add');
|
||||
MenuLogic::add($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑菜单
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/30 10:07
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new MenuValidate())->post()->goCheck('edit');
|
||||
MenuLogic::edit($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除菜单
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/30 10:07
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new MenuValidate())->post()->goCheck('delete');
|
||||
MenuLogic::delete($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 更新状态
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/7/6 17:04
|
||||
*/
|
||||
public function updateStatus()
|
||||
{
|
||||
$params = (new MenuValidate())->post()->goCheck('status');
|
||||
MenuLogic::updateStatus($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
109
server/app/adminapi/controller/auth/RoleController.php
Executable file
109
server/app/adminapi/controller/auth/RoleController.php
Executable file
@@ -0,0 +1,109 @@
|
||||
<?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\auth;
|
||||
|
||||
use app\adminapi\{
|
||||
logic\auth\RoleLogic,
|
||||
lists\auth\RoleLists,
|
||||
validate\auth\RoleValidate,
|
||||
controller\BaseAdminController
|
||||
};
|
||||
|
||||
/**
|
||||
* 角色控制器
|
||||
* Class RoleController
|
||||
* @package app\adminapi\controller\auth
|
||||
*/
|
||||
class RoleController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 查看角色列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 11:49
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new RoleLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加权限
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 11:49
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new RoleValidate())->post()->goCheck('add');
|
||||
$res = RoleLogic::add($params);
|
||||
if (true === $res) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RoleLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑角色
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:18
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new RoleValidate())->post()->goCheck('edit');
|
||||
$res = RoleLogic::edit($params);
|
||||
if (true === $res) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(RoleLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除角色
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:18
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new RoleValidate())->post()->goCheck('del');
|
||||
(new RoleLogic)->delete($params['id']);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看角色详情
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2021/12/29 14:18
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new RoleValidate())->goCheck('detail');
|
||||
$detail = (new RoleLogic)->detail($params['id']);
|
||||
return $this->data($detail);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
53
server/app/adminapi/controller/channel/AppSettingController.php
Executable file
53
server/app/adminapi/controller/channel/AppSettingController.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\AppSettingLogic;
|
||||
|
||||
/**
|
||||
* APP设置控制器
|
||||
* Class AppSettingController
|
||||
* @package app\adminapi\controller\settings\app
|
||||
*/
|
||||
class AppSettingController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取App设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:24
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = AppSettingLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes App设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:25
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
AppSettingLogic::setConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
57
server/app/adminapi/controller/channel/H5SettingController.php
Executable file
57
server/app/adminapi/controller/channel/H5SettingController.php
Executable file
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\H5SettingLogic;
|
||||
use app\adminapi\validate\channel\H5SettingValidate;
|
||||
|
||||
/**
|
||||
* H5设置控制器
|
||||
* Class HFiveSettingController
|
||||
* @package app\adminapi\controller\settings\h5
|
||||
*/
|
||||
class H5SettingController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取H5设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/9/23 9:38 上午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = H5SettingLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes H5设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/9/23 10:02 上午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new H5SettingValidate())->post()->goCheck();
|
||||
H5SettingLogic::setConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
105
server/app/adminapi/controller/channel/MnpSettingsController.php
Executable file
105
server/app/adminapi/controller/channel/MnpSettingsController.php
Executable file
@@ -0,0 +1,105 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\MnpSettingsLogic;
|
||||
use app\adminapi\validate\channel\MnpSettingsValidate;
|
||||
|
||||
/**
|
||||
* 小程序设置
|
||||
* Class MnpSettingsController
|
||||
* @package app\adminapi\controller\channel
|
||||
*/
|
||||
class MnpSettingsController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取小程序配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 9:38 上午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = (new MnpSettingsLogic())->getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置小程序配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 9:51 上午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new MnpSettingsValidate())->post()->goCheck();
|
||||
(new MnpSettingsLogic())->setConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取小程序配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 9:38 上午
|
||||
*/
|
||||
public function getCoachConfig()
|
||||
{
|
||||
$result = (new MnpSettingsLogic())->getCoachConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置小程序配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 9:51 上午
|
||||
*/
|
||||
public function setCoachConfig()
|
||||
{
|
||||
$params = (new MnpSettingsValidate())->post()->goCheck();
|
||||
(new MnpSettingsLogic())->setCoachConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取小程序配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 9:38 上午
|
||||
*/
|
||||
public function getShopConfig()
|
||||
{
|
||||
$result = (new MnpSettingsLogic())->getShopConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置小程序配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 9:51 上午
|
||||
*/
|
||||
public function setShopConfig()
|
||||
{
|
||||
$params = (new MnpSettingsValidate())->post()->goCheck();
|
||||
(new MnpSettingsLogic())->setShopConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
74
server/app/adminapi/controller/channel/OfficialAccountMenuController.php
Executable file
74
server/app/adminapi/controller/channel/OfficialAccountMenuController.php
Executable file
@@ -0,0 +1,74 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\OfficialAccountMenuLogic;
|
||||
|
||||
/**
|
||||
* 微信公众号菜单控制器
|
||||
* Class OfficialAccountMenuController
|
||||
* @package app\adminapi\controller\channel
|
||||
*/
|
||||
class OfficialAccountMenuController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 保存菜单
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:41
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = OfficialAccountMenuLogic::save($params);
|
||||
if(false === $result) {
|
||||
return $this->fail(OfficialAccountMenuLogic::getError());
|
||||
}
|
||||
return $this->success('保存成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 保存发布菜单
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:42
|
||||
*/
|
||||
public function saveAndPublish()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = OfficialAccountMenuLogic::saveAndPublish($params);
|
||||
if($result) {
|
||||
return $this->success('保存并发布成功',[],1,1);
|
||||
}
|
||||
return $this->fail(OfficialAccountMenuLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看菜单详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:42
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$result = OfficialAccountMenuLogic::detail();
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
145
server/app/adminapi/controller/channel/OfficialAccountReplyController.php
Executable file
145
server/app/adminapi/controller/channel/OfficialAccountReplyController.php
Executable file
@@ -0,0 +1,145 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\channel\OfficialAccountReplyLists;
|
||||
use app\adminapi\logic\channel\OfficialAccountReplyLogic;
|
||||
use app\adminapi\validate\channel\OfficialAccountReplyValidate;
|
||||
|
||||
/**
|
||||
* 微信公众号回复控制器
|
||||
* Class OfficialAccountReplyController
|
||||
* @package app\adminapi\controller\channel
|
||||
*/
|
||||
class OfficialAccountReplyController extends BaseAdminController
|
||||
{
|
||||
|
||||
public array $notNeedLogin = ['index'];
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看回复列表(关注/关键词/默认)
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:58
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new OfficialAccountReplyLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加回复(关注/关键词/默认)
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:58
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new OfficialAccountReplyValidate())->post()->goCheck('add');
|
||||
$result = OfficialAccountReplyLogic::add($params);
|
||||
if ($result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OfficialAccountReplyLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看回复详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:58
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new OfficialAccountReplyValidate())->goCheck('detail');
|
||||
$result = OfficialAccountReplyLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑回复(关注/关键词/默认)
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:58
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new OfficialAccountReplyValidate())->post()->goCheck('edit');
|
||||
$result = OfficialAccountReplyLogic::edit($params);
|
||||
if ($result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OfficialAccountReplyLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除回复(关注/关键词/默认)
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:59
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new OfficialAccountReplyValidate())->post()->goCheck('delete');
|
||||
OfficialAccountReplyLogic::delete($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 更新排序
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:59
|
||||
*/
|
||||
public function sort()
|
||||
{
|
||||
$params = (new OfficialAccountReplyValidate())->post()->goCheck('sort');
|
||||
OfficialAccountReplyLogic::sort($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 更新状态
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:59
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new OfficialAccountReplyValidate())->post()->goCheck('status');
|
||||
OfficialAccountReplyLogic::status($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 微信公众号回调
|
||||
* @throws \ReflectionException
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:59
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
OfficialAccountReplyLogic::index();
|
||||
}
|
||||
}
|
||||
52
server/app/adminapi/controller/channel/OfficialAccountSettingController.php
Executable file
52
server/app/adminapi/controller/channel/OfficialAccountSettingController.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\OfficialAccountSettingLogic;
|
||||
use app\adminapi\validate\channel\OfficialAccountSettingValidate;
|
||||
|
||||
/**
|
||||
* 公众号设置
|
||||
* Class OfficialAccountSettingController
|
||||
* @package app\adminapi\controller\channel
|
||||
*/
|
||||
class OfficialAccountSettingController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取公众号配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 10:09 上午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = (new OfficialAccountSettingLogic())->getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置公众号配置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/16 10:09 上午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new OfficialAccountSettingValidate())->post()->goCheck();
|
||||
(new OfficialAccountSettingLogic())->setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
53
server/app/adminapi/controller/channel/OpenSettingController.php
Executable file
53
server/app/adminapi/controller/channel/OpenSettingController.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\OpenSettingLogic;
|
||||
|
||||
/**
|
||||
* 微信开放平台
|
||||
* Class AppSettingController
|
||||
* @package app\adminapi\controller\settings\app
|
||||
*/
|
||||
class OpenSettingController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取微信开放平台设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:03
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = OpenSettingLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 微信开放平台设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:03
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
OpenSettingLogic::setConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
54
server/app/adminapi/controller/channel/WebPageSettingController.php
Executable file
54
server/app/adminapi/controller/channel/WebPageSettingController.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?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\channel;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\channel\WebPageSettingLogic;
|
||||
use app\adminapi\validate\channel\WebPageSettingValidate;
|
||||
|
||||
/**
|
||||
* H5设置控制器
|
||||
* Class HFiveSettingController
|
||||
* @package app\adminapi\controller\settings\h5
|
||||
*/
|
||||
class WebPageSettingController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取H5设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:36
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = WebPageSettingLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes H5设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 10:36
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new WebPageSettingValidate())->post()->goCheck();
|
||||
WebPageSettingLogic::setConfig($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
218
server/app/adminapi/controller/coach/CoachController.php
Executable file
218
server/app/adminapi/controller/coach/CoachController.php
Executable file
@@ -0,0 +1,218 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\coach;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\coach\CoachApplyLists;
|
||||
use app\adminapi\lists\coach\UpdateCoachLists;
|
||||
use app\adminapi\logic\coach\CoachLogic;
|
||||
use app\adminapi\validate\coach\AdjustWalletValidate;
|
||||
use app\adminapi\validate\coach\CoachAuditValidate;
|
||||
use app\adminapi\validate\coach\CoachValidate;
|
||||
|
||||
/**
|
||||
* 技师控制器类
|
||||
* Class CoachController
|
||||
* @package app\adminapi\controller\coach
|
||||
*/
|
||||
class CoachController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 技师端账号列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/20 17:32
|
||||
*/
|
||||
public function coachUserLists()
|
||||
{
|
||||
$lists = (new CoachLogic())->coachUserLists();
|
||||
return $this->success('',$lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 技能列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/20 17:45
|
||||
*/
|
||||
public function skillLists()
|
||||
{
|
||||
$lists = (new CoachLogic())->skillLists();
|
||||
return $this->success('',$lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 数据列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 18:13
|
||||
*/
|
||||
public function otherLists()
|
||||
{
|
||||
$dataLists = (new CoachLogic())->otherLists();
|
||||
return $this->success('',$dataLists);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 技师列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/20 17:33
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 申请列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 17:46
|
||||
*/
|
||||
public function applyLists()
|
||||
{
|
||||
return $this->dataLists((new CoachApplyLists()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 资料更新列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 10:23
|
||||
*/
|
||||
public function updateCoachLists()
|
||||
{
|
||||
return $this->dataLists((new UpdateCoachLists()));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加技师
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 14:20
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new CoachValidate())->post()->goCheck('add');
|
||||
$result = (new CoachLogic())->add($params);
|
||||
if(true === $result){
|
||||
return $this->success('添加成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 更新资料详情
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 11:04
|
||||
*/
|
||||
public function updateDetail()
|
||||
{
|
||||
$params = (new CoachValidate())->goCheck('id');
|
||||
$result = (new CoachLogic())->updateDetail($params['id']);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 详情
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 15:29
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new CoachValidate())->goCheck('id');
|
||||
$result = (new CoachLogic())->detail($params['id']);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/21 15:48
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new CoachValidate())->post()->goCheck();
|
||||
$result = (new CoachLogic())->edit($params);
|
||||
if(true === $result){
|
||||
return $this->success('编辑成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 调整余额
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author cjhao
|
||||
* @date 2024/8/23 13:51
|
||||
*/
|
||||
public function adjustMoney()
|
||||
{
|
||||
$params = (new AdjustWalletValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new CoachLogic())->adjustMoney($params);
|
||||
if(true === $result){
|
||||
return $this->success('调整成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 调整保证金
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/23 15:05
|
||||
*/
|
||||
public function adjustDeposit()
|
||||
{
|
||||
$params = (new AdjustWalletValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new CoachLogic())->adjustDeposit($params);
|
||||
if(true === $result){
|
||||
return $this->success('调整成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 技师审核
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/23 18:43
|
||||
*/
|
||||
public function coachAudit()
|
||||
{
|
||||
$params = (new CoachAuditValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new CoachLogic())->coachAudit($params);
|
||||
if(true === $result){
|
||||
return $this->success('审核成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 技师审核
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 11:30
|
||||
*/
|
||||
public function updateAudit()
|
||||
{
|
||||
$params = (new CoachAuditValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new CoachLogic())->updateAudit($params);
|
||||
if(true === $result){
|
||||
return $this->success('审核成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
}
|
||||
83
server/app/adminapi/controller/coach/DepositPackageController.php
Executable file
83
server/app/adminapi/controller/coach/DepositPackageController.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\coach;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\coach\DepositPackageLogic;
|
||||
use app\adminapi\validate\coach\DepositPackageValidate;
|
||||
|
||||
/**
|
||||
* 保证金套餐控制器类
|
||||
* Class DepositPackageController
|
||||
* @package app\adminapi\controller\coach
|
||||
*/
|
||||
class DepositPackageController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 3:52 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:03 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->post()->goCheck('add');
|
||||
(new DepositPackageLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:21 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->get()->goCheck('id');
|
||||
$result = (new DepositPackageLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:26 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->post()->goCheck();
|
||||
(new DepositPackageLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:34 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->post()->goCheck('id');
|
||||
(new DepositPackageLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
94
server/app/adminapi/controller/coach/SkillController.php
Executable file
94
server/app/adminapi/controller/coach/SkillController.php
Executable file
@@ -0,0 +1,94 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\coach;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\coach\SKillLogic;
|
||||
use app\adminapi\validate\coach\SkillValidate;
|
||||
|
||||
/**
|
||||
* 技能控制器类
|
||||
* Class SkillController
|
||||
* @package app\adminapi\controller\coach
|
||||
*/
|
||||
class SkillController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看服务分类列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 3:52 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:03 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new SkillValidate())->post()->goCheck('add');
|
||||
(new SKillLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:21 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SkillValidate())->get()->goCheck('id');
|
||||
$result = (new SKillLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:26 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new SkillValidate())->post()->goCheck();
|
||||
(new SKillLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:34 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new SkillValidate())->post()->goCheck('id');
|
||||
(new SKillLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改服务分类状态
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/10 10:57 上午
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new SkillValidate())->post()->goCheck('id');
|
||||
(new SKillLogic())->status($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
133
server/app/adminapi/controller/crontab/CrontabController.php
Executable file
133
server/app/adminapi/controller/crontab/CrontabController.php
Executable file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\crontab;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\crontab\CrontabLogic;
|
||||
use app\adminapi\validate\crontab\CrontabValidate;
|
||||
|
||||
/**
|
||||
* 定时任务控制器
|
||||
* Class CrontabController
|
||||
* @package app\adminapi\controller\crontab
|
||||
*/
|
||||
class CrontabController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 定时任务列表
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 10:48
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加定时任务
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 11:44
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new CrontabValidate())->post()->goCheck('add');
|
||||
$result = CrontabLogic::add($params);
|
||||
if($result) {
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CrontabLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查看定时任务详情
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 11:54
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new CrontabValidate())->goCheck('detail');
|
||||
$result = CrontabLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑定时任务
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 12:00
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new CrontabValidate())->post()->goCheck('edit');
|
||||
$result = CrontabLogic::edit($params);
|
||||
if($result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CrontabLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除定时任务
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 14:09
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new CrontabValidate())->post()->goCheck('delete');
|
||||
$result = CrontabLogic::delete($params);
|
||||
if($result) {
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail('删除失败');
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 操作定时任务
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 15:06
|
||||
*/
|
||||
public function operate()
|
||||
{
|
||||
$params = (new CrontabValidate())->post()->goCheck('operate');
|
||||
$result = CrontabLogic::operate($params);
|
||||
if($result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(CrontabLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取规则执行时间
|
||||
* @return \think\response\Json
|
||||
* @author Tab
|
||||
* @date 2021/8/17 15:31
|
||||
*/
|
||||
public function expression()
|
||||
{
|
||||
$params = (new CrontabValidate())->goCheck('expression');
|
||||
$result = CrontabLogic::expression($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
}
|
||||
47
server/app/adminapi/controller/decorate/DataController.php
Executable file
47
server/app/adminapi/controller/decorate/DataController.php
Executable file
@@ -0,0 +1,47 @@
|
||||
<?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\decorate;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\decorate\DecorateDataLogic;
|
||||
|
||||
|
||||
/**
|
||||
* 装修-数据
|
||||
* Class DataController
|
||||
* @package app\adminapi\controller\decorate
|
||||
*/
|
||||
class DataController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 文章列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/9/22 16:50
|
||||
*/
|
||||
public function article()
|
||||
{
|
||||
$limit = $this->request->get('limit/d', 10);
|
||||
$result = DecorateDataLogic::getArticleLists($limit);
|
||||
return $this->success('获取成功', $result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
62
server/app/adminapi/controller/decorate/PageController.php
Executable file
62
server/app/adminapi/controller/decorate/PageController.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?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\decorate;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\decorate\DecoratePageLogic;
|
||||
use app\adminapi\validate\decorate\DecoratePageValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 装修页面
|
||||
* Class DecoratePageController
|
||||
* @package app\adminapi\controller\decorate
|
||||
*/
|
||||
class PageController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取装修修页面详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/14 18:43
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$type = $this->request->get('type/d');
|
||||
$source = $this->request->get('source/d');
|
||||
$result = DecoratePageLogic::getDetail($type,$source);
|
||||
return $this->success('获取成功', $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 保存装修配置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/15 9:57
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$params = (new DecoratePageValidate())->post()->goCheck();
|
||||
$result = DecoratePageLogic::save($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(DecoratePageLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
62
server/app/adminapi/controller/decorate/StyleController.php
Executable file
62
server/app/adminapi/controller/decorate/StyleController.php
Executable file
@@ -0,0 +1,62 @@
|
||||
<?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\decorate;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\decorate\DecoratePageLogic;
|
||||
use app\adminapi\logic\decorate\DecorateStyleLogic;
|
||||
use app\adminapi\validate\decorate\DecorateStyleValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 装修页面
|
||||
* Class DecorateStyleController
|
||||
* @package app\adminapi\controller\decorate
|
||||
*/
|
||||
class StyleController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取装修修页面详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/14 18:43
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$source = $this->request->get('source/d');
|
||||
$result = DecorateStyleLogic::getDetail($source);
|
||||
return $this->success('获取成功', $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 保存装修配置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/15 9:57
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$params = (new DecorateStyleValidate())->post()->goCheck();
|
||||
$result = DecorateStyleLogic::save($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(DecoratePageLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
59
server/app/adminapi/controller/decorate/TabbarController.php
Executable file
59
server/app/adminapi/controller/decorate/TabbarController.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?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\decorate;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\decorate\DecorateTabbarLogic;
|
||||
|
||||
/**
|
||||
* 装修-底部导航
|
||||
* Class DecorateTabbarController
|
||||
* @package app\adminapi\controller\decorate
|
||||
*/
|
||||
class TabbarController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 底部导航详情
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/9/7 16:39
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$source = $this->request->get('source',1);
|
||||
$data = DecorateTabbarLogic::detail($source);
|
||||
return $this->success('', $data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 底部导航保存
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/6 9:58
|
||||
*/
|
||||
public function save()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
DecorateTabbarLogic::save($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
118
server/app/adminapi/controller/dept/DeptController.php
Executable file
118
server/app/adminapi/controller/dept/DeptController.php
Executable file
@@ -0,0 +1,118 @@
|
||||
<?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\dept;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\dept\DeptLogic;
|
||||
use app\adminapi\validate\dept\DeptValidate;
|
||||
|
||||
/**
|
||||
* 部门管理控制器
|
||||
* Class DeptController
|
||||
* @package app\adminapi\controller\dept
|
||||
*/
|
||||
class DeptController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 部门列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:07
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = DeptLogic::lists($params);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 上级部门
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/5/26 18:36
|
||||
*/
|
||||
public function leaderDept()
|
||||
{
|
||||
$result = DeptLogic::leaderDept();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加部门
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:40
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DeptValidate())->post()->goCheck('add');
|
||||
DeptLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑部门
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:41
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DeptValidate())->post()->goCheck('edit');
|
||||
$result = DeptLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(DeptLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除部门
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:41
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new DeptValidate())->post()->goCheck('delete');
|
||||
DeptLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取部门详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:41
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DeptValidate())->goCheck('detail');
|
||||
$result = DeptLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
103
server/app/adminapi/controller/dept/JobsController.php
Executable file
103
server/app/adminapi/controller/dept/JobsController.php
Executable file
@@ -0,0 +1,103 @@
|
||||
<?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\dept;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\dept\JobsLists;
|
||||
use app\adminapi\logic\dept\JobsLogic;
|
||||
use app\adminapi\validate\dept\JobsValidate;
|
||||
|
||||
|
||||
/**
|
||||
* 岗位管理控制器
|
||||
* Class JobsController
|
||||
* @package app\adminapi\controller\dept
|
||||
*/
|
||||
class JobsController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 岗位列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/26 10:00
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new JobsLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加岗位
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:40
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new JobsValidate())->post()->goCheck('add');
|
||||
JobsLogic::add($params);
|
||||
return $this->success('添加成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑岗位
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:41
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new JobsValidate())->post()->goCheck('edit');
|
||||
$result = JobsLogic::edit($params);
|
||||
if (true === $result) {
|
||||
return $this->success('编辑成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(JobsLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除岗位
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:41
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new JobsValidate())->post()->goCheck('delete');
|
||||
JobsLogic::delete($params);
|
||||
return $this->success('删除成功', [], 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取岗位详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/5/25 18:41
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new JobsValidate())->goCheck('detail');
|
||||
$result = JobsLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
58
server/app/adminapi/controller/finance/AccountLogController.php
Executable file
58
server/app/adminapi/controller/finance/AccountLogController.php
Executable file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\AccountLogLists;
|
||||
use app\common\enum\accountLog\AccountLogEnum;
|
||||
use app\common\enum\accountLog\CoachAccountLogEnum;
|
||||
|
||||
class AccountLogController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 账户流水记录列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/12/2 5:30 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new AccountLogLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 变动类型列表
|
||||
* @return array|\think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/5/31 5:06 下午
|
||||
*/
|
||||
public function changeTypeLists()
|
||||
{
|
||||
$params = $this->request->get('change_object',AccountLogEnum::MONEY);
|
||||
if ($params == AccountLogEnum::MONEY) {
|
||||
return $this->data(AccountLogEnum::getChangeTypeDesc(true,true));
|
||||
}
|
||||
// if ($params == AccountLogEnum::DEPOSIT) {
|
||||
// return $this->data(AccountLogEnum::getDepositTypeDesc());
|
||||
// }
|
||||
return [];
|
||||
}
|
||||
}
|
||||
38
server/app/adminapi/controller/finance/CenterController.php
Executable file
38
server/app/adminapi/controller/finance/CenterController.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\finance\CenterLogic;
|
||||
|
||||
class CenterController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 财务中心
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/9/9 6:27 下午
|
||||
*/
|
||||
public function center()
|
||||
{
|
||||
$result = (new CenterLogic())->center();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
}
|
||||
60
server/app/adminapi/controller/finance/CoachAccountLogController.php
Executable file
60
server/app/adminapi/controller/finance/CoachAccountLogController.php
Executable file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\AccountLogLists;
|
||||
use app\adminapi\lists\finance\CoachAccountLogLists;
|
||||
use app\common\enum\accountLog\AccountLogEnum;
|
||||
use app\common\enum\accountLog\CoachAccountLogEnum;
|
||||
|
||||
class CoachAccountLogController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 账户流水记录列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/12/2 5:30 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new CoachAccountLogLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 变动类型列表
|
||||
* @return array|\think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/5/31 5:06 下午
|
||||
*/
|
||||
public function changeTypeLists()
|
||||
{
|
||||
$params = $this->request->get('type',CoachAccountLogEnum::MONEY);
|
||||
if ($params == CoachAccountLogEnum::MONEY) {
|
||||
return $this->data(CoachAccountLogEnum::getCommissionTypeDesc());
|
||||
}
|
||||
if ($params == CoachAccountLogEnum::DEPOSIT) {
|
||||
return $this->data(CoachAccountLogEnum::getDepositTypeDesc());
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
37
server/app/adminapi/controller/finance/RechargeController.php
Executable file
37
server/app/adminapi/controller/finance/RechargeController.php
Executable file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\RechargeLists;
|
||||
|
||||
class RechargeController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 充值明细列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/12/2 6:29 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new RechargeLists());
|
||||
}
|
||||
}
|
||||
61
server/app/adminapi/controller/finance/ShopAccountLogController.php
Executable file
61
server/app/adminapi/controller/finance/ShopAccountLogController.php
Executable file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\finance;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\AccountLogLists;
|
||||
use app\adminapi\lists\finance\CoachAccountLogLists;
|
||||
use app\adminapi\lists\finance\ShopAccountLogLists;
|
||||
use app\common\enum\accountLog\AccountLogEnum;
|
||||
use app\common\enum\accountLog\ShopAccountLogEnum;
|
||||
|
||||
class ShopAccountLogController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 账户流水记录列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/12/2 5:30 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new ShopAccountLogLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 变动类型列表
|
||||
* @return array|\think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/5/31 5:06 下午
|
||||
*/
|
||||
public function changeTypeLists()
|
||||
{
|
||||
$params = $this->request->get('type',ShopAccountLogEnum::MONEY);
|
||||
if ($params == ShopAccountLogEnum::MONEY) {
|
||||
return $this->data(ShopAccountLogEnum::getCommissionTypeDesc());
|
||||
}
|
||||
if ($params == ShopAccountLogEnum::DEPOSIT) {
|
||||
return $this->data(ShopAccountLogEnum::getDepositTypeDesc());
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
}
|
||||
66
server/app/adminapi/controller/finance/WithdrawController.php
Executable file
66
server/app/adminapi/controller/finance/WithdrawController.php
Executable file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\finance;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\finance\WithdrawLists;
|
||||
use app\adminapi\logic\finance\WithdrawLogic;
|
||||
|
||||
/**
|
||||
* 提现控制器类
|
||||
* Class WithdrawController
|
||||
* @package app\adminapi\controller\finance
|
||||
*/
|
||||
class WithdrawController extends BaseAdminController
|
||||
{
|
||||
|
||||
public function lists(){
|
||||
return $this->dataLists(new WithdrawLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 详情
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/31 16:27
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$detail = (new WithdrawLogic())->detail($id);
|
||||
return $this->success('',$detail);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 审核
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/31 16:35
|
||||
*/
|
||||
public function audit()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = (new WithdrawLogic())->audit($params);
|
||||
if(true === $result){
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 转账
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/31 17:46
|
||||
*/
|
||||
public function transfer()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = (new WithdrawLogic())->transfer($params);
|
||||
if(true === $result){
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
}
|
||||
126
server/app/adminapi/controller/goods/GoodsCategoryController.php
Executable file
126
server/app/adminapi/controller/goods/GoodsCategoryController.php
Executable file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\goods;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\goods\GoodsCategoryLists;
|
||||
use app\adminapi\logic\goods\GoodsCategoryLogic;
|
||||
use app\adminapi\validate\goods\GoodsCategoryValidate;
|
||||
|
||||
class GoodsCategoryController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看服务分类列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 3:52 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new GoodsCategoryLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 通用分类列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:10 下午
|
||||
*/
|
||||
public function commonLists()
|
||||
{
|
||||
$is_son = $this->request->get('is_son',0);
|
||||
$result = (new GoodsCategoryLogic())->commonLists($is_son);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:03 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new GoodsCategoryValidate())->post()->goCheck('add');
|
||||
(new GoodsCategoryLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:21 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new GoodsCategoryValidate())->get()->goCheck('detail');
|
||||
$result = (new GoodsCategoryLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:26 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new GoodsCategoryValidate())->post()->goCheck('edit');
|
||||
(new GoodsCategoryLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:34 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new GoodsCategoryValidate())->post()->goCheck('del');
|
||||
(new GoodsCategoryLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改服务分类状态
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/10 10:57 上午
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new GoodsCategoryValidate())->post()->goCheck('status');
|
||||
(new GoodsCategoryLogic())->status($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
80
server/app/adminapi/controller/goods/GoodsCommentController.php
Executable file
80
server/app/adminapi/controller/goods/GoodsCommentController.php
Executable file
@@ -0,0 +1,80 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\goods;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\goods\GoodsCommentLists;
|
||||
use app\adminapi\logic\goods\GoodsCommentLogic;
|
||||
use app\adminapi\validate\goods\GoodsCommentValidate;
|
||||
|
||||
class GoodsCommentController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 查看服务评价列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 6:44 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new GoodsCommentLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 服务评价回复
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 7:03 下午
|
||||
*/
|
||||
public function reply()
|
||||
{
|
||||
$params = (new GoodsCommentValidate())->post()->goCheck('reply');
|
||||
(new GoodsCommentLogic())->reply($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 回复详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/10 9:40 上午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new GoodsCommentValidate())->get()->goCheck('detail');
|
||||
$result = (new GoodsCommentLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除服务评价
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/10 9:42 上午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new GoodsCommentValidate())->post()->goCheck('del');
|
||||
(new GoodsCommentLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
157
server/app/adminapi/controller/goods/GoodsController.php
Executable file
157
server/app/adminapi/controller/goods/GoodsController.php
Executable file
@@ -0,0 +1,157 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\goods;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\goods\GoodsLists;
|
||||
use app\adminapi\logic\goods\GoodsLogic;
|
||||
use app\adminapi\validate\goods\GoodsValidate;
|
||||
|
||||
class GoodsController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 分类列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author cjhao
|
||||
* @date 2024/8/19 15:55
|
||||
*/
|
||||
public function categoryLists()
|
||||
{
|
||||
$lists = (new GoodsLogic())->categoryLists();
|
||||
return $this->success('',$lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 城市列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/19 15:55
|
||||
*/
|
||||
public function cityLists()
|
||||
{
|
||||
$lists = (new GoodsLogic())->cityLists();
|
||||
return $this->success('',$lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 技能列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author cjhao
|
||||
* @date 2024/8/19 16:12
|
||||
*/
|
||||
public function skillLists()
|
||||
{
|
||||
$lists = (new GoodsLogic())->skillLists();
|
||||
return $this->success('',$lists);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查看服务列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 11:39 上午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new GoodsLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加服务
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 3:29 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new GoodsValidate())->post()->goCheck('add');
|
||||
$result = (new GoodsLogic())->add($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查看服务详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 3:52 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new GoodsValidate())->get()->goCheck('detail');
|
||||
$result = (new GoodsLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑服务
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 4:06 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new GoodsValidate())->post()->goCheck('edit');
|
||||
$result = (new GoodsLogic())->edit($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除服务
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 4:13 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new GoodsValidate())->post()->goCheck('del');
|
||||
$result = (new GoodsLogic())->del($params['ids']);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改服务状态
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/9 4:55 下午
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new GoodsValidate())->post()->goCheck('status');
|
||||
(new GoodsLogic)->status($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
54
server/app/adminapi/controller/marketing/RechargeController.php
Executable file
54
server/app/adminapi/controller/marketing/RechargeController.php
Executable file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\marketing;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\marketing\RechargeLogic;
|
||||
use app\adminapi\validate\marketing\RechargeValidate;
|
||||
|
||||
class RechargeController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 设置充值设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/11/17 4:43 下午
|
||||
*/
|
||||
public function setSettings()
|
||||
{
|
||||
$params = (new RechargeValidate())->post()->goCheck('setSettings');
|
||||
(new RechargeLogic())->setSettings($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取充值设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/11/17 4:46 下午
|
||||
*/
|
||||
public function getSettings()
|
||||
{
|
||||
$result = (new RechargeLogic())->getSettings();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
}
|
||||
70
server/app/adminapi/controller/notice/NoticeController.php
Executable file
70
server/app/adminapi/controller/notice/NoticeController.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?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\notice;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\notice\NoticeSettingLists;
|
||||
use app\adminapi\logic\notice\NoticeLogic;
|
||||
use app\adminapi\validate\notice\NoticeValidate;
|
||||
|
||||
/**
|
||||
* 通知控制器
|
||||
* Class NoticeController
|
||||
* @package app\adminapi\controller\notice
|
||||
*/
|
||||
class NoticeController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看通知设置列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:18
|
||||
*/
|
||||
public function settingLists()
|
||||
{
|
||||
return $this->dataLists(new NoticeSettingLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看通知设置详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:18
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new NoticeValidate())->goCheck('detail');
|
||||
$result = NoticeLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 通知设置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:18
|
||||
*/
|
||||
public function set()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = NoticeLogic::set($params);
|
||||
if ($result) {
|
||||
return $this->success('设置成功',[],1,1);
|
||||
}
|
||||
return $this->fail(NoticeLogic::getError());
|
||||
}
|
||||
}
|
||||
69
server/app/adminapi/controller/notice/SmsConfigController.php
Executable file
69
server/app/adminapi/controller/notice/SmsConfigController.php
Executable 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\notice;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\notice\SmsConfigLogic;
|
||||
use app\adminapi\validate\notice\SmsConfigValidate;
|
||||
|
||||
/**
|
||||
* 短信配置控制器
|
||||
* Class SmsConfigController
|
||||
* @package app\adminapi\controller\notice
|
||||
*/
|
||||
class SmsConfigController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取短信配置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:36
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = SmsConfigLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 短信配置
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:36
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new SmsConfigValidate())->post()->goCheck('setConfig');
|
||||
SmsConfigLogic::setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看短信配置详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/3/29 11:36
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new SmsConfigValidate())->goCheck('detail');
|
||||
$result = SmsConfigLogic::detail($params);
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
}
|
||||
315
server/app/adminapi/controller/order/OrderController.php
Executable file
315
server/app/adminapi/controller/order/OrderController.php
Executable file
@@ -0,0 +1,315 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\order;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\order\OrderLists;
|
||||
use app\adminapi\logic\order\OrderLogic;
|
||||
use app\adminapi\validate\order\OrderValidate;
|
||||
use app\common\service\generator\core\ValidateGenerator;
|
||||
|
||||
class OrderController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看订单列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 11:39 上午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new OrderLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 订单详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 3:01 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new OrderValidate())->get()->goCheck('detail');
|
||||
$result = (new OrderLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 子订单列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/4 18:33
|
||||
*/
|
||||
public function subOrderLists()
|
||||
{
|
||||
$params = (new OrderValidate())->get()->goCheck('detail');
|
||||
$result = (new OrderLogic())->subOrderLists($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取订单退款信息
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/21 11:38
|
||||
*/
|
||||
public function getRefundInfo()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = (new OrderLogic())->getRefundInfo($params);
|
||||
if(is_array($result)){
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 取消订单
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 4:10 下午
|
||||
*/
|
||||
public function cancel()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('cancel');
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new OrderLogic())->cancel($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除订单
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 4:27 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('del');
|
||||
(new OrderLogic())->del($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 商家备注
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 4:48 下午
|
||||
*/
|
||||
public function remark()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('remark');
|
||||
(new OrderLogic())->remark($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 商家备注详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 4:56 下午
|
||||
*/
|
||||
public function remarkDetail()
|
||||
{
|
||||
$params = (new OrderValidate())->get()->goCheck('remarkDetail');
|
||||
$result = (new OrderLogic())->remarkDetail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 核销订单
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 5:03 下午
|
||||
*/
|
||||
public function verification()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('verification');
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new OrderLogic())->verification($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 接单操作
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/13 17:23
|
||||
*/
|
||||
public function take()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->take($params);
|
||||
if (true === $result) {
|
||||
return $this->success('接单成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 出发操作
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/13 17:24
|
||||
*/
|
||||
public function depart()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->depart($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 达到操作
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/13 17:24
|
||||
*/
|
||||
public function arrive()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->arrive($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 服务开始
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/14 14:47
|
||||
*/
|
||||
public function startServer()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->startServer($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 服务完成
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/14 14:53
|
||||
*/
|
||||
public function finishServer()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('detail',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->finishServer($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 订单退款
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/27 23:55
|
||||
*/
|
||||
public function refund()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
// $params = (new OrderValidate())->post()->goCheck('cancel',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->refund($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 技师列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/29 10:25
|
||||
*/
|
||||
public function coachLists()
|
||||
{
|
||||
$params = (new OrderValidate())->get()->goCheck('selectCoach',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->coachLists($params);
|
||||
if (false !== $result) {
|
||||
return $this->success('', $result);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 指派技师
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/10 23:05
|
||||
*/
|
||||
public function dispatchCoach()
|
||||
{
|
||||
$params = (new OrderValidate())->post()->goCheck('dispatchCoach',['admin_id'=>$this->adminId]);
|
||||
$result = (new OrderLogic())->dispatchCoach($params);
|
||||
if (false !== $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(OrderLogic::getError());
|
||||
}
|
||||
|
||||
// public function
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取订单的结算状态
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2025/4/18 16:26
|
||||
*/
|
||||
public function getOrderSettle()
|
||||
{
|
||||
$params = (new OrderValidate())->get()->goCheck('settle');
|
||||
$result = (new OrderLogic())->getOrderSettle($params);
|
||||
return $this->success('', $result);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
69
server/app/adminapi/controller/order/OrderRefundController.php
Executable file
69
server/app/adminapi/controller/order/OrderRefundController.php
Executable file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\order;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\order\OrderRefundLists;
|
||||
use app\adminapi\lists\order\OrderRefundLogLists;
|
||||
use app\adminapi\logic\order\OrderRefundLogic;
|
||||
use app\adminapi\validate\order\OrderRefundValidate;
|
||||
|
||||
class OrderRefundController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 订单退款列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/9/9 4:53 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new OrderRefundLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 退款日志列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/9/9 5:53 下午
|
||||
*/
|
||||
public function logLists()
|
||||
{
|
||||
return $this->dataLists(new OrderRefundLogLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 重新退款
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/9/9 6:19 下午
|
||||
*/
|
||||
public function reRefund()
|
||||
{
|
||||
$params = (new OrderRefundValidate())->post()->goCheck('reRefund');
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new OrderRefundLogic())->reRefund($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
130
server/app/adminapi/controller/order/OrderTimeController.php
Executable file
130
server/app/adminapi/controller/order/OrderTimeController.php
Executable file
@@ -0,0 +1,130 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\order;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\order\OrderTimeLists;
|
||||
use app\adminapi\logic\order\OrderTimeLogic;
|
||||
use app\adminapi\validate\order\OrderTimeValidate;
|
||||
|
||||
class OrderTimeController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看预约时间段列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 5:55 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new OrderTimeLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置可预约天数
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 6:08 下午
|
||||
*/
|
||||
public function setTime()
|
||||
{
|
||||
$params = (new OrderTimeValidate())->post()->goCheck('setTime');
|
||||
(new OrderTimeLogic())->setTime($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取可预约天数
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 6:13 下午
|
||||
*/
|
||||
public function getTime()
|
||||
{
|
||||
$result = (new OrderTimeLogic())->getTime();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加预约时间段
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 6:25 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new OrderTimeValidate())->post()->goCheck('add');
|
||||
(new OrderTimeLogic())->add($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 查看时间段详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 6:40 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new OrderTimeValidate())->get()->goCheck('detail');
|
||||
$result = (new OrderTimeLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑时间段
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 6:41 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new OrderTimeValidate())->post()->goCheck('edit');
|
||||
(new OrderTimeLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除时间段
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/11 6:45 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new OrderTimeValidate())->post()->goCheck('del');
|
||||
(new OrderTimeLogic())->del($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改排序
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/11/28 18:20
|
||||
*/
|
||||
public function sort()
|
||||
{
|
||||
$params = (new OrderTimeValidate())->post()->goCheck('sort');
|
||||
(new OrderTimeLogic())->sort($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
56
server/app/adminapi/controller/setting/AdminController.php
Executable file
56
server/app/adminapi/controller/setting/AdminController.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\AdminLogic;
|
||||
use app\adminapi\validate\setting\AdminValidate;
|
||||
|
||||
class AdminController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取个人资料
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/4/18 2:36 下午
|
||||
*/
|
||||
public function getAdmin()
|
||||
{
|
||||
$result = AdminLogic::getAdmin($this->adminId);
|
||||
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 ljj
|
||||
* @date 2022/4/18 2:58 下午
|
||||
*/
|
||||
public function setAdmin()
|
||||
{
|
||||
$params = (new AdminValidate())->post()->goCheck('setAdmin',['admin_id'=>$this->adminId]);
|
||||
AdminLogic::setAdmin($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
42
server/app/adminapi/controller/setting/BaseController.php
Executable file
42
server/app/adminapi/controller/setting/BaseController.php
Executable file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\BaseLogic;
|
||||
|
||||
/**
|
||||
* 获取基础配置
|
||||
* Class BaseController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class BaseController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取基础配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 13:20
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$data = (new BaseLogic())->getConfig();
|
||||
return $this->success('',$data);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 13:21
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
(new BaseLogic())->setConfig($params);
|
||||
return $this->success('设置成功',[],1,1);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
124
server/app/adminapi/controller/setting/CityController.php
Executable file
124
server/app/adminapi/controller/setting/CityController.php
Executable file
@@ -0,0 +1,124 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\CityLogic;
|
||||
use app\adminapi\validate\setting\CityValidate;
|
||||
|
||||
/**
|
||||
* 城市设置控制器类
|
||||
* Class CityController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class CityController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 3:52 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取省市城市列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/6 16:51
|
||||
*/
|
||||
public function getCityLists()
|
||||
{
|
||||
$result = (new CityLogic())->getCityLists();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取省市区城市列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/6 16:51
|
||||
*/
|
||||
public function getRegionLists()
|
||||
{
|
||||
$result = (new CityLogic())->getRegionLists();
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:03 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new CityValidate())->post()->goCheck('add');
|
||||
(new CityLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:21 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new CityValidate())->get()->goCheck('id');
|
||||
$result = (new CityLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:26 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new CityValidate())->post()->goCheck();
|
||||
(new CityLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:34 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new CityValidate())->post()->goCheck('id');
|
||||
(new CityLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
52
server/app/adminapi/controller/setting/CustomerServiceController.php
Executable file
52
server/app/adminapi/controller/setting/CustomerServiceController.php
Executable file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\CustomerServiceLogic;
|
||||
|
||||
class CustomerServiceController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取客服设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 12:05 下午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = CustomerServiceLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置客服设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 12:11 下午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
CustomerServiceLogic::setConfig($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
56
server/app/adminapi/controller/setting/HotSearchController.php
Executable file
56
server/app/adminapi/controller/setting/HotSearchController.php
Executable file
@@ -0,0 +1,56 @@
|
||||
<?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;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\HotSearchLogic;
|
||||
|
||||
/**
|
||||
* 热门搜索设置
|
||||
* Class HotSearchController
|
||||
* @package app\adminapi\controller\setting
|
||||
*/
|
||||
class HotSearchController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取热门搜索
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/5 19:00
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = HotSearchLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置热门搜索
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/9/5 19:00
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = HotSearchLogic::setConfig($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(HotSearchLogic::getError() ?: '系统错误');
|
||||
}
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
107
server/app/adminapi/controller/setting/MapKeyController.php
Executable file
107
server/app/adminapi/controller/setting/MapKeyController.php
Executable file
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\MapKeyLists;
|
||||
use app\adminapi\logic\setting\MapKeyLogic;
|
||||
use app\adminapi\validate\setting\MapKeyValidate;
|
||||
|
||||
class MapKeyController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 地图key列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午1:55
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new MapKeyLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 公共列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午1:57
|
||||
*/
|
||||
public function commonLists()
|
||||
{
|
||||
$result = (new MapKeyLogic())->commonLists();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 新增key
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:05
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new MapKeyValidate())->post()->goCheck('add');
|
||||
(new MapKeyLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:07
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new MapKeyValidate())->get()->goCheck('detail');
|
||||
$result = (new MapKeyLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:21
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new MapKeyValidate())->post()->goCheck('edit');
|
||||
(new MapKeyLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 删除
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2024/11/5 下午2:21
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new MapKeyValidate())->post()->goCheck('del');
|
||||
(new MapKeyLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
86
server/app/adminapi/controller/setting/StorageController.php
Executable file
86
server/app/adminapi/controller/setting/StorageController.php
Executable file
@@ -0,0 +1,86 @@
|
||||
<?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;
|
||||
|
||||
|
||||
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\settings\shop
|
||||
*/
|
||||
class StorageController extends BaseAdminController
|
||||
{
|
||||
|
||||
/**
|
||||
* @notes 获取存储引擎列表
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:13
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->success('获取成功', StorageLogic::lists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 存储配置信息
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/4/20 16:19
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$param = (new StorageValidate())->get()->goCheck('detail');
|
||||
return $this->success('获取成功', StorageLogic::detail($param));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置存储参数
|
||||
* @return Json
|
||||
* @author 段誉
|
||||
* @date 2022/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 段誉
|
||||
* @date 2022/4/20 16:19
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
$params = (new StorageValidate())->post()->goCheck('change');
|
||||
StorageLogic::change($params);
|
||||
return $this->success('切换成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
67
server/app/adminapi/controller/setting/TextController.php
Executable file
67
server/app/adminapi/controller/setting/TextController.php
Executable file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\setting;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\TextLogic;
|
||||
use app\adminapi\validate\setting\TextValidate;
|
||||
|
||||
class TextController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:17
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:17
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new TextValidate())->post()->goCheck('add');
|
||||
(new TextLogic())->add($params);
|
||||
return $this->success('添加成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:19
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new TextValidate())->post()->goCheck();
|
||||
(new TextLogic())->edit($params);
|
||||
return $this->success('编辑成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/11/1 10:21
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new TextValidate())->post()->goCheck('id');
|
||||
$result = (new TextLogic())->del($params['id']);
|
||||
if(true === $result){
|
||||
return $this->success('删除成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
}
|
||||
53
server/app/adminapi/controller/setting/TransactionSettingsController.php
Executable file
53
server/app/adminapi/controller/setting/TransactionSettingsController.php
Executable file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\TransactionSettingsLogic;
|
||||
use app\adminapi\validate\setting\TransactionSettingsValidate;
|
||||
|
||||
class TransactionSettingsController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取交易设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:40 上午
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = TransactionSettingsLogic::getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置交易设置
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 11:50 上午
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new TransactionSettingsValidate())->post()->goCheck('setConfig');
|
||||
TransactionSettingsLogic::setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
99
server/app/adminapi/controller/setting/dict/DictDataController.php
Executable file
99
server/app/adminapi/controller/setting/dict/DictDataController.php
Executable 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
99
server/app/adminapi/controller/setting/dict/DictTypeController.php
Executable file
99
server/app/adminapi/controller/setting/dict/DictTypeController.php
Executable 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\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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
72
server/app/adminapi/controller/setting/pay/PayConfigController.php
Executable file
72
server/app/adminapi/controller/setting/pay/PayConfigController.php
Executable file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\pay;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\pay\PayConfigLogic;
|
||||
use app\adminapi\validate\setting\PayConfigValidate;
|
||||
|
||||
class PayConfigController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看支付配置列表
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:03 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$result = (new PayConfigLogic())->lists();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 编辑支付配置
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:13 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new PayConfigValidate())->post()->goCheck('edit');
|
||||
(new PayConfigLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 支付配置详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:28 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$result = (new PayConfigLogic())->detail($id);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
}
|
||||
59
server/app/adminapi/controller/setting/pay/PayWayController.php
Executable file
59
server/app/adminapi/controller/setting/pay/PayWayController.php
Executable file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\setting\pay;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\setting\pay\PayWayLogic;
|
||||
|
||||
class PayWayController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 获取支付方式
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author ljj
|
||||
* @date 2022/2/15 6:52 下午
|
||||
*/
|
||||
public function getPayWay()
|
||||
{
|
||||
$result = (new PayWayLogic())->getPayWay();
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置支付方式
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author ljj
|
||||
* @date 2022/2/15 7:02 下午
|
||||
*/
|
||||
public function setPayWay()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
$result = (new PayWayLogic())->setPayWay($params);
|
||||
if (true !== $result) {
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
}
|
||||
39
server/app/adminapi/controller/setting/system/CacheController.php
Executable file
39
server/app/adminapi/controller/setting/system/CacheController.php
Executable 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\settings\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);
|
||||
}
|
||||
}
|
||||
38
server/app/adminapi/controller/setting/system/LogController.php
Executable file
38
server/app/adminapi/controller/setting/system/LogController.php
Executable file
@@ -0,0 +1,38 @@
|
||||
<?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;
|
||||
|
||||
/**
|
||||
* 系统日志
|
||||
* 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());
|
||||
}
|
||||
}
|
||||
70
server/app/adminapi/controller/setting/system/SystemController.php
Executable file
70
server/app/adminapi/controller/setting/system/SystemController.php
Executable file
@@ -0,0 +1,70 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 通用设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 16:32
|
||||
*/
|
||||
public function getGeneralSetting()
|
||||
{
|
||||
$result = SystemLogic::getGeneralSetting();
|
||||
return $this->data($result);
|
||||
}
|
||||
/**
|
||||
* @notes 通用设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 16:32
|
||||
*/
|
||||
public function setGeneralSetting()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
SystemLogic::setGeneralSetting($params);
|
||||
return $this->success('设置成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
85
server/app/adminapi/controller/setting/system/UpgradeController.php
Executable file
85
server/app/adminapi/controller/setting/system/UpgradeController.php
Executable file
@@ -0,0 +1,85 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace app\adminapi\controller\setting\system;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\setting\system\UpgradeLists;
|
||||
use app\adminapi\logic\setting\system\UpgradeLogic;
|
||||
use app\adminapi\validate\setting\upgrade\downloadPkgValidate;
|
||||
use app\adminapi\validate\setting\upgrade\UpgradeValidate;
|
||||
|
||||
/**
|
||||
* 系统更新
|
||||
* Class UpgradeController
|
||||
* @package app\adminapi\controller\settings\system
|
||||
*/
|
||||
class UpgradeController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看系统更新列表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/8/14 17:17
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new UpgradeLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 执行系统更新
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/8/14 16:51
|
||||
*/
|
||||
public function upgrade()
|
||||
{
|
||||
$params = (new UpgradeValidate())->post()->goCheck();
|
||||
$params['update_type'] = 1;//一键更新类型
|
||||
if (true === UpgradeLogic::upgrade($params)) {
|
||||
return $this->success('更新成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail('更新失败:'. UpgradeLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 下载更新包
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/10/8 14:23
|
||||
*/
|
||||
public function downloadPkg()
|
||||
{
|
||||
$params = (new downloadPkgValidate())->post()->goCheck();
|
||||
$result = UpgradeLogic::getPkgLine($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(UpgradeLogic::getError());
|
||||
}
|
||||
return $this->success('', $result);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
111
server/app/adminapi/controller/setting/user/UserController.php
Executable file
111
server/app/adminapi/controller/setting/user/UserController.php
Executable file
@@ -0,0 +1,111 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
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 cjhao
|
||||
* @date 2021/7/27 17:29
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置用户设置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/7/27 17:59
|
||||
*/
|
||||
public function setConfig()
|
||||
{
|
||||
$params = (new UserConfigValidate())->post()->goCheck('user');
|
||||
(new UserLogic())->setConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取注册配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/9/14 17:11
|
||||
*/
|
||||
public function getRegisterConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getRegisterConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置注册配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2021/9/14 17:29
|
||||
*/
|
||||
public function setRegisterConfig()
|
||||
{
|
||||
$params = (new UserConfigValidate())->post()->goCheck('register');
|
||||
(new UserLogic())->setRegisterConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 17:56
|
||||
*/
|
||||
public function getWithdrawConfig()
|
||||
{
|
||||
$result = (new UserLogic())->getWithdrawConfig();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 设置提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/27 17:56
|
||||
*/
|
||||
public function setWithdrawConfig()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
(new UserLogic())->setWithdrawConfig($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
}
|
||||
143
server/app/adminapi/controller/setting/web/WebSettingController.php
Executable file
143
server/app/adminapi/controller/setting/web/WebSettingController.php
Executable file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop100%开源免费商用商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | 开源版本可自由商用,可去除界面版权logo
|
||||
// | 商业版本务必购买商业授权,以免引起法律纠纷
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop团队 版权所有 拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshopTeam
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
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 段誉
|
||||
* @date 2021/12/28 15:44
|
||||
*/
|
||||
public function getWebsite()
|
||||
{
|
||||
$result = WebSettingLogic::getWebsiteInfo();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置网站信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/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 段誉
|
||||
* @date 2021/12/28 16:10
|
||||
*/
|
||||
public function getCopyright()
|
||||
{
|
||||
$result = WebSettingLogic::getCopyright();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置备案信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2021/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 ljj
|
||||
* @date 2022/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 ljj
|
||||
* @date 2022/2/15 11:16 上午
|
||||
*/
|
||||
public function getAgreement()
|
||||
{
|
||||
$result = WebSettingLogic::getAgreement();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置地图钥匙
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/3/10 5:12 下午
|
||||
*/
|
||||
public function setMapKey()
|
||||
{
|
||||
$params = $this->request->post();
|
||||
WebSettingLogic::setMapKey($params);
|
||||
return $this->success('设置成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取地图钥匙
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/3/10 5:12 下午
|
||||
*/
|
||||
public function getMapKey()
|
||||
{
|
||||
$result = WebSettingLogic::getMapKey();
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
}
|
||||
83
server/app/adminapi/controller/shop/DepositPackageController.php
Executable file
83
server/app/adminapi/controller/shop/DepositPackageController.php
Executable file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\shop;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\shop\DepositPackageLogic;
|
||||
use app\adminapi\validate\shop\DepositPackageValidate;
|
||||
|
||||
/**
|
||||
* 保证金套餐控制器类
|
||||
* Class DepositPackageController
|
||||
* @package app\adminapi\controller\coach
|
||||
*/
|
||||
class DepositPackageController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 3:52 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 添加服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:03 下午
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->post()->goCheck('add');
|
||||
(new DepositPackageLogic())->add($params);
|
||||
return $this->success('操作成功', [],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 查看服务分类详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 5:21 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->get()->goCheck('id');
|
||||
$result = (new DepositPackageLogic())->detail($params['id']);
|
||||
return $this->success('获取成功',$result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:26 下午
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->post()->goCheck();
|
||||
(new DepositPackageLogic())->edit($params);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除服务分类
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/8 6:34 下午
|
||||
*/
|
||||
public function del()
|
||||
{
|
||||
$params = (new DepositPackageValidate())->post()->goCheck('id');
|
||||
(new DepositPackageLogic())->del($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
68
server/app/adminapi/controller/shop/GoodsController.php
Executable file
68
server/app/adminapi/controller/shop/GoodsController.php
Executable file
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\shop;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\logic\shop\GoodsLogic;
|
||||
use app\adminapi\validate\shop\GoodsValidate;
|
||||
|
||||
/**
|
||||
* 商家项目控制器类
|
||||
* Class GoodsController
|
||||
* @package app\adminapi\controller\shop
|
||||
*/
|
||||
class GoodsController extends BaseAdminController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 12:11
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 详情
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 13:15
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new GoodsValidate())->goCheck('id');
|
||||
$result = (new GoodsLogic())->detail($params['id']);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 上下架
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 13:04
|
||||
*/
|
||||
public function status()
|
||||
{
|
||||
$params = (new GoodsValidate())->post()->goCheck('id');
|
||||
(new GoodsLogic())->status($params['id']);
|
||||
return $this->success('操作成功',[],1,1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 审核
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 13:24
|
||||
*/
|
||||
public function audit()
|
||||
{
|
||||
$params = (new GoodsValidate())->post()->goCheck();
|
||||
$result = (new GoodsLogic())->audit($params);
|
||||
if(true === $result){
|
||||
return $this->success('审核成功',[],1,1);
|
||||
}
|
||||
return $this->fail(GoodsLogic::getError(),[],1,1);
|
||||
}
|
||||
}
|
||||
181
server/app/adminapi/controller/shop/ShopController.php
Executable file
181
server/app/adminapi/controller/shop/ShopController.php
Executable file
@@ -0,0 +1,181 @@
|
||||
<?php
|
||||
namespace app\adminapi\controller\shop;
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\shop\ShopApplyLists;
|
||||
use app\adminapi\lists\shop\UpdateShopLists;
|
||||
use app\adminapi\logic\shop\ShopLogic;
|
||||
use app\adminapi\validate\shop\AdjustWalletValidate;
|
||||
use app\adminapi\validate\shop\ShopAuditValidate;
|
||||
use app\adminapi\validate\shop\ShopValidate;
|
||||
|
||||
/**
|
||||
* 店铺控制器类
|
||||
* Class ShopController
|
||||
* @package app\adminapi\controller\shop
|
||||
*/
|
||||
class ShopController extends BaseAdminController
|
||||
{
|
||||
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 申请列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/26 17:46
|
||||
*/
|
||||
public function applyLists()
|
||||
{
|
||||
return $this->dataLists((new ShopApplyLists()));
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 店铺审核
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/7 00:41
|
||||
*/
|
||||
public function shopAudit()
|
||||
{
|
||||
$params = (new ShopValidate())->post()->goCheck('id');
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new Shoplogic())->shopAudit($params);
|
||||
if(true === $result){
|
||||
return $this->success('审核成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 添加门店
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/2 19:11
|
||||
*/
|
||||
public function add()
|
||||
{
|
||||
$params = (new ShopValidate())->post()->goCheck('add');
|
||||
$result = (new ShopLogic())->add($params);
|
||||
if(true === $result){
|
||||
return $this->success('添加成功');
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑门店
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/3 15:01
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new ShopValidate())->post()->goCheck();
|
||||
$result = (new ShopLogic())->edit($params);
|
||||
if(true === $result){
|
||||
return $this->success('编辑成功');
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 详情
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author cjhao
|
||||
* @date 2024/10/3 23:21
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new ShopValidate())->goCheck('id');
|
||||
$result = (new ShopLogic())->detail($params['id']);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 调整余额
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author cjhao
|
||||
* @date 2024/8/23 13:51
|
||||
*/
|
||||
public function adjustMoney()
|
||||
{
|
||||
$params = (new AdjustWalletValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new ShopLogic())->adjustMoney($params);
|
||||
if(true === $result){
|
||||
return $this->success('调整成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 调整余额
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author cjhao
|
||||
* @date 2024/8/23 13:51
|
||||
*/
|
||||
public function adjustDeposit()
|
||||
{
|
||||
$params = (new AdjustWalletValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new ShopLogic())->adjustDeposit($params);
|
||||
if(true === $result){
|
||||
return $this->success('调整成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 审核列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/7 01:19
|
||||
*/
|
||||
public function updateShopLists()
|
||||
{
|
||||
return $this->dataLists((new UpdateShopLists()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 更新资料详情
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/8/28 11:04
|
||||
*/
|
||||
public function updateDetail()
|
||||
{
|
||||
$params = (new ShopValidate())->goCheck('id');
|
||||
$result = (new ShopLogic())->updateDetail($params['id']);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 更新资料审核
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/7 14:54
|
||||
*/
|
||||
public function updateAudit()
|
||||
{
|
||||
$params = (new ShopAuditValidate())->post()->goCheck();
|
||||
$params['admin_id'] = $this->adminId;
|
||||
$result = (new ShopLogic())->updateAudit($params);
|
||||
if(true === $result){
|
||||
return $this->success('审核成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
191
server/app/adminapi/controller/tools/GeneratorController.php
Executable file
191
server/app/adminapi/controller/tools/GeneratorController.php
Executable file
@@ -0,0 +1,191 @@
|
||||
<?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\tools;
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\tools\DataTableLists;
|
||||
use app\adminapi\lists\tools\GenerateTableLists;
|
||||
use app\adminapi\logic\tools\GeneratorLogic;
|
||||
use app\adminapi\validate\tools\EditTableValidate;
|
||||
use app\adminapi\validate\tools\GenerateTableValidate;
|
||||
|
||||
/**
|
||||
* 代码生成器控制器
|
||||
* Class GeneratorController
|
||||
* @package app\adminapi\controller\article
|
||||
*/
|
||||
class GeneratorController extends BaseAdminController
|
||||
{
|
||||
|
||||
public array $notNeedLogin = ['download'];
|
||||
|
||||
/**
|
||||
* @notes 获取数据库中所有数据表信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/14 10:57
|
||||
*/
|
||||
public function dataTable()
|
||||
{
|
||||
return $this->dataLists(new DataTableLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取已选择的数据表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/14 10:57
|
||||
*/
|
||||
public function generateTable()
|
||||
{
|
||||
return $this->dataLists(new GenerateTableLists());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 选择数据表
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/15 10:09
|
||||
*/
|
||||
public function selectTable()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->post()->goCheck('select');
|
||||
$result = GeneratorLogic::selectTable($params, $this->adminId);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(GeneratorLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 生成代码
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/23 19:08
|
||||
*/
|
||||
public function generate()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->post()->goCheck('id');
|
||||
$result = GeneratorLogic::generate($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(GeneratorLogic::getError());
|
||||
}
|
||||
return $this->success('操作成功', $result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 下载文件
|
||||
* @return \think\response\File|\think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/24 9:51
|
||||
*/
|
||||
public function download()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->goCheck('download');
|
||||
$result = GeneratorLogic::download($params['file']);
|
||||
if (false === $result) {
|
||||
return $this->fail(GeneratorLogic::getError() ?: '下载失败');
|
||||
}
|
||||
return download($result, 'likeadmin-curd.zip');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 预览代码
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/23 19:07
|
||||
*/
|
||||
public function preview()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->post()->goCheck('id');
|
||||
$result = GeneratorLogic::preview($params);
|
||||
if (false === $result) {
|
||||
return $this->fail(GeneratorLogic::getError());
|
||||
}
|
||||
return $this->data($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 同步字段
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/17 15:22
|
||||
*/
|
||||
public function syncColumn()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->post()->goCheck('id');
|
||||
$result = GeneratorLogic::syncColumn($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(GeneratorLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 编辑表信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/20 10:44
|
||||
*/
|
||||
public function edit()
|
||||
{
|
||||
$params = (new EditTableValidate())->post()->goCheck();
|
||||
$result = GeneratorLogic::editTable($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(GeneratorLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取已选择的数据表详情
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/15 19:00
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->goCheck('id');
|
||||
$result = GeneratorLogic::getTableDetail($params);
|
||||
return $this->success('', $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除已选择的数据表信息
|
||||
* @return \think\response\Json
|
||||
* @author 段誉
|
||||
* @date 2022/6/15 19:00
|
||||
*/
|
||||
public function delete()
|
||||
{
|
||||
$params = (new GenerateTableValidate())->post()->goCheck('id');
|
||||
$result = GeneratorLogic::deleteTable($params);
|
||||
if (true === $result) {
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(GeneratorLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
82
server/app/adminapi/controller/user/UserController.php
Executable file
82
server/app/adminapi/controller/user/UserController.php
Executable file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\adminapi\controller\user;
|
||||
|
||||
|
||||
use app\adminapi\controller\BaseAdminController;
|
||||
use app\adminapi\lists\user\UserLists;
|
||||
use app\adminapi\logic\user\UserLogic;
|
||||
use app\adminapi\validate\user\UserValidate;
|
||||
|
||||
class UserController extends BaseAdminController
|
||||
{
|
||||
/**
|
||||
* @notes 查看用户列表
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/2/7 6:53 下午
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
return $this->dataLists(new UserLists());
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 用户详情
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/4/21 2:29 下午
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$result = UserLogic::detail($id);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 修改用户信息
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2022/5/24 10:18 上午
|
||||
*/
|
||||
public function editInfo()
|
||||
{
|
||||
$params = (new UserValidate())->post()->goCheck('editInfo');
|
||||
(new UserLogic)->editInfo($params);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 调整余额
|
||||
* @return \think\response\Json
|
||||
* @author ljj
|
||||
* @date 2023/4/12 11:59 上午
|
||||
*/
|
||||
public function adjustBalance()
|
||||
{
|
||||
$params = (new UserValidate())->post()->goCheck('adjustBalance');
|
||||
$result = (new UserLogic)->adjustUserWallet($params);
|
||||
if(true !== $result){
|
||||
return $this->fail($result);
|
||||
}
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user