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.UserPackage;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserPackageDao extends BaseMapper<UserPackage> {

    List<UserPackage> findList(UserPackage userPackage);

    List<UserPackage> findListByMapping(UserPackage userPackage);

    int insert(UserPackage userPackage);

    int updateStatusByOrder(UserPackage userPackage);

    IPage<UserPackage> findMyPackageList(Page<UserPackage> page, @Param("params") UserPackage userPackage);

    UserPackage getMyPackageById(Long id);

    int deletePackageByOrders(Long ordersId);

}