package com.sqx.modules.goods.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sqx.modules.goods.dao.GoodsRuleValueMapper;
import com.sqx.modules.goods.entity.GoodsRuleValue;
import com.sqx.modules.goods.service.GoodsRuleValueService;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class GoodsRuleValueServiceImpl extends ServiceImpl<GoodsRuleValueMapper, GoodsRuleValue> implements GoodsRuleValueService {

    @Override
    public List<GoodsRuleValue> selectGoodsRuleValue( Long ruleId){
        return baseMapper.selectList(new QueryWrapper<GoodsRuleValue>().eq("rule_id",ruleId));
    }

    @Override
    public int deleteGoodsRuleValue( Long ruleId){
        return baseMapper.delete(new QueryWrapper<GoodsRuleValue>().eq("rule_id",ruleId));
    }

}