李雨欣 8.28 19:51 查询订单信息接口迭代
parent
2447cb8af6
commit
836345a54e
|
@ -51,7 +51,6 @@ public class OrdersController {
|
||||||
@RequestMapping(path = "/orderSelect",method = RequestMethod.POST)
|
@RequestMapping(path = "/orderSelect",method = RequestMethod.POST)
|
||||||
@Operation(summary = "查询订单",description = "根据接口查看订单信息")
|
@Operation(summary = "查询订单",description = "根据接口查看订单信息")
|
||||||
public Result<List<OrdersSelectResp>> findByorderList(@RequestBody OrdersSelectResp ordersSelectResp){
|
public Result<List<OrdersSelectResp>> findByorderList(@RequestBody OrdersSelectResp ordersSelectResp){
|
||||||
|
|
||||||
return Result.success(orderService.findByorderList(ordersSelectResp));
|
return Result.success(orderService.findByorderList(ordersSelectResp));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,19 +1,15 @@
|
||||||
package com.muyu.market.server.service.Impl;
|
package com.muyu.market.server.service.Impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.market.admain.Orders;
|
import com.muyu.market.admain.Orders;
|
||||||
import com.muyu.market.admain.Product;
|
import com.muyu.market.admain.Product;
|
||||||
import com.muyu.market.admain.response.OrdersSelectResp;
|
import com.muyu.market.admain.response.OrdersSelectResp;
|
||||||
import com.muyu.market.server.mapper.OrdersMapper;
|
import com.muyu.market.server.mapper.OrdersMapper;
|
||||||
import com.muyu.market.server.service.OrdersService;
|
import com.muyu.market.server.service.OrdersService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.scheduling.annotation.Scheduled;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.time.temporal.ChronoUnit;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
|
@ -23,13 +23,10 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||||
@Override
|
@Override
|
||||||
public List<ProductListResp> findByproductList(ProductListResp productListResp) {
|
public List<ProductListResp> findByproductList(ProductListResp productListResp) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LambdaQueryWrapper<Product> lambdaQueryWrapperlist = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<Product> lambdaQueryWrapperlist = new LambdaQueryWrapper<>();
|
||||||
/**
|
/**
|
||||||
* 查询接口名称
|
* 查询接口名称
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (StringUtils.isNotBlank(productListResp.getProductName())) {
|
if (StringUtils.isNotBlank(productListResp.getProductName())) {
|
||||||
lambdaQueryWrapperlist.like(Product::getProductName, productListResp.getProductName());
|
lambdaQueryWrapperlist.like(Product::getProductName, productListResp.getProductName());
|
||||||
}
|
}
|
||||||
|
@ -42,7 +39,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||||
Product::getProductPrice,productListResp.getBegin()
|
Product::getProductPrice,productListResp.getBegin()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据金额查询
|
* 根据金额查询
|
||||||
* le(<=)
|
* le(<=)
|
||||||
|
@ -52,9 +48,6 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
|
||||||
Product::getProductPrice,productListResp.getEnd()
|
Product::getProductPrice,productListResp.getEnd()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<Product> productlist = this.list(lambdaQueryWrapperlist);
|
List<Product> productlist = this.list(lambdaQueryWrapperlist);
|
||||||
|
|
||||||
// return productlist.stream()
|
// return productlist.stream()
|
||||||
|
|
|
@ -15,9 +15,7 @@
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="note" column="note" />
|
<result property="note" column="note" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
<select id="findByorderList" resultType="com.muyu.market.admain.response.OrdersSelectResp">
|
||||||
|
|
||||||
<select id="findByorderList" resultMap="OrderDetailDTOMap">
|
|
||||||
SELECT
|
SELECT
|
||||||
orders.*,
|
orders.*,
|
||||||
sys_user.user_name,
|
sys_user.user_name,
|
||||||
|
@ -27,8 +25,8 @@
|
||||||
product.`status`
|
product.`status`
|
||||||
FROM
|
FROM
|
||||||
orders
|
orders
|
||||||
LEFT JOIN sys_user ON orders.order_id = sys_user.user_id
|
LEFT JOIN sys_user ON orders.order_id = sys_user.user_id
|
||||||
LEFT JOIN product ON orders.order_id = product.product_id
|
LEFT JOIN product ON orders.order_id = product.product_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue