package com.platform.yijia.service;

import com.platform.yijia.param.request.PayOrderRequest;
import com.platform.yijia.pojo.AppUserInfo;
import com.platform.yijia.pojo.CustomerManage;
import com.platform.yijia.pojo.PayOrder;

import java.util.List;
import java.util.Map;

public interface PayOrderService {

    //查询POS机近七天数据
    List<Map<String, Object>> selectPosRecentlySevenData(PayOrder payOrder);

    //获取POS机昨天数据
    Map<String, Object> selectPosYesterDayData(PayOrder payOrder);

    //查询汇总数据
    List<Map> selectSum(PayOrder payOrder);

     //根据订单号查询订单信息
     List<PayOrder> getPayOrderList(String orderNo);

     //查询班结时间内订单
     List<PayOrder> selectPayOrderList(PayOrder payOrder);

     //查询订单信息
     PayOrder getPayOrderInfoMin(PayOrder payOrder);

     //修改订单状态
     int getUpdatePayOrder(PayOrder payOrder);

     //根据订单号查询
     PayOrder searchPayOrder(Integer orderId);

     //根据手机号查询用户信息
    List<AppUserInfo> getUserInfoByOpenId(AppUserInfo appUserInfo);

    /*
     * 根据用户openId和用户类型userType查询用户订单
     * @param payOrder
     * @return
     */
    List<PayOrder> getOrderListByOpenIdAndUserType(AppUserInfo appUserInfo);

    /*
     * 根据订单号查询订单信息和用户信息  注：此方法在随行付回调校验之后修改状态完成后
     * @param payOrder
     * @return
     */
    Map<String, Object> getOrderInfoAndUserInfoByOrderNo(PayOrder payOrder);

    /*
     * 判断该客户是否存在
     * @param customerManage
     * @return
     */
    CustomerManage isExistCustomer(CustomerManage customerManage);

    //更新客户表
    void updateCustomer(CustomerManage customerManage);

    //插入客户表
    void insertCustomer(CustomerManage customerManage);

    /*
     *  根据手机号更新客户表
     * @param customerManage
     */
    void updateCustomerByPhoneNumber(CustomerManage customerManage);
}
