<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Api\Controller; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use ModStart\Core\Util\CRUDUtil; use ModStart\Module\ModuleBaseController; use Module\Member\Auth\MemberUser; use Module\Member\Support\MemberLoginCheck; use Module\Member\Util\MemberMessageUtil; class MemberMessageController extends ModuleBaseController implements MemberLoginCheck { public function paginate() { goto J9FNJ; oYRKs: return Response::generateSuccessPaginateData($JcqUq, $WrYIu, $y6j27['records'], $y6j27['total']); goto LCpeM; Dy3Ro: $iNhXN = array('search' => array(), 'order' => array('id', 'desc')); goto n6OV2; n6OV2: $oYeH5 = $WZ8dY->getJson('search'); goto ZsAUV; ZsAUV: if (!empty($oYeH5['status'])) { $iNhXN['search'][] = array('status' => array('equal' => intval($oYeH5['status']))); } goto sSLQw; J9FNJ: $WZ8dY = InputPackage::buildFromInput(); goto tf6U0; J96oj: $WrYIu = 10; goto Dy3Ro; sSLQw: $y6j27 = MemberMessageUtil::paginate(MemberUser::id(), $JcqUq, $WrYIu, $iNhXN); goto oYRKs; tf6U0: $JcqUq = $WZ8dY->getInteger('page'); goto J96oj; LCpeM: } public function delete() { MemberMessageUtil::delete(MemberUser::id(), CRUDUtil::ids()); return Response::generateSuccessData(array('unreadMessageCount' => MemberMessageUtil::getUnreadMessageCount(MemberUser::id()))); } public function read() { MemberMessageUtil::updateRead(MemberUser::id(), CRUDUtil::ids()); return Response::generateSuccessData(array('unreadMessageCount' => MemberMessageUtil::getUnreadMessageCount(MemberUser::id()))); } public function readAll() { MemberMessageUtil::updateReadAll(MemberUser::id()); return Response::generateSuccess(); } public function deleteAll() { MemberMessageUtil::deleteAll(MemberUser::id()); return Response::generateSuccess(); } }