<?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 xkFEJ; Iy3iD: $fFBu8 = MemberMessageUtil::paginate(MemberUser::id(), $j13Tr, $OB9LF, $AQ4wg); goto o9LBZ; aLij3: $oHfcx = $Nw6ws->getJson('search'); goto iJ3Z9; xkFEJ: $Nw6ws = InputPackage::buildFromInput(); goto w1EX3; o9LBZ: return Response::generateSuccessPaginateData($j13Tr, $OB9LF, $fFBu8['records'], $fFBu8['total']); goto Mz5Z0; Pt8DD: $AQ4wg = array('search' => array(), 'order' => array('id', 'desc')); goto aLij3; iJ3Z9: if (!empty($oHfcx['status'])) { $AQ4wg['search'][] = array('status' => array('equal' => intval($oHfcx['status']))); } goto Iy3iD; jJ9XL: $OB9LF = 10; goto Pt8DD; w1EX3: $j13Tr = $Nw6ws->getInteger('page'); goto jJ9XL; Mz5Z0: } 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(); } }