<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use ModStart\Core\Dao\ModelUtil; class MemberFavoriteUtil { public static function urlFavorite($zmsn6, $QgB_Y, $yTnoO = '') { return modstart_api_url('member_favorite/favorite', array('category' => $zmsn6, 'categoryId' => $QgB_Y, 'redirect' => $yTnoO)); } public static function urlUnfavorite($zmsn6, $QgB_Y, $yTnoO = '') { return modstart_api_url('member_favorite/unfavorite', array('category' => $zmsn6, 'categoryId' => $QgB_Y, 'redirect' => $yTnoO)); } public static function add($wEeRo, $zmsn6, $QgB_Y) { $a_yFh = ModelUtil::get('member_favorite', array('userId' => $wEeRo, 'category' => $zmsn6, 'categoryId' => $QgB_Y)); if (empty($a_yFh)) { ModelUtil::insert('member_favorite', array('userId' => $wEeRo, 'category' => $zmsn6, 'categoryId' => $QgB_Y)); } } public static function delete($wEeRo, $zmsn6, $QgB_Y) { ModelUtil::delete('member_favorite', array('userId' => $wEeRo, 'category' => $zmsn6, 'categoryId' => $QgB_Y)); } public static function clean($zmsn6, $QgB_Y) { ModelUtil::delete('member_favorite', array('category' => $zmsn6, 'categoryId' => $QgB_Y)); } public static function exists($wEeRo, $zmsn6, $QgB_Y) { return ModelUtil::exists('member_favorite', array('userId' => $wEeRo, 'category' => $zmsn6, 'categoryId' => $QgB_Y)); } public static function paginate($wEeRo, $zmsn6, $WLCMC, $Aqj3Z, $f2U49 = array()) { goto dHYco; dHYco: $f2U49['where']['userId'] = $wEeRo; goto kM2Zk; kM2Zk: $f2U49['where']['category'] = $zmsn6; goto gLYz3; gLYz3: return ModelUtil::paginate('member_favorite', $WLCMC, $Aqj3Z, $f2U49); goto UKZXx; UKZXx: } }