package org.springblade.modules.service.impl;

import java.util.List;

import org.springblade.core.function.annotation.ServiceMethod;
import org.springblade.core.function.annotation.ServiceMethodBean;
import org.springblade.modules.entity.ProductCategory;
import org.springblade.modules.service.ProductCategoryService;
import org.springframework.stereotype.Service;

import com.google.common.collect.Lists;
@Service
@ServiceMethodBean(value = "productCategory", desc = "商品分类")
public class ProductCategoryServiceImpl implements ProductCategoryService {
	@ServiceMethod(method = "load", desc = "商品分类")
	public ProductCategory getById(Long id){
		ProductCategory p=new ProductCategory();
		p.setId(10l);
		p.setName("productCategory_10");
		return p;
	}
	@ServiceMethod(method = "list", desc = "商品分类")
	public List<ProductCategory> find(List<Long> ids){
		List<ProductCategory> list=Lists.newArrayList();
		for(Long id:ids) {
			ProductCategory p=new ProductCategory();
			p.setId(id);
			p.setName("productCategory_"+id);
			list.add(p);
		}
		return list;
	}
}
