92 lines
3.5 KiB
PHP
92 lines
3.5 KiB
PHP
<?php
|
|
/**
|
|
* SAAS应用系统 --- 十年开发经验汇集巨献!
|
|
* ==========================================================
|
|
* Copy right 2020-2050 成都众联思索科技有限公司,保留所有权利。
|
|
* ----------------------------------------------------------
|
|
* 官方网址: https://www.zoomtk.com
|
|
* 这不是自由软件!未经允许不得用于商业目或程序代码摘取及修改。
|
|
* 任何企业和个人未经允许对程序代码以任何形式任何目的再发布传播。
|
|
* 唯一发布渠道www.zoomtk.com;非官方渠道统一视为侵权行为。
|
|
* ==========================================================
|
|
*/
|
|
namespace addon\saas\shop\controller;
|
|
use addon\saas\model\SiteApply;
|
|
class Shop extends SaasBase
|
|
{
|
|
|
|
/***
|
|
* 申请客户端列表
|
|
* @return array|mixed
|
|
*/
|
|
public function lists()
|
|
{
|
|
if (request()->isAjax()) {
|
|
$SiteApply=new SiteApply();
|
|
$search_text = input('search_text', '');
|
|
$page = input('page', 1);
|
|
$page_size = input('page_size', PAGE_LIST_ROWS);
|
|
$condition[] = ['ag_site_id', '=', $this->site_id];
|
|
if ($search_text) {
|
|
$condition[] = ['name|component_phone|legal_persona_name', 'like', '%' . $search_text . '%'];
|
|
}
|
|
$res = $SiteApply->getPageList($condition, $page, $page_size);
|
|
return $res;
|
|
}
|
|
$this->forthMenu();
|
|
return $this->fetch('site/apply');
|
|
}
|
|
|
|
/***
|
|
* 头部商家
|
|
* @return array|mixed
|
|
*/
|
|
public function topshop(){
|
|
if (request()->isAjax()) {
|
|
$page = input('page', 1);
|
|
$page_size = input('page_size', PAGE_LIST_ROWS);
|
|
// $status = input('status', '');
|
|
// $group_id = input('group_id', '');
|
|
// $start_time = input("start_time", '');
|
|
// $end_time = input("end_time", '');
|
|
// $search_text = input('search_text', '');
|
|
// //商家状态
|
|
// if ($status != '') {
|
|
// $condition[] = ['status', '=', $status];
|
|
// }
|
|
// //套餐分组
|
|
// if ($group_id != '') {
|
|
// $condition[] = ['group_id', '=', $status];
|
|
// }
|
|
// if (!empty($start_time) && empty($end_time)) {
|
|
// $condition[] = ['expire_time', '>=', strtotime($start_time)];
|
|
// } elseif (empty($start_time) && !empty($end_time)) {
|
|
// $condition[] = ["expire_time", "<=", strtotime($end_time)];
|
|
// } elseif (!empty($start_time) && !empty($end_time)) {
|
|
// $condition[] = ["expire_time", ">=", strtotime($start_time)];
|
|
// $condition[] = ["expire_time", "<=", strtotime($end_time)];
|
|
// }
|
|
$where=[
|
|
['s.agent_id','=',$this->site_id],
|
|
['o.pay_status','=',1],
|
|
];
|
|
$order = 'goods_num desc,order_money desc';
|
|
$join=[
|
|
['site s','s.site_id=o.site_id','left']
|
|
];
|
|
$field = 's.username,s.status,s.site_name,s.site_tel,s.create_time,s.expire_time,sum(o.order_money) as total_money,sum(o.goods_num) as goods_num,o.site_id';
|
|
$siteInfo = model('order')->pageList($where,$field,$order,$page,$page_size,'o',$join,'o.site_id');
|
|
return success(0,'成功',$siteInfo);
|
|
}
|
|
$this->forthMenu();
|
|
return $this->fetch('shop/topshop');
|
|
}
|
|
/***
|
|
* 审阅
|
|
*/
|
|
public function review()
|
|
{
|
|
|
|
|
|
}
|
|
} |