123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <?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.ams.config.mapper.LotattConfigMapper">
-
- <resultMap type="LotattConfig" id="LotattConfigResult">
- <result property="id" column="id" />
- <result property="lotattId" column="lotatt_id" />
- <result property="lotattName" column="lotatt_name" />
- <result property="requiredTag" column="required_tag" />
- <result property="inputType" column="input_type" />
- <result property="inputScope" column="input_scope" />
- <result property="defaultValue" column="default_value" />
- <result property="status" column="status" />
- <result property="createBy" column="create_by" />
- <result property="createTime" column="create_time" />
- <result property="updateBy" column="update_by" />
- <result property="updateTime" column="update_time" />
- <result property="remark" column="remark" />
- </resultMap>
- <resultMap type="com.ruoyi.ams.config.domain.vo.LotattConfigVO" id="LotattConfigVOResult">
- <result property="lotattId" column="lotatt_id" />
- <result property="lotattName" column="lotatt_name" />
- <result property="lotattFlag" column="lotatt_flag" />
- <result property="inputType" column="input_type" />
- <result property="inputScope" column="input_scope" />
- <result property="defaultValue" column="default_value" />
- </resultMap>
- <sql id="selectLotattConfigVo">
- select id, lotatt_id, lotatt_name, required_tag, input_type, input_scope, default_value, status, create_by, create_time, update_by, update_time, remark from lotatt_config
- </sql>
- <select id="selectLotattConfigList" parameterType="LotattConfig" resultMap="LotattConfigResult">
- <include refid="selectLotattConfigVo"/>
- where status = 0
- </select>
-
- <select id="selectLotattConfigById" parameterType="Long" resultMap="LotattConfigResult">
- <include refid="selectLotattConfigVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertLotattConfig" parameterType="LotattConfig" useGeneratedKeys="true" keyProperty="id">
- insert into lotatt_config
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="lotattId != null and lotattId != ''">lotatt_id,</if>
- <if test="lotattName != null and lotattName != ''">lotatt_name,</if>
- <if test="requiredTag != null and requiredTag != ''">required_tag,</if>
- <if test="inputType != null and inputType != ''">input_type,</if>
- <if test="inputScope != null">input_scope,</if>
- <if test="defaultValue != null">default_value,</if>
- <if test="status != null and status != ''">status,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="lotattId != null and lotattId != ''">#{lotattId},</if>
- <if test="lotattName != null and lotattName != ''">#{lotattName},</if>
- <if test="requiredTag != null and requiredTag != ''">#{requiredTag},</if>
- <if test="inputType != null and inputType != ''">#{inputType},</if>
- <if test="inputScope != null">#{inputScope},</if>
- <if test="defaultValue != null">#{defaultValue},</if>
- <if test="status != null and status != ''">#{status},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateLotattConfig" parameterType="LotattConfig">
- update lotatt_config
- <trim prefix="SET" suffixOverrides=",">
- <if test="lotattId != null and lotattId != ''">lotatt_id = #{lotattId},</if>
- <if test="lotattName != null and lotattName != ''">lotatt_name = #{lotattName},</if>
- <if test="requiredTag != null and requiredTag != ''">required_tag = #{requiredTag},</if>
- <if test="inputType != null and inputType != ''">input_type = #{inputType},</if>
- <if test="inputScope != null">input_scope = #{inputScope},</if>
- <if test="defaultValue != null">default_value = #{defaultValue},</if>
- <if test="status != null and status != ''">status = #{status},</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>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteLotattConfigById" parameterType="Long">
- delete from lotatt_config where id = #{id}
- </delete>
- <delete id="deleteLotattConfigByIds" parameterType="String">
- delete from lotatt_config where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
- <select id="queryLotattConfigList" resultMap="LotattConfigVOResult">
- select lotatt_id,lotatt_name,required_tag lotatt_flag, input_type, input_scope, default_value from lotatt_config
- where status = '0'
- </select>
- <select id="queryLotattConfigListActive" resultMap="LotattConfigVOResult">
- select lotatt_id,lotatt_name,required_tag lotatt_flag, input_type, input_scope, default_value from lotatt_config
- where status = '0' and required_tag <![CDATA[ <> ]]> 'Hidden'
- </select>
- <select id="lotattConfigComboDict" resultType="string">
- select input_scope from lotatt_config where input_type = 'ComboBox' and input_scope is not null group by input_scope
- </select>
- </mapper>
|