李雨欣 8.28 19:51 测试查询接口
parent
836345a54e
commit
b124a80f53
|
@ -0,0 +1,27 @@
|
||||||
|
package com.muyu.market.admain.request;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@Tag(name = "订单查询", description = "订单查询")
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class OrdersSelectReq {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单的唯一标识
|
||||||
|
*/
|
||||||
|
@Schema(type = "Long",description = "订单ID",defaultValue = "1")
|
||||||
|
private Long orderId;
|
||||||
|
/**
|
||||||
|
*用户ID
|
||||||
|
*/
|
||||||
|
@Schema(type = "Long",defaultValue = "用户ID",description = "用户ID")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
}
|
|
@ -3,6 +3,7 @@ package com.muyu.market.server.controller;
|
||||||
import com.muyu.common.core.domain.Result;
|
import com.muyu.common.core.domain.Result;
|
||||||
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.request.OrdersSelectReq;
|
||||||
import com.muyu.market.admain.request.OrdersUpdResp;
|
import com.muyu.market.admain.request.OrdersUpdResp;
|
||||||
import com.muyu.market.admain.response.OrdersSelectResp;
|
import com.muyu.market.admain.response.OrdersSelectResp;
|
||||||
import com.muyu.market.server.service.OrdersService;
|
import com.muyu.market.server.service.OrdersService;
|
||||||
|
@ -42,19 +43,33 @@ public class OrdersController {
|
||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// /**
|
||||||
|
// * 查询订信息
|
||||||
|
// * @param ordersSelectResp
|
||||||
|
// * @return
|
||||||
|
// */
|
||||||
|
// @RequestMapping(path = "/orderSelect",method = RequestMethod.POST)
|
||||||
|
// @Operation(summary = "查询订单",description = "根据接口查看订单信息")
|
||||||
|
// public Result<List<OrdersSelectResp>> findByorderList(@RequestBody OrdersSelectResp ordersSelectResp){
|
||||||
|
// return Result.success(orderService.findByorderList(ordersSelectResp));
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询订信息
|
* 查询订信息(测试)
|
||||||
* @param ordersSelectResp
|
* @param ordersSelectReq
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@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 OrdersSelectReq ordersSelectReq){
|
||||||
return Result.success(orderService.findByorderList(ordersSelectResp));
|
return Result.success(orderService.findByorderList(ordersSelectReq));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID删除订单
|
* 根据ID删除订单
|
||||||
* @param orderId
|
* @param orderId
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.market.server.mapper;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.muyu.market.admain.Orders;
|
import com.muyu.market.admain.Orders;
|
||||||
|
import com.muyu.market.admain.request.OrdersSelectReq;
|
||||||
import com.muyu.market.admain.response.OrdersSelectResp;
|
import com.muyu.market.admain.response.OrdersSelectResp;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
@ -9,6 +10,6 @@ import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface OrdersMapper extends BaseMapper<Orders> {
|
public interface OrdersMapper extends BaseMapper<Orders> {
|
||||||
List<OrdersSelectResp> findByorderList(OrdersSelectResp ordersSelectResp);
|
List<OrdersSelectResp> findByorderList(OrdersSelectReq ordersSelectReq);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
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.request.OrdersSelectReq;
|
||||||
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;
|
||||||
|
@ -57,8 +58,8 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> impleme
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<OrdersSelectResp> findByorderList(OrdersSelectResp ordersSelectResp) {
|
public List<OrdersSelectResp> findByorderList(OrdersSelectReq ordersSelectReq) {
|
||||||
return orderMapper.findByorderList(ordersSelectResp);
|
return orderMapper.findByorderList(ordersSelectReq);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ package com.muyu.market.server.service;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
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.request.OrdersSelectReq;
|
||||||
import com.muyu.market.admain.response.OrdersSelectResp;
|
import com.muyu.market.admain.response.OrdersSelectResp;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -12,5 +13,5 @@ public interface OrdersService extends IService<Orders> {
|
||||||
|
|
||||||
void saveOrder(Product product);
|
void saveOrder(Product product);
|
||||||
|
|
||||||
List<OrdersSelectResp> findByorderList(OrdersSelectResp ordersSelectResp);
|
List<OrdersSelectResp> findByorderList(OrdersSelectReq ordersSelectReq);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue