|
|
@ -3,11 +3,13 @@ |
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|
|
|
<mapper namespace="com.ruoyi.web.persist.mapper.OnenetConfigMapper"> |
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="OnenetConfig" id="OnenetConfigResult"> |
|
|
|
<result property="id" column="id" /> |
|
|
|
<result property="configKey" column="config_key" /> |
|
|
|
<result property="configValue" column="config_value" /> |
|
|
|
<result property="ableUpdate" column="able_update" /> |
|
|
|
<result property="ableDelete" column="able_delete" /> |
|
|
|
<result property="createBy" column="create_by" /> |
|
|
|
<result property="createTime" column="create_time" /> |
|
|
|
<result property="updateBy" column="update_by" /> |
|
|
@ -15,27 +17,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="selectOnenetConfigVo"> |
|
|
|
select id, config_key, config_value, create_by, create_time, update_by, update_time from onenet_config |
|
|
|
select id, config_key, config_value, able_update, able_delete, create_by, create_time, update_by, update_time from onenet_config |
|
|
|
</sql> |
|
|
|
|
|
|
|
<select id="selectOnenetConfigList" parameterType="OnenetConfig" resultMap="OnenetConfigResult"> |
|
|
|
<include refid="selectOnenetConfigVo"/> |
|
|
|
<where> |
|
|
|
<where> |
|
|
|
<if test="configKey != null and configKey != ''"> and config_key = #{configKey}</if> |
|
|
|
<if test="configValue != null and configValue != ''"> and config_value = #{configValue}</if> |
|
|
|
<if test="ableUpdate != null "> and able_update = #{ableUpdate}</if> |
|
|
|
<if test="ableDelete != null "> and able_delete = #{ableDelete}</if> |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="selectOnenetConfigById" parameterType="Integer" resultMap="OnenetConfigResult"> |
|
|
|
<include refid="selectOnenetConfigVo"/> |
|
|
|
where id = #{id} |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertOnenetConfig" parameterType="OnenetConfig" useGeneratedKeys="true" keyProperty="id"> |
|
|
|
insert into onenet_config |
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
|
|
|
<if test="configKey != null and configKey != ''">config_key,</if> |
|
|
|
<if test="configValue != null and configValue != ''">config_value,</if> |
|
|
|
<if test="ableUpdate != null">able_update,</if> |
|
|
|
<if test="ableDelete != null">able_delete,</if> |
|
|
|
<if test="createBy != null">create_by,</if> |
|
|
|
<if test="createTime != null">create_time,</if> |
|
|
|
<if test="updateBy != null">update_by,</if> |
|
|
@ -44,6 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|
|
|
<if test="configKey != null and configKey != ''">#{configKey},</if> |
|
|
|
<if test="configValue != null and configValue != ''">#{configValue},</if> |
|
|
|
<if test="ableUpdate != null">#{ableUpdate},</if> |
|
|
|
<if test="ableDelete != null">#{ableDelete},</if> |
|
|
|
<if test="createBy != null">#{createBy},</if> |
|
|
|
<if test="createTime != null">#{createTime},</if> |
|
|
|
<if test="updateBy != null">#{updateBy},</if> |
|
|
@ -56,6 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
<trim prefix="SET" suffixOverrides=","> |
|
|
|
<if test="configKey != null and configKey != ''">config_key = #{configKey},</if> |
|
|
|
<if test="configValue != null and configValue != ''">config_value = #{configValue},</if> |
|
|
|
<if test="ableUpdate != null">able_update = #{ableUpdate},</if> |
|
|
|
<if test="ableDelete != null">able_delete = #{ableDelete},</if> |
|
|
|
<if test="createBy != null">create_by = #{createBy},</if> |
|
|
|
<if test="createTime != null">create_time = #{createTime},</if> |
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if> |
|
|
@ -69,9 +79,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|
|
|
</delete> |
|
|
|
|
|
|
|
<delete id="deleteOnenetConfigByIds" parameterType="String"> |
|
|
|
delete from onenet_config where id in |
|
|
|
delete from onenet_config where id in |
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
</delete> |
|
|
|
</mapper> |
|
|
|
</mapper> |