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

141 lines
8.3 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.NodeSettingMapper">
<resultMap type="com.ruoyi.system.domain.NodeSetting" id="NodeSettingResult">
<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="buyCoinName" column="buy_coin_name" />
<result property="nodeTotal" column="node_total" />
<result property="nodePrice" column="node_price" />
<result property="purchaseLimit" column="purchase_limit" />
<result property="purchasedCount" column="purchased_count" />
<result property="purchasedAmount" column="purchased_amount" />
<result property="status" column="status" />
<result property="nodeName" column="node_name" />
<result property="illustrate" column="illustrate" />
<result property="title" column="title" />
<result property="nodeGrade" column="node_grade" />
</resultMap>
<sql id="selectNodeSettingVo">
select id, create_time, create_by, update_time, update_by, buy_coin_name, node_total, node_price, purchase_limit, purchased_count, purchased_amount, status, node_name, illustrate, title, node_grade from node_setting
</sql>
<select id="selectNodeSettingList" parameterType="com.ruoyi.system.domain.NodeSetting" resultMap="NodeSettingResult">
<include refid="selectNodeSettingVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="buyCoinName != null and buyCoinName != ''"> and buy_coin_name like concat('%', #{buyCoinName}, '%')</if>
<if test="nodeTotal != null "> and node_total = #{nodeTotal}</if>
<if test="nodePrice != null "> and node_price = #{nodePrice}</if>
<if test="purchaseLimit != null "> and purchase_limit = #{purchaseLimit}</if>
<if test="purchasedCount != null "> and purchased_count = #{purchasedCount}</if>
<if test="purchasedAmount != null "> and purchased_amount = #{purchasedAmount}</if>
<if test="status != null "> and status = #{status}</if>
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
<if test="illustrate != null and illustrate != ''"> and illustrate = #{illustrate}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="nodeGrade != null and nodeGrade != ''"> and node_grade = #{nodeGrade}</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="findNodeSetting" parameterType="com.ruoyi.system.domain.NodeSetting" resultMap="NodeSettingResult">
<include refid="selectNodeSettingVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="buyCoinName != null and buyCoinName != ''"> and buy_coin_name like concat('%', #{buyCoinName}, '%')</if>
<if test="nodeTotal != null "> and node_total = #{nodeTotal}</if>
<if test="nodePrice != null "> and node_price = #{nodePrice}</if>
<if test="purchaseLimit != null "> and purchase_limit = #{purchaseLimit}</if>
<if test="purchasedCount != null "> and purchased_count = #{purchasedCount}</if>
<if test="purchasedAmount != null "> and purchased_amount = #{purchasedAmount}</if>
<if test="status != null "> and status = #{status}</if>
<if test="nodeName != null and nodeName != ''"> and node_name like concat('%', #{nodeName}, '%')</if>
<if test="illustrate != null and illustrate != ''"> and illustrate = #{illustrate}</if>
<if test="title != null and title != ''"> and title = #{title}</if>
<if test="nodeGrade != null and nodeGrade != ''"> and node_grade = #{nodeGrade}</if>
</where>
limit 1
</select>
<select id="selectNodeSettingById" parameterType="Integer" resultMap="NodeSettingResult">
<include refid="selectNodeSettingVo"/>
where id = #{id}
</select>
<insert id="insertNodeSetting" parameterType="com.ruoyi.system.domain.NodeSetting" useGeneratedKeys="true" keyProperty="id">
insert into node_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="buyCoinName != null and buyCoinName != ''">buy_coin_name,</if>
<if test="nodeTotal != null">node_total,</if>
<if test="nodePrice != null">node_price,</if>
<if test="purchaseLimit != null">purchase_limit,</if>
<if test="purchasedCount != null">purchased_count,</if>
<if test="purchasedAmount != null">purchased_amount,</if>
<if test="status != null">status,</if>
<if test="nodeName != null and nodeName != ''">node_name,</if>
<if test="illustrate != null">illustrate,</if>
<if test="title != null">title,</if>
<if test="nodeGrade != null">node_grade,</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="buyCoinName != null and buyCoinName != ''">#{buyCoinName},</if>
<if test="nodeTotal != null">#{nodeTotal},</if>
<if test="nodePrice != null">#{nodePrice},</if>
<if test="purchaseLimit != null">#{purchaseLimit},</if>
<if test="purchasedCount != null">#{purchasedCount},</if>
<if test="purchasedAmount != null">#{purchasedAmount},</if>
<if test="status != null">#{status},</if>
<if test="nodeName != null and nodeName != ''">#{nodeName},</if>
<if test="illustrate != null">#{illustrate},</if>
<if test="title != null">#{title},</if>
<if test="nodeGrade != null">#{nodeGrade},</if>
</trim>
</insert>
<update id="updateNodeSetting" parameterType="com.ruoyi.system.domain.NodeSetting">
update node_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="buyCoinName != null and buyCoinName != ''">buy_coin_name = #{buyCoinName},</if>
<if test="nodeTotal != null">node_total = #{nodeTotal},</if>
<if test="nodePrice != null">node_price = #{nodePrice},</if>
<if test="purchaseLimit != null">purchase_limit = #{purchaseLimit},</if>
<if test="purchasedCount != null">purchased_count = #{purchasedCount},</if>
<if test="purchasedAmount != null">purchased_amount = #{purchasedAmount},</if>
<if test="status != null">status = #{status},</if>
<if test="nodeName != null and nodeName != ''">node_name = #{nodeName},</if>
<if test="illustrate != null">illustrate = #{illustrate},</if>
<if test="title != null">title = #{title},</if>
<if test="nodeGrade != null">node_grade = #{nodeGrade},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteNodeSettingByIds" parameterType="String">
delete from node_setting where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>