本文整理汇总了PHP中UserService::getlist方法的典型用法代码示例。如果您正苦于以下问题:PHP UserService::getlist方法的具体用法?PHP UserService::getlist怎么用?PHP UserService::getlist使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserService
的用法示例。
在下文中一共展示了UserService::getlist方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: doNewList
public function doNewList()
{
//list
$listPageHelper = new ListPageHelper();
$listPageHelper->pageSize = 10;
$pageNum = intval(Request::get("page"));
$listPageHelper->pageNum = $pageNum ? $pageNum : 1;
//Condition
$messageCondition = new MessageValue();
//get data
$messageService = new MessageService();
$messageCondition->addStatusCondition(Value::STATUS_NOT_SEE, Value::EQUAL);
$messageCondition->addCondition(' 1=1 ORDER BY `message_id` DESC');
$messageList = $messageService->getList($messageCondition, $listPageHelper);
$userCondition = new UserValue();
$userService = new UserService();
$userlist = $userService->getlist($userCondition);
//view
View::set("UserViewValue", $userlist);
View::set("MessageList", $messageList);
View::set("ListPageHelper", $listPageHelper);
View::display("List");
}
示例2: doExport
public function doExport()
{
// create a simple 2-dimensional array
if (Request::get('type') == 'time') {
$ordersService = new OrdersService();
$userCondition = new UserValue();
$userService = new UserService();
$ordersCondition = new OrdersValue();
$userlist = $userService->getlist($userCondition);
//get project
$projectCondition = new ProjectValue();
$projectService = new ProjectService();
$projectlist = $projectService->getList($projectCondition);
//按时间范围搜索
$start = Request::get('start');
$end = Request::get('end');
$orderListModel = '所有派单';
if ($start != '' and $end != '') {
$ordersCondition->addAddtimeCondition($start, Value::GREATER_EQUAL);
$ordersCondition->addAddtimeCondition($end, Value::LESS_EQUAL);
$orderListModel = '从' . $start . ' 到 ' . $end . '的派单';
} elseif ($end == '' and $start != '') {
$ordersCondition->addAddtimeCondition($end, Value::LESS_EQUAL);
$orderListModel = '从' . $start . ' 到 今天 的派单';
}
$ordersCondition->addCondition('1=1 ORDER BY `order_id` DESC');
$ordersList = $ordersService->getList($ordersCondition, $listPageHelper);
$areaService = new AreaService();
$arealist = $areaService->getList(new AreaValue());
$array_top = array();
$array_top = array(Language::get("ORDERS.ADDTIME.LABEL"), Language::get("ORDERS.CUSTOMER_NAME.LABEL"), Language::get("ORDERS.CUSTOMER_ADDRESS.LABEL"), Language::get("ORDERS.PROJECT_ID.LABEL"), Language::get("ORDERS.HIS.LABEL"), Language::get("ORDERS.OPERATE_STATUS.LABEL"), Language::get("ORDERS.CONTACT_STATUS.LABEL"), Language::get("ORDERS.USER_ID.LABEL"), Language::get("ORDERS.INFO.LABEL"));
$data[] = $array_top;
if (count($ordersList) > 0) {
foreach ($ordersList as $k => $v) {
if (count($projectlist) > 0) {
foreach ($projectlist as $project) {
if ($v->project_id == $project->project_id) {
$project = $project->project_name;
break;
}
}
}
switch ($v->operate_status) {
case Value::OPERATE_STATUS_NOT_OPERATE:
$operate_status = '未成交';
break;
case Value::OPERATE_STATUS_OPERATED:
$operate_status = '已成交';
break;
}
switch ($v->contact_status) {
case Value::CONTACT_STATUS_CANNOT_CONTACT:
$contact_status = '无法联系';
break;
case Value::CONTACT_STATUS_CONTACTED:
$contact_status = '已联系';
break;
case Value::CONTACT_STATUS_NOT_CONTACT:
$contact_status = '未联系';
break;
}
if (count($userlist) > 0) {
foreach ($userlist as $outUser) {
if ($v->user_id == $outUser->user_id) {
$user = $outUser->realname;
break;
}
}
}
$data[] = array($v->addtime, $v->customer_name, $v->customer_address, $project, $v->HIS, $operate_status, $contact_status, $user, $v->info);
}
}
// generate file (constructor parameters are optional)
$xls = new Excel_XML('UTF-8', false, $orderListModel);
$xls->addArray($data);
$xls->generateXML('paidan');
} else {
View::display('Export');
}
}