全量提交
This commit is contained in:
55
fp-system/src/main/resources/mapper/SchoolRefundMapper.xml
Normal file
55
fp-system/src/main/resources/mapper/SchoolRefundMapper.xml
Normal file
@@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zf.foodpurchase.fdsafe.mapper.SchoolRefundMapper">
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
sr
|
||||
.
|
||||
refund_no
|
||||
, sr.delivery_no, sr.order_no, sr.total_refund_money, sr.supplier_id, sr.school_id, sr.edu_id, sr.refund_reason, sr.create_time, sr.check_time, sr.update_time, sr.refund_status, sr.check_remark
|
||||
</sql>
|
||||
<select id="querySchoolRefund" resultType="com.zf.foodpurchase.fdsafe.vo.SchoolRefundVO">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
s.school_name,
|
||||
e.edu_name,
|
||||
su.supplier_name
|
||||
from school_refund sr
|
||||
left join school s on sr.school_id = s.school_id
|
||||
left join edu e on sr.edu_id = e.edu_id
|
||||
left join supplier su on sr.supplier_id = su.supplier_id
|
||||
|
||||
<where>
|
||||
<if test="refundNo != null and refundNo != ''">
|
||||
and sr.refund_no = #{refundNo}
|
||||
</if>
|
||||
<if test="orderNo != null and orderNo != ''">
|
||||
and sr.order_no = #{orderNo}
|
||||
</if>
|
||||
<if test="deliveryNo != null and deliveryNo != ''">
|
||||
and sr.delivery_no = #{deliveryNo}
|
||||
</if>
|
||||
<if test="eduId != null">
|
||||
and sr.edu_id = #{eduId}
|
||||
</if>
|
||||
<if test="schoolId != null">
|
||||
and sr.school_id = #{schoolId}
|
||||
</if>
|
||||
<if test="supplierId != null">
|
||||
and sr.supplier_id = #{supplierId}
|
||||
</if>
|
||||
<if test="refundStatus != null">
|
||||
and sr.refund_status = #{refundStatus}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
AND date_format(sr.create_time,'%Y%m%d') >= date_format(#{beginTime},'%Y%m%d')
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and date_format(sr.create_time,'%Y%m%d') <=date_format(#{endTime},'%Y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by sr.refund_no desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user