src/com/shop/service/OsProductService.java
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.shop.service;
import java.util.*;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.shop.dao.*;
import com.shop.po.*;
import com.shop.vo.*;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class OsProductService {
@Autowired
private OsProductMapper osProductMapper;
@Autowired
private OsProductCategoryMapper osProductCategoryMappert;
@Autowired
private OsProductDetailMapper osProductDetailMapper;
@Autowired
private OsProductImageMapper osProductImageMapper;
@Autowired
private OsProductParameterMapper osProductParameterMapper;
@Autowired
private OsProductSpecificationMapper osProductSpecificationMapper;
@Autowired
private OsSpecificationAttributeMapper osSpecificationAttributeMapper;
@Autowired
private OsSpecificationMapper osSpecificationMapper;
@Autowired
private OsCategoryMapper osCategoryMapper;
@Autowired
private OsCategoryService osCategoryService;
@Autowired
private OsCommentMapper commentDao;
/**
* 查询热门分类商品
*/
public ArrayList<HotCategoryVO> getHotCategory() {
//先查找大类的二级类 在查找父类下的商品
ArrayList<HotCategoryVO> categorys = osProductMapper.getAllCategory();
for (HotCategoryVO hot : categorys) {
List<CategoryVO> child = hot.getChildrenCategorys();
for (CategoryVO vo : child) {
List<OsProduct> list = osProductMapper.getHotProduct(vo);
vo.setProducts(list);
}
}
return categorys;
}
/**
* 查询商品详情
*/
public OsProduct getProductDetil(Long productNumber) {
后面还有 171 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。