package com.yc.ship.module.product.dal.mysql.pricespu;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.yc.ship.framework.mybatis.core.mapper.BaseMapperX;
import com.yc.ship.module.product.dal.dataobject.pricespu.PriceSpuDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 附加产品设置 Mapper
 *
 * @author 管理员
 */
@Mapper
public interface PriceSpuMapper extends BaseMapperX<PriceSpuDO> {

    default void deleteByObjectId(Long objectId) {
        delete(new LambdaQueryWrapper<PriceSpuDO>().eq(PriceSpuDO::getObjectId, objectId));
    }

    default List<PriceSpuDO> selectListByObjectId(Long id) {
        return selectList(new LambdaQueryWrapper<PriceSpuDO>().eq(PriceSpuDO::getObjectId, id));
    }
}