Commit 56d2a53e by 冷斌

推广

parent 5912cac7
......@@ -412,42 +412,28 @@ class UserAction extends CommonAction
//余额支付记录
protected function account_pay()
{
// $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);
$map = ['uid' => $this->mid];
$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');
$st = strtotime($_GET['st']) + 0;
$et = strtotime($_GET['et']) + 0;
if (!$st) {
$_GET['st'] = '';
}
var_dump($sum, $results);
die;
$this->assign('num', $sum);
$this->assign('data', $results);
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);
}
//余额申请提现页面
......@@ -483,42 +469,56 @@ class UserAction extends CommonAction
//余额申请提现列表页面
protected function account_take_list()
{
if (!empty($_GET['id'])) {
$id = intval($_GET['id']);
$result = D('ZyService', 'classroom')->setWithdrawStatus($id, $this->mid, 4);
if (true === $result) {
$this->ajaxReturn(null, null, true);
} else {
$this->ajaxReturn(null, $result, false);
}
exit;
}
$map['uid'] = $this->mid;
$map['wtype'] = 2;
$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];
}
// if (!empty($_GET['id'])) {
// $id = intval($_GET['id']);
// $result = D('ZyService', 'classroom')->setWithdrawStatus($id, $this->mid, 4);
// if (true === $result) {
// $this->ajaxReturn(null, null, true);
// } else {
// $this->ajaxReturn(null, $result, false);
// }
// exit;
// }
//
// $map['uid'] = $this->mid;
// $map['wtype'] = 2;
//
// $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('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');
$this->assign('data', $data);
$this->assign('total', $total);
var_dump($sum, $results);
die;
$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