/** * 粉丝活跃度+1, 同时在fan_reports表中增加记录. * * @param int $accountId AccountID * @param string $openId OpenID * @param string $type 操作类型 * * @return bool */ public function setLiveness($accountId, $openId, $type) { /* * 1 粉丝活跃度+1 */ $this->fanRepository->updateLiveness(['account_id' => $accountId, 'openid' => $openId]); /* * 2 在fan_reports表中增加记录 */ $this->fanReportRepository->store(['account_id' => $accountId, 'openid' => $openId, 'type' => $type]); }