|
|
|
|
@@ -42,13 +42,47 @@
|
|
|
|
|
<if test="orderTime != null"> and order_time = #{orderTime}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
|
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
|
and order_time >= #{params.beginTime}
|
|
|
|
|
and date(order_time) >= #{params.beginTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
|
and order_time <= #{params.endTime}
|
|
|
|
|
and date(order_time) <= #{params.endTime}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by order_time desc, id desc
|
|
|
|
|
order by create_time desc, remark asc, id desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectJDOrderListWithSort" parameterType="JDOrder" resultMap="JDOrderResult">
|
|
|
|
|
<include refid="selectJDOrderBase"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
|
|
|
|
<if test="distributionMark != null and distributionMark != ''"> and distribution_mark = #{distributionMark}</if>
|
|
|
|
|
<if test="modelNumber != null and modelNumber != ''"> and model_number like concat('%', #{modelNumber}, '%')</if>
|
|
|
|
|
<if test="link != null and link != ''"> and link like concat('%', #{link}, '%')</if>
|
|
|
|
|
<if test="paymentAmount != null"> and payment_amount = #{paymentAmount}</if>
|
|
|
|
|
<if test="rebateAmount != null"> and rebate_amount = #{rebateAmount}</if>
|
|
|
|
|
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
|
|
|
|
<if test="logisticsLink != null and logisticsLink != ''"> and logistics_link like concat('%', #{logisticsLink}, '%')</if>
|
|
|
|
|
<if test="orderId != null and orderId != ''"> and order_id = #{orderId}</if>
|
|
|
|
|
<if test="buyer != null and buyer != ''"> and buyer like concat('%', #{buyer}, '%')</if>
|
|
|
|
|
<if test="orderTime != null"> and order_time = #{orderTime}</if>
|
|
|
|
|
<if test="status != null and status != ''"> and status like concat('%', #{status}, '%')</if>
|
|
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
|
|
and date(order_time) >= #{params.beginTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
|
|
|
|
and date(order_time) <= #{params.endTime}
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
<choose>
|
|
|
|
|
<when test="params.orderBy != null and params.orderBy != ''">
|
|
|
|
|
order by ${params.orderBy}
|
|
|
|
|
<if test="params.isAsc != null and params.isAsc == 'asc'">asc</if>
|
|
|
|
|
<if test="params.isAsc == null or params.isAsc == 'desc'">desc</if>
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
order by create_time desc, remark asc, id desc
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="selectJDOrderById" parameterType="long" resultMap="JDOrderResult">
|
|
|
|
|
|