|
|
@@ -21,35 +21,6 @@
|
|
|
l.id_,l.group_id_, l.prize_id_,d.name_,d.reward_type_, l.user_id_, l.create_on_
|
|
|
</sql>
|
|
|
|
|
|
- <sql id="queryCondition">
|
|
|
- <where>
|
|
|
- <if test="prizeId != null">
|
|
|
- and l.prize_id_ = #{id}
|
|
|
- </if>
|
|
|
- <if test="userId != null">
|
|
|
- and l.user_id_ = #{userId}
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- and d.name_ like concat('%',#{name},'%')
|
|
|
- </if>
|
|
|
- <if test="rewardType != null">
|
|
|
- and d.reward_type_ like concat('%',#{rewardType},'%')
|
|
|
- </if>
|
|
|
- <if test="groupId != null">
|
|
|
- and l.group_id_ = #{groupId}
|
|
|
- </if>
|
|
|
- <if test="startDate != null">
|
|
|
- and l.create_on_ >= #{startDate}
|
|
|
- </if>
|
|
|
- <if test="endDate != null">
|
|
|
- and l.create_on_ <= #{endDate}
|
|
|
- </if>
|
|
|
- <if test="organId != null">
|
|
|
- and u.organ_id_ = #{organId}
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </sql>
|
|
|
-
|
|
|
<select id="get" resultMap="BaseResultMap" parameterType="java.lang.Long">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
@@ -109,4 +80,36 @@
|
|
|
order by l.create_on_ desc
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
|
+
|
|
|
+ <sql id="queryCondition">
|
|
|
+ <where>
|
|
|
+ <if test="prizeId != null">
|
|
|
+ and l.prize_id_ = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="userId != null">
|
|
|
+ and l.user_id_ = #{userId}
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ and d.name_ like concat('%',#{name},'%')
|
|
|
+ </if>
|
|
|
+ <if test="rewardType != null">
|
|
|
+ and d.reward_type_ like concat('%',#{rewardType},'%')
|
|
|
+ </if>
|
|
|
+ <if test="groupId != null">
|
|
|
+ and l.group_id_ = #{groupId}
|
|
|
+ </if>
|
|
|
+ <if test="startDate != null">
|
|
|
+ and l.create_on_ >= #{startDate}
|
|
|
+ </if>
|
|
|
+ <if test="endDate != null">
|
|
|
+ and l.create_on_ <= #{endDate}
|
|
|
+ </if>
|
|
|
+ <if test="organId != null">
|
|
|
+ and u.organ_id_ = #{organId}
|
|
|
+ </if>
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (u.username_ = LIKE CONCAT('%',#{search},'%') OR u.id_ = #{search})
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
</mapper>
|