Syncstore.php 640 Bytes
<?php

/**
 * 同步店铺
 * @author tongdesheng
 *
 */
class YHMSearch_Syncstore extends YHMSearch_Core {
	
	private $_urlPath = 'syncstore';
	
	/**
	 * 可接受的字段
	 * @var array
	 */
	private $_fields = array('store_id','nick_name','store_type','star','status');
	
	/**
	 * 
	 * @param array $params
	 */
	public function sync($params) {
		$syncParams = array();
		foreach($this->_fields as $field) {
			if(isset($params[$field])) {
				$syncParams[$field] = $params[$field];
			}
		}
		$retData = $this->req($this->_urlPath, $syncParams);
		if($retData['syncstore'] == 'success') {
			return true;
		}
		return false;
		
	}


}