public function LoadPage() { $this->LogInfo("Load product page list"); $clientType = $this->GetReqObj()->clientType; $searchFilter = null; if (ClientTypeEnum::ANDROID == $clientType || ClientTypeEnum::IOS == $clientType) { $searchFilter['company_id'] = $this->GetReqObj()->app_id; $this->LogInfo("ClientType is " . $clientType . ",SearchFilter is " . json_encode($searchFilter)); } else { //删除自动转义增加的\ $PostStr = stripslashes($_POST['data']); $req = json_decode($PostStr); if ("" != $req->product_id) { $keyID = '%' . $req->product_id . '%'; $searchFilter['product_id'] = array('like', $keyID); } if ("" != $req->product_name) { $keyName = '%' . $req->product_name . '%'; $searchFilter['product_name'] = array('like', $keyName); } if ("" != $req->type_id) { $searchFilter['type_id'] = $req->type_id; } if (CompanyEnum::GROUP_COMPANY == $_SESSION['user']['company_id']) { //显示所有产品 $this->LogInfo("The company id of this user is " . $_SESSION['user']['company_id']); } else { $this->LogInfo("The company id of this user is " . $_SESSION['user']['company_id']); $searchFilter['company_id'] = $_SESSION['user']['company_id']; } $this->LogInfo("ClientType is WEB,SearchFilter is " . json_encode($searchFilter)); } $viewProductDao = LaundryDaoContext::ViewProduct(); $order['sort_id'] = 'asc'; $this->LoadPageTable($viewProductDao, $searchFilter, $order); }