|
@@ -22,6 +22,49 @@
|
|
|
order by id desc
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryScholarshipsLogs" resultType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs" parameterType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs">
|
|
|
+ select
|
|
|
+ ta.id,
|
|
|
+ ta.openid,
|
|
|
+ ta.present_id,
|
|
|
+ (select `name` from college_present_scholarships where id = ta.present_id) as present_name,
|
|
|
+ ta.type,
|
|
|
+ ta.create_at,
|
|
|
+ ta.collection_date,
|
|
|
+ ta.mkt_id,
|
|
|
+ (select mi_mktname from wx_mkt_info where id = ta.mkt_id) as mkt_name,
|
|
|
+ ta.address,
|
|
|
+ ta.coupon_number,
|
|
|
+ tb.xu_phone
|
|
|
+ from college_present_scholarships_logs ta LEFT JOIN wx_user tb ON ta.openid = tb.xu_openid
|
|
|
+ where 1=1
|
|
|
+ <if test="present_id != null and present_id != ''">
|
|
|
+ and present_id = #{present_id,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type != ''">
|
|
|
+ and `type` = #{type,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="create_at != null and create_at != ''">
|
|
|
+ and DATE_FORMAT(create_at,'%Y-%m-%d') = DATE_FORMAT(#{create_at,jdbcType=DATE},'%Y-%m-%d')
|
|
|
+ </if>
|
|
|
+ <if test="collection_date != null and collection_date != ''">
|
|
|
+ and DATE_FORMAT(collection_date,'%Y-%m-%d') = DATE_FORMAT(#{collection_date,jdbcType=DATE},'%Y-%m-%d')
|
|
|
+ </if>
|
|
|
+ <if test="mkt_id != null and mkt_id != ''">
|
|
|
+ and mkt_id = #{mkt_id,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="address != null and address != ''">
|
|
|
+ and address like "%"#{address,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="coupon_number != null and coupon_number != ''">
|
|
|
+ and coupon_number = #{coupon_number,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="xu_phone != null and xu_phone != ''">
|
|
|
+ and xu_phone = #{xu_phone,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ order by ta.id desc
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="selectByPrimaryKey" resultType="com.ygj.yuemum.domain.college.CollegePresentScholarshipsLogs"
|
|
|
parameterType="java.lang.Integer">
|
|
|
select
|