has('distribution_channel_id') ? $request->input('distribution_channel_id') : ''; if(empty($distribution_channel_id)) { return response()->error("PARAM_EMPTY"); } $from = $request->has('from') ? $request->input('from') : ''; if(empty($from)) { return response()->error("PARAM_EMPTY"); } $customMsgService = CustomSendStatsService::customSendDayStatsByChannelAndFrom($distribution_channel_id,$from); if (!empty($customMsgService)) { return response()->pagination(new CustomSendStatsTransformers(), $customMsgService); }else{ return response()->success(['data'=>0]); } } /** * @apiVersion 1.0.0 * @api {GET} OfficialAccount/customSendStatsByChannelAndFrom 获取渠道下智能推送分析总数据 * @apiGroup OfficialAccount * @apiName customSendStatsByChannelAndFrom * @apiSuccessExample {json} Success-Response: * * { * "code": 0, * "msg": "", * "data": [ * * ] * } */ function customSendStatsByChannelAndFrom(Request $request) { $distribution_channel_id = $request->has('distribution_channel_id') ? $request->input('distribution_channel_id') : ''; if(empty($distribution_channel_id)) { return response()->error("PARAM_EMPTY"); } $from = $request->has('from') ? $request->input('from') : ''; if(empty($from)) { return response()->error("PARAM_EMPTY"); } $customMsgService = CustomSendStatsService::customSendStatsByChannelAndFrom($distribution_channel_id,$from); if (!empty($customMsgService)) { return response()->item(new CustomSendStatsTransformers(), $customMsgService); }else{ return response()->success(['data'=>0]); } } }