|
@@ -70,10 +70,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectList" parameterType="com.zhongzheng.modules.order.bo.OrderInvoiceQueryBo" resultMap="OrderInvoiceVoResult">
|
|
|
SELECT
|
|
|
- *
|
|
|
+ oi.*,u.id_card,u.realname
|
|
|
FROM
|
|
|
- order_invoice
|
|
|
+ order_invoice oi LEFT JOIN `user` u on oi.user_id = u.user_id
|
|
|
where 1=1
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ AND oi.type = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="periodStatus != null and periodStatus != ''">
|
|
|
+ AND oi.period_status = #{periodStatus}
|
|
|
+ </if>
|
|
|
+ <if test="invoiceStatus != null and invoiceStatus != ''">
|
|
|
+ AND oi.invoice_status = #{invoiceStatus}
|
|
|
+ </if>
|
|
|
+ <if test="subject != null and subject != ''">
|
|
|
+ AND oi.subject = #{subject}
|
|
|
+ </if>
|
|
|
+ <if test="applyStartTime != null and applyStartTime != ''">
|
|
|
+ AND oi.apply_time >= #{applyStartTime}
|
|
|
+ </if>
|
|
|
+ <if test="applyEndTime != null and applyEndTime != ''">
|
|
|
+ AND #{applyStartTime} >= oi.apply_time
|
|
|
+ </if>
|
|
|
+ <if test="searchKey != null and searchKey != ''">
|
|
|
+ and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
|
|
|
+ </if>
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|