<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Member\Util; use ModStart\Core\Dao\ModelUtil; class MemberFavoriteUtil { public static function urlFavorite($WDJxG, $tKN9l, $C30Ed = '') { return modstart_api_url('member_favorite/favorite', array('category' => $WDJxG, 'categoryId' => $tKN9l, 'redirect' => $C30Ed)); } public static function urlUnfavorite($WDJxG, $tKN9l, $C30Ed = '') { return modstart_api_url('member_favorite/unfavorite', array('category' => $WDJxG, 'categoryId' => $tKN9l, 'redirect' => $C30Ed)); } public static function add($N2Bvr, $WDJxG, $tKN9l) { $Kwhgm = ModelUtil::get('member_favorite', array('userId' => $N2Bvr, 'category' => $WDJxG, 'categoryId' => $tKN9l)); if (empty($Kwhgm)) { ModelUtil::insert('member_favorite', array('userId' => $N2Bvr, 'category' => $WDJxG, 'categoryId' => $tKN9l)); } } public static function delete($N2Bvr, $WDJxG, $tKN9l) { ModelUtil::delete('member_favorite', array('userId' => $N2Bvr, 'category' => $WDJxG, 'categoryId' => $tKN9l)); } public static function clean($WDJxG, $tKN9l) { ModelUtil::delete('member_favorite', array('category' => $WDJxG, 'categoryId' => $tKN9l)); } public static function exists($N2Bvr, $WDJxG, $tKN9l) { return ModelUtil::exists('member_favorite', array('userId' => $N2Bvr, 'category' => $WDJxG, 'categoryId' => $tKN9l)); } public static function paginate($N2Bvr, $WDJxG, $JcqUq, $WrYIu, $iNhXN = array()) { goto m_tRl; RORkJ: return ModelUtil::paginate('member_favorite', $JcqUq, $WrYIu, $iNhXN); goto ouloM; puM39: $iNhXN['where']['category'] = $WDJxG; goto RORkJ; m_tRl: $iNhXN['where']['userId'] = $N2Bvr; goto puM39; ouloM: } }