Merge pull request '更新用户区域选择' (#29) from fix_store_user into main
Reviewed-on: #29
This commit is contained in:
commit
be32e704c3
13
app/common/model/user_ship/UserShip.php
Normal file
13
app/common/model/user_ship/UserShip.php
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\common\model\user_ship;
|
||||||
|
|
||||||
|
use app\common\model\BaseModel;
|
||||||
|
use think\model\concern\SoftDelete;
|
||||||
|
|
||||||
|
class UserShip extends BaseModel
|
||||||
|
{
|
||||||
|
use SoftDelete;
|
||||||
|
protected $name = 'user_ship';
|
||||||
|
protected $deleteTime = 'delete_time';
|
||||||
|
}
|
@ -8,8 +8,9 @@ use app\common\model\store_finance_flow\StoreFinanceFlow;
|
|||||||
use app\common\model\user_sign\UserSign;
|
use app\common\model\user_sign\UserSign;
|
||||||
use app\store\lists\BaseAdminDataLists;
|
use app\store\lists\BaseAdminDataLists;
|
||||||
use app\common\model\user\User;
|
use app\common\model\user\User;
|
||||||
use app\common\model\user\UserShip;
|
use app\common\model\user_ship\UserShip;
|
||||||
use app\common\lists\ListsSearchInterface;
|
use app\common\lists\ListsSearchInterface;
|
||||||
|
use app\common\model\user\UserAddress;
|
||||||
|
|
||||||
class UserLists extends BaseAdminDataLists implements ListsSearchInterface
|
class UserLists extends BaseAdminDataLists implements ListsSearchInterface
|
||||||
{
|
{
|
||||||
@ -38,7 +39,15 @@ class UserLists extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
*/
|
*/
|
||||||
public function lists(): array
|
public function lists(): array
|
||||||
{
|
{
|
||||||
|
$street=$this->request->get('street','');
|
||||||
|
if($street){
|
||||||
|
$uid=UserAddress::where('street',$street)->group('uid')->column('uid');
|
||||||
|
if($uid){
|
||||||
|
$this->searchWhere[]=['id','in',$uid];
|
||||||
|
}else{
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
$field = "id,nickname,real_name,sex,avatar,account,mobile,now_money,user_ship,create_time,purchase_funds,integral";
|
$field = "id,nickname,real_name,sex,avatar,account,mobile,now_money,user_ship,create_time,purchase_funds,integral";
|
||||||
$lists = User::where($this->searchWhere)
|
$lists = User::where($this->searchWhere)
|
||||||
->limit($this->limitOffset, $this->limitLength)
|
->limit($this->limitOffset, $this->limitLength)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user