first commit

This commit is contained in:
Your Name
2026-01-19 14:19:22 +08:00
commit fe2d9c1868
4777 changed files with 665503 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
<?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
// +----------------------------------------------------------------------
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'];
}
}
}

View File

@@ -0,0 +1,73 @@
<?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\logic\auth\AuthLogic;
use app\adminapi\logic\ConfigLogic;
/**
* 配置控制器
* Class ConfigController
* @package app\adminapi\controller
*/
class ConfigController extends BaseAdminController
{
public array $notNeedLogin = ['getConfig','getAgentConfig','dict'];
/**
* @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 段誉
* @date 2021/12/31 11:01
*/
public function getAgentConfig()
{
$data = ConfigLogic::getAgentConfig();
return $this->data($data);
}
/**
* @notes 根据类型获取字典数据
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/9/27 19:10
*/
public function dict()
{
$type = $this->request->get('type', '');
$data = ConfigLogic::getDictByType($type);
return $this->data($data);
}
}

View File

@@ -0,0 +1,50 @@
<?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\common\cache\ExportCache;
use app\common\service\JsonService;
class DownloadController extends BaseAdminController
{
public array $notNeedLogin = ['export'];
/**
* @notes 导出文件
* @return \think\response\File|\think\response\Json
* @author 段誉
* @date 2022/11/24 16:10
*/
public function export()
{
//获取文件缓存的key
$fileKey = request()->get('file');
//通过文件缓存的key获取文件储存的路径
$exportCache = new ExportCache();
$fileInfo = $exportCache->getFile($fileKey);
if (empty($fileInfo)) {
return JsonService::fail('下载文件不存在');
}
//下载前删除缓存
$exportCache->delete($fileKey);
return download($fileInfo['src'] . $fileInfo['name'], $fileInfo['name']);
}
}

View 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);
}
}

View File

@@ -0,0 +1,61 @@
<?php
namespace app\adminapi\controller;
use app\adminapi\logic\LoginLogic;
use app\adminapi\validate\{LoginValidate,LoginAgentValidate};
/**
* 管理员登录控制器
* Class LoginController
* @package app\adminapi\controller
*/
class LoginController extends BaseAdminController
{
public array $notNeedLogin = ['account','agentAccount'];
/**
* @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 代理账号登录
* @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 agentAccount()
{
$params = (new LoginAgentValidate())->post()->goCheck();
return $this->data((new LoginLogic())->loginAgent($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();
}
}

View File

@@ -0,0 +1,480 @@
<?php
namespace app\adminapi\controller;
use app\adminapi\controller\BaseAdminController;
use app\common\model\finance\{RechargeRecord};
use app\common\model\user\{UserUdun,User};
use app\common\model\setting\RechargeMethod;
use app\common\service\{UtilsService,ConfigService};
use app\common\model\lh\{LhCoin};
use app\common\enum\YesNoEnum;
use think\facade\Db;
use Exception;
//清空数据
use app\common\model\withdraw\{WithdrawWallet,WithdrawMethod};
use app\common\model\setting\OperationLog;
use app\common\model\finance\{WithdrawRecord,UserFinance,UserTransferRecord};
use app\common\model\user\{UserTron,UserSigninRecord,UserSession,UserRelation,UserRelationAgent,UserKadan,UserGroupRecord,UserRewardRecord,UserNotice,UserInfo,UserLog,UserMineRecord};
use app\common\model\member\{UserMemberRecord};
use app\common\model\mall\{MallGoodsRecord};
use app\common\model\notice\{SmsLog,NoticeRecord,EmailRecord};
use app\common\model\goods\{GoodsRecord};
use app\common\model\auth\{AdminSession,AdminRole,AdminJobs,AdminDept,Admin,SystemRole,SystemRoleMenu};
use app\common\model\lh\{LhRecord};
use app\common\model\feedback\{FeedbackRecord};
use app\common\model\item\{ItemRecord};
/**
* 回调理控制器
* Class NotifyController
* @package app\adminapi\controller
*/
class NotifyController extends BaseAdminController
{
public array $notNeedLogin = ['market','clear','notify','test'];
/**
* @notes 清空数据,开发用,请注释掉
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/04/13 10:54
*/
// public function clear(){
// Db::startTrans();
// try {
// //用户提现钱包
// $withdrawWallets = WithdrawWallet::select()->toArray();
// foreach ($withdrawWallets as &$withdrawWallet) {
// WithdrawWallet::destroy($withdrawWallet['id'],true);
// }
// //用户提现记录
// $withdrawRecords = WithdrawRecord::select()->toArray();
// foreach ($withdrawRecords as &$withdrawRecord) {
// WithdrawRecord::destroy($withdrawRecord['id'],true);
// }
// //用户Udun
// $userUduns = UserUdun::select()->toArray();
// foreach ($userUduns as &$userUdun) {
// UserUdun::destroy($userUdun['id'],true);
// }
// //用户波场钱包
// $userTrons = UserTron::select()->toArray();
// foreach ($userTrons as &$userTron) {
// UserTron::destroy($userTron['id'],true);
// }
// //资金明细
// $userFinances = UserFinance::select()->toArray();
// foreach ($userFinances as &$userFinance) {
// UserFinance::destroy($userFinance['id'],true);
// }
// //用户
// $users = User::select()->toArray();
// foreach ($users as &$user) {
// User::destroy($user['id'],true);
// }
// //角色
// $systemRoles = SystemRole::where('id <> 6')->select()->toArray();
// foreach ($systemRoles as &$systemRole) {
// SystemRole::destroy($systemRole['id'],true);
// }
// //短信记录
// $smsLogs = SmsLog::select()->toArray();
// foreach ($smsLogs as &$smsLog) {
// SmsLog::destroy($smsLog['id'],true);
// }
// //充值记录
// $rechargeRecords = RechargeRecord::select()->toArray();
// foreach ($rechargeRecords as &$rechargeRecord) {
// RechargeRecord::destroy($rechargeRecord['id'],true);
// }
// //通知记录
// $noticeRecords = NoticeRecord::select()->toArray();
// foreach ($noticeRecords as &$noticeRecord) {
// NoticeRecord::destroy($noticeRecord['id'],true);
// }
// //量化记录
// $lhRecords = LhRecord::select()->toArray();
// foreach ($lhRecords as &$lhRecord) {
// LhRecord::destroy($lhRecord['id'],true);
// }
// // //管理员
// // $admins = Admin::select()->toArray();
// // foreach ($admins as &$admin) {
// // Admin::destroy($admin['id'],true);
// // }
// //用户转账记录
// UserTransferRecord::where('1 = 1')->delete();
// //用户签到
// UserSigninRecord::where('1 = 1')->delete();
// //用户会话
// UserSession::where('1 = 1')->delete();
// //奖励活动记录
// UserRewardRecord::where('1 = 1')->delete();
// //用户关系
// UserRelation::where('1 = 1')->delete();
// //用户代理关系
// UserRelationAgent::where('1 = 1')->delete();
// //用户消息
// UserNotice::where('1 = 1')->delete();
// //挖矿记录
// UserMineRecord::where('1 = 1')->delete();
// //会员记录
// UserMemberRecord::where('1 = 1')->delete();
// //用户操作
// UserLog::where('1 = 1')->delete();
// //卡单规则
// UserKadan::where('1 = 1')->delete();
// //用户信息
// UserInfo::where('1 = 1')->delete();
// //用户分组记录
// UserGroupRecord::where('1 = 1')->delete();
// //角色菜单关系
// SystemRoleMenu::where('role_id <> 6')->delete();
// //清空日志
// OperationLog::where('1 = 1')->delete();
// //奖品记录
// MallGoodsRecord::where('1 = 1')->delete();
// //抢单记录
// GoodsRecord::where('1 = 1')->delete();
// //项目记录
// ItemRecord::where('1 = 1')->delete();
// //意见反馈记录
// FeedbackRecord::where('1 = 1')->delete();
// //邮件发送记录
// EmailRecord::where('1 = 1')->delete();
// //管理员会话
// AdminSession::where('1 = 1')->delete();
// //角色关联
// AdminRole::where('role_id <> 0')->delete();
// //岗位关联
// AdminJobs::where('1 = 1')->delete();
// // //部门关联
// AdminDept::where('1 = 1')->delete();
// //波场配置
// ConfigService::set('website', 'tron', ['api_key'=>'','url'=>'']);
// //翻译配置
// $translation = ConfigService::get('website', 'translation');
// $translation['app_key'] = '';
// $translation['sec_key'] = '';
// ConfigService::set('website', 'translation', $translation);
// //短信宝配置
// $smsbao = ConfigService::get('sms', 'smsbao');
// $smsbao['sign'] = '';
// $smsbao['username'] = '';
// $smsbao['api_key'] = '';
// ConfigService::set('sms', 'smsbao', $smsbao);
// //邮箱配置
// ConfigService::set('website', 'email', ['host'=>'','port'=>'','smtp'=>'','charset'=>'','nickname'=>'','username'=>'','password'=>'']);
// //优盾配置
// ConfigService::set('website', 'udun', ['merchant_no'=>'','api_key'=>'','gateway_address'=>'','callUrl'=>'接口域名/adminapi/notify/notify','debug'=>'0','is_open_df'=>'0','pay_min'=>'10','pay_min'=>'10','pay_max'=>'100']);
// //前台链接
// ConfigService::set('website', 'front_link', '');
// Db::commit();
// return '清理成功';
// } catch (\Exception $e) {
// Db::rollback();
// print_r($e->getMessage());
// self::$error = $e->getMessage();
// return '清理失败,请查看日志';
// }
// }
/**
* @notes 更新行情数据
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/04/13 10:54
*/
public function market()
{
Db::startTrans();
try {
$marketData = UtilsService::curl_request('https://api.huobi.pro/market/tickers',[],'GET');
$marketData = json_decode($marketData,true);
if('ok' != $marketData['status']){
throw new \Exception('获取API失败');
}
$marketData = $marketData['data'];
//实时行情
$market = ConfigService::get('website', 'market');
//挖矿货币
$mine = ConfigService::get('website', 'mine');
//充值方式
$rechargeMethods = RechargeMethod::where(['is_show' => 1])
->where(" symbol_rate != '' AND type IN (1,5,7) ")
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
//提现方式
$withdrawMethods = WithdrawMethod::where(['is_show' => 1])
->where(" symbol_rate != '' AND type IN (1) ")
->order(['sort' => 'desc', 'id' => 'desc'])
->select()
->toArray();
foreach ($marketData as $market_data) {
foreach ($market as &$item) {
if($item['symbol'] == $market_data['symbol']){
$item['price'] = $market_data['close'];
$item['rise'] = round((($market_data['close']) - ($market_data['open']))/($market_data['open']) *100,2);
}
}
foreach ($rechargeMethods as &$rechargeMethod) {
if($rechargeMethod['symbol_rate'] == $market_data['symbol']){
RechargeMethod::update([
'id' => $rechargeMethod['id'],
'rate' => 1/$market_data['close'],
]);
}
}
foreach ($withdrawMethods as &$withdrawMethod) {
if($withdrawMethod['symbol_rate'] == $market_data['symbol']){
WithdrawMethod::update([
'id' => $withdrawMethod['id'],
'rate' => 1/$market_data['close'],
]);
}
}
if($mine['symbol_rate'] != '' & $mine['symbol_rate'] == $market_data['symbol']){
$mine['rate'] = 1/$market_data['close'];
}
}
ConfigService::set('website', 'market', $market);
if($mine['symbol_rate'] != '') ConfigService::set('website', 'mine', $mine);
Db::commit();
return 'success';
} catch (\Exception $e) {
Db::rollback();
return $e;
}
}
/**
* @notes 优盾钱包交易回调
* @return string
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/04/13 10:54
*/
public function notify(){
Db::startTrans();
try {
$body = $_POST['body'];
$nonce = $_POST['nonce'];
$timestamp = $_POST['timestamp'];
$sign = $_POST['sign'];
//验证签名
$signCheck = UtilsService::udun_signature($body,$timestamp,$nonce);
if ($sign != $signCheck) {
throw new \Exception('签名错误');
return ;
}
$body = json_decode($body);
//$this->printLog("回调接收内容(tradeType):".$body->tradeType);
//$body->tradeType 1充币回调 2提币回调
if ($body->tradeType == 1) {
//$body->status 0待审核 1审核成功 2审核驳回 3交易成功 4交易失败
if($body->status == 3){
//业务处理
//查询钱包地址
$userUdun = UserUdun::where([
'address' => $body->address,
'main_coin_type' => $body->mainCoinType,
'coin_type' => $body->coinType
])
->findOrEmpty();
if ($userUdun->isEmpty()) {
throw new \Exception('地址不存在');
return ;
}
$method = RechargeMethod::where(['id' => $userUdun['method_id']])->findOrEmpty();
if ($method->isEmpty()) {
throw new \Exception('充值方式不存在');
return ;
}
$user = User::where(['id' => $userUdun['user_id']])->findOrEmpty();
if ($user->isEmpty()) {
throw new \Exception('用户不存在');
return ;
}
$money = ($body->amount) / pow(10,($body->decimals));
$order_amount_act = round($money / $method['rate'] , 2);
//判断最低充值金额
$config = ConfigService::get('website', 'trade');
if($order_amount_act < $config['recharge_min']){
return "success";
}
$data = [
'sn' => generate_sn(RechargeRecord::class, 'sn'),
'user_id' => $userUdun['user_id'],
'method_id' => $method['id'],
'amount' => $order_amount_act,
'amount_act' => round($money , $method['precision']),
'rate' => $method['rate'],
'symbol' => $method['symbol'],
'status' => 1,
];
$record = RechargeRecord::create($data);
//记录日志
UtilsService::user_finance_add(
$data['user_id'],
1,
1,
$data['amount'],
$data['sn'],
'',
1//冻结
);
//用户资金修改
UtilsService::user_money_change($data['user_id'], 1, $data['amount'],'user_money');
//充值金额增加
UtilsService::user_money_change($data['user_id'], 1, $data['amount'],'total_recharge');
//团队充值奖励
// UtilsService::team_reward_add($data['user_id'],$data['amount'],1);
//充值活动奖励
UtilsService::activity_reward_add($data['user_id'],$data['amount']);
//更新充值记录用户余额
$user = User::where(['id' => $data['user_id']])->findOrEmpty();
if ($user->isEmpty()) {
throw new \Exception('用户不存在');
}
//充值次数+1
User::update([
'id' => $user['id'],
'recharge_num' => $user['recharge_num'] + 1
]);
RechargeRecord::update([
'id' => $record['id'],
'user_money' => $user['user_money']
]);
Db::commit();
}
//无论业务方处理成功与否success,failed回调都认为成功
return "success";
}
elseif ($body->tradeType == 2) {
//$body->status 0待审核 1审核成功 2审核驳回 3交易成功 4交易失败
if($body->status == 0){
//业务处理
}
else if($body->status == 1){
//业务处理
}
else if($body->status == 3){
$record = WithdrawRecord::where(['account' => $body->address,'status' => 0,'status2' => 1,'sn' => $body->businessId])->findOrEmpty();
if ($record->isEmpty()) {
throw new \Exception('记录不存在');
return;
}
WithdrawRecord::update([
'id' => $record['id'],
'status' => 1
]);
//更新充值记录用户余额
$user = User::where(['id' => $record['user_id']])->findOrEmpty();
if (!$user->isEmpty()) {
//提现次数+1
User::update([
'id' => $user['id'],
'withdraw_num' => $user['withdraw_num'] + 1
]);
WithdrawRecord::update([
'id' => $record['id'],
'user_money' => $user['user_money'],
'remark_df' => '',
]);
}
Db::commit();
}
else if($body->status == 2 || $body->status == 4){
$record = WithdrawRecord::where(['account' => $body->address,'status' => 0,'status2' => 1,'sn' => $body->businessId])->findOrEmpty();
if ($record->isEmpty()) {
throw new \Exception('记录不存在');
return;
}
WithdrawRecord::update([
'id' => $record['id'],
'status2' => 0,
'remark_df' => 'udun代付失败',
]);
Db::commit();
}
//无论业务方处理成功与否success,failed回调都认为成功
return "success";
}
} catch (\Exception $e) {
Db::rollback();
self::setError($e->getMessage());
return false;
}
}
public function test(){
}
}

View File

@@ -0,0 +1,63 @@
<?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\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());
}
}
}

