From 01176a459019295f4249222b1aaf8908d7a3f9f3 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Thu, 23 Mar 2023 11:46:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E5=88=86=E9=94=80?= =?UTF-8?q?=E5=95=86=E6=B5=81=E6=B0=B4=E5=88=86=E4=B8=BA=E9=92=BB=E7=9F=B3?= =?UTF-8?q?=E6=B5=81=E6=B0=B4=E5=92=8C=E5=88=86=E9=94=80=E5=95=86=E6=B5=81?= =?UTF-8?q?=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addon/fenxiao/shop/controller/Fenxiao.php | 30 +++- app/shop/controller/Memberaccount.php | 6 + app/shop/view/account/diamond.html | 197 ++++++++++++++++++++++ config/menu_shop.php | 13 +- 4 files changed, 236 insertions(+), 10 deletions(-) create mode 100644 app/shop/view/account/diamond.html diff --git a/addon/fenxiao/shop/controller/Fenxiao.php b/addon/fenxiao/shop/controller/Fenxiao.php index 271559d8..3c4dd3d3 100644 --- a/addon/fenxiao/shop/controller/Fenxiao.php +++ b/addon/fenxiao/shop/controller/Fenxiao.php @@ -757,8 +757,12 @@ class Fenxiao extends BaseShop return (new FenxiaoApply())->upgradeApplyExamine(); } - - // 分销商流水 + /** + * Common: 分销商流水 + * Author: wu-hui + * Time: 2023/03/23 11:40 + * @return array|mixed + */ public function accountStatement(){ if(request()->isAjax()){ // 参数获取 @@ -795,19 +799,29 @@ class Fenxiao extends BaseShop if($searchText) $condition[] = ['m.username|m.nickname',"like","%{$searchText}%"]; if($fromType) $condition[] = ['a.type',"=",$fromType]; if($memberId > 0) $condition[] = ['m.member_id','=',$memberId]; - //发生时间 + // 发生时间 if($startTime != '' && $endTime != '') $condition[] = ['a.create_time','between',[strtotime($startTime),strtotime($endTime)]]; elseif($startTime != '' && $endTime == '') $condition[] = ['a.create_time','>=',strtotime($startTime)]; elseif($startTime == '' && $endTime != '') $condition[] = ['a.create_time','<=',strtotime($endTime)]; + // 是否获取钻石:获取钻石-仅获取钻石流水,不获取钻石-获取除钻石外所有流水 + if($fromType == 'diamond') $condition[] = ['a.type',"=",'diamond']; + else $condition[] = ['a.type',"<>",'diamond']; + return(new FenxiaoAccount())->getFenxiaoAccountPageList($condition,$page,$pageSize,'a.id desc', $field,'a',$join); } // 获取流水类型 - $typeList = Db::name('fenxiao_account') - ->field('type,type_name') - ->group('type') - ->select(); - if($typeList) $typeList = $typeList->toArray(); + $typeList = [ + ['type' => 'withdraw','type_name' => '提现'], + ['type' => 'order','type_name' => '订单结算'], + ['type' => 'points','type_name' => '积分'], + ]; + // $typeList = Db::name('fenxiao_account') + // ->field('type,type_name') + // ->where('type',"<>",'diamond') + // ->group('type') + // ->select(); + // if($typeList) $typeList = $typeList->toArray(); $this->assign('typeList',$typeList); return $this->fetch('fenxiao/account'); diff --git a/app/shop/controller/Memberaccount.php b/app/shop/controller/Memberaccount.php index 05c4c430..4070116b 100644 --- a/app/shop/controller/Memberaccount.php +++ b/app/shop/controller/Memberaccount.php @@ -217,4 +217,10 @@ class Memberaccount extends BaseShop return $result; } + // 钻石流水 + public function diamond(){ + + return $this->fetch('account/diamond'); + } + } \ No newline at end of file diff --git a/app/shop/view/account/diamond.html b/app/shop/view/account/diamond.html new file mode 100644 index 00000000..f0e95b1e --- /dev/null +++ b/app/shop/view/account/diamond.html @@ -0,0 +1,197 @@ +{extend name="app/shop/view/base.html"/} +{block name="resources"} + +{/block} + +{block name="main"} + +