李雨欣 8.27 22:08 测试查询
parent
6c4373f0f2
commit
2447cb8af6
|
@ -10,6 +10,7 @@ import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
import lombok.extern.log4j.Log4j2;
|
import lombok.extern.log4j.Log4j2;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
@ -17,10 +18,10 @@ import org.springframework.web.bind.annotation.*;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
@Log4j2
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("order")
|
@RequestMapping("/order")
|
||||||
@Tag(name = "订单控制层",description = "进行订单的查询和添加")
|
@Tag(name = "订单控制层",description = "订单查询")
|
||||||
public class OrdersController {
|
public class OrdersController {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|
|
@ -58,7 +58,6 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersMapper, Orders> impleme
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -3,7 +3,21 @@
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.muyu.market.server.mapper.OrdersMapper">
|
<mapper namespace="com.muyu.market.server.mapper.OrdersMapper">
|
||||||
|
|
||||||
<select id="findByorderList" resultType="com.muyu.market.admain.response.OrdersSelectResp">
|
|
||||||
|
<resultMap id="OrderDetailDTOMap" type="com.muyu.market.admain.response.OrdersSelectResp">
|
||||||
|
<result property="orderId" column="order_id" />
|
||||||
|
<result property="userId" column="user_id" />
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<result property="orderNo" column="order_no" />
|
||||||
|
<result property="orderStatus" column="order_status" />
|
||||||
|
<result property="totalAmount" column="total_amount" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="note" column="note" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="findByorderList" resultMap="OrderDetailDTOMap">
|
||||||
SELECT
|
SELECT
|
||||||
orders.*,
|
orders.*,
|
||||||
sys_user.user_name,
|
sys_user.user_name,
|
||||||
|
@ -16,4 +30,6 @@
|
||||||
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>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue