Exemple #1
0
 public function attentionTo($attenaccount)
 {
     $staffinfo = $this->getInfo();
     $attention_type = '01';
     //关注人员
     $sql = "insert into we_staff_atten(login_account,atten_type,atten_id,atten_date)values(?,?,?,now())";
     $para = array((string) $staffinfo["login_account"], (string) $attention_type, (string) $attenaccount);
     $this->conn->ExecSQL($sql, $para);
     //每个关注0.2分
     $sql = "insert into we_staff_points (login_account,point_type,point_desc,point,point_date)\n          values (?,?,?,?,now())";
     $para = array((string) $staffinfo["login_account"], (string) '08', (string) '关注' . $attenaccount . ',获得积分0.2', (double) 0.2);
     $this->conn->ExecSQL($sql, $para);
     $friendevent = new \Justsy\BaseBundle\Management\FriendEvent($this->conn, $this->logger, null);
     $friendevent->attenuser($staffinfo["login_account"], $staffinfo["nick_name"], $attenaccount);
 }