package com.ruoyi.frequency.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.controller.req.OrdinaryAuthReq;
import com.ruoyi.frequency.auth.entity.Auth;
import com.ruoyi.frequency.auth.model.result.AuthCount;
import com.ruoyi.response.ResponseData;
import com.ruoyi.vo.UserVo;

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

/**
 * 平台认证Service接口
 *
 * @author liwenlong
 * @date 2023-10-18
 */
public interface AuthService extends IService<Auth>
{
    /**
     * 查询平台认证
     *
     * @param id 平台认证主键
     * @return 平台认证
     */
    public Auth selectAuthById(Long id);

    /**
     * 查询平台认证列表
     *
     * @param auth 平台认证
     * @return 平台认证集合
     */
    public List<Auth> selectAuthList(Auth auth);

    AuthCount statistics(Auth auth);

    /**
     * 新增平台认证
     *
     * @param auth 平台认证
     * @return 结果
     */
    public int insertAuth(Auth auth);

    /**
     * 修改平台认证
     *
     * @param auth 平台认证
     * @return 结果
     */
    public int updateAuth(Auth auth);

    /**
     * 批量删除平台认证
     *
     * @param ids 需要删除的平台认证主键集合
     * @return 结果
     */
    public int deleteAuthByIds(Long[] ids);

    /**
     * 删除平台认证信息
     *
     * @param id 平台认证主键
     * @return 结果
     */
    public int deleteAuthById(Long id);


    /**
     * 审核
     * @param auth
     * @return
     */
    int process(Auth auth);


    /**
     * 普通认证
     * @param req
     * @param userVo
     * @return
     */
    ResponseData ordinaryAuth(OrdinaryAuthReq req, UserVo userVo);


    /**
     * 普通认证详情
     * @param userVo
     * @return
     */
    ResponseData<Auth> ordinaryAuthDetail(Integer type,UserVo userVo);

    /**
     * 支付宝回调
     * @param request
     * @param response
     * @return
     */
    ResponseData authAliNotify(HttpServletRequest request, HttpServletResponse response);

    /**
     * 微信回调
     * @param request
     * @param response
     * @return
     */
    ResponseData authWxNotify(HttpServletRequest request, HttpServletResponse response);

    ResponseData authLakalaNotify(Map<String, String> paramMap);
}
