package com.jpsoft.shinestar.modules.base.service;

import java.util.List;
import java.util.Map;
import com.jpsoft.shinestar.modules.base.entity.ParkingMerchant;
import com.github.pagehelper.Page;
import com.jpsoft.shinestar.modules.common.dto.Sort;

public interface ParkingMerchantService {
	ParkingMerchant get(String id);
	boolean exist(String id);
	int insert(ParkingMerchant model);
	int update(ParkingMerchant model);
	int delete(String id);
	List<ParkingMerchant> list();
	Page<ParkingMerchant> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
	ParkingMerchant findByMerchantNo(String merchantNo);


	/**
	 * 创建商户
	 * @param companyId
	 * @param merchantName
	 * @param money
	 * @return
	 */
	ParkingMerchant createMerchant(String merchantNo,String companyId,String merchantName,String money) throws Exception;



	void deleteMerchant(String id) throws Exception;


	/**
	 * 创建商户操作人员
	 * @param parkingMerchant
	 */
	void createShopMember(ParkingMerchant parkingMerchant) throws Exception;

	/**
	 * 赠送优惠券
	 * @param parkingMerchant
	 */
	void giveReductionTicket(ParkingMerchant parkingMerchant) throws Exception;


	/**
	 * 生成优惠券
	 * @param carNumber
	 * @param parkingMerchant
	 */
	String createReductionTicket(String carNumber, ParkingMerchant parkingMerchant) throws Exception;

	/**
	 * 用券
	 * @param carNumber
	 * @param code
	 * @param parkingMerchant
	 */
	void useReductionTicket(String carNumber, String code, ParkingMerchant parkingMerchant) throws Exception;
}