src/main/java/com/byh/biyesheji/service/impl/ForeServiceImpl.java
(完整代码) 1KBpackage com.byh.biyesheji.service.impl;
import com.byh.biyesheji.dao.CategoryMapper;
import com.byh.biyesheji.dao.ProductMapper;
import com.byh.biyesheji.pojo.Category;
import com.byh.biyesheji.pojo.CategoryExample;
import com.byh.biyesheji.pojo.Product;
import com.byh.biyesheji.service.ForeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class ForeServiceImpl implements ForeService {
@Autowired
private CategoryMapper categoryMapper;
@Autowired
private ProductMapper productMapper;
@Override
public List<Category> listToThree() {
CategoryExample example = new CategoryExample();
example.createCriteria().andIdBetween(1,4); //从1开始计数
List<Category> categories = categoryMapper.selectByExample(example);
return categories;
}
@Override
public List<Product> getFivePro() {
return productMapper.randFive();
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。