<?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 zbgSP; gmny1: $Aqj3Z = 10; goto p5Jsu; Ip9A7: if (!empty($mNCUj['status'])) { $f2U49['search'][] = array('status' => array('equal' => intval($mNCUj['status']))); } goto z3A2U; IsBUU: $WLCMC = $tBuXm->getInteger('page'); goto gmny1; zbgSP: $tBuXm = InputPackage::buildFromInput(); goto IsBUU; l35Bz: return Response::generateSuccessPaginateData($WLCMC, $Aqj3Z, $Nv2EE['records'], $Nv2EE['total']); goto dYHXs; J64Oc: $mNCUj = $tBuXm->getJson('search'); goto Ip9A7; z3A2U: $Nv2EE = MemberMessageUtil::paginate(MemberUser::id(), $WLCMC, $Aqj3Z, $f2U49); goto l35Bz; p5Jsu: $f2U49 = array('search' => array(), 'order' => array('id', 'desc')); goto J64Oc; dYHXs: } 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(); } }