package com.tzy.base.mapper;

import com.tzy.base.dto.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface SysBaseMapper {

    /**
     * 查询支付配置
     * @param type
     * @param status
     * @return
     */
    public List<String> selectPayType(@Param("type")String type,  @Param("status")String status);

    /**
     * 查询订单详情
     * @param orderNo
     * @return
     */
    public OrderBaseInfoDto selectOrderInfoByCode(String orderNo);

    /**
     * 根据订单编码查询
     * @param orderNo
     * @return
     */
    public List<SysFinanceDto> getFinanceByOrderNo(@Param("orderNo") String orderNo,@Param("type")String type);

    /**
     * 更新财务对账信息
     * @return
     */
    public int updateSysFinance(SysFinanceDto sysFinanceDto);

    /**
     * 新增财务对账信息
     * @param sysFinanceDto
     * @return
     */
    public int insertSysFinance(SysFinanceDto sysFinanceDto);

    /**
     * 根据id查询用户信息
     * @param id
     * @return
     */
    public AppUserInfoDtos searchUserInfoById(Long id);

    /**
     *增加我的积分
     * @param point
     * @param growthNum
     * @param userId
     * @return
     */
    public int addVipPoint(@Param("point")Integer point,@Param("growthNum")Integer growthNum,@Param("userId")Integer userId);

    /**
     * 新增积分获取记录
     * @param userPointRecordDto
     * @return
     */
    public int insertAppUserPointRecord(UserPointRecordDto userPointRecordDto);

    /**
     * 新增系统消息记录
     * @param noticeRecord
     * @return
     */
    public int insertSysNoticeRecord(SysNoticeRecordDto noticeRecord);

    /**
     *
     * @param username
     */
    public SysMerchantDto selectMerchantInfo(@Param("username")String username);

    public String getAppMenuByCode (@Param("code") String code);

    public MerchantDto selectMerchantInfoByid(@Param("id") Long id);

    public AddressInfoDto searchAddressById(Integer id);
    public List<DictBaseDto> selectDictDataByType(@Param("type")String type,@Param("key")String key);

    public List<DictBaseDto> selectDictDataByLabel(@Param("type")String type,@Param("key")String key);
    public List<DictBaseDto> selectDictDataByDictType(@Param("type")String type);
    //查询店配规则信息
    public List<ExpresPriceDto> selectExpresPriceRules(ExpresPriceDto expresPriceDto);
    //查询店配规则信息
    public List<ExpresPriceDto> selectExpresPriceRulesV2(ExpresPriceDto expresPriceDto);
    //保存用户银行卡信息
    public int addUserBankInfo(BankInfoDto bankInfoDto);

    public int bandUserBankInfo(BankInfoDto bankInfoDto);
    public int unbandUserBankInfo(BankInfoDto bankInfoDto);
    //查询用户的绑定银行卡信息
    public BankInfoDto selectUserBankInfoById(@Param("userId") Integer userId,@Param("id") Integer id);

    public BankInfoDto selectUserRechargeAccountInfo(BankInfoDto bankInfoDto);

    public BankInfoDto selectUserBankInfoByAccount(BankInfoDto bankInfoDto);

    public BankInfoDto selectMerchantInfoByAccount(BankInfoDto bankInfoDto);
    public List<BankInfoDto> selectUserBankInfoByUserId(@Param("userId") Integer userId,@Param("status") Integer status,@Param("type") String type);

    public List<BankInfoDto> selectUserBankInfo(BankInfoDto bankInfoDto);

    public ChecklistBaseConfigDto selectChecklistBaseConfigAndPrice (Integer id);
//    v2
    public ChecklistBaseConfigDto selectChecklistBaseConfigAndPriceV2 (Integer id);
    public Integer selectChecklistBaseCustom (Integer id);

    public String selectChecklistBasePresaleTime (Integer id);

    public String selectChecklistBasePresaleTimeV2 (Integer id);

    String selectChecklistBaseConfig (@Param("groupInfoId") Long groupInfoId);

    List<MerchantDetailDto> selectByMerchantIdAndColumnNames(@Param("id") Integer id, @Param("columnNames") Set<String> columnNames);

}
