初始化代码
This commit is contained in:
148
app/massage/controller/AdminService.php
Normal file
148
app/massage/controller/AdminService.php
Normal file
@@ -0,0 +1,148 @@
|
||||
<?php
|
||||
namespace app\massage\controller;
|
||||
use app\AdminRest;
|
||||
use app\massage\model\Goods;
|
||||
use app\massage\model\Service;
|
||||
use app\shop\model\Article;
|
||||
use app\shop\model\Banner;
|
||||
use app\shop\model\Cap;
|
||||
use app\shop\model\GoodsCate;
|
||||
use app\shop\model\GoodsSh;
|
||||
use app\shop\model\GoodsShList;
|
||||
use think\App;
|
||||
use app\shop\model\Goods as Model;
|
||||
use think\Db;
|
||||
|
||||
|
||||
class AdminService extends AdminRest
|
||||
{
|
||||
|
||||
|
||||
protected $model;
|
||||
|
||||
protected $goods_sh;
|
||||
|
||||
protected $goods_sh_list;
|
||||
|
||||
public function __construct(App $app) {
|
||||
|
||||
parent::__construct($app);
|
||||
|
||||
$this->model = new Goods();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-15 14:43
|
||||
* @功能说明:商品列表
|
||||
*/
|
||||
public function serviceList(){
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
$dis[] = ['uniacid','=',$this->_uniacid];
|
||||
|
||||
if(!empty($input['status'])){
|
||||
|
||||
$dis[] = ['status','=',$input['status']];
|
||||
|
||||
}else{
|
||||
|
||||
$dis[] = ['status','>',-1];
|
||||
|
||||
}
|
||||
|
||||
if(!empty($input['name'])){
|
||||
|
||||
$dis[] = ['title','like','%'.$input['name'].'%'];
|
||||
|
||||
}
|
||||
|
||||
$data = $this->model->dataList($dis,$input['limit']);
|
||||
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-03-15 14:58
|
||||
* @功能说明:审核详情
|
||||
*/
|
||||
public function serviceInfo(){
|
||||
|
||||
$input = $this->_param;
|
||||
|
||||
$dis = [
|
||||
|
||||
'id' => $input['id']
|
||||
];
|
||||
|
||||
$data = $this->model->dataInfo($dis);
|
||||
|
||||
return $this->success($data);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-07-03 00:27
|
||||
* @功能说明:添加
|
||||
*/
|
||||
public function serviceAdd(){
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$input['uniacid'] = $this->_uniacid;
|
||||
|
||||
$res = $this->model->dataAdd($input);
|
||||
|
||||
return $this->success($res);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @author chenniang
|
||||
* @DataTime: 2021-07-03 00:27
|
||||
* @功能说明:添加
|
||||
*/
|
||||
public function serviceUpdate(){
|
||||
|
||||
$input = $this->_input;
|
||||
|
||||
$input['uniacid'] = $this->_uniacid;
|
||||
|
||||
$dis = [
|
||||
|
||||
'id' => $input['id']
|
||||
];
|
||||
|
||||
$res = $this->model->dataUpdate($dis,$input);
|
||||
|
||||
return $this->success($res);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user