package com.css.txw.gxzx.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.css.txw.gxzx.pojo.domain.TxwGxzxGxscbDO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.util.List;

/**
* @author AirlH
* @description 针对表【txw_gxzx_gxscb(供需收藏表)】的数据库操作Mapper
* @createDate 2025-09-19 14:05:38
* @Entity com.css.txw.gxzx.pojo.domain.TxwGxzxGxscb
*/
public interface TxwGxzxGxscbMapper extends BaseMapper<TxwGxzxGxscbDO> {

    default List<TxwGxzxGxscbDO> getByYhuuid(String yhUuid){
         QueryWrapper<TxwGxzxGxscbDO> wrapper = new QueryWrapper<>();
         wrapper.lambda().eq(TxwGxzxGxscbDO::getYhUuid,yhUuid);
         return selectList(wrapper);
    }

    default List<TxwGxzxGxscbDO> getByGxuuidandYhuuid(String gxUuid, String yhUuid){
        QueryWrapper<TxwGxzxGxscbDO> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(TxwGxzxGxscbDO::getGxUuid,gxUuid)
                .eq(TxwGxzxGxscbDO::getYhUuid,yhUuid);
        return selectList(wrapper);
    }

    default void removeByGxuuidAndYhuuid(String gxUuid, String yhUuid){
        QueryWrapper<TxwGxzxGxscbDO> wrapper = new QueryWrapper<>();
        wrapper.lambda().eq(TxwGxzxGxscbDO::getGxUuid,gxUuid)
                .eq(TxwGxzxGxscbDO::getYhUuid,yhUuid);
        delete(wrapper);
    }
}




