|
@@ -35,20 +35,19 @@ class JClientController extends ChBaseController
|
|
|
'desc' => '备注',
|
|
|
];
|
|
|
|
|
|
- public function actionList()
|
|
|
+ public function actionInfo()
|
|
|
{
|
|
|
- $pageParams = CommonFn::getPageParams();
|
|
|
- $search = Yii::app()->request->getParam('search', '');
|
|
|
- $criteria = new EMongoCriteria($pageParams);
|
|
|
+ $user_id = Yii::app()->request->getParam('user_id','');
|
|
|
+ $criteria = new EMongoCriteria();
|
|
|
+ $criteria->user_id('==',$user_id);
|
|
|
|
|
|
- if ($search) {
|
|
|
- $criteria->addCond('user_info.name','or',new MongoRegex('/' . $search . '/'));
|
|
|
+ $client = Client::model()->find($criteria);
|
|
|
+ if (empty($client)) {
|
|
|
+ CommonFn::requestAjax(false,'数据不存在');exit;
|
|
|
}
|
|
|
- $cursor = Client::model()->findAll($criteria);
|
|
|
- $rows = CommonFn::getRowsFromCursor($cursor);
|
|
|
- $parsedRows = Client::model()->parse($rows);
|
|
|
- $total = $cursor->count();
|
|
|
- echo CommonFn::composeDatagridData($parsedRows, $total);
|
|
|
+
|
|
|
+ CommonFn::requestAjax(true,'修改成功', ['client' => $client]);exit;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public function actionEdit()
|