<?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 zZYHt; ugIZQ: $iXUoW = $Km8YS->getInteger('page'); goto mIcUA; q2Ia4: if (!empty($N8UD0['status'])) { $r2pbP['search'][] = array('status' => array('equal' => intval($N8UD0['status']))); } goto LPMmY; x6FLo: return Response::generateSuccessPaginateData($iXUoW, $VUK_X, $fPAoT['records'], $fPAoT['total']); goto Xr_ve; AQp_D: $r2pbP = array('search' => array(), 'order' => array('id', 'desc')); goto zqTGt; LPMmY: $fPAoT = MemberMessageUtil::paginate(MemberUser::id(), $iXUoW, $VUK_X, $r2pbP); goto x6FLo; mIcUA: $VUK_X = 10; goto AQp_D; zZYHt: $Km8YS = InputPackage::buildFromInput(); goto ugIZQ; zqTGt: $N8UD0 = $Km8YS->getJson('search'); goto q2Ia4; Xr_ve: } 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(); } }