package com.iamberry.wechat.face.integral;

import com.iamberry.wechat.core.entity.integral.IntegralCart;
import com.iamberry.wechat.core.entity.integral.IntegralOrder;
import com.iamberry.wechat.core.entity.integral.IntegralProduct;
import com.iamberry.wechat.core.entity.member.Member;
import com.iamberry.wechat.core.entity.page.PageRequest;
import com.iamberry.wechat.core.entity.page.PagedResult;

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

/**
 *  积分商城订单表接口
 * @author ys
 * @Date 2018-04-28
 */
public interface IntegralOrderService {

    /**
     * 添加订单
     * @param openId
     * @param integralCartList
     * @return
     */
    Map<String,Object> addOrder(String openId, List<IntegralCart> integralCartList);

    /**
     * 获取订单集合与订单项集合
     * @param integralOrder
     * @return
     */
    List<IntegralOrder> getIntegralOrderListAndItem(IntegralOrder  integralOrder);

    /**
     * 获取集合
     * @param  integralOrder
     * @return List
     */
    List<IntegralOrder> getIntegralOrderList(IntegralOrder  integralOrder);

    PagedResult<IntegralOrder> listIntegralProductPage(PageRequest<IntegralOrder> pageRequest);

    /**
     * 查询单条数据
     * @param  id
     * @return  integralOrder
     */
    IntegralOrder getIntegralOrderById(String  id);
    /**
     * 增加数据
     * @param  integralOrder
     * @return Integer
     */
    Integer  save(IntegralOrder  integralOrder);
    /**
     * 修改数据
     * @param  integralOrder
     * @return Integer
     */
    Integer  update(IntegralOrder  integralOrder);
    /**
     * 删除数据
     * @param  id
     * @return Integer
     */
    Integer  delete(String  id);
}