he2802 4 лет назад
Родитель
Сommit
6c21b10730

+ 13 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderGoodsVo.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.order.vo;
 
+import com.baomidou.mybatisplus.annotation.TableField;
 import com.zhongzheng.common.annotation.Excel;
 import com.fasterxml.jackson.annotation.JsonFormat;
 import java.math.BigDecimal;
@@ -43,4 +44,16 @@ public class OrderGoodsVo {
 	@Excel(name = "商品成交价格")
 	@ApiModelProperty("商品成交价格")
 	private BigDecimal goodsRealPrice;
+	/** 编码 */
+	@Excel(name = "编码")
+	@ApiModelProperty("编码")
+	private String code;
+
+	private String educationName;
+
+	private String projectName;
+
+	private String businessName;
+
+	private String goodsName;
 }

+ 33 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderGoodsMapper.xml

@@ -15,5 +15,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="updateTime" column="update_time"/>
     </resultMap>
 
+    <resultMap type="com.zhongzheng.modules.order.vo.OrderGoodsVo" id="OrderGoodsResultVo">
+        <result property="orderGoodsId" column="order_goods_id"/>
+        <result property="orderSn" column="order_sn"/>
+        <result property="goodsId" column="goods_id"/>
+        <result property="goodsInputData" column="goods_input_data"/>
+        <result property="goodsPrice" column="goods_price"/>
+        <result property="goodsRealPrice" column="goods_real_price"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+
+        <result property="code" column="code"/>
+        <result property="goodsName" column="goods_name"/>
+        <result property="educationName" column="education_name"/>
+        <result property="projectName" column="project_name"/>
+        <result property="businessName" column="business_name"/>
+    </resultMap>
 
+    <select id="selectList" parameterType="com.zhongzheng.modules.order.bo.OrderGoodsQueryBo" resultMap="OrderGoodsResultVo">
+        SELECT
+            og.*,
+            g.`code`,
+            g.goods_name,
+            cet.education_name,
+            cpt.project_name,
+            cb.business_name
+        FROM
+            order_goods og
+                LEFT JOIN goods g ON og.goods_id = g.goods_id
+                LEFT JOIN course_education_type cet ON g.education_type_id = cet.id
+                LEFT JOIN course_project_type cpt ON g.project_id = cpt.id
+                LEFT JOIN course_business cb ON g.business_id = cb.id
+        WHERE
+            og.order_sn =  #{orderSn}
+    </select>
 </mapper>

+ 2 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderMapper.xml

@@ -26,4 +26,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
 
+
+
 </mapper>