|
@@ -22,24 +22,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectActiveHelpRecordPage" resultMap="activeHelpRecordResultMap">
|
|
<select id="selectActiveHelpRecordPage" resultMap="activeHelpRecordResultMap">
|
|
|
- select ahr.*,hg.name helpGoodsName,lu.nick_name userName,apr.title productTitle from sing_active_help_record ahr
|
|
|
|
|
- inner JOIN sing_help_goods hg on ahr.help_goods_id = hg.id
|
|
|
|
|
- inner JOIN sing_login_user lu on ahr.user_id = lu.id
|
|
|
|
|
- inner JOIN sing_active_product_record apr on ahr.product_id = apr.id
|
|
|
|
|
- where ahr.is_deleted = 0
|
|
|
|
|
|
|
+ select hr.*,g.name helpGoodsName,u.nick_name userName,pr.title productTitle from sing_active_help_record hr
|
|
|
|
|
+ inner JOIN sing_help_goods g on hr.help_goods_id = g.id
|
|
|
|
|
+ inner JOIN sing_login_user u on hr.user_id = u.id
|
|
|
|
|
+ inner JOIN sing_active_product_record pr on hr.product_id = pr.id
|
|
|
|
|
+ where hr.is_deleted = 0
|
|
|
<if test="activeHelpRecord.helpGoodsName != null">
|
|
<if test="activeHelpRecord.helpGoodsName != null">
|
|
|
- and hg.name like concat('%',#{activeHelpRecord.helpGoodsName},'%')
|
|
|
|
|
|
|
+ and g.name like concat('%',#{activeHelpRecord.helpGoodsName},'%')
|
|
|
</if>
|
|
</if>
|
|
|
-
|
|
|
|
|
<if test="activeHelpRecord.productTitle != null">
|
|
<if test="activeHelpRecord.productTitle != null">
|
|
|
- and apr.title concat('%',#{activeHelpRecord.productTitle},'%')
|
|
|
|
|
|
|
+ and pr.title like concat('%',#{activeHelpRecord.productTitle},'%')
|
|
|
</if>
|
|
</if>
|
|
|
-
|
|
|
|
|
<if test="activeHelpRecord.userName != null">
|
|
<if test="activeHelpRecord.userName != null">
|
|
|
- and lu.nick_name concat('%',#{activeHelpRecord.userName},'%')
|
|
|
|
|
|
|
+ and u.nick_name like concat('%',#{activeHelpRecord.userName},'%')
|
|
|
</if>
|
|
</if>
|
|
|
- order by ahr.create_time DESC
|
|
|
|
|
-
|
|
|
|
|
|
|
+ order by hr.create_time DESC
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|