LOG_MODULE, __FUNCTION__); if ($params['like'] > 0) { $res = LiveRoomLogModel::where('session', $params['session'])->increment('like', $params['like']); LiveRoomLogLikeModel::likes($params['user_id'], $params['room_id'], $params['room_no'], $params['session'], $params['like']); } else { $res = LiveRoomLogModel::where('session', $params['session'])->decrement('like', $params['like'] * -1); } } // 增加ccu if (!empty($params['ccu'])) { LogUtil::info('增加ccu', $this->LOG_MODULE, __FUNCTION__); if ($params['ccu'] > 0) { $res = LiveRoomLogModel::where('session', $params['session'])->increment('ccu', $params['ccu']); } else { $res = LiveRoomLogModel::where('session', $params['session'])->decrement('ccu', $params['ccu'] * -1); } } // 增加分享次数 if (!empty($params['share_num'])) { LogUtil::info('增加分享次数', $this->LOG_MODULE, __FUNCTION__); if ($params['share_num'] > 0) { $res = LiveRoomLogModel::where('session', $params['session'])->increment('share_num', $params['share_num']); } else { $res = LiveRoomLogModel::where('session', $params['session'])->decrement('share_num', $params['share_num'] * -1); } } // 增加关注量 if (!empty($params['follow_num'])) { LogUtil::info('增加关注量', $this->LOG_MODULE, __FUNCTION__); if ($params['follow_num'] > 0) { $res = LiveRoomLogModel::where('session', $params['session'])->increment('follow_num', $params['follow_num']); } else { $res = LiveRoomLogModel::where('session', $params['session'])->decrement('follow_num', $params['follow_num'] * -1); } } // 增加商品销量 if (!empty($params['goods_sales'])) { LogUtil::info('增加商品销量', $this->LOG_MODULE, __FUNCTION__); if ($params['goods_sales'] > 0) { $res = LiveRoomLogModel::where('session', $params['session'])->increment('goods_sales', $params['goods_sales']); } else { $res = LiveRoomLogModel::where('session', $params['session'])->decrement('goods_sales', $params['goods_sales'] * -1); } } if (!isset($res) || !$res) { return $this->error('执行失败'); } return $this->success('执行成功'); } }