north 7 年之前
父節點
當前提交
ef321bdbef
共有 1 個文件被更改,包括 16 次插入36 次删除
  1. 16 36
      www/protected/modules/j/controllers/HouseKeepingController.php

+ 16 - 36
www/protected/modules/j/controllers/HouseKeepingController.php

@@ -101,12 +101,13 @@ class HouseKeepingController extends JBaseController
 
     public function actionAdd()
     {
-        $status = intval(Yii::app()->request->getParam('status', 100));
-        $contract = intval(Yii::app()->request->getParam('contract', 100));
+        $mobile = intval(Yii::app()->request->getParam('mobile', 100));
+        $user_name = intval(Yii::app()->request->getParam('user_name', 100));
         $type = intval(Yii::app()->request->getParam('type', 100));
         $cart = intval(Yii::app()->request->getParam('cart', 100));
         $skill = intval(Yii::app()->request->getParam('skill', 100));
         $age = intval(Yii::app()->request->getParam('age', 0));
+        $address = intval(Yii::app()->request->getParam('address', 0));
         $tech = intval(Yii::app()->request->getParam('tech', ''));
         $desc = intval(Yii::app()->request->getParam('desc', ''));
         $yc_time = intval(Yii::app()->request->getParam('yc_time', ''));
@@ -114,43 +115,22 @@ class HouseKeepingController extends JBaseController
         $status_time = intval(Yii::app()->request->getParam('status_time', ''));
         $server_end_time = intval(Yii::app()->request->getParam('server_end_time', ''));
         $h = new HouseKeeping();
-        $h->user_name = '1';
-        $h->mobile = '15600266816';
-        $h->type = 1;
-        $h->cart = 1;
-        $h->address = '1dsfafsdf';
-        $h->server_start_time = time();
-        $h->server_end_time = time();
-        $h->skill = 1;
-        $h->yc_time = time();
-        $h->age = 18;
-        $h->desc = 'fasdf1';
+        $h->user_name = $user_name;
+        $h->mobile = $mobile;
+        $h->type = $type;
+        $h->cart = $cart;
+        $h->address = $address;
+        $h->server_start_time = $server_start_time;
+        $h->server_end_time = $server_end_time;
+        $h->skill = $skill;
+        $h->yc_time = $yc_time;
+        $h->age = $age;
+        $h->desc = $desc;
         $h->status = 1;
-        $h->status_time = time();
-        $h->tech = '12asdf';
+        $h->status_time = $status_time;
+        $h->tech = $tech;
         $h->contract = 1;
         $h->time = time();
         $h->save();
     }
-    public function actionUserAdd() {
-        $user_name = Yii::app()->getRequest()->getParam('user_name','');
-        $sex = Yii::app()->getRequest()->getParam('sex',1);
-        $card_id = Yii::app()->getRequest()->getParam('card_id',0);
-        $mobile = Yii::app()->getRequest()->getParam('mobile','');
-        $address = Yii::app()->getRequest()->getParam('address','');
-        $time = Yii::app()->getRequest()->getParam('time');
-        $register_time = time();
-
-        $userInfo = new UserInfo;
-        $userInfo->user_id = new MongoId();
-        $userInfo->user_name = $user_name;
-        $userInfo->time = $time;
-        $userInfo->sex = $sex;
-        $userInfo->card_id = $card_id;
-        $userInfo->mobile = $mobile;
-        $userInfo->address = $address;
-        $userInfo->register_time = $register_time;
-        $result = $userInfo->save();
-        CommonFn::requestAjax(true,CommonFn::getMessage('message','operation_success'),$result);
-    }
 }