feat: 根据用户ID调整用户等级和订单查询条件
This commit is contained in:
parent
c19ba84f06
commit
32baf07c71
32
app/api/controller/user_label/UserLabelController.php
Normal file
32
app/api/controller/user_label/UserLabelController.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\user_label;
|
||||
|
||||
|
||||
use app\api\controller\BaseApiController;
|
||||
use app\admin\lists\user_label\UserLabelLists;
|
||||
|
||||
|
||||
/**
|
||||
* 用户标签控制器
|
||||
* Class UserLabelController
|
||||
* @package app\admin\controller\user_label
|
||||
*/
|
||||
class UserLabelController extends BaseApiController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取用户标签列表
|
||||
* @return \think\response\Json
|
||||
* @author admin
|
||||
* @date 2024/06/17 17:02
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$this->request->__set('id',1);
|
||||
return $this->dataLists(new UserLabelLists());
|
||||
}
|
||||
|
||||
|
||||
}
|
31
app/api/controller/user_ship/UserShipController.php
Normal file
31
app/api/controller/user_ship/UserShipController.php
Normal file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller\user_ship;
|
||||
|
||||
|
||||
use app\api\controller\BaseApiController;
|
||||
use app\common\lists\user\UserShipLists;
|
||||
|
||||
/**
|
||||
* 用户类型控制器
|
||||
* Class UserLabelController
|
||||
* @package app\admin\controller\user_label
|
||||
*/
|
||||
class UserShipController extends BaseApiController
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取用户类型列表
|
||||
* @return \think\response\Json
|
||||
* @author admin
|
||||
* @date 2024/06/17 17:02
|
||||
*/
|
||||
public function lists()
|
||||
{
|
||||
$this->request->__set('id',1);
|
||||
return $this->dataLists(new UserShipLists());
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -38,8 +38,12 @@ class UserShipLists extends BaseAdminDataLists
|
||||
{
|
||||
|
||||
$field = "id,title";
|
||||
$arr[]=['id'=>0,'title'=>'一般用户'];
|
||||
|
||||
$arr=[];
|
||||
if($this->request->__get('id')){
|
||||
$this->searchWhere[]=['id','in',[1,4]];
|
||||
}else{
|
||||
$arr=['id'=>0,'title'=>'一般用户'];
|
||||
}
|
||||
$lists = UserShip::where($this->searchWhere)
|
||||
->limit($this->limitOffset, $this->limitLength)
|
||||
->field($field)
|
||||
|
@ -47,9 +47,9 @@ class StoreOrderLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||
public function lists(): array
|
||||
{
|
||||
$store_id = $this->adminInfo['store_id']??5;
|
||||
$this->searchWhere[] = ['store_id' ,'=',$store_id];
|
||||
$is_sashier=$this->request->get('is_sashier');
|
||||
if($is_sashier==1){//收银台订单
|
||||
$this->searchWhere[] = ['store_id' ,'=',$store_id];
|
||||
$this->searchWhere[] = ['pay_type','in',[17,9,13,18]];
|
||||
}elseif($is_sashier==2){//小程序订单
|
||||
$this->searchWhere[] = ['pay_type','in',[7,3,18]];
|
||||
|
Loading…
x
Reference in New Issue
Block a user