109 lines
5.5 KiB
XML
109 lines
5.5 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.NodeTaskMapper">
|
||
|
|
||
|
<resultMap type="com.ruoyi.system.domain.NodeTask" id="NodeTaskResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="flag" column="flag" />
|
||
|
<result property="type" column="type" />
|
||
|
<result property="title" column="title" />
|
||
|
<result property="awardValue" column="award_value" />
|
||
|
<result property="recommendValue" column="recommend_value" />
|
||
|
<result property="type2Target" column="type2_target" />
|
||
|
<result property="coinId" column="coin_id" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectNodeTaskVo">
|
||
|
select id, create_time, update_time, flag, type, title, award_value, recommend_value, type2_target, coin_id from node_task
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectNodeTaskList" parameterType="com.ruoyi.system.domain.NodeTask" resultMap="NodeTaskResult">
|
||
|
<include refid="selectNodeTaskVo"/>
|
||
|
<where>
|
||
|
<if test="id != null "> and id = #{id}</if>
|
||
|
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
||
|
<if test="type != null "> and type = #{type}</if>
|
||
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||
|
<if test="awardValue != null "> and award_value = #{awardValue}</if>
|
||
|
<if test="recommendValue != null "> and recommend_value = #{recommendValue}</if>
|
||
|
<if test="type2Target != null "> and type2_target = #{type2Target}</if>
|
||
|
<if test="coinId != null "> and coin_id = #{coinId}</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="findNodeTask" parameterType="com.ruoyi.system.domain.NodeTask" resultMap="NodeTaskResult">
|
||
|
<include refid="selectNodeTaskVo"/>
|
||
|
<where>
|
||
|
<if test="id != null "> and id = #{id}</if>
|
||
|
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
||
|
<if test="type != null "> and type = #{type}</if>
|
||
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||
|
<if test="awardValue != null "> and award_value = #{awardValue}</if>
|
||
|
<if test="recommendValue != null "> and recommend_value = #{recommendValue}</if>
|
||
|
<if test="type2Target != null "> and type2_target = #{type2Target}</if>
|
||
|
<if test="coinId != null "> and coin_id = #{coinId}</if>
|
||
|
</where>
|
||
|
limit 1
|
||
|
</select>
|
||
|
|
||
|
<select id="selectNodeTaskById" parameterType="Integer" resultMap="NodeTaskResult">
|
||
|
<include refid="selectNodeTaskVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertNodeTask" parameterType="com.ruoyi.system.domain.NodeTask" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into node_task
|
||
|
<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="type != null">type,</if>
|
||
|
<if test="title != null and title != ''">title,</if>
|
||
|
<if test="awardValue != null">award_value,</if>
|
||
|
<if test="recommendValue != null">recommend_value,</if>
|
||
|
<if test="type2Target != null">type2_target,</if>
|
||
|
<if test="coinId != null">coin_id,</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="type != null">#{type},</if>
|
||
|
<if test="title != null and title != ''">#{title},</if>
|
||
|
<if test="awardValue != null">#{awardValue},</if>
|
||
|
<if test="recommendValue != null">#{recommendValue},</if>
|
||
|
<if test="type2Target != null">#{type2Target},</if>
|
||
|
<if test="coinId != null">#{coinId},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateNodeTask" parameterType="com.ruoyi.system.domain.NodeTask">
|
||
|
update node_task
|
||
|
<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="type != null">type = #{type},</if>
|
||
|
<if test="title != null and title != ''">title = #{title},</if>
|
||
|
<if test="awardValue != null">award_value = #{awardValue},</if>
|
||
|
<if test="recommendValue != null">recommend_value = #{recommendValue},</if>
|
||
|
<if test="type2Target != null">type2_target = #{type2Target},</if>
|
||
|
<if test="coinId != null">coin_id = #{coinId},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteNodeTaskByIds" parameterType="String">
|
||
|
delete from node_task where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|