getOrder($condition); $allProduct = model('product')->getProduct(); foreach ($allOrder as $key=>$value) { foreach ($allProduct as $k=>$va) { if ($value->product_pid == $va->product_id) { $allOrder[$key]->fatherProduct = $va->product_name; } } } $this->assign('allOrder', $allOrder); $this->assign('show_page', $allOrder->render()); $this->assign('status', $status); return $this->fetch('orderManagement'); } public function recharge() { $userId = session('user_id'); $userInfo = model('user')->getUserInfo($userId); $this->assign('userInfo', $userInfo); $status = input('get.status'); $this->assign('status', $status); $systemPayment = model('systempayment')->getSystempayment($userId); $zhifubao = ''; $weixin = ''; $bank = ''; foreach ($systemPayment as $value) { if ($value->systemPayment_type == 1 && $value->systemPayment_status == 1) { $zhifubao = $value; } elseif ($value->systemPayment_type == 2 && $value->systemPayment_status == 1) { $weixin = $value; } elseif ($value->systemPayment_type == 3 && $value->systemPayment_status == 1) { $bank = $value; } } $this->assign('zhifubao', $zhifubao); $this->assign('weixin', $weixin); $this->assign('bank', $bank); return $this->fetch('recharge'); } public function rechargeSubmit() { $data['recharge_type'] = input('post.type'); $data['recharge_identity'] = input('post.orderNumber'); $getRecharge = model('recharge')->getRecharge($data); if ($getRecharge) { return ["msg"=>"错误:已提交过该订单号"]; } $userId = session('user_id'); $getInfo = model('userinfo')->getInfo($userId); $data['user_id'] = session('user_id'); $data['user_money'] = $getInfo->userInfo_money; $data['recharge_time'] = date('Y-m-d H:i:s'); $data['recharge_status'] = 2; $addBack = model('recharge')->addRecharge($data); if ($addBack) { return ["msg"=>"成功:人工操作流程较长,金额预计在操作完成后2-3天到账,请耐心等待"]; } else { return ["msg"=>"错误:系统错误,请重新提交"]; } } public function transaction() { $condition['user_id'] = session('user_id'); $time = input('get.timeRang'); if (!empty($time)) { $gap = explode(' - ', $time); $begin = $gap[0]; $end = date('Y-m-d', strtotime ("+1 day", strtotime($gap[1]))); $condition['recharge_time'] = array('between', array($begin, $end)); } $type = input('get.type'); if ($type) { $condition['recharge_type'] = $type; } $status = input('get.status'); if (strlen($status)) { $condition['recharge_status'] = $status; } $allRecharge = model('recharge')->selectRecharge($condition); $this->assign('allRecharge', $allRecharge); $this->assign('show_page', $allRecharge->render()); return $this->fetch('transaction'); } public function capital() { $condition['user_id'] = session('user_id'); $time = input('get.timeRang'); if (!empty($time)) { $gap = explode(' - ', $time); $begin = $gap[0]; $end = date('Y-m-d', strtotime ("+1 day", strtotime($gap[1]))); $condition['capitalMovements_create'] = array('between', array($begin, $end)); } $type = input('get.type'); if ($type) { $condition['capitalMovements_type'] = $type; } $allCapital = model('CapitalMovements')->select($condition); $this->assign('allCapital', $allCapital); $this->assign('show_page', $allCapital->render()); return $this->fetch(); } } ?>