package org.linlinjava.jz.db.service;

import org.linlinjava.jz.db.dao.JzGoodsCategoryMapper;
import org.linlinjava.jz.db.domain.JzGoodsCategory;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author fuxubing
 */
@Service
public class JzGoodsCategoryService {
    @Resource
    private JzGoodsCategoryMapper jzGoodsCategoryMapper;

    public List<JzGoodsCategory> query() {

        return jzGoodsCategoryMapper.query();
    }

    public List<JzGoodsCategory> selectByPidAndLevel(Integer pid, String level) {
        return jzGoodsCategoryMapper.selectByPidAndLevel(pid, level);
    }

    public JzGoodsCategory selectById(Integer goodsId) {
        return jzGoodsCategoryMapper.selectByPrimaryKey(goodsId);
    }
}
