109 lines
5.7 KiB
XML
109 lines
5.7 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.NodeTaskLogMapper">
|
||
|
|
||
|
<resultMap type="com.ruoyi.system.domain.NodeTaskLog" id="NodeTaskLogResult">
|
||
|
<result property="id" column="id" />
|
||
|
<result property="createTime" column="create_time" />
|
||
|
<result property="updateTime" column="update_time" />
|
||
|
<result property="flag" column="flag" />
|
||
|
<result property="taskId" column="task_id" />
|
||
|
<result property="memberId" column="member_id" />
|
||
|
<result property="state" column="state" />
|
||
|
<result property="awardValue" column="award_value" />
|
||
|
<result property="coinName" column="coin_name" />
|
||
|
<result property="recommendValue" column="recommend_value" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectNodeTaskLogVo">
|
||
|
select id, create_time, update_time, flag, task_id, member_id, state, award_value, coin_name, recommend_value from node_task_log
|
||
|
</sql>
|
||
|
|
||
|
<select id="selectNodeTaskLogList" parameterType="com.ruoyi.system.domain.NodeTaskLog" resultMap="NodeTaskLogResult">
|
||
|
<include refid="selectNodeTaskLogVo"/>
|
||
|
<where>
|
||
|
<if test="id != null "> and id = #{id}</if>
|
||
|
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
||
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||
|
<if test="state != null "> and state = #{state}</if>
|
||
|
<if test="awardValue != null "> and award_value = #{awardValue}</if>
|
||
|
<if test="coinName != null and coinName != ''"> and coin_name like concat('%', #{coinName}, '%')</if>
|
||
|
<if test="recommendValue != null "> and recommend_value = #{recommendValue}</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="findNodeTaskLog" parameterType="com.ruoyi.system.domain.NodeTaskLog" resultMap="NodeTaskLogResult">
|
||
|
<include refid="selectNodeTaskLogVo"/>
|
||
|
<where>
|
||
|
<if test="id != null "> and id = #{id}</if>
|
||
|
<if test="flag != null and flag != ''"> and flag = #{flag}</if>
|
||
|
<if test="taskId != null "> and task_id = #{taskId}</if>
|
||
|
<if test="memberId != null "> and member_id = #{memberId}</if>
|
||
|
<if test="state != null "> and state = #{state}</if>
|
||
|
<if test="awardValue != null "> and award_value = #{awardValue}</if>
|
||
|
<if test="coinName != null and coinName != ''"> and coin_name like concat('%', #{coinName}, '%')</if>
|
||
|
<if test="recommendValue != null "> and recommend_value = #{recommendValue}</if>
|
||
|
</where>
|
||
|
limit 1
|
||
|
</select>
|
||
|
|
||
|
<select id="selectNodeTaskLogById" parameterType="Integer" resultMap="NodeTaskLogResult">
|
||
|
<include refid="selectNodeTaskLogVo"/>
|
||
|
where id = #{id}
|
||
|
</select>
|
||
|
|
||
|
<insert id="insertNodeTaskLog" parameterType="com.ruoyi.system.domain.NodeTaskLog" useGeneratedKeys="true" keyProperty="id">
|
||
|
insert into node_task_log
|
||
|
<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="taskId != null">task_id,</if>
|
||
|
<if test="memberId != null">member_id,</if>
|
||
|
<if test="state != null">state,</if>
|
||
|
<if test="awardValue != null">award_value,</if>
|
||
|
<if test="coinName != null and coinName != ''">coin_name,</if>
|
||
|
<if test="recommendValue != null">recommend_value,</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="taskId != null">#{taskId},</if>
|
||
|
<if test="memberId != null">#{memberId},</if>
|
||
|
<if test="state != null">#{state},</if>
|
||
|
<if test="awardValue != null">#{awardValue},</if>
|
||
|
<if test="coinName != null and coinName != ''">#{coinName},</if>
|
||
|
<if test="recommendValue != null">#{recommendValue},</if>
|
||
|
</trim>
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateNodeTaskLog" parameterType="com.ruoyi.system.domain.NodeTaskLog">
|
||
|
update node_task_log
|
||
|
<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="taskId != null">task_id = #{taskId},</if>
|
||
|
<if test="memberId != null">member_id = #{memberId},</if>
|
||
|
<if test="state != null">state = #{state},</if>
|
||
|
<if test="awardValue != null">award_value = #{awardValue},</if>
|
||
|
<if test="coinName != null and coinName != ''">coin_name = #{coinName},</if>
|
||
|
<if test="recommendValue != null">recommend_value = #{recommendValue},</if>
|
||
|
</trim>
|
||
|
where id = #{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteNodeTaskLogByIds" parameterType="String">
|
||
|
delete from node_task_log where id in
|
||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||
|
#{id}
|
||
|
</foreach>
|
||
|
</delete>
|
||
|
|
||
|
</mapper>
|