Commit 56d2a53e by 冷斌

推广

parent 5912cac7
...@@ -412,42 +412,28 @@ class UserAction extends CommonAction ...@@ -412,42 +412,28 @@ class UserAction extends CommonAction
//余额支付记录 //余额支付记录
protected function account_pay() protected function account_pay()
{ {
// $map = ['uid' => $this->mid]; $map = ['uid' => $this->mid];
//
// $st = strtotime($_GET['st']) + 0;
// $et = strtotime($_GET['et']) + 0;
// if (!$st) {
// $_GET['st'] = '';
// }
//
// if (!$et) {
// $_GET['et'] = '';
// }
//
// if ($_GET['st']) {
// $map['ctime'][] = ['gt', $st];
// }
// if ($_GET['et']) {
// $map['ctime'][] = ['lt', $et];
// }
// $data = D('ZyOrderCourse', 'course')->where($map)->order('ctime DESC,id DESC')->findPage(12);
// $total = D('ZyOrderCourse', 'course')->where(['uid' => $this->mid])->sum('price');
// $this->assign('data', $data);
// $this->assign('total', $total);
$results = M('zy_split_balance_flow')->where([ $st = strtotime($_GET['st']) + 0;
'uid' => $this->mid, $et = strtotime($_GET['et']) + 0;
['!=', 'type' , 5] if (!$st) {
])->order('ctime desc')->findAll(); $_GET['st'] = '';
$sum = M('zy_split_balance_flow')->where([ }
'uid' => $this->mid,
['!=', 'type' , 5]
])->sum('num');
var_dump($sum, $results); if (!$et) {
die; $_GET['et'] = '';
$this->assign('num', $sum); }
$this->assign('data', $results);
if ($_GET['st']) {
$map['ctime'][] = ['gt', $st];
}
if ($_GET['et']) {
$map['ctime'][] = ['lt', $et];
}
$data = D('ZyOrderCourse', 'course')->where($map)->order('ctime DESC,id DESC')->findPage(12);
$total = D('ZyOrderCourse', 'course')->where(['uid' => $this->mid])->sum('price');
$this->assign('data', $data);
$this->assign('total', $total);
} }
//余额申请提现页面 //余额申请提现页面
...@@ -483,42 +469,56 @@ class UserAction extends CommonAction ...@@ -483,42 +469,56 @@ class UserAction extends CommonAction
//余额申请提现列表页面 //余额申请提现列表页面
protected function account_take_list() protected function account_take_list()
{ {
if (!empty($_GET['id'])) { // if (!empty($_GET['id'])) {
$id = intval($_GET['id']); // $id = intval($_GET['id']);
$result = D('ZyService', 'classroom')->setWithdrawStatus($id, $this->mid, 4); // $result = D('ZyService', 'classroom')->setWithdrawStatus($id, $this->mid, 4);
if (true === $result) { // if (true === $result) {
$this->ajaxReturn(null, null, true); // $this->ajaxReturn(null, null, true);
} else { // } else {
$this->ajaxReturn(null, $result, false); // $this->ajaxReturn(null, $result, false);
} // }
exit; // exit;
} // }
//
$map['uid'] = $this->mid; // $map['uid'] = $this->mid;
$map['wtype'] = 2; // $map['wtype'] = 2;
//
$st = strtotime($_GET['st']) + 0; // $st = strtotime($_GET['st']) + 0;
$et = strtotime($_GET['et']) + 0; // $et = strtotime($_GET['et']) + 0;
if (!$st) { // if (!$st) {
$_GET['st'] = ''; // $_GET['st'] = '';
} // }
//
if (!$et) { // if (!$et) {
$_GET['et'] = ''; // $_GET['et'] = '';
} // }
//
if ($_GET['st']) { // if ($_GET['st']) {
$map['ctime'][] = ['gt', $st]; // $map['ctime'][] = ['gt', $st];
} // }
if ($_GET['et']) { // if ($_GET['et']) {
$map['ctime'][] = ['lt', $et]; // $map['ctime'][] = ['lt', $et];
} // }
//
// $data = D('ZyWithdraw')->order('ctime DESC, id DESC')->where($map)->findPage(12);
//
// $total = D('ZyWithdraw')->where(['uid' => $this->mid, 'status' => 2, 'wtype' => 1])->sum('wnum');
// $this->assign('data', $data);
// $this->assign('total', $total);
$data = D('ZyWithdraw')->order('ctime DESC, id DESC')->where($map)->findPage(12); $results = M('zy_split_balance_flow')->where([
'uid' => $this->mid,
['!=', 'type', 5],
])->order('ctime desc')->findAll();
$sum = M('zy_split_balance_flow')->where([
'uid' => $this->mid,
['!=', 'type', 5],
])->sum('num');
$total = D('ZyWithdraw')->where(['uid' => $this->mid, 'status' => 2, 'wtype' => 1])->sum('wnum'); var_dump($sum, $results);
$this->assign('data', $data); die;
$this->assign('total', $total); $this->assign('num', $sum);
$this->assign('data', $results);
} }
//用户账户收入余额 //用户账户收入余额
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment