@@ -79,7 +79,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
user_exam_goods ueg
WHERE
ueg.user_id = #{userId}
+ <if test="goodsId != null and goodsId != '' ">
and ueg.goods_id = #{goodsId}
+ </if>
</select>
<select id="getUserExam" parameterType="map" resultMap="UserExamGoodsSupplementVo">
@@ -215,5 +215,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
FROM
( SELECT user_id FROM user_subscribe GROUP BY user_id ) us
LEFT JOIN `user` u ON us.user_id = u.user_id
+ WHERE
+ 1 =1
+ <if test="searchKey != null and searchKey != '' ">
+ and (u.realname like concat('%', #{searchKey}, '%') or u.id_card like concat('%', #{searchKey}, '%'))
</mapper>