package com.sqx.modules.bl.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sqx.modules.bl.order.entity.UserPackageOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserPackageOrderDao extends BaseMapper<UserPackageOrder> {

    IPage<UserPackageOrder> findPage(Page<UserPackageOrder> page, @Param("params") UserPackageOrder userPackageOrder);

    UserPackageOrder getById(Long ordersId);

    UserPackageOrder getByNo(String ordersNo);

    List<UserPackageOrder> findCoupon(UserPackageOrder userPackageOrder);

    int refund(UserPackageOrder userPackageOrder);

    int insertOrders(UserPackageOrder userPackageOrder);

    int insertCoupon(UserPackageOrder userPackageOrder);

    List<UserPackageOrder> selectOrdersStatusByTime(String time);

    IPage<UserPackageOrder> findUserPackageOrders(Page<UserPackageOrder> page,@Param("params") UserPackageOrder userPackageOrder);

    int updateStatus(UserPackageOrder userPackageOrder);

    List<UserPackageOrder> getActivityOrderList(Long id,Integer status);

    List<UserPackageOrder> getActivityOrderListByGroupNo(String groupNo,Long userId);

    int updateStatusByGroupNo(UserPackageOrder userPackageOrder);

    List<UserPackageOrder> getUnGroupOrderList();

}