Esempio n. 1
0
 protected function addMessage()
 {
     $MessageModel = new Model_Message();
     $row['customer_id'] = $this->customer_id;
     $row['fromuser'] = $this->post_data['FromUserName'];
     $row['touser'] = $this->post_data['ToUserName'];
     $row['msgtype'] = $this->post_data['FromMsgType'];
     $row['msg_content'] = $this->post_data['Keyword'];
     $row['create_time'] = $this->post_data['CreateTime'];
     $row['create_date'] = date("Y-m-d H:i:s");
     $MessageModel->insert($row);
     if ($this->post_data['Event'] != 'subscribe' and $this->post_data['Event'] != 'unsubscribe') {
         /*更新会员表*/
         $memberModel = new Model_Member();
         $rowMem2 = $this->getMemDetail();
         //获取用户详细信息
         $rowMem2['customer_id'] = $this->customer_id;
         $rowMem2['fromuser'] = $this->post_data['FromUserName'];
         $rowMem2['timesign'] = $this->post_data['timesign'];
         $memberModel->upsert($rowMem2);
     }
 }