From 1bada3da32aa8b29509b7357e5adfe816ac17c72 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 16 Jul 2021 10:29:33 +0800
Subject: [PATCH] fix
---
gc-shop/src/main/resources/mapper/shop/JhyOrderItemsMapper.xml | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/gc-shop/src/main/resources/mapper/shop/JhyOrderItemsMapper.xml b/gc-shop/src/main/resources/mapper/shop/JhyOrderItemsMapper.xml
index 4bd86f6..6a075a8 100644
--- a/gc-shop/src/main/resources/mapper/shop/JhyOrderItemsMapper.xml
+++ b/gc-shop/src/main/resources/mapper/shop/JhyOrderItemsMapper.xml
@@ -2,5 +2,26 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xzx.gc.shop.mapper.JhyOrderItemsMapper">
+ <select id="selectByOrderId" resultType="com.xzx.gc.shop.vo.JhyOrderItemsVo">
+ SELECT
+ *
+ FROM
+ xzx_jhy_order_items a
+ WHERE a.order_id=#{orderId}
+ </select>
+
+ <select id="selectJhyOrderItemListByOrderId" resultType="com.xzx.gc.shop.vo.JhyOrderItemsVo">
+ SELECT
+ a.*
+ ,IFNULL(case when d.item_unit = '台' then a.weight
+ else 0 end, 0) recycleTai
+ ,IFNULL(case when d.item_unit = 'kg' then a.weight
+ else 0 end, 0) recycleKg
+ FROM
+ xzx_jhy_order_items a
+ left join xzx_sys_environmental_info d on a.item_type = d.id
+ WHERE a.order_id=#{orderId}
+ </select>
+
</mapper>
--
Gitblit v1.9.1