View 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;
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);
}
/**
* @notes 代理工作台
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 17:01
*/
public function agent()
{
$params = $this->request->get();
$params['admin_id'] = $this->adminId;
$result = WorkbenchLogic::agent($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,134 @@
<?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\article;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\article\ArticleCateLists;
use app\adminapi\logic\article\ArticleCateLogic;
use app\adminapi\validate\article\ArticleCateValidate;
/**
* 资讯分类管理控制器
* Class ArticleCateController
* @package app\adminapi\controller\article
*/
class ArticleCateController extends BaseAdminController
{
/**
* @notes 查看资讯分类列表
* @return \think\response\Json
* @author heshihu
* @date 2022/2/21 17:11
*/
public function lists()
{
return $this->dataLists(new ArticleCateLists());
}
/**
* @notes 添加资讯分类
* @return \think\response\Json
* @author heshihu
* @date 2022/2/21 17:31
*/
public function add()
{
$params = (new ArticleCateValidate())->post()->goCheck('add');
ArticleCateLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑资讯分类
* @return \think\response\Json
* @author heshihu
* @date 2022/2/21 17:49
*/
public function edit()
{
$params = (new ArticleCateValidate())->post()->goCheck('edit');
$result = ArticleCateLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(ArticleCateLogic::getError());
}
/**
* @notes 删除资讯分类
* @return \think\response\Json
* @author heshihu
* @date 2022/2/21 17:52
*/
public function delete()
{
$params = (new ArticleCateValidate())->post()->goCheck('delete');
ArticleCateLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 资讯分类详情
* @return \think\response\Json
* @author heshihu
* @date 2022/2/21 17:54
*/
public function detail()
{
$params = (new ArticleCateValidate())->goCheck('detail');
$result = ArticleCateLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更改资讯分类状态
* @return \think\response\Json
* @author heshihu
* @date 2022/2/21 10:15
*/
public function updateStatus()
{
$params = (new ArticleCateValidate())->post()->goCheck('status');
$result = ArticleCateLogic::updateStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(ArticleCateLogic::getError());
}
/**
* @notes 获取文章分类
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/10/13 10:54
*/
public function all()
{
$result = ArticleCateLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,126 @@
<?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\article;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\article\ArticleLists;
use app\adminapi\logic\article\ArticleLogic;
use app\adminapi\validate\article\ArticleValidate;
/**
* 资讯管理控制器
* Class ArticleController
* @package app\adminapi\controller\article
*/
class ArticleController extends BaseAdminController
{
/**
* @notes 查看资讯列表
* @return \think\response\Json
* @author heshihu
* @date 2022/2/22 9:47
*/
public function lists()
{
return $this->dataLists(new ArticleLists());
}
/**
* @notes 添加资讯
* @return \think\response\Json
* @author heshihu
* @date 2022/2/22 9:57
*/
public function add()
{
$params = (new ArticleValidate())->post()->goCheck('add');
ArticleLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑资讯
* @return \think\response\Json
* @author heshihu
* @date 2022/2/22 10:12
*/
public function edit()
{
$params = (new ArticleValidate())->post()->goCheck('edit');
$result = ArticleLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(ArticleLogic::getError());
}
/**
* @notes 删除资讯
* @return \think\response\Json
* @author heshihu
* @date 2022/2/22 10:17
*/
public function delete()
{
$params = (new ArticleValidate())->post()->goCheck('delete');
ArticleLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 资讯详情
* @return \think\response\Json
* @author heshihu
* @date 2022/2/22 10:15
*/
public function detail()
{
$params = (new ArticleValidate())->goCheck('detail');
$result = ArticleLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更改资讯状态
* @return \think\response\Json
* @author heshihu
* @date 2022/2/22 10:18
*/
public function updateStatus()
{
$params = (new ArticleValidate())->post()->goCheck('status');
$result = ArticleLogic::updateStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(ArticleLogic::getError());
}
/**
* @notes 资讯列表
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function all()
{
$params = $this->request->get();
$result = ArticleLogic::all($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,163 @@
<?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');
$result = AdminLogic::add($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 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);
}
/**
* @notes 获取谷歌验证
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:07
*/
public function google()
{
$params['id'] = $this->adminId;
$result = AdminLogic::google($params);
return $this->data($result);
}
/**
* @notes 重置谷歌验证
* @return \think\response\Json
* @author 段誉
* @date 2021/12/29 11:07
*/
public function resetGoogle()
{
$params = $this->request->post();
$result = AdminLogic::resetGoogle($params);
if (true === $result) {
return $this->success('重置成功', [], 1, 1);
}
return $this->fail(AdminLogic::getError());
}
}

View File

@@ -0,0 +1,143 @@
<?php
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);
}
/**
* @notes 更新排序
* @return \think\response\Json
* @author 段誉
* @date 2022/7/6 17:04
*/
public function updateSort()
{
$params = (new MenuValidate())->post()->goCheck('sort');
MenuLogic::updateSort($params);
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 2022/10/13 11:03
*/
public function all()
{
$result = MenuLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,124 @@
<?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');
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 = RoleLogic::detail($params['id']);
return $this->data($detail);
}
/**
* @notes 获取角色数据
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/10/13 10:39
*/
public function all()
{
$result = RoleLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,135 @@
<?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\crontab;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\crontab\CrontabLists;
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 段誉
* @date 2022/3/29 14:27
*/
public function lists()
{
return $this->dataLists(new CrontabLists());
}
/**
* @notes 添加定时任务
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 14:27
*/
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 段誉
* @date 2022/3/29 14:27
*/
public function detail()
{
$params = (new CrontabValidate())->goCheck('detail');
$result = CrontabLogic::detail($params);
return $this->data($result);
}
/**
* @notes 编辑定时任务
* @return \think\response\Json
* @author 段誉
* @date 2022/3/29 14:27
*/
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 段誉
* @date 2022/3/29 14:27
*/
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 段誉
* @date 2022/3/29 14:28
*/
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 段誉
* @date 2022/3/29 14:28
*/
public function expression()
{
$params = (new CrontabValidate())->goCheck('expression');
$result = CrontabLogic::expression($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,120 @@
<?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\lists\decorate\DecorateHintLists;
use app\adminapi\logic\decorate\DecorateHintLogic;
use app\adminapi\validate\decorate\DecorateHintValidate;
/**
* 提示内容控制器
* Class DecorateHintController
* @package app\adminapi\controller\decorate
*/
class DecorateHintController extends BaseAdminController
{
/**
* @notes 获取提示内容列表
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function lists()
{
return $this->dataLists(new DecorateHintLists());
}
/**
* @notes 添加提示内容
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function add()
{
$params = (new DecorateHintValidate())->post()->goCheck('add');
$result = DecorateHintLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(DecorateHintLogic::getError());
}
/**
* @notes 编辑提示内容
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function edit()
{
$params = (new DecorateHintValidate())->post()->goCheck('edit');
$result = DecorateHintLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(DecorateHintLogic::getError());
}
/**
* @notes 删除提示内容
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function delete()
{
$params = (new DecorateHintValidate())->post()->goCheck('delete');
DecorateHintLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取提示内容详情
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function detail()
{
$params = (new DecorateHintValidate())->goCheck('detail');
$result = DecorateHintLogic::detail($params);
return $this->data($result);
}
/**
* @notes 消息列表
* @return \think\response\Json
* @author BD
* @date 2024/03/17 17:01
*/
public function allByType()
{
$params = $this->request->get();
$result = DecorateHintLogic::allByType($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,108 @@
<?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\lists\decorate\DecorateNavLists;
use app\adminapi\logic\decorate\DecorateNavLogic;
use app\adminapi\validate\decorate\DecorateNavValidate;
/**
* 菜单按钮控制器
* Class DecorateNavController
* @package app\adminapi\controller\decorate
*/
class DecorateNavController extends BaseAdminController
{
/**
* @notes 获取菜单按钮列表
* @return \think\response\Json
* @author BD
* @date 2024/03/17 16:41
*/
public function lists()
{
return $this->dataLists(new DecorateNavLists());
}
/**
* @notes 添加菜单按钮
* @return \think\response\Json
* @author BD
* @date 2024/03/17 16:41
*/
public function add()
{
$params = (new DecorateNavValidate())->post()->goCheck('add');
$result = DecorateNavLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(DecorateNavLogic::getError());
}
/**
* @notes 编辑菜单按钮
* @return \think\response\Json
* @author BD
* @date 2024/03/17 16:41
*/
public function edit()
{
$params = (new DecorateNavValidate())->post()->goCheck('edit');
$result = DecorateNavLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(DecorateNavLogic::getError());
}
/**
* @notes 删除菜单按钮
* @return \think\response\Json
* @author BD
* @date 2024/03/17 16:41
*/
public function delete()
{
$params = (new DecorateNavValidate())->post()->goCheck('delete');
DecorateNavLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取菜单按钮详情
* @return \think\response\Json
* @author BD
* @date 2024/03/17 16:41
*/
public function detail()
{
$params = (new DecorateNavValidate())->goCheck('detail');
$result = DecorateNavLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,108 @@
<?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\lists\decorate\DecorateSwiperLists;
use app\adminapi\logic\decorate\DecorateSwiperLogic;
use app\adminapi\validate\decorate\DecorateSwiperValidate;
/**
* 轮播图控制器
* Class DecorateSwiperController
* @package app\adminapi\controller\decorate
*/
class DecorateSwiperController extends BaseAdminController
{
/**
* @notes 获取轮播图列表
* @return \think\response\Json
* @author BD
* @date 2024/03/16 17:34
*/
public function lists()
{
return $this->dataLists(new DecorateSwiperLists());
}
/**
* @notes 添加轮播图
* @return \think\response\Json
* @author BD
* @date 2024/03/16 17:34
*/
public function add()
{
$params = (new DecorateSwiperValidate())->post()->goCheck('add');
$result = DecorateSwiperLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(DecorateSwiperLogic::getError());
}
/**
* @notes 编辑轮播图
* @return \think\response\Json
* @author BD
* @date 2024/03/16 17:34
*/
public function edit()
{
$params = (new DecorateSwiperValidate())->post()->goCheck('edit');
$result = DecorateSwiperLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(DecorateSwiperLogic::getError());
}
/**
* @notes 删除轮播图
* @return \think\response\Json
* @author BD
* @date 2024/03/16 17:34
*/
public function delete()
{
$params = (new DecorateSwiperValidate())->post()->goCheck('delete');
DecorateSwiperLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取轮播图详情
* @return \think\response\Json
* @author BD
* @date 2024/03/16 17:34
*/
public function detail()
{
$params = (new DecorateSwiperValidate())->goCheck('detail');
$result = DecorateSwiperLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,134 @@
<?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);
}
/**
* @notes 获取部门数据
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/10/13 10:28
*/
public function all()
{
$result = DeptLogic::getAllData();
return $this->data($result);
}
}

View 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\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);
}
/**
* @notes 获取岗位数据
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/10/13 10:31
*/
public function all()
{
$result = JobsLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\feedback;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\feedback\FeedbackCateLists;
use app\adminapi\logic\feedback\FeedbackCateLogic;
use app\adminapi\validate\feedback\FeedbackCateValidate;
/**
* 意见反馈类型控制器
* Class FeedbackCateController
* @package app\adminapi\controller\feedback
*/
class FeedbackCateController extends BaseAdminController
{
/**
* @notes 获取意见反馈类型列表
* @return \think\response\Json
* @author BD
* @date 2024/06/06 00:12
*/
public function lists()
{
return $this->dataLists(new FeedbackCateLists());
}
/**
* @notes 添加意见反馈类型
* @return \think\response\Json
* @author BD
* @date 2024/06/06 00:12
*/
public function add()
{
$params = (new FeedbackCateValidate())->post()->goCheck('add');
$result = FeedbackCateLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(FeedbackCateLogic::getError());
}
/**
* @notes 编辑意见反馈类型
* @return \think\response\Json
* @author BD
* @date 2024/06/06 00:12
*/
public function edit()
{
$params = (new FeedbackCateValidate())->post()->goCheck('edit');
$result = FeedbackCateLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(FeedbackCateLogic::getError());
}
/**
* @notes 删除意见反馈类型
* @return \think\response\Json
* @author BD
* @date 2024/06/06 00:12
*/
public function delete()
{
$params = (new FeedbackCateValidate())->post()->goCheck('delete');
FeedbackCateLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取意见反馈类型详情
* @return \think\response\Json
* @author BD
* @date 2024/06/06 00:12
*/
public function detail()
{
$params = (new FeedbackCateValidate())->goCheck('detail');
$result = FeedbackCateLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\feedback;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\feedback\FeedbackRecordLists;
use app\adminapi\logic\feedback\FeedbackRecordLogic;
use app\adminapi\validate\feedback\FeedbackRecordValidate;
/**
* 意见反馈记录控制器
* Class FeedbackRecordController
* @package app\adminapi\controller\feedback
*/
class FeedbackRecordController extends BaseAdminController
{
/**
* @notes 获取意见反馈记录列表
* @return \think\response\Json
* @author BD
* @date 2024/06/06 01:11
*/
public function lists()
{
return $this->dataLists(new FeedbackRecordLists());
}
/**
* @notes 添加意见反馈记录
* @return \think\response\Json
* @author BD
* @date 2024/06/06 01:11
*/
public function add()
{
$params = (new FeedbackRecordValidate())->post()->goCheck('add');
$result = FeedbackRecordLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(FeedbackRecordLogic::getError());
}
/**
* @notes 编辑意见反馈记录
* @return \think\response\Json
* @author BD
* @date 2024/06/06 01:11
*/
public function edit()
{
$params = (new FeedbackRecordValidate())->post()->goCheck('edit');
$result = FeedbackRecordLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(FeedbackRecordLogic::getError());
}
/**
* @notes 删除意见反馈记录
* @return \think\response\Json
* @author BD
* @date 2024/06/06 01:11
*/
public function delete()
{
$params = (new FeedbackRecordValidate())->post()->goCheck('delete');
FeedbackRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取意见反馈记录详情
* @return \think\response\Json
* @author BD
* @date 2024/06/06 01:11
*/
public function detail()
{
$params = (new FeedbackRecordValidate())->goCheck('detail');
$result = FeedbackRecordLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,163 @@
<?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\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\{RechargeRecordLists,AgentRechargeRecordLists};
use app\adminapi\logic\finance\RechargeRecordLogic;
use app\adminapi\validate\finance\RechargeRecordValidate;
/**
* 充值记录控制器
* Class RechargeRecordController
* @package app\adminapi\controller\finance
*/
class RechargeRecordController extends BaseAdminController
{
/**
* @notes 获取充值记录列表
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function lists()
{
return $this->dataLists(new RechargeRecordLists());
}
/**
* @notes 获取代理充值记录列表
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function agentLists()
{
return $this->dataLists(new AgentRechargeRecordLists());
}
/**
* @notes 删除充值记录
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function delete()
{
$params = (new RechargeRecordValidate())->post()->goCheck('delete');
RechargeRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 同意充值
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function agree()
{
$params = (new RechargeRecordValidate())->post()->goCheck('agree');
$result = RechargeRecordLogic::agree($params['id']);
if (true === $result) {
return $this->success('同意成功', [], 1, 1);
}
return $this->fail(RechargeRecordLogic::getError());
}
/**
* @notes 拒绝充值
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function refuse()
{
$params = (new RechargeRecordValidate())->post()->goCheck('refuse');
$result = RechargeRecordLogic::refuse($params['id']);
if (true === $result) {
return $this->success('拒绝成功', [], 1, 1);
}
return $this->fail(RechargeRecordLogic::getError());
}
/**
* @notes 备注
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function remark()
{
$params = $this->request->post();
$params['admin_id'] = $this->adminId;
$result = RechargeRecordLogic::remark($params);
if (true === $result) {
return $this->success('备注成功', [], 1, 1);
}
return $this->fail(RechargeRecordLogic::getError());
}
/**
* @notes 修改充值金额
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function changeAmount()
{
$params = $this->request->post();
$result = RechargeRecordLogic::changeAmount($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(RechargeRecordLogic::getError());
}
/**
* @notes 新充值提现条数
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function warmCount()
{
$result = RechargeRecordLogic::warmCount();
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 bd
* @date 2024/01/31 14:07
*/
public function stat()
{
$result = RechargeRecordLogic::stat();
return $this->success('', $result);
}
}

View File

@@ -0,0 +1,85 @@
<?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\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\{UserFinanceLists,AgentUserFinanceLists};
use app\adminapi\logic\finance\UserFinanceLogic;
use app\adminapi\validate\finance\UserFinanceValidate;
/**
* 资金明细控制器
* Class UserFinanceController
* @package app\adminapi\controller\finance
*/
class UserFinanceController extends BaseAdminController
{
/**
* @notes 获取资金明细列表
* @return \think\response\Json
* @author BD
* @date 2024/03/07 13:10
*/
public function lists()
{
return $this->dataLists(new UserFinanceLists());
}
/**
* @notes 获取代理资金明细列表
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function agentLists()
{
return $this->dataLists(new AgentUserFinanceLists());
}
/**
* @notes 删除资金明细
* @return \think\response\Json
* @author BD
* @date 2024/03/07 13:10
*/
public function delete()
{
$params = (new UserFinanceValidate())->post()->goCheck('delete');
UserFinanceLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 解冻
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function unfrozen()
{
$params = (new UserFinanceValidate())->post()->goCheck('unfrozen');
$result = UserFinanceLogic::unfrozen($params);
if (true === $result) {
return $this->success('解冻成功', [], 1, 1);
}
return $this->fail(UserFinanceLogic::getError());
}
}

View File

@@ -0,0 +1,199 @@
<?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\finance;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\finance\{WithdrawRecordLists,AgentWithdrawRecordLists};
use app\adminapi\logic\finance\WithdrawRecordLogic;
use app\adminapi\validate\finance\WithdrawRecordValidate;
/**
* 提现记录控制器
* Class WithdrawRecordController
* @package app\adminapi\controller\finance
*/
class WithdrawRecordController extends BaseAdminController
{
/**
* @notes 获取提现记录列表
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:35
*/
public function lists()
{
return $this->dataLists(new WithdrawRecordLists());
}
/**
* @notes 获取代理提现记录列表
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function agentLists()
{
return $this->dataLists(new AgentWithdrawRecordLists());
}
/**
* @notes 添加提现记录
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:35
*/
public function add()
{
$params = (new WithdrawRecordValidate())->post()->goCheck('add');
$result = WithdrawRecordLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(WithdrawRecordLogic::getError());
}
/**
* @notes 编辑提现记录
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:35
*/
public function edit()
{
$params = (new WithdrawRecordValidate())->post()->goCheck('edit');
$result = WithdrawRecordLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(WithdrawRecordLogic::getError());
}
/**
* @notes 删除提现记录
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:35
*/
public function delete()
{
$params = (new WithdrawRecordValidate())->post()->goCheck('delete');
WithdrawRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取提现记录详情
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:35
*/
public function detail()
{
$params = (new WithdrawRecordValidate())->goCheck('detail');
$result = WithdrawRecordLogic::detail($params);
return $this->data($result);
}
/**
* @notes udun代付
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function udunPay()
{
$params = (new WithdrawRecordValidate())->post()->goCheck('udunPay');
$result = WithdrawRecordLogic::udunPay($params);
if ('success' === $result) {
return $this->success('发起成功', [], 1, 1);
}
return $this->fail(WithdrawRecordLogic::getError());
}
/**
* @notes 同意提现
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function agree()
{
$params = (new WithdrawRecordValidate())->post()->goCheck('agree');
$result = WithdrawRecordLogic::agree($params);
if (true === $result) {
return $this->success('同意成功', [], 1, 1);
}
return $this->fail(WithdrawRecordLogic::getError());
}
/**
* @notes 拒绝提现
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function refuse()
{
$params = (new WithdrawRecordValidate())->post()->goCheck('refuse');
$result = WithdrawRecordLogic::refuse($params);
if (true === $result) {
return $this->success('拒绝成功', [], 1, 1);
}
return $this->fail(WithdrawRecordLogic::getError());
}
/**
* @notes 备注
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function remark()
{
$params = $this->request->post();
$params['admin_id'] = $this->adminId;
$result = WithdrawRecordLogic::remark($params);
if (true === $result) {
return $this->success('备注成功', [], 1, 1);
}
return $this->fail(WithdrawRecordLogic::getError());
}
/**
* @notes 提现统计
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author bd
* @date 2024/01/31 14:07
*/
public function stat()
{
$result = WithdrawRecordLogic::stat();
return $this->success('', $result);
}
}

View File

@@ -0,0 +1,123 @@
<?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\goods;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\goods\GoodsCateLists;
use app\adminapi\logic\goods\GoodsCateLogic;
use app\adminapi\validate\goods\GoodsCateValidate;
/**
* 商品分类控制器
* Class GoodsCateController
* @package app\adminapi\controller\goods
*/
class GoodsCateController extends BaseAdminController
{
/**
* @notes 获取商品分类列表
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function lists()
{
return $this->dataLists(new GoodsCateLists());
}
/**
* @notes 添加商品分类
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function add()
{
$params = (new GoodsCateValidate())->post()->goCheck('add');
$result = GoodsCateLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(GoodsCateLogic::getError());
}
/**
* @notes 编辑商品分类
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function edit()
{
$params = (new GoodsCateValidate())->post()->goCheck('edit');
$result = GoodsCateLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(GoodsCateLogic::getError());
}
/**
* @notes 删除商品分类
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function delete()
{
$params = (new GoodsCateValidate())->post()->goCheck('delete');
GoodsCateLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取商品分类详情
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function detail()
{
$params = (new GoodsCateValidate())->goCheck('detail');
$result = GoodsCateLogic::detail($params);
return $this->data($result);
}
/**
* @notes 获取商品分类
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/03/11 01:58
*/
public function all()
{
$result = GoodsCateLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,108 @@
<?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\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
* @package app\adminapi\controller\goods
*/
class GoodsController extends BaseAdminController
{
/**
* @notes 获取商品列表
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function lists()
{
return $this->dataLists(new GoodsLists());
}
/**
* @notes 添加商品
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function add()
{
$params = (new GoodsValidate())->post()->goCheck('add');
$result = GoodsLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(GoodsLogic::getError());
}
/**
* @notes 编辑商品
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function edit()
{
$params = (new GoodsValidate())->post()->goCheck('edit');
$result = GoodsLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(GoodsLogic::getError());
}
/**
* @notes 删除商品
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function delete()
{
$params = (new GoodsValidate())->post()->goCheck('delete');
GoodsLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取商品详情
* @return \think\response\Json
* @author BD
* @date 2024/03/11 01:58
*/
public function detail()
{
$params = (new GoodsValidate())->goCheck('detail');
$result = GoodsLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,76 @@
<?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\goods;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\goods\GoodsRecordLists;
use app\adminapi\logic\goods\GoodsRecordLogic;
use app\adminapi\validate\goods\GoodsRecordValidate;
/**
* 抢单记录控制器
* Class GoodsRecordController
* @package app\adminapi\controller\goods
*/
class GoodsRecordController extends BaseAdminController
{
/**
* @notes 获取抢单记录列表
* @return \think\response\Json
* @author BD
* @date 2024/03/19 02:29
*/
public function lists()
{
return $this->dataLists(new GoodsRecordLists());
}
/**
* @notes 删除抢单记录
* @return \think\response\Json
* @author BD
* @date 2024/03/19 02:29
*/
public function delete()
{
$params = (new GoodsRecordValidate())->post()->goCheck('delete');
GoodsRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 派单
* @return \think\response\Json
* @author BD
* @date 2024/03/19 02:29
*/
public function dispatch()
{
$params = (new GoodsRecordValidate())->post()->goCheck('dispatch');
$result = GoodsRecordLogic::dispatch($params);
if (true === $result) {
return $this->success('派单成功', [], 1, 1);
}
return $this->fail(GoodsRecordLogic::getError());
}
}

View File

@@ -0,0 +1,138 @@
<?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\item;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\item\ItemCateLists;
use app\adminapi\logic\item\ItemCateLogic;
use app\adminapi\validate\item\ItemCateValidate;
/**
* 项目分类控制器
* Class ItemCateController
* @package app\adminapi\controller\item
*/
class ItemCateController extends BaseAdminController
{
/**
* @notes 获取项目分类列表
* @return \think\response\Json
* @author likeadmin
* @date 2024/01/16 13:23
*/
public function lists()
{
return $this->dataLists(new ItemCateLists());
}
/**
* @notes 添加项目分类
* @return \think\response\Json
* @author likeadmin
* @date 2024/01/16 13:23
*/
public function add()
{
$params = (new ItemCateValidate())->post()->goCheck('add');
$result = ItemCateLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(ItemCateLogic::getError());
}
/**
* @notes 编辑项目分类
* @return \think\response\Json
* @author likeadmin
* @date 2024/01/16 13:23
*/
public function edit()
{
$params = (new ItemCateValidate())->post()->goCheck('edit');
$result = ItemCateLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(ItemCateLogic::getError());
}
/**
* @notes 删除项目分类
* @return \think\response\Json
* @author likeadmin
* @date 2024/01/16 13:23
*/
public function delete()
{
$params = (new ItemCateValidate())->post()->goCheck('delete');
ItemCateLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取项目分类详情
* @return \think\response\Json
* @author likeadmin
* @date 2024/01/16 13:23
*/
public function detail()
{
$params = (new ItemCateValidate())->goCheck('detail');
$result = ItemCateLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更改项目分类状态
* @return \think\response\Json
* @author likeadmin
* @date 2022/2/21 10:15
*/
public function updateStatus()
{
$params = (new ItemCateValidate())->post()->goCheck('status');
$result = ItemCateLogic::updateStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(ItemCateLogic::getError());
}
/**
* @notes 获取项目分类
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/10/13 10:54
*/
public function all()
{
$result = ItemCateLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,124 @@
<?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\item;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\item\ItemLists;
use app\adminapi\logic\item\ItemLogic;
use app\adminapi\validate\item\ItemValidate;
/**
* 项目控制器
* Class ItemController
* @package app\adminapi\controller\item
*/
class ItemController extends BaseAdminController
{
/**
* @notes 获取项目列表
* @return \think\response\Json
* @author BD
* @date 2024/01/16 13:23
*/
public function lists()
{
return $this->dataLists(new ItemLists());
}
/**
* @notes 添加项目
* @return \think\response\Json
* @author BD
* @date 2024/01/16 13:23
*/
public function add()
{
$params = (new ItemValidate())->post()->goCheck('add');
$result = ItemLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(ItemLogic::getError());
}
/**
* @notes 编辑项目
* @return \think\response\Json
* @author BD
* @date 2024/01/16 13:23
*/
public function edit()
{
$params = (new ItemValidate())->post()->goCheck('edit');
$result = ItemLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(ItemLogic::getError());
}
/**
* @notes 删除项目
* @return \think\response\Json
* @author BD
* @date 2024/01/16 13:23
*/
public function delete()
{
$params = (new ItemValidate())->post()->goCheck('delete');
ItemLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取项目详情
* @return \think\response\Json
* @author BD
* @date 2024/01/16 13:23
*/
public function detail()
{
$params = (new ItemValidate())->goCheck('detail');
$result = ItemLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateIndexStatus()
{
$params = $this->request->post();
$result = ItemLogic::updateIndexStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\item;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\item\ItemRecordLists;
use app\adminapi\logic\item\ItemRecordLogic;
use app\adminapi\validate\item\ItemRecordValidate;
/**
* 项目记录控制器
* Class ItemRecordController
* @package app\adminapi\controller\item
*/
class ItemRecordController extends BaseAdminController
{
/**
* @notes 获取项目记录列表
* @return \think\response\Json
* @author BD
* @date 2024/08/07 15:42
*/
public function lists()
{
return $this->dataLists(new ItemRecordLists());
}
/**
* @notes 添加项目记录
* @return \think\response\Json
* @author BD
* @date 2024/08/07 15:42
*/
public function add()
{
$params = (new ItemRecordValidate())->post()->goCheck('add');
$result = ItemRecordLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(ItemRecordLogic::getError());
}
/**
* @notes 编辑项目记录
* @return \think\response\Json
* @author BD
* @date 2024/08/07 15:42
*/
public function edit()
{
$params = (new ItemRecordValidate())->post()->goCheck('edit');
$result = ItemRecordLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(ItemRecordLogic::getError());
}
/**
* @notes 删除项目记录
* @return \think\response\Json
* @author BD
* @date 2024/08/07 15:42
*/
public function delete()
{
$params = (new ItemRecordValidate())->post()->goCheck('delete');
ItemRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取项目记录详情
* @return \think\response\Json
* @author BD
* @date 2024/08/07 15:42
*/
public function detail()
{
$params = (new ItemRecordValidate())->goCheck('detail');
$result = ItemRecordLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\lh;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\lh\LhCoinLists;
use app\adminapi\logic\lh\LhCoinLogic;
use app\adminapi\validate\lh\LhCoinValidate;
/**
* 量化货币控制器
* Class LhCoinController
* @package app\adminapi\controller\lh
*/
class LhCoinController extends BaseAdminController
{
/**
* @notes 获取量化货币列表
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function lists()
{
return $this->dataLists(new LhCoinLists());
}
/**
* @notes 添加量化货币
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function add()
{
$params = (new LhCoinValidate())->post()->goCheck('add');
$result = LhCoinLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(LhCoinLogic::getError());
}
/**
* @notes 编辑量化货币
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function edit()
{
$params = (new LhCoinValidate())->post()->goCheck('edit');
$result = LhCoinLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(LhCoinLogic::getError());
}
/**
* @notes 删除量化货币
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function delete()
{
$params = (new LhCoinValidate())->post()->goCheck('delete');
LhCoinLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取量化货币详情
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function detail()
{
$params = (new LhCoinValidate())->goCheck('detail');
$result = LhCoinLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\lh;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\lh\LhRecordLists;
use app\adminapi\logic\lh\LhRecordLogic;
use app\adminapi\validate\lh\LhRecordValidate;
/**
* 量化记录控制器
* Class LhRecordController
* @package app\adminapi\controller\lh
*/
class LhRecordController extends BaseAdminController
{
/**
* @notes 获取量化记录列表
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function lists()
{
return $this->dataLists(new LhRecordLists());
}
/**
* @notes 添加量化记录
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function add()
{
$params = (new LhRecordValidate())->post()->goCheck('add');
$result = LhRecordLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(LhRecordLogic::getError());
}
/**
* @notes 编辑量化记录
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function edit()
{
$params = (new LhRecordValidate())->post()->goCheck('edit');
$result = LhRecordLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(LhRecordLogic::getError());
}
/**
* @notes 删除量化记录
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function delete()
{
$params = (new LhRecordValidate())->post()->goCheck('delete');
LhRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取量化记录详情
* @return \think\response\Json
* @author BD
* @date 2024/05/19 21:13
*/
public function detail()
{
$params = (new LhRecordValidate())->goCheck('detail');
$result = LhRecordLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\mall;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\mall\MallGoodsLists;
use app\adminapi\logic\mall\MallGoodsLogic;
use app\adminapi\validate\mall\MallGoodsValidate;
/**
* 积分、抽奖奖品控制器
* Class MallGoodsController
* @package app\adminapi\controller\mall
*/
class MallGoodsController extends BaseAdminController
{
/**
* @notes 获取积分、抽奖奖品列表
* @return \think\response\Json
* @author BD
* @date 2024/10/14 23:57
*/
public function lists()
{
return $this->dataLists(new MallGoodsLists());
}
/**
* @notes 添加积分、抽奖奖品
* @return \think\response\Json
* @author BD
* @date 2024/10/14 23:57
*/
public function add()
{
$params = (new MallGoodsValidate())->post()->goCheck('add');
$result = MallGoodsLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(MallGoodsLogic::getError());
}
/**
* @notes 编辑积分、抽奖奖品
* @return \think\response\Json
* @author BD
* @date 2024/10/14 23:57
*/
public function edit()
{
$params = (new MallGoodsValidate())->post()->goCheck('edit');
$result = MallGoodsLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(MallGoodsLogic::getError());
}
/**
* @notes 删除积分、抽奖奖品
* @return \think\response\Json
* @author BD
* @date 2024/10/14 23:57
*/
public function delete()
{
$params = (new MallGoodsValidate())->post()->goCheck('delete');
MallGoodsLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取积分、抽奖奖品详情
* @return \think\response\Json
* @author BD
* @date 2024/10/14 23:57
*/
public function detail()
{
$params = (new MallGoodsValidate())->goCheck('detail');
$result = MallGoodsLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\mall;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\mall\MallGoodsRecordLists;
use app\adminapi\logic\mall\MallGoodsRecordLogic;
use app\adminapi\validate\mall\MallGoodsRecordValidate;
/**
* 奖品记录控制器
* Class MallGoodsRecordController
* @package app\adminapi\controller\mall
*/
class MallGoodsRecordController extends BaseAdminController
{
/**
* @notes 获取奖品记录列表
* @return \think\response\Json
* @author BD
* @date 2024/10/15 14:00
*/
public function lists()
{
return $this->dataLists(new MallGoodsRecordLists());
}
/**
* @notes 添加奖品记录
* @return \think\response\Json
* @author BD
* @date 2024/10/15 14:00
*/
public function add()
{
$params = (new MallGoodsRecordValidate())->post()->goCheck('add');
$result = MallGoodsRecordLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(MallGoodsRecordLogic::getError());
}
/**
* @notes 编辑奖品记录
* @return \think\response\Json
* @author BD
* @date 2024/10/15 14:00
*/
public function edit()
{
$params = (new MallGoodsRecordValidate())->post()->goCheck('edit');
$result = MallGoodsRecordLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(MallGoodsRecordLogic::getError());
}
/**
* @notes 删除奖品记录
* @return \think\response\Json
* @author BD
* @date 2024/10/15 14:00
*/
public function delete()
{
$params = (new MallGoodsRecordValidate())->post()->goCheck('delete');
MallGoodsRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取奖品记录详情
* @return \think\response\Json
* @author BD
* @date 2024/10/15 14:00
*/
public function detail()
{
$params = (new MallGoodsRecordValidate())->goCheck('detail');
$result = MallGoodsRecordLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,138 @@
<?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\member;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\member\UserMemberLists;
use app\adminapi\logic\member\UserMemberLogic;
use app\adminapi\validate\member\UserMemberValidate;
/**
* 会员等级控制器
* Class UserMemberController
* @package app\adminapi\controller\member
*/
class UserMemberController extends BaseAdminController
{
/**
* @notes 获取会员等级列表
* @return \think\response\Json
* @author BD
* @date 2024/03/14 00:28
*/
public function lists()
{
return $this->dataLists(new UserMemberLists());
}
/**
* @notes 添加会员等级
* @return \think\response\Json
* @author BD
* @date 2024/03/14 00:28
*/
public function add()
{
$params = (new UserMemberValidate())->post()->goCheck('add');
$result = UserMemberLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserMemberLogic::getError());
}
/**
* @notes 编辑会员等级
* @return \think\response\Json
* @author BD
* @date 2024/03/14 00:28
*/
public function edit()
{
$params = (new UserMemberValidate())->post()->goCheck('edit');
$result = UserMemberLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserMemberLogic::getError());
}
/**
* @notes 删除会员等级
* @return \think\response\Json
* @author BD
* @date 2024/03/14 00:28
*/
public function delete()
{
$params = (new UserMemberValidate())->post()->goCheck('delete');
UserMemberLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取会员等级详情
* @return \think\response\Json
* @author BD
* @date 2024/03/14 00:28
*/
public function detail()
{
$params = (new UserMemberValidate())->goCheck('detail');
$result = UserMemberLogic::detail($params);
return $this->data($result);
}
/**
* @notes 设置用户会员等级
* @return \think\response\Json
* @author BD
* @date 2024/03/19 02:29
*/
public function setUserMember()
{
$params = $this->request->post();
$result = UserMemberLogic::setUserMember($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserMemberLogic::getError());
}
/**
* @notes 获取会员等级
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/03/11 01:58
*/
public function all()
{
$result = UserMemberLogic::getAllData();
return $this->data($result);
}
}

View 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('设置成功');
}
return $this->fail(NoticeLogic::getError());
}
}

View 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);
}
}

View File

@@ -0,0 +1,38 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\CustomerServiceLogic;
/**
* 客服设置
* Class CustomerServiceController
* @package app\adminapi\controller\setting
*/
class CustomerServiceController extends BaseAdminController
{
/**
* @notes 获取客服设置
* @return \think\response\Json
* @author BD
* @date 2024/2/15 12:05 下午
*/
public function getConfig()
{
$result = CustomerServiceLogic::getConfig();
return $this->data($result);
}
/**
* @notes 设置客服设置
* @return \think\response\Json
* @author BD
* @date 2024/2/15 12:11 下午
*/
public function setConfig()
{
$params = $this->request->post();
CustomerServiceLogic::setConfig($params);
return $this->success('设置成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,124 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\LanguageLists;
use app\adminapi\logic\setting\LanguageLogic;
use app\adminapi\validate\setting\LanguageValidate;
/**
* 语言包控制器
* Class LanguageController
* @package app\adminapi\controller\setting
*/
class LanguageController extends BaseAdminController
{
/**
* @notes 获取语言包列表
* @return \think\response\Json
* @author BD
* @date 2023/11/30 13:59
*/
public function lists()
{
return $this->dataLists(new LanguageLists());
}
/**
* @notes 添加语言包
* @return \think\response\Json
* @author BD
* @date 2023/11/30 13:59
*/
public function add()
{
$params = (new LanguageValidate())->post()->goCheck('add');
$result = LanguageLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(LanguageLogic::getError());
}
/**
* @notes 编辑语言包
* @return \think\response\Json
* @author BD
* @date 2023/11/30 13:59
*/
public function edit()
{
$params = (new LanguageValidate())->post()->goCheck('edit');
$result = LanguageLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(LanguageLogic::getError());
}
/**
* @notes 删除语言包
* @return \think\response\Json
* @author BD
* @date 2023/11/30 13:59
*/
public function delete()
{
$params = (new LanguageValidate())->post()->goCheck('delete');
LanguageLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取语言详情
* @return \think\response\Json
* @author BD
* @date 2023/11/30 13:59
*/
public function detail()
{
$params = (new LanguageValidate())->goCheck('detail');
$result = LanguageLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2024/2/22 10:18
*/
public function updateStatus()
{
$params = (new LanguageValidate())->post()->goCheck('status');
$result = LanguageLogic::updateStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(LanguageLogic::getError());
}
/**
* @notes 获取所有语言
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/10/13 10:54
*/
public function all()
{
$result = LanguageLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,122 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\LanguagePagLists;
use app\adminapi\logic\setting\LanguagePagLogic;
use app\adminapi\validate\setting\LanguagePagValidate;
/**
* 语言包控制器
* Class LanguagePagController
* @package app\adminapi\controller\setting
*/
class LanguagePagController extends BaseAdminController
{
/**
* @notes 获取语言包列表
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function lists()
{
return $this->dataLists(new LanguagePagLists());
}
/**
* @notes 添加语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function add()
{
$params = (new LanguagePagValidate())->post()->goCheck('add');
$result = LanguagePagLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(LanguagePagLogic::getError());
}
/**
* @notes 编辑语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function edit()
{
$params = (new LanguagePagValidate())->post()->goCheck('edit');
$result = LanguagePagLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(LanguagePagLogic::getError());
}
/**
* @notes 删除语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function delete()
{
$params = (new LanguagePagValidate())->post()->goCheck('delete');
LanguagePagLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取语言包详情
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function detail()
{
$params = (new LanguagePagValidate())->goCheck('detail');
$result = LanguagePagLogic::detail($params);
return $this->data($result);
}
/**
* @notes 同步语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function sync()
{
$params = $this->request->post();
LanguagePagLogic::sync($params);
return $this->success('同步成功', [], 1, 1);
}
/**
* @notes 翻译语言包
* @return \think\response\Json
* @author BD
* @date 2024/01/14 13:50
*/
public function trans()
{
$params = $this->request->post();
$result = LanguagePagLogic::trans($params);
if (true === $result) {
return $this->success('翻译成功', [], 1, 1);
}
return $this->fail(LanguagePagLogic::getError());
}
}

View File

@@ -0,0 +1,125 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\RechargeMethodLists;
use app\adminapi\logic\setting\RechargeMethodLogic;
use app\adminapi\validate\setting\RechargeMethodValidate;
/**
* 充值方式控制器
* Class RechargeMethodController
* @package app\adminapi\controller\setting
*/
class RechargeMethodController extends BaseAdminController
{
/**
* @notes 获取充值方式列表
* @return \think\response\Json
* @author BD
* @date 2023/11/30 15:22
*/
public function lists()
{
return $this->dataLists(new RechargeMethodLists());
}
/**
* @notes 添加充值方式
* @return \think\response\Json
* @author BD
* @date 2023/11/30 15:22
*/
public function add()
{
$params = (new RechargeMethodValidate())->post()->goCheck('add');
$result = RechargeMethodLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(RechargeMethodLogic::getError());
}
/**
* @notes 编辑充值方式
* @return \think\response\Json
* @author BD
* @date 2023/11/30 15:22
*/
public function edit()
{
$params = (new RechargeMethodValidate())->post()->goCheck('edit');
$result = RechargeMethodLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(RechargeMethodLogic::getError());
}
/**
* @notes 删除充值方式
* @return \think\response\Json
* @author BD
* @date 2023/11/30 15:22
*/
public function delete()
{
$params = (new RechargeMethodValidate())->post()->goCheck('delete');
RechargeMethodLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取充值方式详情
* @return \think\response\Json
* @author BD
* @date 2023/11/30 15:22
*/
public function detail()
{
$params = (new RechargeMethodValidate())->goCheck('detail');
$result = RechargeMethodLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateStatus()
{
$params = (new RechargeMethodValidate())->post()->goCheck('status');
$result = RechargeMethodLogic::updateStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(RechargeMethodLogic::getError());
}
/**
* @notes 获取全部充值方式
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2323/10/13 10:54
*/
public function all()
{
$result = RechargeMethodLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,73 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\StorageLogic;
use app\adminapi\validate\setting\StorageValidate;
use think\response\Json;
/**
* 存储设置控制器
* Class StorageController
* @package app\adminapi\controller\setting\shop
*/
class StorageController extends BaseAdminController
{
/**
* @notes 获取存储引擎列表
* @return Json
* @author BD
* @date 2023/4/20 16:13
*/
public function lists()
{
return $this->success('获取成功', StorageLogic::lists());
}
/**
* @notes 存储配置信息
* @return Json
* @author BD
* @date 2023/4/20 16:19
*/
public function detail()
{
$param = (new StorageValidate())->get()->goCheck('detail');
return $this->success('获取成功', StorageLogic::detail($param));
}
/**
* @notes 设置存储参数
* @return Json
* @author BD
* @date 2023/4/20 16:19
*/
public function setup()
{
$params = (new StorageValidate())->post()->goCheck('setup');
$result = StorageLogic::setup($params);
if (true === $result) {
return $this->success('配置成功', [], 1, 1);
}
return $this->success($result, [], 1, 1);
}
/**
* @notes 切换存储引擎
* @return Json
* @author BD
* @date 2023/4/20 16:19
*/
public function change()
{
$params = (new StorageValidate())->post()->goCheck('change');
StorageLogic::change($params);
return $this->success('切换成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,40 @@
<?php
namespace app\adminapi\controller\setting;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\TransactionSettingsLogic;
use app\adminapi\validate\setting\TransactionSettingsValidate;
/**
* 交易设置
* Class TransactionSettingsController
* @package app\adminapi\controller\setting
*/
class TransactionSettingsController extends BaseAdminController
{
/**
* @notes 获取交易设置
* @return \think\response\Json
* @author BD
* @date 2023/2/15 11:40 上午
*/
public function getConfig()
{
$result = TransactionSettingsLogic::getConfig();
return $this->data($result);
}
/**
* @notes 设置交易设置
* @return \think\response\Json
* @author BD
* @date 2023/2/15 11:50 上午
*/
public function setConfig()
{
$params = (new TransactionSettingsValidate())->post()->goCheck('setConfig');
TransactionSettingsLogic::setConfig($params);
return $this->success('操作成功',[],1,1);
}
}

View 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);
}
}

View File

@@ -0,0 +1,116 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\dict;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\dict\DictTypeLists;
use app\adminapi\logic\setting\dict\DictTypeLogic;
use app\adminapi\validate\dict\DictTypeValidate;
/**
* 字典类型
* Class DictTypeController
* @package app\adminapi\controller\dict
*/
class DictTypeController extends BaseAdminController
{
/**
* @notes 获取字典类型列表
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 15:50
*/
public function lists()
{
return $this->dataLists(new DictTypeLists());
}
/**
* @notes 添加字典类型
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:24
*/
public function add()
{
$params = (new DictTypeValidate())->post()->goCheck('add');
DictTypeLogic::add($params);
return $this->success('添加成功', [], 1, 1);
}
/**
* @notes 编辑字典类型
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:25
*/
public function edit()
{
$params = (new DictTypeValidate())->post()->goCheck('edit');
DictTypeLogic::edit($params);
return $this->success('编辑成功', [], 1, 1);
}
/**
* @notes 删除字典类型
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:25
*/
public function delete()
{
$params = (new DictTypeValidate())->post()->goCheck('delete');
DictTypeLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取字典详情
* @return \think\response\Json
* @author 段誉
* @date 2022/6/20 16:25
*/
public function detail()
{
$params = (new DictTypeValidate())->goCheck('detail');
$result = DictTypeLogic::detail($params);
return $this->data($result);
}
/**
* @notes 获取字典类型数据
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author 段誉
* @date 2022/10/13 10:46
*/
public function all()
{
$result = DictTypeLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,39 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\system\CacheLogic;
/**
* 系统缓存
* Class CacheController
* @package app\adminapi\controller\setting\system
*/
class CacheController extends BaseAdminController
{
/**
* @notes 清除系统缓存
* @return \think\response\Json
* @author 段誉
* @date 2022/4/8 16:34
*/
public function clear()
{
CacheLogic::clear();
return $this->success('清除成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,69 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\setting\system\LogLists;
use app\adminapi\logic\setting\system\OperationLogLogic;
use app\adminapi\validate\setting\OperationLogValidate;
/**
* 系统日志
* Class LogController
* @package app\adminapi\controller\setting\system
*/
class LogController extends BaseAdminController
{
/**
* @notes 查看系统日志列表
* @return \think\response\Json
* @author ljj
* @date 2021/8/3 4:25 下午
*/
public function lists()
{
return $this->dataLists(new LogLists());
}
/**
* @notes 删除已选择的系统日志
* @return \think\response\Json
* @author 段誉
* @date 2022/6/15 19:00
*/
public function delete()
{
$params = (new OperationLogValidate())->post()->goCheck('id');
$result = OperationLogLogic::deleteTable($params);
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OperationLogLogic::getError());
}
/**
* @notes 删除系统日志
* @return \think\response\Json
* @author 段誉
* @date 2022/6/15 19:00
*/
public function deleteAll()
{
$result = OperationLogLogic::deleteAll();
if (true === $result) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(OperationLogLogic::getError());
}
}

View File

@@ -0,0 +1,42 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\controller\setting\system;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\system\SystemLogic;
/**
* 系统维护
* Class SystemController
* @package app\adminapi\controller\setting\system
*/
class SystemController extends BaseAdminController
{
/**
* @notes 获取系统环境信息
* @return \think\response\Json
* @author 段誉
* @date 2021/12/28 18:36
*/
public function info()
{
$result = SystemLogic::getInfo();
return $this->data($result);
}
}

View File

@@ -0,0 +1,72 @@
<?php
namespace app\adminapi\controller\setting\user;
use app\adminapi\{
controller\BaseAdminController,
logic\setting\user\UserLogic,
validate\setting\UserConfigValidate
};
/**
* 设置-用户设置控制器
* Class UserController
* @package app\adminapi\controller\config
*/
class UserController extends BaseAdminController
{
/**
* @notes 获取用户设置
* @return \think\response\Json
* @author BD
* @date 2024/3/29 10:08
*/
public function getConfig()
{
$result = (new UserLogic())->getConfig();
return $this->data($result);
}
/**
* @notes 设置用户设置
* @return \think\response\Json
* @author BD
* @date 2024/3/29 10:08
*/
public function setConfig()
{
$params = (new UserConfigValidate())->post()->goCheck('user');
(new UserLogic())->setConfig($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 获取注册配置
* @return \think\response\Json
* @author BD
* @date 2024/3/29 10:08
*/
public function getRegisterConfig()
{
$result = (new UserLogic())->getRegisterConfig();
return $this->data($result);
}
/**
* @notes 设置注册配置
* @return \think\response\Json
* @author BD
* @date 2024/3/29 10:08
*/
public function setRegisterConfig()
{
$params = (new UserConfigValidate())->post()->goCheck('register');
(new UserLogic())->setRegisterConfig($params);
return $this->success('操作成功', [], 1, 1);
}
}

View File

@@ -0,0 +1,142 @@
<?php
namespace app\adminapi\controller\setting\web;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\setting\web\WebSettingLogic;
use app\adminapi\validate\setting\WebSettingValidate;
/**
* 网站设置
* Class WebSettingController
* @package app\adminapi\controller\setting
*/
class WebSettingController extends BaseAdminController
{
/**
* @notes 获取网站信息
* @return \think\response\Json
* @author BD
* @date 2023/12/28 15:44
*/
public function getWebsite()
{
$result = WebSettingLogic::getWebsiteInfo();
return $this->data($result);
}
/**
* @notes 设置网站信息
* @return \think\response\Json
* @author BD
* @date 2023/12/28 15:45
*/
public function setWebsite()
{
$params = (new WebSettingValidate())->post()->goCheck('website');
WebSettingLogic::setWebsiteInfo($params);
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 获取网站配置
* @return \think\response\Json
* @author BD
* @date 2023/12/28 15:44
*/
public function getWebsiteProject()
{
$params = $this->request->get();
$result = WebSettingLogic::getWebsiteProject($params);
if ($result === false) {
return $this->fail(WebSettingLogic::getError());
}
return $this->data($result);
}
/**
* @notes 设置网站配置
* @return \think\response\Json
* @author BD
* @date 2023/12/28 15:45
*/
public function setWebsiteProject()
{
$params = $this->request->post();
$result = WebSettingLogic::setWebsiteProject($params);
if (false === $result) {
return $this->fail(WebSettingLogic::getError() ?: '操作失败');
}
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 获取国际区号
* @return \think\response\Json
* @author BD
* @date 2023/12/28 16:10
*/
public function getRegioncodeAll()
{
$result = WebSettingLogic::getRegioncodeAll();
return $this->data($result);
}
/**
* @notes 获取备案信息
* @return \think\response\Json
* @author BD
* @date 2023/12/28 16:10
*/
public function getCopyright()
{
$result = WebSettingLogic::getCopyright();
return $this->data($result);
}
/**
* @notes 设置备案信息
* @return \think\response\Json
* @author BD
* @date 2023/12/28 16:10
*/
public function setCopyright()
{
$params = $this->request->post();
$result = WebSettingLogic::setCopyright($params);
if (false === $result) {
return $this->fail(WebSettingLogic::getError() ?: '操作失败');
}
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 设置政策协议
* @return \think\response\Json
* @author BD
* @date 2023/2/15 11:00 上午
*/
public function setAgreement()
{
$params = $this->request->post();
WebSettingLogic::setAgreement($params);
return $this->success('设置成功', [], 1, 1);
}
/**
* @notes 获取政策协议
* @return \think\response\Json
* @author BD
* @date 2023/2/15 11:16 上午
*/
public function getAgreement()
{
$result = WebSettingLogic::getAgreement();
return $this->data($result);
}
}

View File

@@ -0,0 +1,193 @@
<?php
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 BD
* @date 2023/6/14 10:57
*/
public function dataTable()
{
return $this->dataLists(new DataTableLists());
}
/**
* @notes 获取已选择的数据表
* @return \think\response\Json
* @author BD
* @date 2023/6/14 10:57
*/
public function generateTable()
{
return $this->dataLists(new GenerateTableLists());
}
/**
* @notes 选择数据表
* @return \think\response\Json
* @author BD
* @date 2023/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 BD
* @date 2023/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 BD
* @date 2023/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 BD
* @date 2023/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 BD
* @date 2023/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 BD
* @date 2023/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 BD
* @date 2023/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 BD
* @date 2023/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());
}
/**
* @notes 获取模型
* @return \think\response\Json
* @author BD
* @date 2023/12/14 11:07
*/
public function getModels()
{
$result = GeneratorLogic::getAllModels();
return $this->success('', $result, 1, 1);
}
}

View File

@@ -0,0 +1,45 @@
<?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\translation;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\translation\TranslationLogic;
/**
* 翻译控制器
* Class TranslationController
* @package app\adminapi\controller\translation
*/
class TranslationController extends BaseAdminController
{
/**
* @notes 翻译
* @return \think\response\Json
* @author BD
* @date 2024/03/14 00:28
*/
public function translation()
{
$params = $this->request->post();
$result = TranslationLogic::translation($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,298 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\{UserLists,UserAgentLists};
use app\adminapi\logic\user\UserLogic;
use app\adminapi\validate\user\{AdjustUserMoney,AddUserValidate,UserValidate};
use app\api\validate\RegisterValidate;
/**
* 用户控制器
* Class UserController
* @package app\adminapi\controller\user
*/
class UserController extends BaseAdminController
{
/**
* @notes 用户列表
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:16
*/
public function lists()
{
return $this->dataLists(new UserLists());
}
/**
* @notes 代理用户列表
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:16
*/
public function agentLists()
{
return $this->dataLists(new UserAgentLists());
}
/**
* @notes 添加用户
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function add()
{
$params = (new AddUserValidate())->post()->goCheck('add');
$res = UserLogic::add($params);
if (true === $res) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 修改用户密码
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function changePwd()
{
$params = (new UserValidate())->post()->goCheck('changePwd');
UserLogic::changePwd($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 重置支付密码
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function resetPayPwd()
{
$params = $this->request->post();
UserLogic::resetPayPwd($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 修改邮箱
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function changeEmail()
{
$params = (new UserValidate())->post()->goCheck('changeEmail');
UserLogic::changeEmail($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 重置邮箱验证
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function resetEmail()
{
$params = $this->request->post();
UserLogic::resetEmail($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 重置谷歌验证
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function resetGoogle()
{
$params = $this->request->post();
UserLogic::resetGoogle($params);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 调整用户余额
* @return \think\response\Json
* @author BD
* @date 2023/2/23 14:33
*/
public function adjustMoney()
{
$params = (new AdjustUserMoney())->post()->goCheck();
$res = UserLogic::adjustUserMoney($params);
if (true === $res) {
return $this->success('操作成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateMemberStatus()
{
$params = $this->request->post();
$result = UserLogic::updateMemberStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateLhStatus()
{
$params = $this->request->post();
$result = UserLogic::updateLhStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateTransferStatus()
{
$params = $this->request->post();
$result = UserLogic::updateTransferStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateSnStatus()
{
$params = $this->request->post();
$result = UserLogic::updateSnStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateOpenStatus()
{
$params = $this->request->post();
$result = UserLogic::updateOpenStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
/**
* @notes 更改状态
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function updateAgentStatus()
{
$params = $this->request->post();
$result = UserLogic::updateAgentStatus($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail($result);
}
/**
* @notes 修改代理名称
* @return \think\response\Json
* @author BD
* @date 2023/9/22 16:34
*/
public function changeAgentName()
{
$params = $this->request->post();
$result = UserLogic::changeAgentName($params);
if (true === $result) {
return $this->success('修改成功', [], 1, 1);
}
return $this->fail($result);
}
/**
* @notes 发送站内信
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function sendNotice()
{
$params = $this->request->post();
$res = UserLogic::sendNotice($params);
if (true === $res) {
return $this->success('发送成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 彩金赠送
* @return \think\response\Json
* @author BD
* @date 2323/2/22 10:18
*/
public function caijin()
{
$params = $this->request->post();
$res = UserLogic::caijin($params);
if (true === $res) {
return $this->success('赠送成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 备注
* @return \think\response\Json
* @author bd
* @date 2024/01/31 14:07
*/
public function remark()
{
$params = $this->request->post();
$params['admin_id'] = $this->adminId;
$result = UserLogic::remark($params);
if (true === $result) {
return $this->success('备注成功', [], 1, 1);
}
return $this->fail(UserLogic::getError());
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserGroupLists;
use app\adminapi\logic\user\UserGroupLogic;
use app\adminapi\validate\user\UserGroupValidate;
/**
* 用户分组控制器
* Class UserGroupController
* @package app\adminapi\controller\user
*/
class UserGroupController extends BaseAdminController
{
/**
* @notes 获取用户分组列表
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:04
*/
public function lists()
{
return $this->dataLists(new UserGroupLists());
}
/**
* @notes 添加用户分组
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:04
*/
public function add()
{
$params = (new UserGroupValidate())->post()->goCheck('add');
$result = UserGroupLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserGroupLogic::getError());
}
/**
* @notes 编辑用户分组
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:04
*/
public function edit()
{
$params = (new UserGroupValidate())->post()->goCheck('edit');
$result = UserGroupLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserGroupLogic::getError());
}
/**
* @notes 删除用户分组
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:04
*/
public function delete()
{
$params = (new UserGroupValidate())->post()->goCheck('delete');
UserGroupLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取用户分组详情
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:04
*/
public function detail()
{
$params = (new UserGroupValidate())->goCheck('detail');
$result = UserGroupLogic::detail($params);
return $this->data($result);
}
/**
* @notes 用户分组
* @return \think\response\Json
* @author BD
* @date 2024/03/19 02:29
*/
public function setUserGroup()
{
$params = $this->request->post();
$result = UserGroupLogic::setUserGroup($params);
if (true === $result) {
return $this->success('分组成功', [], 1, 1);
}
return $this->fail(UserGroupLogic::getError());
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserGroupRuleLists;
use app\adminapi\logic\user\UserGroupRuleLogic;
use app\adminapi\validate\user\UserGroupRuleValidate;
/**
* 分组规则控制器
* Class UserGroupRuleController
* @package app\adminapi\controller\user
*/
class UserGroupRuleController extends BaseAdminController
{
/**
* @notes 获取分组规则列表
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:30
*/
public function lists()
{
return $this->dataLists(new UserGroupRuleLists());
}
/**
* @notes 添加分组规则
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:30
*/
public function add()
{
$params = (new UserGroupRuleValidate())->post()->goCheck('add');
$result = UserGroupRuleLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserGroupRuleLogic::getError());
}
/**
* @notes 编辑分组规则
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:30
*/
public function edit()
{
$params = (new UserGroupRuleValidate())->post()->goCheck('edit');
$result = UserGroupRuleLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserGroupRuleLogic::getError());
}
/**
* @notes 删除分组规则
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:30
*/
public function delete()
{
$params = (new UserGroupRuleValidate())->post()->goCheck('delete');
UserGroupRuleLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取分组规则详情
* @return \think\response\Json
* @author BD
* @date 2024/04/25 01:30
*/
public function detail()
{
$params = (new UserGroupRuleValidate())->goCheck('detail');
$result = UserGroupRuleLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,62 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserInfoLists;
use app\adminapi\logic\user\UserInfoLogic;
use app\adminapi\validate\user\UserInfoValidate;
/**
* 用户信息控制器
* Class UserInfoController
* @package app\adminapi\controller\user
*/
class UserInfoController extends BaseAdminController
{
/**
* @notes 获取用户信息列表
* @return \think\response\Json
* @author BD
* @date 2024/06/08 17:51
*/
public function lists()
{
return $this->dataLists(new UserInfoLists());
}
/**
* @notes 同意实名
* @return \think\response\Json
* @author BD
* @date 2024/06/08 17:51
*/
public function agree()
{
$params = $this->request->post();
$result = UserInfoLogic::agree($params);
if (true === $result) {
return $this->success('同意成功', [], 1, 1);
}
return $this->fail(UserInfoLogic::getError());
}
/**
* @notes 拒绝实名
* @return \think\response\Json
* @author BD
* @date 2024/06/08 17:51
*/
public function refuse()
{
$params = $this->request->post();
$result = UserInfoLogic::refuse($params);
if (true === $result) {
return $this->success('拒绝成功', [], 1, 1);
}
return $this->fail(UserInfoLogic::getError());
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserKadanLists;
use app\adminapi\logic\user\UserKadanLogic;
use app\adminapi\validate\user\UserKadanValidate;
/**
* 卡单规则控制器
* Class UserKadanController
* @package app\adminapi\controller\user
*/
class UserKadanController extends BaseAdminController
{
/**
* @notes 获取卡单规则列表
* @return \think\response\Json
* @author BD
* @date 2024/04/24 17:00
*/
public function lists()
{
return $this->dataLists(new UserKadanLists());
}
/**
* @notes 添加卡单规则
* @return \think\response\Json
* @author BD
* @date 2024/04/24 17:00
*/
public function add()
{
$params = (new UserKadanValidate())->post()->goCheck('add');
$result = UserKadanLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserKadanLogic::getError());
}
/**
* @notes 编辑卡单规则
* @return \think\response\Json
* @author BD
* @date 2024/04/24 17:00
*/
public function edit()
{
$params = (new UserKadanValidate())->post()->goCheck('edit');
$result = UserKadanLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserKadanLogic::getError());
}
/**
* @notes 删除卡单规则
* @return \think\response\Json
* @author BD
* @date 2024/04/24 17:00
*/
public function delete()
{
$params = (new UserKadanValidate())->post()->goCheck('delete');
UserKadanLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取卡单规则详情
* @return \think\response\Json
* @author BD
* @date 2024/04/24 17:00
*/
public function detail()
{
$params = (new UserKadanValidate())->goCheck('detail');
$result = UserKadanLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserMineRecordLists;
use app\adminapi\logic\user\UserMineRecordLogic;
use app\adminapi\validate\user\UserMineRecordValidate;
/**
* 挖矿记录控制器
* Class UserMineRecordController
* @package app\adminapi\controller\user
*/
class UserMineRecordController extends BaseAdminController
{
/**
* @notes 获取挖矿记录列表
* @return \think\response\Json
* @author BD
* @date 2025/01/01 15:47
*/
public function lists()
{
return $this->dataLists(new UserMineRecordLists());
}
/**
* @notes 添加挖矿记录
* @return \think\response\Json
* @author BD
* @date 2025/01/01 15:47
*/
public function add()
{
$params = (new UserMineRecordValidate())->post()->goCheck('add');
$result = UserMineRecordLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserMineRecordLogic::getError());
}
/**
* @notes 编辑挖矿记录
* @return \think\response\Json
* @author BD
* @date 2025/01/01 15:47
*/
public function edit()
{
$params = (new UserMineRecordValidate())->post()->goCheck('edit');
$result = UserMineRecordLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserMineRecordLogic::getError());
}
/**
* @notes 删除挖矿记录
* @return \think\response\Json
* @author BD
* @date 2025/01/01 15:47
*/
public function delete()
{
$params = (new UserMineRecordValidate())->post()->goCheck('delete');
UserMineRecordLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取挖矿记录详情
* @return \think\response\Json
* @author BD
* @date 2025/01/01 15:47
*/
public function detail()
{
$params = (new UserMineRecordValidate())->goCheck('detail');
$result = UserMineRecordLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,94 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserNoticeLists;
use app\adminapi\logic\user\UserNoticeLogic;
use app\adminapi\validate\user\UserNoticeValidate;
/**
* 用户消息控制器
* Class UserNoticeController
* @package app\adminapi\controller\user
*/
class UserNoticeController extends BaseAdminController
{
/**
* @notes 获取用户消息列表
* @return \think\response\Json
* @author BD
* @date 2024/05/26 00:36
*/
public function lists()
{
return $this->dataLists(new UserNoticeLists());
}
/**
* @notes 添加用户消息
* @return \think\response\Json
* @author BD
* @date 2024/05/26 00:36
*/
public function add()
{
$params = (new UserNoticeValidate())->post()->goCheck('add');
$result = UserNoticeLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(UserNoticeLogic::getError());
}
/**
* @notes 编辑用户消息
* @return \think\response\Json
* @author BD
* @date 2024/05/26 00:36
*/
public function edit()
{
$params = (new UserNoticeValidate())->post()->goCheck('edit');
$result = UserNoticeLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserNoticeLogic::getError());
}
/**
* @notes 删除用户消息
* @return \think\response\Json
* @author BD
* @date 2024/05/26 00:36
*/
public function delete()
{
$params = (new UserNoticeValidate())->post()->goCheck('delete');
UserNoticeLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取用户消息详情
* @return \think\response\Json
* @author BD
* @date 2024/05/26 00:36
*/
public function detail()
{
$params = (new UserNoticeValidate())->goCheck('detail');
$result = UserNoticeLogic::detail($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,30 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserRelationLists;
use app\adminapi\logic\user\UserRelationLogic;
use app\adminapi\validate\user\UserRelationValidate;
/**
* 用户关系控制器
* Class UserRelationController
* @package app\adminapi\controller\user
*/
class UserRelationController extends BaseAdminController
{
/**
* @notes 获取用户关系列表
* @return \think\response\Json
* @author BD
* @date 2024/01/12 17:21
*/
public function lists()
{
return $this->dataLists(new UserRelationLists());
}
}

View File

@@ -0,0 +1,150 @@
<?php
namespace app\adminapi\controller\user;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\user\UserTronLists;
use app\adminapi\logic\user\UserTronLogic;
use app\adminapi\validate\user\UserTronValidate;
/**
* 波场钱包控制器
* Class UserTronController
* @package app\adminapi\controller\user
*/
class UserTronController extends BaseAdminController
{
/**
* @notes 获取波场钱包列表
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function lists()
{
return $this->dataLists(new UserTronLists());
}
/**
* @notes 创建波场钱包
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function add()
{
$result = UserTronLogic::add();
if (true === $result) {
return $this->success('创建成功', [], 1, 1);
}
return $this->fail(UserTronLogic::getError());
}
/**
* @notes 编辑波场钱包
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function edit()
{
$params = (new UserTronValidate())->post()->goCheck('edit');
$result = UserTronLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(UserTronLogic::getError());
}
/**
* @notes 删除波场钱包
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function delete()
{
$params = (new UserTronValidate())->post()->goCheck('delete');
UserTronLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取波场钱包详情
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function detail()
{
$params = (new UserTronValidate())->goCheck('detail');
$result = UserTronLogic::detail($params);
return $this->data($result);
}
/**
* @notes 更新排序
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function updateSort()
{
$params = $this->request->post();
UserTronLogic::updateSort($params);
return $this->success('更新成功', [], 1, 1);
}
/**
* @notes 更新金额
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function updateMoney()
{
$params = $this->request->post();
UserTronLogic::updateMoney($params);
return $this->success('更新成功', [], 1, 1);
}
/**
* @notes 转账
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function tran()
{
$params = (new UserTronValidate())->post()->goCheck('tran');
$res = UserTronLogic::tran($params);
if (true === $res) {
return $this->success('转账成功', [], 1, 1);
}
return $this->fail($res);
}
/**
* @notes 资金归集
* @return \think\response\Json
* @author BD
* @date 2024/05/04 23:38
*/
public function tranAll()
{
$params = (new UserTronValidate())->post()->goCheck('tranAll');
$res = UserTronLogic::tranAll($params);
if (true === $res) {
return $this->success('归集完成', [], 1, 1);
}
return $this->fail($res);
}
}

View File

@@ -0,0 +1,110 @@
<?php
namespace app\adminapi\controller\withdraw;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\withdraw\WithdrawBankLists;
use app\adminapi\logic\withdraw\WithdrawBankLogic;
use app\adminapi\validate\withdraw\WithdrawBankValidate;
/**
* 可提现银行控制器
* Class WithdrawBankController
* @package app\adminapi\controller\withdraw
*/
class WithdrawBankController extends BaseAdminController
{
/**
* @notes 获取可提现银行列表
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:19
*/
public function lists()
{
return $this->dataLists(new WithdrawBankLists());
}
/**
* @notes 添加可提现银行
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:19
*/
public function add()
{
$params = (new WithdrawBankValidate())->post()->goCheck('add');
$result = WithdrawBankLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(WithdrawBankLogic::getError());
}
/**
* @notes 编辑可提现银行
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:19
*/
public function edit()
{
$params = (new WithdrawBankValidate())->post()->goCheck('edit');
$result = WithdrawBankLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(WithdrawBankLogic::getError());
}
/**
* @notes 删除可提现银行
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:19
*/
public function delete()
{
$params = (new WithdrawBankValidate())->post()->goCheck('delete');
WithdrawBankLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取可提现银行详情
* @return \think\response\Json
* @author BD
* @date 2024/02/25 12:19
*/
public function detail()
{
$params = (new WithdrawBankValidate())->goCheck('detail');
$result = WithdrawBankLogic::detail($params);
return $this->data($result);
}
/**
* @notes 获取所有银行
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/02/25 12:19
*/
public function allByLang()
{
$params = (new WithdrawBankValidate())->goCheck('allByLang');
$result = WithdrawBankLogic::allByLang($params);
return $this->data($result);
}
}

View File

@@ -0,0 +1,108 @@
<?php
namespace app\adminapi\controller\withdraw;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\withdraw\WithdrawMethodLists;
use app\adminapi\logic\withdraw\WithdrawMethodLogic;
use app\adminapi\validate\withdraw\WithdrawMethodValidate;
/**
* 提现方式控制器
* Class WithdrawMethodController
* @package app\adminapi\controller\withdraw
*/
class WithdrawMethodController extends BaseAdminController
{
/**
* @notes 获取提现方式列表
* @return \think\response\Json
* @author BD
* @date 2024/02/23 14:34
*/
public function lists()
{
return $this->dataLists(new WithdrawMethodLists());
}
/**
* @notes 添加提现方式
* @return \think\response\Json
* @author BD
* @date 2024/02/23 14:34
*/
public function add()
{
$params = (new WithdrawMethodValidate())->post()->goCheck('add');
$result = WithdrawMethodLogic::add($params);
if (true === $result) {
return $this->success('添加成功', [], 1, 1);
}
return $this->fail(WithdrawMethodLogic::getError());
}
/**
* @notes 编辑提现方式
* @return \think\response\Json
* @author BD
* @date 2024/02/23 14:34
*/
public function edit()
{
$params = (new WithdrawMethodValidate())->post()->goCheck('edit');
$result = WithdrawMethodLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(WithdrawMethodLogic::getError());
}
/**
* @notes 删除提现方式
* @return \think\response\Json
* @author BD
* @date 2024/02/23 14:34
*/
public function delete()
{
$params = (new WithdrawMethodValidate())->post()->goCheck('delete');
WithdrawMethodLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
/**
* @notes 获取提现方式详情
* @return \think\response\Json
* @author BD
* @date 2024/02/23 14:34
*/
public function detail()
{
$params = (new WithdrawMethodValidate())->goCheck('detail');
$result = WithdrawMethodLogic::detail($params);
return $this->data($result);
}
/**
* @notes 获取全部提现方式
* @return \think\response\Json
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author BD
* @date 2024/02/23 14:34
*/
public function all()
{
$result = WithdrawMethodLogic::getAllData();
return $this->data($result);
}
}

View File

@@ -0,0 +1,64 @@
<?php
namespace app\adminapi\controller\withdraw;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\lists\withdraw\WithdrawWalletLists;
use app\adminapi\logic\withdraw\WithdrawWalletLogic;
use app\adminapi\validate\withdraw\WithdrawWalletValidate;
/**
* 用户提现钱包控制器
* Class WithdrawWalletController
* @package app\adminapi\controller\withdraw
*/
class WithdrawWalletController extends BaseAdminController
{
/**
* @notes 获取用户提现钱包列表
* @return \think\response\Json
* @author BD
* @date 2024/02/26 13:32
*/
public function lists()
{
return $this->dataLists(new WithdrawWalletLists());
}
/**
* @notes 编辑用户提现钱包
* @return \think\response\Json
* @author BD
* @date 2024/02/26 13:32
*/
public function edit()
{
$params = (new WithdrawWalletValidate())->post()->goCheck('edit');
$result = WithdrawWalletLogic::edit($params);
if (true === $result) {
return $this->success('编辑成功', [], 1, 1);
}
return $this->fail(WithdrawWalletLogic::getError());
}
/**
* @notes 删除用户提现钱包
* @return \think\response\Json
* @author BD
* @date 2024/02/26 13:32
*/
public function delete()
{
$params = (new WithdrawWalletValidate())->post()->goCheck('delete');
WithdrawWalletLogic::delete($params);
return $this->success('删除成功', [], 1, 1);
}
}