提交其他文件

This commit is contained in:
2026-03-14 16:20:49 +08:00
parent a227deaecd
commit 0a19b334f8
1385 changed files with 73568 additions and 0 deletions

View File

@ -0,0 +1,113 @@
<?php
// +----------------------------------------------------------------------
// | likeadmin快速开发前后端分离管理后台PHP版
// +----------------------------------------------------------------------
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
// | 开源版本可自由商用可去除界面版权logo
// | gitee下载https://gitee.com/likeshop_gitee/likeadmin
// | github下载https://github.com/likeshop-github/likeadmin
// | 访问官网https://www.likeadmin.cn
// | likeadmin团队 版权所有 拥有最终解释权
// +----------------------------------------------------------------------
// | author: likeadminTeam
// +----------------------------------------------------------------------
namespace app\adminapi\lists;
use app\adminapi\lists\BaseAdminDataLists;
use app\common\model\OrderStore;
use app\common\lists\ListsSearchInterface;
/**
* OrderStore列表
* Class OrderStoreLists
* @package app\adminapi\lists
*/
class OrderStoreLists extends BaseAdminDataLists implements ListsSearchInterface
{
/**
* @notes 设置搜索条件
* @return \string[][]
* @author likeadmin
* @date 2026/02/07 16:29
*/
public function setSearch(): array
{
return [
'=' => ['store_id', 'room_id'],
'%like%' => ['order_sn', 'transaction_id'],
'between_time' => ['dtime'],
];
}
/**
* @notes 获取列表
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
* @author likeadmin
* @date 2026/02/07 16:29
*/
public function lists(): array
{
$mobile = "";
if(isset($this->params['mobile'])){
if($this->params['mobile']!=""&&$this->params['mobile']!=null){
$mobile = "d.mobile like '%".$this->params['mobile']."%'";
}
}
$store_name = "";
if(isset($this->params['store_name'])){
if($this->params['store_name']!=""&&$this->params['store_name']!=null){
$store_name = "b.name like '%".$this->params['store_name']."%'";
}
}
$room_name = "";
if(isset($this->params['room_name'])){
if($this->params['room_name']!=""&&$this->params['room_name']!=null){
$room_name = "c.title like ".$this->params['room_name']."";
}
}
return OrderStore::alias("a")
->where($this->searchWhere)
->field(['a.id', 'a.order_sn', 'a.transaction_id', 'a.store_id', 'a.room_id', 'a.user_id',
'a.day_title', 'a.day_time', 'a.start_time', 'a.end_time', 'a.hours', 'a.timeslot',
'a.room_price', 'a.room_all_price', 'a.user_coupon_id', 'a.coupon_price',
'a.group_coupon_id', 'a.group_price', 'a.member_price', 'a.order_amount',
'a.is_member_price', 'a.service_price', 'a.store_income_price', 'a.earnings_price',
'a.remark', 'a.is_release', 'a.order_terminal', 'a.is_renewal', 'a.is_transfer',
'a.transfer_order_id', 'a.renew_dtime', 'a.renew_hour', 'a.renew_price', 'a.pay_way',
'a.store_user_order', 'a.order_status', 'a.pay_status', 'a.gate_key', 'a.room_key',
'a.roomcardpwd_id', 'a.storecardpwd_id', 'a.is_lockpwd', 'a.dtime', 'a.update_dtime',
'b.name as store_name','c.title as room_name','d.avatar','d.nickname','d.mobile'])
->limit($this->limitOffset, $this->limitLength)
->join("tea_store b","b.id=a.store_id","left")
->join("tea_store_room c","c.id=a.room_id","left")
->join("user d","d.id=a.user_id","left")
->where($mobile)
->where($store_name)
->where($room_name)
->order(['id' => 'desc'])
->select()
->toArray();
}
/**
* @notes 获取数量
* @return int
* @author likeadmin
* @date 2026/02/07 16:29
*/
public function count(): int
{
return OrderStore::where($this->searchWhere)->count();
}
}