package com.zcxk.rmcp.web.service.impl;

import com.zcxk.core.oauth2.util.UserUtil;
import com.zcxk.rmcp.api.vo.ProductCategoryVo;
import com.zcxk.rmcp.web.service.ProductCategoryService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.zcxk.rmcp.core.entity.ProductCategory;
import com.zcxk.rmcp.core.dao.ProductCategoryMapper;

import java.util.List;

/**
 * 
 * @author linqingwei
 * @date 2021-07-21 17:00
 */
@Service
public class ProductCategoryServiceImpl implements ProductCategoryService {

    @Resource
    private ProductCategoryMapper productCategoryMapper;

    @Override
    public int insertSelective(ProductCategory record) {
        return productCategoryMapper.insertSelective(record);
    }

    @Override
    public int updateByPrimaryKeySelective(ProductCategory record) {
        return productCategoryMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public List<ProductCategoryVo> listProductCategory() {
        return productCategoryMapper.listProductCategory(UserUtil.getCurrentUser().getUserCondition());
    }

}
