package com.yn.bftl.thirdparty.modules.chinaums.service;

import com.alibaba.fastjson.JSONObject;
import com.yn.bftl.thirdparty.modules.chinaums.dto.ChinaumsPostDTO;
import com.yn.bftl.thirdparty.modules.chinaums.vo.BankLineNumberVO;
import com.yn.bftl.thirdparty.modules.chinaums.vo.ChinaumsImageVO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * 银联工具服务
 *
 * @author huabiao
 * @create 2022/12/6  18:25
 **/
public interface ToolService {

    /**
     * 银联-图片上传
     *
     * @param file :文件
     * @param type
     * @return 银联图片VO
     * @author huabiao
     * @create 2022/12/6  9:57
     */
    ChinaumsImageVO uploadImage(MultipartFile file, String type);

    /**
     * 银行-列表查询
     *
     * @param keyword:关键字
     * @return 银行列表
     * @author huabiao
     * @create 2022/12/6  18:44
     */
    Page<BankLineNumberVO> getBankList(String keyword, Pageable pageable);

    /**
     * 打款金额验证
     *
     * @param amount:打款金额
     * @return TRUE:正确,FALSE:不正确
     * @description
     * @author huabiao
     * @create 2022/12/7  11:34
     */
    Boolean amountValidate(BigDecimal amount);

    /**
     * 银联-发送验证码
     *
     * @param mobile :手机号
     * @author huabiao
     * @create 2022/12/7  13:45
     */
    void smsCodes(String mobile);

    /**
     * 获取平台对账单下载接口
     *
     * @param billDate
     * @return
     */
    String tradeBills(LocalDate billDate);

    /**
     * 重置支付密码-发送验证码
     *
     * @author huabiao
     * @create 2023/3/2  16:04
     */
    void smsCodesForResetPassword();

    /**
     * 银联调用
     *
     * @param chinaumsPostDTO 请求参数
     * @author huabiao
     * @create 2023/4/3  16:06
     */
    JSONObject postTool(ChinaumsPostDTO chinaumsPostDTO);
}
