85 lines
4.1 KiB
XML
85 lines
4.1 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.ActivityStatisticsMapper">
|
|
|
|
<resultMap type="com.ruoyi.system.domain.ActivityStatistics" id="ActivityStatisticsResult">
|
|
<result property="id" column="id" />
|
|
<result property="createTime" column="create_time" />
|
|
<result property="updateTime" column="update_time" />
|
|
<result property="flag" column="flag" />
|
|
<result property="address" column="address" />
|
|
<result property="amount" column="amount" />
|
|
</resultMap>
|
|
|
|
<sql id="selectActivityStatisticsVo">
|
|
select id, create_time, update_time, flag, address, amount from activity_statistics
|
|
</sql>
|
|
|
|
<select id="selectActivityStatisticsList" parameterType="com.ruoyi.system.domain.ActivityStatistics" resultMap="ActivityStatisticsResult">
|
|
<include refid="selectActivityStatisticsVo"/>
|
|
<where>
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="amount != null "> and amount = #{amount}</if>
|
|
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and create_time between #{params.beginTime} and #{params.endTime}</if>
|
|
</where>
|
|
order by id desc
|
|
</select>
|
|
|
|
<select id="findActivityStatistics" parameterType="com.ruoyi.system.domain.ActivityStatistics" resultMap="ActivityStatisticsResult">
|
|
<include refid="selectActivityStatisticsVo"/>
|
|
<where>
|
|
<if test="id != null "> and id = #{id}</if>
|
|
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="amount != null "> and amount = #{amount}</if>
|
|
</where>
|
|
limit 1
|
|
</select>
|
|
|
|
<select id="selectActivityStatisticsById" parameterType="Integer" resultMap="ActivityStatisticsResult">
|
|
<include refid="selectActivityStatisticsVo"/>
|
|
where id = #{id}
|
|
</select>
|
|
|
|
<insert id="insertActivityStatistics" parameterType="com.ruoyi.system.domain.ActivityStatistics" useGeneratedKeys="true" keyProperty="id">
|
|
insert into activity_statistics
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="createTime != null">create_time,</if>
|
|
<if test="updateTime != null">update_time,</if>
|
|
<if test="flag != null and flag != ''">flag,</if>
|
|
<if test="address != null and address != ''">address,</if>
|
|
<if test="amount != null">amount,</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="createTime != null">#{createTime},</if>
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
<if test="flag != null and flag != ''">#{flag},</if>
|
|
<if test="address != null and address != ''">#{address},</if>
|
|
<if test="amount != null">#{amount},</if>
|
|
</trim>
|
|
</insert>
|
|
|
|
<update id="updateActivityStatistics" parameterType="com.ruoyi.system.domain.ActivityStatistics">
|
|
update activity_statistics
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
<if test="flag != null and flag != ''">flag = #{flag},</if>
|
|
<if test="address != null and address != ''">address = #{address},</if>
|
|
<if test="amount != null">amount = #{amount},</if>
|
|
</trim>
|
|
where id = #{id}
|
|
</update>
|
|
|
|
<delete id="deleteActivityStatisticsByIds" parameterType="String">
|
|
delete from activity_statistics where id in
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</delete>
|
|
|
|
</mapper> |