alive-admin/alive-server/target/classes/mapper/system/NodeAwardSettingMapper.xml

123 lines
6.6 KiB
XML
Raw Normal View History

2024-05-27 16:26:14 +08:00
<?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.NodeAwardSettingMapper">
<resultMap type="com.ruoyi.system.domain.NodeAwardSetting" id="NodeAwardSettingResult">
<result property="id" column="id" />
<result property="createTime" column="create_time" />
<result property="createBy" column="create_by" />
<result property="updateTime" column="update_time" />
<result property="updateBy" column="update_by" />
<result property="nodeSettingId" column="node_setting_id" />
<result property="rebate" column="rebate" />
<result property="rbitAmount" column="rbit_amount" />
<result property="rbitOne" column="rbit_one" />
<result property="rebateTwo" column="rebate_two" />
<result property="nftAmount" column="nft_amount" />
<result property="nftOne" column="nft_one" />
<result property="nftTwo" column="nft_two" />
</resultMap>
<sql id="selectNodeAwardSettingVo">
select id, create_time, create_by, update_time, update_by, node_setting_id, rebate, rbit_amount, rbit_one, rebate_two, nft_amount, nft_one, nft_two from node_award_setting
</sql>
<select id="selectNodeAwardSettingList" parameterType="com.ruoyi.system.domain.NodeAwardSetting" resultMap="NodeAwardSettingResult">
<include refid="selectNodeAwardSettingVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="nodeSettingId != null "> and node_setting_id = #{nodeSettingId}</if>
<if test="rebate != null "> and rebate = #{rebate}</if>
<if test="rbitAmount != null "> and rbit_amount = #{rbitAmount}</if>
<if test="rbitOne != null "> and rbit_one = #{rbitOne}</if>
<if test="rebateTwo != null "> and rebate_two = #{rebateTwo}</if>
<if test="nftAmount != null "> and nft_amount = #{nftAmount}</if>
<if test="nftOne != null "> and nft_one = #{nftOne}</if>
<if test="nftTwo != null "> and nft_two = #{nftTwo}</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="findNodeAwardSetting" parameterType="com.ruoyi.system.domain.NodeAwardSetting" resultMap="NodeAwardSettingResult">
<include refid="selectNodeAwardSettingVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="nodeSettingId != null "> and node_setting_id = #{nodeSettingId}</if>
<if test="rebate != null "> and rebate = #{rebate}</if>
<if test="rbitAmount != null "> and rbit_amount = #{rbitAmount}</if>
<if test="rbitOne != null "> and rbit_one = #{rbitOne}</if>
<if test="rebateTwo != null "> and rebate_two = #{rebateTwo}</if>
<if test="nftAmount != null "> and nft_amount = #{nftAmount}</if>
<if test="nftOne != null "> and nft_one = #{nftOne}</if>
<if test="nftTwo != null "> and nft_two = #{nftTwo}</if>
</where>
limit 1
</select>
<select id="selectNodeAwardSettingById" parameterType="Integer" resultMap="NodeAwardSettingResult">
<include refid="selectNodeAwardSettingVo"/>
where id = #{id}
</select>
<insert id="insertNodeAwardSetting" parameterType="com.ruoyi.system.domain.NodeAwardSetting" useGeneratedKeys="true" keyProperty="id">
insert into node_award_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="createTime != null">create_time,</if>
<if test="createBy != null">create_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="nodeSettingId != null">node_setting_id,</if>
<if test="rebate != null">rebate,</if>
<if test="rbitAmount != null">rbit_amount,</if>
<if test="rbitOne != null">rbit_one,</if>
<if test="rebateTwo != null">rebate_two,</if>
<if test="nftAmount != null">nft_amount,</if>
<if test="nftOne != null">nft_one,</if>
<if test="nftTwo != null">nft_two,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="createTime != null">#{createTime},</if>
<if test="createBy != null">#{createBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="nodeSettingId != null">#{nodeSettingId},</if>
<if test="rebate != null">#{rebate},</if>
<if test="rbitAmount != null">#{rbitAmount},</if>
<if test="rbitOne != null">#{rbitOne},</if>
<if test="rebateTwo != null">#{rebateTwo},</if>
<if test="nftAmount != null">#{nftAmount},</if>
<if test="nftOne != null">#{nftOne},</if>
<if test="nftTwo != null">#{nftTwo},</if>
</trim>
</insert>
<update id="updateNodeAwardSetting" parameterType="com.ruoyi.system.domain.NodeAwardSetting">
update node_award_setting
<trim prefix="SET" suffixOverrides=",">
<if test="createTime != null">create_time = #{createTime},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="nodeSettingId != null">node_setting_id = #{nodeSettingId},</if>
<if test="rebate != null">rebate = #{rebate},</if>
<if test="rbitAmount != null">rbit_amount = #{rbitAmount},</if>
<if test="rbitOne != null">rbit_one = #{rbitOne},</if>
<if test="rebateTwo != null">rebate_two = #{rebateTwo},</if>
<if test="nftAmount != null">nft_amount = #{nftAmount},</if>
<if test="nftOne != null">nft_one = #{nftOne},</if>
<if test="nftTwo != null">nft_two = #{nftTwo},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNodeAwardSettingByIds" parameterType="String">
delete from node_award_setting where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>