package com.izouma.awesomeadmin.service;

import java.util.*;

import com.izouma.awesomeadmin.dto.Page;
import com.izouma.awesomeadmin.dto.Result;
import com.izouma.awesomeadmin.model.UserOrder;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * service接口类
 */
public interface UserOrderService {

    List<UserOrder> getUserOrderList(UserOrder record);

    List<UserOrder> getUserOrderByPage(Page page, UserOrder record);

    UserOrder getUserOrderById(String id);

    UserOrder getUserOrder(UserOrder record);

    boolean createUserOrder(UserOrder record);

    boolean deleteUserOrder(String id);

    boolean updateUserOrder(UserOrder record);

    Result payOrder(String orderId, double coin, double point, double cash, int payMode);

    Result payOrder(HttpServletRequest request, HttpServletResponse response);

    double calculatedPrice(String orderId, double coin, double point);

    void alipaySuccess(String tradeNo, String tradeStatus);

    Result recharge(HttpServletRequest request, HttpServletResponse response);

    Result cancel(UserOrder record);

    /**
     * <p>确认收货。</p>
     *
     * @param
     * @return
     */
    Result confirm(UserOrder record);

    /**
     * <p>结算订单。</p>
     *
     * @return
     */
    Result jieSuan(String orderId);

    /**
     * <p>退款。</p>
     *
     * @param orderId
     * @return
     */
    Result refundOrder(String orderId);

    /**
     * <p>退款失败，被拒绝。</p>
     *
     * @param orderId
     * @return
     */
    Result refundFail(String orderId);

    /**
     * <p>。自动执行任务</p>
     *
     * @return
     */
    Result ziDong();

    /**
     * 自动取消
     *
     * @return
     */
    Result autoCancel();

    boolean repair(UserOrder record);
}

