| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <?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.interfaces.mapper.MdDataFieldMapper">
- <resultMap type="com.ruoyi.interfaces.domain.MdDataField" id="MdDataFieldResult">
- <result property="dcCode" column="DC_CODE" />
- <result property="fieldCode" column="FIELD_CODE" />
- <result property="fieldName" column="FIELD_NAME" />
- <result property="fieldType" column="FIELD_TYPE" />
- <result property="fieldLength" column="FIELD_LENGTH" />
- <result property="fieldPrecision" column="FIELD_PRECISION" />
- <result property="fieldIspri" column="FIELD_ISPRI" />
- <result property="fieldIsnullable" column="FIELD_ISNULLABLE" />
- <result property="fieldDefault" column="FIELD_DEFAULT" />
- <result property="fieldDesc" column="FIELD_DESC" />
- <result property="fieldStatus" column="FIELD_STATUS" />
- <result property="fieldOrder" column="FIELD_ORDER" />
- <result property="fieldExtend" column="FIELD_EXTEND" />
- <result property="fieldExtendTable" column="FIELD_EXTEND_TABLE" />
- <result property="fieldInputType" column="FIELD_INPUT_TYPE" />
- <result property="fieldInputFormat" column="FIELD_INPUT_FORMAT" />
- <result property="fieldInputDefault" column="FIELD_INPUT_DEFAULT" />
- <result property="fieldViewType" column="FIELD_VIEW_TYPE" />
- <result property="fieldDict" column="FIELD_DICT" />
- </resultMap>
- <sql id="selectMdDataFieldVo">
- select DC_CODE, FIELD_CODE, FIELD_NAME, FIELD_TYPE, FIELD_LENGTH, FIELD_PRECISION, FIELD_ISPRI, FIELD_ISNULLABLE, FIELD_DEFAULT, FIELD_DESC, FIELD_STATUS, FIELD_ORDER, FIELD_EXTEND, FIELD_EXTEND_TABLE, FIELD_INPUT_TYPE, FIELD_INPUT_FORMAT, FIELD_INPUT_DEFAULT, FIELD_VIEW_TYPE, FIELD_DICT from md_data_field
- </sql>
- <select id="selectMdDataFieldList" parameterType="com.ruoyi.interfaces.domain.MdDataField" resultMap="MdDataFieldResult">
- <include refid="selectMdDataFieldVo"/>
- <where>
- <if test="dcCode != null and dcCode != ''"> and DC_CODE = #{dcCode}</if>
- <if test="fieldName != null and fieldName != ''"> and FIELD_NAME like concat('%', #{fieldName}, '%')</if>
- <if test="fieldType != null and fieldType != ''"> and FIELD_TYPE = #{fieldType}</if>
- <if test="fieldLength != null and fieldLength != ''"> and FIELD_LENGTH = #{fieldLength}</if>
- <if test="fieldPrecision != null and fieldPrecision != ''"> and FIELD_PRECISION = #{fieldPrecision}</if>
- <if test="fieldIspri != null and fieldIspri != ''"> and FIELD_ISPRI = #{fieldIspri}</if>
- <if test="fieldIsnullable != null and fieldIsnullable != ''"> and FIELD_ISNULLABLE = #{fieldIsnullable}</if>
- <if test="fieldDefault != null and fieldDefault != ''"> and FIELD_DEFAULT = #{fieldDefault}</if>
- <if test="fieldDesc != null and fieldDesc != ''"> and FIELD_DESC = #{fieldDesc}</if>
- <if test="fieldStatus != null and fieldStatus != ''"> and FIELD_STATUS = #{fieldStatus}</if>
- <if test="fieldOrder != null "> and FIELD_ORDER = #{fieldOrder}</if>
- <if test="fieldExtend != null and fieldExtend != ''"> and FIELD_EXTEND = #{fieldExtend}</if>
- <if test="fieldExtendTable != null and fieldExtendTable != ''"> and FIELD_EXTEND_TABLE = #{fieldExtendTable}</if>
- <if test="fieldInputType != null and fieldInputType != ''"> and FIELD_INPUT_TYPE = #{fieldInputType}</if>
- <if test="fieldInputFormat != null and fieldInputFormat != ''"> and FIELD_INPUT_FORMAT = #{fieldInputFormat}</if>
- <if test="fieldInputDefault != null and fieldInputDefault != ''"> and FIELD_INPUT_DEFAULT = #{fieldInputDefault}</if>
- <if test="fieldViewType != null and fieldViewType != ''"> and FIELD_VIEW_TYPE = #{fieldViewType}</if>
- <if test="fieldDict != null and fieldDict != ''"> and FIELD_DICT = #{fieldDict}</if>
- </where>
- order by FIELD_ORDER
- </select>
- <select id="selectMdDataFieldByDsCode" parameterType="String" resultMap="MdDataFieldResult">
- <include refid="selectMdDataFieldVo"/>
- where DC_CODE = #{dcCode}
- </select>
- <insert id="insertMdDataField" parameterType="com.ruoyi.interfaces.domain.MdDataField">
- insert into md_data_field
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="dcCode != null">DC_CODE,</if>
- <if test="fieldCode != null">FIELD_CODE,</if>
- <if test="fieldName != null">FIELD_NAME,</if>
- <if test="fieldType != null">FIELD_TYPE,</if>
- <if test="fieldLength != null">FIELD_LENGTH,</if>
- <if test="fieldPrecision != null">FIELD_PRECISION,</if>
- <if test="fieldIspri != null">FIELD_ISPRI,</if>
- <if test="fieldIsnullable != null">FIELD_ISNULLABLE,</if>
- <if test="fieldDefault != null">FIELD_DEFAULT,</if>
- <if test="fieldDesc != null">FIELD_DESC,</if>
- <if test="fieldStatus != null">FIELD_STATUS,</if>
- <if test="fieldOrder != null">FIELD_ORDER,</if>
- <if test="fieldExtend != null">FIELD_EXTEND,</if>
- <if test="fieldExtendTable != null">FIELD_EXTEND_TABLE,</if>
- <if test="fieldInputType != null">FIELD_INPUT_TYPE,</if>
- <if test="fieldInputFormat != null">FIELD_INPUT_FORMAT,</if>
- <if test="fieldInputDefault != null">FIELD_INPUT_DEFAULT,</if>
- <if test="fieldViewType != null">FIELD_VIEW_TYPE,</if>
- <if test="fieldDict != null">FIELD_DICT,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="dcCode != null">#{dcCode},</if>
- <if test="fieldCode != null">#{fieldCode},</if>
- <if test="fieldName != null">#{fieldName},</if>
- <if test="fieldType != null">#{fieldType},</if>
- <if test="fieldLength != null">#{fieldLength},</if>
- <if test="fieldPrecision != null">#{fieldPrecision},</if>
- <if test="fieldIspri != null">#{fieldIspri},</if>
- <if test="fieldIsnullable != null">#{fieldIsnullable},</if>
- <if test="fieldDefault != null">#{fieldDefault},</if>
- <if test="fieldDesc != null">#{fieldDesc},</if>
- <if test="fieldStatus != null">#{fieldStatus},</if>
- <if test="fieldOrder != null">#{fieldOrder},</if>
- <if test="fieldExtend != null">#{fieldExtend},</if>
- <if test="fieldExtendTable != null">#{fieldExtendTable},</if>
- <if test="fieldInputType != null">#{fieldInputType},</if>
- <if test="fieldInputFormat != null">#{fieldInputFormat},</if>
- <if test="fieldInputDefault != null">#{fieldInputDefault},</if>
- <if test="fieldViewType != null">#{fieldViewType},</if>
- <if test="fieldDict != null">#{fieldDict},</if>
- </trim>
- </insert>
- <update id="updateMdDataField" parameterType="com.ruoyi.interfaces.domain.MdDataField">
- update md_data_field
- <trim prefix="SET" suffixOverrides=",">
- FIELD_NAME = #{fieldName,jdbcType=VARCHAR},
- FIELD_TYPE = #{fieldType,jdbcType=VARCHAR},
- FIELD_LENGTH = #{fieldLength,jdbcType=VARCHAR},
- FIELD_PRECISION = #{fieldPrecision,jdbcType=VARCHAR},
- FIELD_ISPRI = #{fieldIspri,jdbcType=VARCHAR},
- FIELD_ISNULLABLE = #{fieldIsnullable,jdbcType=VARCHAR},
- FIELD_DEFAULT = #{fieldDefault,jdbcType=VARCHAR},
- FIELD_DESC = #{fieldDesc,jdbcType=VARCHAR},
- FIELD_STATUS = #{fieldStatus,jdbcType=VARCHAR},
- FIELD_ORDER = #{fieldOrder,jdbcType=INTEGER},
- FIELD_EXTEND = #{fieldExtend,jdbcType=VARCHAR},
- FIELD_EXTEND_TABLE = #{fieldExtendTable,jdbcType=VARCHAR},
- FIELD_INPUT_TYPE = #{fieldInputType,jdbcType=VARCHAR},
- FIELD_INPUT_FORMAT = #{fieldInputFormat,jdbcType=VARCHAR},
- FIELD_INPUT_DEFAULT = #{fieldInputDefault,jdbcType=VARCHAR},
- FIELD_VIEW_TYPE = #{fieldViewType,jdbcType=VARCHAR},
- FIELD_DICT = #{fieldDict,jdbcType=VARCHAR},
- </trim>
- where DC_CODE = #{dcCode} and
- FIELD_CODE = #{fieldCode}
- </update>
- <delete id="deleteMdDataFieldByDsCode" parameterType="String">
- delete from md_data_field where DC_CODE = #{dcCode}
- </delete>
- <delete id="deleteMdDataFieldByDsCodes" parameterType="String">
- delete from md_data_field where DC_CODE in
- <foreach item="dcCode" collection="array" open="(" separator="," close=")">
- #{dcCode}
- </foreach>
- </delete>
- <delete id="deleteMdDataFieldOne">
- delete
- from md_data_field
- where DC_CODE = #{dcCode}
- and field_Code = #{fieldCode}
- </delete>
- </mapper>
|