182 lines
4.5 KiB
PHP
Executable File
182 lines
4.5 KiB
PHP
Executable File
<?php
|
|
namespace app\adminapi\controller\shop;
|
|
use app\adminapi\controller\BaseAdminController;
|
|
use app\adminapi\lists\shop\ShopApplyLists;
|
|
use app\adminapi\lists\shop\UpdateShopLists;
|
|
use app\adminapi\logic\shop\ShopLogic;
|
|
use app\adminapi\validate\shop\AdjustWalletValidate;
|
|
use app\adminapi\validate\shop\ShopAuditValidate;
|
|
use app\adminapi\validate\shop\ShopValidate;
|
|
|
|
/**
|
|
* 店铺控制器类
|
|
* Class ShopController
|
|
* @package app\adminapi\controller\shop
|
|
*/
|
|
class ShopController extends BaseAdminController
|
|
{
|
|
|
|
public function lists()
|
|
{
|
|
return $this->dataLists();
|
|
}
|
|
|
|
/**
|
|
* @notes 申请列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/26 17:46
|
|
*/
|
|
public function applyLists()
|
|
{
|
|
return $this->dataLists((new ShopApplyLists()));
|
|
}
|
|
|
|
/**
|
|
* @notes 店铺审核
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/7 00:41
|
|
*/
|
|
public function shopAudit()
|
|
{
|
|
$params = (new ShopValidate())->post()->goCheck('id');
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new Shoplogic())->shopAudit($params);
|
|
if(true === $result){
|
|
return $this->success('审核成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 添加门店
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/2 19:11
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new ShopValidate())->post()->goCheck('add');
|
|
$result = (new ShopLogic())->add($params);
|
|
if(true === $result){
|
|
return $this->success('添加成功');
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑门店
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/3 15:01
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new ShopValidate())->post()->goCheck();
|
|
$result = (new ShopLogic())->edit($params);
|
|
if(true === $result){
|
|
return $this->success('编辑成功');
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 详情
|
|
* @return \think\response\Json
|
|
* @throws \Exception
|
|
* @author cjhao
|
|
* @date 2024/10/3 23:21
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new ShopValidate())->goCheck('id');
|
|
$result = (new ShopLogic())->detail($params['id']);
|
|
return $this->success('',$result);
|
|
}
|
|
|
|
/**
|
|
* @notes 调整余额
|
|
* @return \think\response\Json
|
|
* @throws \Exception
|
|
* @author cjhao
|
|
* @date 2024/8/23 13:51
|
|
*/
|
|
public function adjustMoney()
|
|
{
|
|
$params = (new AdjustWalletValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new ShopLogic())->adjustMoney($params);
|
|
if(true === $result){
|
|
return $this->success('调整成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 调整余额
|
|
* @return \think\response\Json
|
|
* @throws \Exception
|
|
* @author cjhao
|
|
* @date 2024/8/23 13:51
|
|
*/
|
|
public function adjustDeposit()
|
|
{
|
|
$params = (new AdjustWalletValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new ShopLogic())->adjustDeposit($params);
|
|
if(true === $result){
|
|
return $this->success('调整成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 审核列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/7 01:19
|
|
*/
|
|
public function updateShopLists()
|
|
{
|
|
return $this->dataLists((new UpdateShopLists()));
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 更新资料详情
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/28 11:04
|
|
*/
|
|
public function updateDetail()
|
|
{
|
|
$params = (new ShopValidate())->goCheck('id');
|
|
$result = (new ShopLogic())->updateDetail($params['id']);
|
|
return $this->success('',$result);
|
|
}
|
|
|
|
/**
|
|
* @notes 更新资料审核
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/7 14:54
|
|
*/
|
|
public function updateAudit()
|
|
{
|
|
$params = (new ShopAuditValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new ShopLogic())->updateAudit($params);
|
|
if(true === $result){
|
|
return $this->success('审核成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|