/** * 用户获取参数值,如果没有或为空, 则返回默认值 * @param $param * @param int $def * @return int */ public static function getComParam($param, $def = 20) { $value = $def; if (!CommonUtil::parmIsEmpty($param)) { $value = intval($param); } return $value; }
/** * 进行临时统计 */ public function doTempReportAction() { $time_str = date("Y-m-d"); $stm = date('Y-m-d 00:00:00', strtotime($time_str)); $time = FRequest::getString("time"); if (CommonUtil::parmIsEmpty($time)) { $time = $stm; } // $time = "2014-11-15 00:00:00"; $sql = "select count(*) as count from user where reg_time > '" . $time . "' "; // 注册人数 $sql2 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0"; // 注册绑定 $sql3 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0 and common_status = 1 "; // 注帮领 $sql4 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0 and common_status = 1 and rename_reward = 2 "; $sql5 = "select count(*) as count from user where reg_time > '" . $time . "' and cell_phone>0 and common_status = 1 and addpic_reward = 2 "; $sql6 = "select count(distinct uid) as count from bid where uid in (select uid from user where reg_time>'" . $time . " and cell_phone>0 and common_status = 1') "; // 领出价 $sql7 = "select count(*) as count from user where reg_time > '" . $time . "' and addpic_reward = 2 "; $sql8 = "select count(*) as count from user where reg_time > '" . $time . "' and rename_reward = 2 "; $sql9 = "select count(distinct uid) as count from bid where uid in (select uid from user where reg_time>'" . $time . "') "; // 领出价 $reg_data = FDB::fetch($sql); $reg_bind_data = FDB::fetch($sql2); $reg_bind_ling = FDB::fetch($sql3); $reg_b_l_rename = FDB::fetch($sql4); $reg_b_l_addpic = FDB::fetch($sql5); $reg_b_l_bid = FDB::fetch($sql6); $reg_rename = FDB::fetch($sql7); $reg_addpic = FDB::fetch($sql8); $reg_bid = FDB::fetch($sql9); $reg_b_l_name_num = $reg_b_l_rename[0]["count"]; $reg_b_l_num = $reg_bind_ling[0]["count"]; $reg_b_l_pic_num = $reg_b_l_addpic[0]["count"]; $reg_b_l_bid_num = $reg_b_l_bid[0]["count"]; echo "注册人数 :" . $reg_data[0]["count"] . " <br>"; echo "注册绑定人数 :" . $reg_bind_data[0]["count"] . " <br>"; echo "注册绑定领取礼包人数 :" . $reg_b_l_num . " <br>"; echo "注改昵称 :" . $reg_rename[0]["count"] . " <br>"; echo "注该头像 :" . $reg_addpic[0]["count"] . " <br>"; echo "注册出价 :" . $reg_bid[0]["count"] . " <br>"; echo "注绑领改昵称 :" . $reg_b_l_name_num . " ----- " . sprintf("%.2f", $reg_b_l_name_num * 100 / $reg_b_l_num) . "% <br>"; echo "注绑领改头像 :" . $reg_b_l_pic_num . " ----- " . sprintf("%.2f", $reg_b_l_pic_num * 100 / $reg_b_l_num) . "% <br>"; echo "注绑领出价 :" . $reg_b_l_bid[0]["count"] . " ----- " . sprintf("%.2f", $reg_b_l_bid_num * 100 / $reg_b_l_num) . "% <br>"; }
/** * 用户资料复审 */ function verifyUserSecondAction() { $id = FRequest::getInt("id"); $uid = FRequest::getInt("uid"); $status = FRequest::getInt("status"); // $reason = FRequest::getString("reason"); if (CommonUtil::parmIsEmpty($uid) || CommonUtil::parmIsEmpty($status) || CommonUtil::parmIsEmpty($id)) { FResponse::output(CommonUtil::GetDefRes(201, "参数错误")); return; } //请求服务端接口 $url = FConfig::get('global.service_mumu_url') . "/s/user/IUserInfoVerify"; $res = Service_Common::secPost($url, array("id" => $id, "uid" => $uid, "level" => $status)); FResponse::output($res); }