lisy
2023-08-14 0f64a74ee3b818bb42b7b9c9b01a9d33c279781b
cloud-server-activity/src/main/resources/mapper/PointsMerchandiseMapper.xml
@@ -3,4 +3,36 @@
<mapper namespace="com.dsh.activity.mapper.PointsMerchandiseMapper">
    <select id="queryGoodsListOfSearch" resultType="java.util.Map">
        SELECT id,
               `name`,
               `cover`,
               `type`,
               date_format(startTime ,'%Y-%m-%d') as startTime,
               date_format(endTime ,'%Y-%m-%d') as endTime,
               useScope,
               userPopulation,
               quantityIssued,
               pickUpQuantity,
               `sort`,
               shelves
        from t_points_merchandise
        where 1 = 1
        <if test="name != null">
            and `name` like concat('%', #{name}, '%')
        </if>
        <if test="type != null">
            and type = #{type}
        </if>
        <if test="redemptionMethod != null">
            and redemptionMethod = #{redemptionMethod}
        </if>
        <if test="userPopulation != null">
            and userPopulation = #{userPopulation}
        </if>
        <if test="state != null">
            and `state` = #{state}
        </if>
        order by insertTime desc
    </select>
</mapper>