李雨欣 8.26 15:34 测试查询商品全部数据接口
parent
c48f66c815
commit
26a3145a1d
|
@ -42,7 +42,15 @@ public class ProductController {
|
|||
return Result.success(productService.findByproductList(productListResp));
|
||||
}
|
||||
|
||||
//上传一下 我排一下错误 好的 别动啊 好的 昨天分支好像也有一点点问题 我组长框框跑建木
|
||||
/**
|
||||
* 测试 查询所有商品信息
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(path = "/productList",method = RequestMethod.GET)
|
||||
@Operation(summary = "查询所有商品信息",description = "查询所有商品信息")
|
||||
public Result<List<Product>> findByproductList(){
|
||||
return Result.success(productService.findProductList());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
@ -56,7 +64,7 @@ public class ProductController {
|
|||
productService.save(Product.SaveProductList(productSaveReq));
|
||||
return Result.success(null,"操作成功");
|
||||
}
|
||||
// 哈哈哈哈哈 我帮你看看哈 上传git 我们要先pull 然后再push
|
||||
|
||||
|
||||
/**
|
||||
* 修改接口
|
||||
|
|
|
@ -3,11 +3,13 @@ package com.muyu.market.server.service.Impl;
|
|||
import com.alibaba.csp.sentinel.util.StringUtil;
|
||||
import com.alibaba.nacos.common.utils.StringUtils;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.muyu.market.admain.Product;
|
||||
import com.muyu.market.admain.response.ProductListResp;
|
||||
import com.muyu.market.server.mapper.ProductMapper;
|
||||
import com.muyu.market.server.service.ProductService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -15,6 +17,10 @@ import java.util.stream.Collectors;
|
|||
|
||||
@Service
|
||||
public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> implements ProductService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private ProductMapper productMapper;
|
||||
@Override
|
||||
public List<ProductListResp> findByproductList(ProductListResp productListResp) {
|
||||
|
||||
|
@ -55,4 +61,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
|||
//mybatis-plus 我仔看看哈 实在看不出来 就找组长吧
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Product> findProductList() {
|
||||
QueryWrapper<Product> objectQueryWrapper = new QueryWrapper<>(null);
|
||||
return productMapper.selectList(objectQueryWrapper);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,4 +15,6 @@ public interface ProductService extends IService<Product> {
|
|||
*/
|
||||
List<ProductListResp> findByproductList(ProductListResp productListResp);
|
||||
|
||||
List<Product> findProductList();
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue