1, 'position' => 1 ]; $list = Db::name('platform_banner')->where($where)->order('weigh asc,id asc')->select(); $list = list_domain_image($list,['image']); $this->success(1,$list); } //商家钱包明细 public function money_log(){ $map = [ 'user_id' => $this->auth->company_id, ]; $list = Db::name('company_money_log') ->field('id,log_type,change_value,remain,remark,createtime') ->where($map)->order('id desc')->autopage()->select(); //$list = $this->list_appen_logtext($list); $this->success(1,$list); } //追加log_text private function list_appen_logtext($list){ if(!empty($list)){ $conf = config('wallet.logtype'); foreach($list as $key => $val){ $list[$key]['log_text'] = isset($conf[$val['log_type']]) ? $conf[$val['log_type']] : ''; } } return $list; } //资金账单,用来显示本门店下所有用户的储值卡的流水日志 public function usermoney_info(){ $usernumber = Db::name('user_wallet')->where('company_id',$this->auth->company_id)->count(); $summoney = Db::name('user_wallet')->where('company_id',$this->auth->company_id)->sum('money'); $rs = [ 'usernumber' => $usernumber, 'summoney' => $summoney, ]; return $this->success(1,$rs); } }