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.Product;
import org.springblade.modules.service.ProductService;
import org.springframework.stereotype.Service;

import com.google.api.client.util.Lists;
@Service
@ServiceMethodBean(value = "product", desc = "商品")
public class ProductServiceImpl implements ProductService {
	@ServiceMethod(method = "load", desc = "sku列表")
	public Product getById(Long id){
		Product p=new Product();
		p.setId(100l);
		p.setProductCategoryId(10l);
		p.setName("product_100");
		return p;
	}
	@ServiceMethod(method = "list", desc = "sku列表")
	public List<Product> findAll(){
		List<Product> ps=Lists.newArrayList();
		Product p=new Product();
		p.setId(100l);
		p.setProductCategoryId(10l);
		p.setName("product_100");
		ps.add(p);
		p=new Product();
		p.setId(101l);
		p.setProductCategoryId(11l);
		p.setName("product_101");
		ps.add(p);
		return ps;
	}
}
