LotattConfigMapper.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.ams.config.mapper.LotattConfigMapper">
  6. <resultMap type="LotattConfig" id="LotattConfigResult">
  7. <result property="id" column="id" />
  8. <result property="lotattId" column="lotatt_id" />
  9. <result property="lotattName" column="lotatt_name" />
  10. <result property="requiredTag" column="required_tag" />
  11. <result property="inputType" column="input_type" />
  12. <result property="inputScope" column="input_scope" />
  13. <result property="defaultValue" column="default_value" />
  14. <result property="status" column="status" />
  15. <result property="createBy" column="create_by" />
  16. <result property="createTime" column="create_time" />
  17. <result property="updateBy" column="update_by" />
  18. <result property="updateTime" column="update_time" />
  19. <result property="remark" column="remark" />
  20. </resultMap>
  21. <resultMap type="com.ruoyi.ams.config.domain.vo.LotattConfigVO" id="LotattConfigVOResult">
  22. <result property="lotattId" column="lotatt_id" />
  23. <result property="lotattName" column="lotatt_name" />
  24. <result property="lotattFlag" column="lotatt_flag" />
  25. <result property="inputType" column="input_type" />
  26. <result property="inputScope" column="input_scope" />
  27. <result property="defaultValue" column="default_value" />
  28. </resultMap>
  29. <sql id="selectLotattConfigVo">
  30. 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
  31. </sql>
  32. <select id="selectLotattConfigList" parameterType="LotattConfig" resultMap="LotattConfigResult">
  33. <include refid="selectLotattConfigVo"/>
  34. where status = 0
  35. </select>
  36. <select id="selectLotattConfigById" parameterType="Long" resultMap="LotattConfigResult">
  37. <include refid="selectLotattConfigVo"/>
  38. where id = #{id}
  39. </select>
  40. <insert id="insertLotattConfig" parameterType="LotattConfig" useGeneratedKeys="true" keyProperty="id">
  41. insert into lotatt_config
  42. <trim prefix="(" suffix=")" suffixOverrides=",">
  43. <if test="lotattId != null and lotattId != ''">lotatt_id,</if>
  44. <if test="lotattName != null and lotattName != ''">lotatt_name,</if>
  45. <if test="requiredTag != null and requiredTag != ''">required_tag,</if>
  46. <if test="inputType != null and inputType != ''">input_type,</if>
  47. <if test="inputScope != null">input_scope,</if>
  48. <if test="defaultValue != null">default_value,</if>
  49. <if test="status != null and status != ''">status,</if>
  50. <if test="createBy != null">create_by,</if>
  51. <if test="createTime != null">create_time,</if>
  52. <if test="updateBy != null">update_by,</if>
  53. <if test="updateTime != null">update_time,</if>
  54. <if test="remark != null">remark,</if>
  55. </trim>
  56. <trim prefix="values (" suffix=")" suffixOverrides=",">
  57. <if test="lotattId != null and lotattId != ''">#{lotattId},</if>
  58. <if test="lotattName != null and lotattName != ''">#{lotattName},</if>
  59. <if test="requiredTag != null and requiredTag != ''">#{requiredTag},</if>
  60. <if test="inputType != null and inputType != ''">#{inputType},</if>
  61. <if test="inputScope != null">#{inputScope},</if>
  62. <if test="defaultValue != null">#{defaultValue},</if>
  63. <if test="status != null and status != ''">#{status},</if>
  64. <if test="createBy != null">#{createBy},</if>
  65. <if test="createTime != null">#{createTime},</if>
  66. <if test="updateBy != null">#{updateBy},</if>
  67. <if test="updateTime != null">#{updateTime},</if>
  68. <if test="remark != null">#{remark},</if>
  69. </trim>
  70. </insert>
  71. <update id="updateLotattConfig" parameterType="LotattConfig">
  72. update lotatt_config
  73. <trim prefix="SET" suffixOverrides=",">
  74. <if test="lotattId != null and lotattId != ''">lotatt_id = #{lotattId},</if>
  75. <if test="lotattName != null and lotattName != ''">lotatt_name = #{lotattName},</if>
  76. <if test="requiredTag != null and requiredTag != ''">required_tag = #{requiredTag},</if>
  77. <if test="inputType != null and inputType != ''">input_type = #{inputType},</if>
  78. <if test="inputScope != null">input_scope = #{inputScope},</if>
  79. <if test="defaultValue != null">default_value = #{defaultValue},</if>
  80. <if test="status != null and status != ''">status = #{status},</if>
  81. <if test="createBy != null">create_by = #{createBy},</if>
  82. <if test="createTime != null">create_time = #{createTime},</if>
  83. <if test="updateBy != null">update_by = #{updateBy},</if>
  84. <if test="updateTime != null">update_time = #{updateTime},</if>
  85. <if test="remark != null">remark = #{remark},</if>
  86. </trim>
  87. where id = #{id}
  88. </update>
  89. <delete id="deleteLotattConfigById" parameterType="Long">
  90. delete from lotatt_config where id = #{id}
  91. </delete>
  92. <delete id="deleteLotattConfigByIds" parameterType="String">
  93. delete from lotatt_config where id in
  94. <foreach item="id" collection="array" open="(" separator="," close=")">
  95. #{id}
  96. </foreach>
  97. </delete>
  98. <select id="queryLotattConfigList" resultMap="LotattConfigVOResult">
  99. select lotatt_id,lotatt_name,required_tag lotatt_flag, input_type, input_scope, default_value from lotatt_config
  100. where status = '0'
  101. </select>
  102. <select id="queryLotattConfigListActive" resultMap="LotattConfigVOResult">
  103. select lotatt_id,lotatt_name,required_tag lotatt_flag, input_type, input_scope, default_value from lotatt_config
  104. where status = '0' and required_tag <![CDATA[ <> ]]> 'Hidden'
  105. </select>
  106. <select id="lotattConfigComboDict" resultType="string">
  107. select input_scope from lotatt_config where input_type = 'ComboBox' and input_scope is not null group by input_scope
  108. </select>
  109. </mapper>