|
@@ -6,6 +6,8 @@
|
|
|
<!--@Table sell_order-->
|
|
|
<id column="id_" property="id"/>
|
|
|
<result column="organ_id_" property="organId"/>
|
|
|
+ <result column="edu_teacher_id_" property="eduTeacherId"/>
|
|
|
+ <result column="eduTeacher" property="eduTeacher"/>
|
|
|
<result column="cooperation_organ_id_" property="cooperationOrganId"/>
|
|
|
<result column="school_name_" property="schoolName"/>
|
|
|
<result column="trans_no_" property="transNo"/>
|
|
@@ -33,7 +35,8 @@
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
<!--@mbg.generated-->
|
|
|
- id_, organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_, actual_amount_,
|
|
|
+ id_, edu_teacher_id_,organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_,
|
|
|
+ actual_amount_,
|
|
|
balance_amount_, sell_cost_, sell_cost2_, type_, goods_id_,goods_name_, num_, user_id_, payment_channel_,
|
|
|
mer_no_, sell_time_, create_ime_, update_time_
|
|
|
</sql>
|
|
@@ -52,11 +55,13 @@
|
|
|
<insert id="insert" keyColumn="id_" keyProperty="id" parameterType="com.ym.mec.biz.dal.entity.SellOrder"
|
|
|
useGeneratedKeys="true">
|
|
|
<!--@mbg.generated-->
|
|
|
- insert into sell_order (organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_,
|
|
|
+ insert into sell_order (edu_teacher_id_,organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_,
|
|
|
+ expect_amount_,
|
|
|
actual_amount_,
|
|
|
balance_amount_, type_, goods_id_,goods_name_, sell_cost_, sell_cost2_, num_, user_id_, payment_channel_,
|
|
|
mer_no_, sell_time_, create_ime_, update_time_)
|
|
|
- values (#{organId}, #{cooperationOrganId}, #{transNo}, #{orderNo},#{orderId}, #{expectAmount}, #{actualAmount},
|
|
|
+ values (#{eduTeacherId},#{organId}, #{cooperationOrganId}, #{transNo}, #{orderNo},#{orderId}, #{expectAmount},
|
|
|
+ #{actualAmount},
|
|
|
#{balanceAmount}, #{type}, #{goodsId}, #{goodsName}, #{sellCost}, #{sellCost2}, #{num}, #{userId},
|
|
|
#{paymentChannel},
|
|
|
#{merNo}, #{sellTime}, #{createIme}, #{updateTime})
|
|
@@ -65,6 +70,9 @@
|
|
|
<!--@mbg.generated-->
|
|
|
update sell_order
|
|
|
<set>
|
|
|
+ <if test="eduTeacherId != null">
|
|
|
+ edu_teacher_id_ = #{eduTeacherId},
|
|
|
+ </if>
|
|
|
<if test="organId != null">
|
|
|
organ_id_ = #{organId},
|
|
|
</if>
|
|
@@ -146,10 +154,12 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="SellOrder" parameterType="map">
|
|
|
- SELECT so.*,su.username_ user_name_,su.phone_,o.name_ organ_name_,co.name_ school_name_ FROM sell_order so
|
|
|
+ SELECT so.*,su.username_ user_name_,su.phone_,o.name_ organ_name_,co.name_ school_name_,t.real_name_ eduTeacher
|
|
|
+ FROM sell_order so
|
|
|
LEFT JOIN sys_user su ON so.user_id_ = su.id_
|
|
|
LEFT JOIN organization o ON o.id_ = so.organ_id_
|
|
|
LEFT JOIN cooperation_organ co ON co.id_= so.cooperation_organ_id_
|
|
|
+ LEFT JOIN sys_user t ON t.id_ = so.edu_teacher_id_
|
|
|
<include refid="queryPageSql"/>
|
|
|
ORDER BY so.create_ime_ DESC
|
|
|
<include refid="global.limit"/>
|