初始版本

This commit is contained in:
贾祥聪
2025-08-19 14:16:51 +08:00
commit f937a1f9b9
4373 changed files with 359728 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
<?php
namespace app\adminapi\controller\shop;
use app\adminapi\controller\BaseAdminController;
use app\adminapi\logic\shop\GoodsLogic;
use app\adminapi\validate\shop\GoodsValidate;
/**
* 商家项目控制器类
* Class GoodsController
* @package app\adminapi\controller\shop
*/
class GoodsController extends BaseAdminController
{
/**
* @notes 列表
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 12:11
*/
public function lists()
{
return $this->dataLists();
}
/**
* @notes 详情
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 13:15
*/
public function detail()
{
$params = (new GoodsValidate())->goCheck('id');
$result = (new GoodsLogic())->detail($params['id']);
return $this->success('',$result);
}
/**
* @notes 上下架
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 13:04
*/
public function status()
{
$params = (new GoodsValidate())->post()->goCheck('id');
(new GoodsLogic())->status($params['id']);
return $this->success('操作成功',[],1,1);
}
/**
* @notes 审核
* @return \think\response\Json
* @author cjhao
* @date 2024/10/29 13:24
*/
public function audit()
{
$params = (new GoodsValidate())->post()->goCheck();
$result = (new GoodsLogic())->audit($params);
if(true === $result){
return $this->success('审核成功',[],1,1);
}
return $this->fail(GoodsLogic::getError(),[],1,1);
}
}