|
@@ -15,6 +15,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="payType" column="pay_type" />
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
+ <result property="isShare" column="is_share" />
|
|
|
+ <result property="dqbh" column="dqbh" />
|
|
|
+ <result property="dqmc" column="dqmc" />
|
|
|
+ <result property="school" column="school" />
|
|
|
+ <result property="schoolName" column="school_name" />
|
|
|
+ <result property="schoolCommission" column="school_commission" />
|
|
|
+ <result property="phoneType" column="phone_type" />
|
|
|
+ <result property="refundReason" column="refund_reason" />
|
|
|
+
|
|
|
+
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectOrderInfoVo">
|
|
@@ -47,19 +57,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
sum(school_commission) as school_commission,
|
|
|
sum(total) as orderTotal
|
|
|
from order_info
|
|
|
- where is_share =1
|
|
|
- <if test="schoolName != null and schoolName != ''">
|
|
|
- and school_name like concat('%', #{schoolName}, '%')
|
|
|
- </if>
|
|
|
- <if test="startTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y-%m-%d')<![CDATA[ >= ]]> #{startTime}
|
|
|
- </if>
|
|
|
- <if test="endTime != null">
|
|
|
- and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ < ]]> #{endTime}
|
|
|
- </if>
|
|
|
+ <where>
|
|
|
+ <if test="isShare != null and isShare != ''">
|
|
|
+ and is_share = #{isShare }
|
|
|
+ </if>
|
|
|
+ <if test="tradeType != null and tradeType != ''">
|
|
|
+ and trade_type = #{tradeType }
|
|
|
+ </if>
|
|
|
+ <if test="schoolName != null and schoolName != ''">
|
|
|
+ and school_name like concat('%', #{schoolName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d')<![CDATA[ >= ]]> #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ < ]]> #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
group by school,school_name
|
|
|
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
+ <select id="selectSchoolOrderDetailed" resultType="com.miaxis.order.domain.OrderInfo">
|
|
|
+ select * from order_info
|
|
|
+ <where>
|
|
|
+ <if test="isShare != null and isShare != ''">
|
|
|
+ and is_share = #{isShare }
|
|
|
+ </if>
|
|
|
+ <if test="tradeType != null and tradeType != ''">
|
|
|
+ and trade_type = #{tradeType }
|
|
|
+ </if>
|
|
|
+ <if test="schoolName != null and schoolName != ''">
|
|
|
+ and school_name like concat('%', #{schoolName}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="startTime != null">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d')<![CDATA[ >= ]]> #{startTime}
|
|
|
+ </if>
|
|
|
+ <if test="endTime != null">
|
|
|
+ and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ < ]]> #{endTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ order by success_time desc
|
|
|
</select>
|
|
|
|
|
|
+
|
|
|
</mapper>
|