package com.willalp.event.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.willalp.event.domain.HsEventBusinessRelation;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 事件相关业务关系Mapper接口
 *
 * @author willalp
 * @date 2023-01-29
 */
public interface HsEventBusinessRelationMapper extends BaseMapper<HsEventBusinessRelation>
{
    /**
     * 查询事件相关业务关系列表
     *
     * @param hsEventBusinessRelation 事件相关业务关系
     * @return 事件相关业务关系集合
     */
    List<HsEventBusinessRelation> selectHsEventBusinessRelationList(HsEventBusinessRelation hsEventBusinessRelation);


    /**
     * 代理删除购物车已过期商品
     *
     * @param id
     * @return
     */
    @Delete("DELETE FROM hs_user_shop_car  WHERE json_data ->> '$.giftId' = #{id}")
    int agencyDeleteShopCar(@Param("id") String id);
}
