You've already forked qlg.tsgz.moe
Init Repo
This commit is contained in:
77
hyhproject/home2/controller/Logmoneys.php
Executable file
77
hyhproject/home2/controller/Logmoneys.php
Executable file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
namespace wstmart\home\controller;
|
||||
use wstmart\common\model\LogMoneys as M;
|
||||
/**
|
||||
* ============================================================================
|
||||
* 资金流水控制器
|
||||
*/
|
||||
class Logmoneys extends Base{
|
||||
protected $beforeActionList = [
|
||||
'checkAuth'=>['only'=>'usermoneys,pageuserquery,touserrecharge'],
|
||||
'checkShopAuth'=>['only'=>'shopmoneys,pageshopquery,torecharge']
|
||||
];
|
||||
/**
|
||||
* 查看用户资金流水
|
||||
*/
|
||||
public function usermoneys(){
|
||||
$rs = model('Users')->getFieldsById((int)session('WST_USER.userId'),['lockMoney','userMoney','rechargeMoney']);
|
||||
$this->assign('object',$rs);
|
||||
return $this->fetch('users/logmoneys/list');
|
||||
}
|
||||
/**
|
||||
* 查看商户资金流水
|
||||
*/
|
||||
public function shopmoneys(){
|
||||
$shopId = (int)session('WST_USER.shopId');
|
||||
$rs = model('Shops')->getFieldsById($shopId,['lockMoney','shopMoney','noSettledOrderFee','paymentMoney']);
|
||||
$rs['deposit'] = db('shops_deposit')->where(['shopId'=>$shopId])->field('payDeposit,cashDeposit,isFinish')->find();
|
||||
$this->assign('object',$rs);
|
||||
return $this->fetch('shops/logmoneys/list');
|
||||
}
|
||||
/**
|
||||
* 获取用户数据
|
||||
*/
|
||||
public function pageUserQuery(){
|
||||
$userId = (int)session('WST_USER.userId');
|
||||
$data = model('logMoneys')->pageQuery(0,$userId);
|
||||
return WSTReturn("", 1,$data);
|
||||
}
|
||||
/**
|
||||
* 获取商家数据
|
||||
*/
|
||||
public function pageShopQuery(){
|
||||
$shopId = (int)session('WST_USER.shopId');
|
||||
$data = model('logMoneys')->pageQuery(1,$shopId);
|
||||
return WSTReturn("", 1,$data);
|
||||
}
|
||||
/**
|
||||
* 获取商家质保金流水
|
||||
*/
|
||||
public function pageShopDeposit(){
|
||||
$shopId = (int)session('WST_USER.shopId');
|
||||
$data = model('logMoneys')->pageDeposit(1,$shopId);
|
||||
return WSTReturn("", 1,$data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值[商家]
|
||||
*/
|
||||
public function toRecharge(){
|
||||
$payments = model('common/payments')->recharePayments('1');
|
||||
$this->assign('payments',$payments);
|
||||
$chargeItems = model('common/ChargeItems')->queryList();
|
||||
$this->assign('chargeItems',$chargeItems);
|
||||
return $this->fetch('shops/recharge/pay_step1');
|
||||
}
|
||||
|
||||
/**
|
||||
* 充值[用户]
|
||||
*/
|
||||
public function toUserRecharge(){
|
||||
$payments = model('common/payments')->recharePayments('1');
|
||||
$this->assign('payments',$payments);
|
||||
$chargeItems = model('common/ChargeItems')->queryList();
|
||||
$this->assign('chargeItems',$chargeItems);
|
||||
return $this->fetch('users/recharge/pay_step1');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user