zxl
1 天以前 e636396c6c16f56931edc8b57b8efb6b9a165786
framework/src/main/resources/mapper/lmk/PrizeGrantRecordMapper.xml
@@ -54,12 +54,53 @@
            LPGR.prize_content,
            LPGR.grant_status,
            LPGR.prize_num_id,
            LPGR.create_time,
            LPGR.des,
            LPGR.id
        FROM
            lmk_prize_grant_record LPGR
        WHERE
            LPGR.delete_flag = 0
        <if test="query.nickName != null and query.nickName !=''">
            AND LPGR.nick_name like CONCAT('%',#{query.nickName},'%')
        </if>
        <if test="query.activityName != null and query.activityName !=''">
            AND LPGR.activity_name like CONCAT('%',#{query.activityName},'%')
        </if>
        <if test="query.grantStatus != null and query.grantStatus !=''">
            AND LPGR.grant_status  = #{query.grantStatus}
        </if>
        <if test="query.startTime != null">AND LPGR.create_time >= #{query.startTime}</if>
        <if test="query.endTime != null">AND LPGR.create_time &lt;= #{query.endTime}</if>
    </select>
    <select id="getExportData" resultMap="BaseResultMap">
        SELECT
        LPGR.user_id,
        LPGR.nick_name,
        LPGR.activity_id,
        LPGR.activity_name,
        LPGR.prize_id,
        LPGR.prize_name,
        LPGR.prize_content,
        LPGR.grant_status,
        LPGR.prize_num_id,
        LPGR.des,
        LPGR.create_time,
        LPGR.id
        FROM
        lmk_prize_grant_record LPGR
        WHERE
        LPGR.delete_flag = 0
        <if test="query.nickName != null and query.nickName !=''">
            AND LPGR.nick_name like CONCAT('%',#{query.nickName},'%')
        </if>
        <if test="query.activityName != null and query.activityName !=''">
            AND LPGR.activity_name like CONCAT('%',#{query.activityName},'%')
        </if>
        <if test="query.grantStatus != null and query.grantStatus !=''">
            AND LPGR.grant_status  = #{query.grantStatus}
        </if>
        <if test="query.startTime != null">AND LPGR.create_time >= #{query.startTime}</if>
        <if test="query.endTime != null">AND LPGR.create_time &lt;= #{query.endTime}</if>
    </select>
</mapper>