package com.ssm.manage.service;


import com.github.pagehelper.PageInfo;
import com.ssm.manage.dto.PlatformCouponDto;
import com.ssm.manage.entity.PlatformCoupon;
import com.ssm.manage.entity.SmsException;
import com.ssm.manage.entity.UploadFiles;
import com.ssm.manage.query.PlatformCouponRequest;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
 * (PlatformCoupon)表服务接口
 *
 * @author makejava
 * @since 2022-06-11 14:58:52
 */
public interface PlatformCouponService {

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return
     */
    public PlatformCoupon queryById(Serializable id);

    /**
     * 分页查询
     *
     * @param dto
     * @return
     */
    public PageInfo<PlatformCoupon> queryByPage(PlatformCouponDto dto);

    /**
     * 新增
     *
     * @param platformCoupon
     * @return
     */
    public int add(PlatformCouponRequest platformCoupon, String key, List<UploadFiles> uploadFilesInfo) throws SmsException;

    /**
     * 编辑
     *
     * @param platformCoupon
     * @return
     */
    public int edit(PlatformCouponRequest platformCoupon,String key,List<UploadFiles> uploadFilesInfo) throws SmsException;

    /**
     * 根据主键删除
     *
     * @param id 主键
     * @return
     */
    public int delete(Serializable id);


    /**
     * 审核
     */
    int audit(PlatformCouponRequest platformCoupon,String key) throws SmsException;


    int newCheck(PlatformCoupon platformCoupon,String key) throws SmsException;//新建审核
    int shopCheck(PlatformCouponRequest platformCoupon,String key) throws SmsException;//门店审核
    int platformCheck(PlatformCouponRequest platformCoupon,String key) throws SmsException;//平台审核

    int moneyReceipt(PlatformCouponRequest platformCoupon, String key, List<UploadFiles> uploadFilesInfo) throws SmsException;

    List<PlatformCoupon> shareDiscounts(PlatformCouponDto dto);

    void thePublic(HttpServletRequest request, HttpServletResponse response,String key) throws Exception;
    void thePublic(HttpServletRequest request, HttpServletResponse response, String key, HttpSession session) throws Exception;

    List<String>  obtainOpenid(HttpServletRequest request, HttpServletResponse response);

    String obtainPhone(String accessToken, String code);

    String generateUniPayXml(String openId ,String ipAddress, String money);
    Map<String, String> secondSign(Map<String, String> unifiedOrderMap);
}