src/cn/itbaizhan/shop/product/action/ProductAction.java
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package cn.itbaizhan.shop.product.action;
import cn.itbaizhan.shop.category.service.CategoryService;
import cn.itbaizhan.shop.product.service.ProductService;
import cn.itbaizhan.shop.product.vo.Product;
import cn.itbaizhan.shop.utils.PageBean;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
/**
* 商品的Action对象
*/
public class ProductAction extends ActionSupport implements
ModelDriven<Product> {
// 用于接收数据的模型驱动.
private Product product = new Product();
// 注入商品的Service
private ProductService productService;
// 接收分类cid
private Integer cid;
// 接收二级分类id
private Integer csid;
public Integer getCsid() {
return csid;
}
public void setCsid(Integer csid) {
this.csid = csid;
}
// 注入一级分类的Service
private CategoryService categoryService;
// 接收当前页数:
private int page;
public void setPage(int page) {
this.page = page;
}
public void setCategoryService(CategoryService categoryService) {
this.categoryService = categoryService;
}
public void setCid(Integer cid) {
this.cid = cid;
}
public Integer getCid() {
return cid;
}
public void setProductService(ProductService productService) {
this.productService = productService;
}
public Product getModel() {
return product;
后面还有 27 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。