package com.lyq.action;

import java.util.List;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.lyq.model.product.ProductCategory;
import com.lyq.model.product.ProductInfo;
@Scope("prototype")
@Controller("indexAction")
public class IndexAction extends BaseAction {
	private static final long serialVersionUID = 1L;
	@Override
	public String execute() throws Exception {
		// 查询所有类别
		String where = "where parent is null";
		categories = categoryDao.find(-1, -1, where, null).getList();
		// 查询推荐的商品
		product_commend = productDao.findCommend();
		// 查询销量最高的商品
		product_sellCount = productDao.findSellCount();
		// 查询人气高的商品
		product_clickcount = productDao.findClickcount();
		return SUCCESS;
	}
	
	// 所有类别
	private List<ProductCategory> categories;
	// 推荐商品
	private List<ProductInfo> product_commend;
	// 销售最好的商品
	private List<ProductInfo> product_sellCount;
	// 人气最高的商品
	private List<ProductInfo> product_clickcount;
	public List<ProductCategory> getCategories() {
		return categories;
	}
	public void setCategories(List<ProductCategory> categories) {
		this.categories = categories;
	}
	public List<ProductInfo> getProduct_commend() {
		return product_commend;
	}
	public void setProduct_commend(List<ProductInfo> productCommend) {
		product_commend = productCommend;
	}
	public List<ProductInfo> getProduct_sellCount() {
		return product_sellCount;
	}
	public void setProduct_sellCount(List<ProductInfo> productSellCount) {
		product_sellCount = productSellCount;
	}
	public List<ProductInfo> getProduct_clickcount() {
		return product_clickcount;
	}
	public void setProduct_clickcount(List<ProductInfo> productClickcount) {
		product_clickcount = productClickcount;
	}
}
最近下载更多
hongdongdong  LV12 2023年12月16日
微信网友_6680567232876544  LV8 2023年10月10日
2036495585  LV9 2023年9月25日
pangxiangdong  LV4 2023年3月12日
xiaowangjj  LV4 2023年2月15日
微信网友_5966087716769792  LV9 2022年9月2日
309681  LV5 2022年5月11日
kuoluoluo  LV3 2022年4月18日
149872g  LV2 2022年3月28日
不停的奔跑  LV20 2022年3月5日
最近浏览更多
zrz666  LV1 4月18日
刘孟飞  LV19 3月29日
heshao  LV2 1月11日
a2418735612  LV1 1月4日
1765281247 1月2日
暂无贡献等级
asddwh  LV12 2023年12月26日
1601547803  LV1 2023年12月26日
2517958616  LV1 2023年12月26日
qxs110  LV1 2023年12月25日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友