package com.xhpc.user.service;

import com.xhpc.common.core.web.domain.AjaxResult;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @author yuyang
 * @date 2021/12/29 11:10
 */
public interface IXhpcCommonService {

    /**
     * 根据用户手机号获取用户信息
     */
    Map<String, Object> getLandUser(String phone,Long userId,Integer type,String serialNumber,String tenantId);

    /**
     * 根据用户类型，用户id，充值记录，增加流水
     * @param money          充值金额
     * @param userId          充值用户
     * @param userType        用户类型
     * @param tenantId        租户id
     * @param type            充值渠道（1微信 2支付宝  3平台)
     * @param status           1 充值 2退款
     * @param remark          备注
     * @return
     */
    AjaxResult insertUserBalance(BigDecimal money, Long userId, Integer userType, String tenantId, Integer type,Integer status,String remark,Long moneyOrderId);

    /**
     * 获取该机构的折扣比例
     * @param userId          充值用户
     * @param userType        用户类型
     * @param tenantId        租户id
     * @param chargingStationId  场站id
     * @return
     */
    AjaxResult getMechanismDiscount(Long userId, Integer userType, String tenantId, Long chargingStationId);


    /**
     * 根据用户手机号获取用户信息
     */
    List<Map<String, Object>> getPersonnelStatistics(String tenantId,Long terminalId,Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account,String startTime,String endTime,String mark);


    void getPersonnelStatisticsExport(HttpServletResponse response,String tenantId,Long terminalId, Long operatorId, Long chargingStationId, Long chargingPileId, Integer type, String name , String phone, String account,String startTime,String endTime,String mark)throws IOException;
}
