DicIoPropertyMapper.xml 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="com.xinxin.topro.sysservice.dao.mysqlmapper.DicIoPropertyMapper" >
  4. <resultMap id="BaseResultMap" type="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIoProperty" >
  5. <id column="DIP_ID" property="dipId" jdbcType="INTEGER" />
  6. <result column="DIO_ID" property="dioId" jdbcType="INTEGER" />
  7. <result column="DIP_PropCode" property="dipPropcode" jdbcType="VARCHAR" />
  8. <result column="DIP_PropName" property="dipPropname" jdbcType="VARCHAR" />
  9. <result column="DIP_Operation_Time" property="dipOperationTime" jdbcType="TIMESTAMP" />
  10. <result column="DIP_Operator" property="dipOperator" jdbcType="VARCHAR" />
  11. <result column="DIP_SupID" property="dipSupid" jdbcType="INTEGER" />
  12. <result column="DIP_IsDel" property="dipIsdel" jdbcType="INTEGER" />
  13. <result column="DIP_Sort" property="dipSort" jdbcType="INTEGER"/>
  14. </resultMap>
  15. <sql id="Base_Column_List" >
  16. DIP_ID, DIO_ID, DIP_PropCode, DIP_PropName, DIP_Operation_Time, DIP_Operator, DIP_SupID,
  17. DIP_IsDel,DIP_Sort
  18. </sql>
  19. <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
  20. select
  21. <include refid="Base_Column_List" />
  22. from dic_io_property
  23. where DIP_ID = #{dipId,jdbcType=INTEGER} order by DIP_Sort desc
  24. </select>
  25. <select id="selectByDioId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
  26. select
  27. <include refid="Base_Column_List" />
  28. from dic_io_property
  29. where DIO_ID = #{dioId,jdbcType=INTEGER} and DIP_IsDel = 0 order by DIP_Sort desc
  30. </select>
  31. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
  32. delete from dic_io_property
  33. where DIP_ID = #{dipId,jdbcType=INTEGER}
  34. </delete>
  35. <insert id="insert" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIoProperty" >
  36. insert into dic_io_property (DIP_ID, DIO_ID, DIP_PropCode,
  37. DIP_PropName, DIP_Operation_Time, DIP_Operator,
  38. DIP_SupID, DIP_IsDel,DIP_Sort)
  39. values (#{dipId,jdbcType=INTEGER}, #{dioId,jdbcType=INTEGER}, #{dipPropcode,jdbcType=VARCHAR},
  40. #{dipPropname,jdbcType=VARCHAR}, #{dipOperationTime,jdbcType=TIMESTAMP}, #{dipOperator,jdbcType=VARCHAR},
  41. #{dipSupid,jdbcType=INTEGER}, #{dipIsdel,jdbcType=INTEGER},#{dipSort,jdbcType=INTEGER})
  42. </insert>
  43. <insert id="addProperty" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIoProperty" >
  44. insert into dic_io_property (DIO_ID, DIP_PropCode,
  45. DIP_PropName, DIP_Operation_Time, DIP_Operator,
  46. DIP_SupID, DIP_IsDel,DIP_Sort)
  47. values (#{dioId,jdbcType=INTEGER}, #{dipPropcode,jdbcType=VARCHAR},
  48. #{dipPropname,jdbcType=VARCHAR}, now(), #{dipOperator,jdbcType=VARCHAR},
  49. #{dipSupid,jdbcType=INTEGER}, #{dipIsdel,jdbcType=INTEGER},#{dipSort,jdbcType=INTEGER})
  50. </insert>
  51. <insert id="insertSelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIoProperty" >
  52. insert into dic_io_property
  53. <trim prefix="(" suffix=")" suffixOverrides="," >
  54. <if test="dipId != null" >
  55. DIP_ID,
  56. </if>
  57. <if test="dioId != null" >
  58. DIO_ID,
  59. </if>
  60. <if test="dipPropcode != null" >
  61. DIP_PropCode,
  62. </if>
  63. <if test="dipPropname != null" >
  64. DIP_PropName,
  65. </if>
  66. <if test="dipOperationTime != null" >
  67. DIP_Operation_Time,
  68. </if>
  69. <if test="dipOperator != null" >
  70. DIP_Operator,
  71. </if>
  72. <if test="dipSupid != null" >
  73. DIP_SupID,
  74. </if>
  75. <if test="dipIsdel != null" >
  76. DIP_IsDel,
  77. </if>
  78. <if test="dipSort != null" >
  79. DIP_Sort,
  80. </if>
  81. </trim>
  82. <trim prefix="values (" suffix=")" suffixOverrides="," >
  83. <if test="dipId != null" >
  84. #{dipId,jdbcType=INTEGER},
  85. </if>
  86. <if test="dioId != null" >
  87. #{dioId,jdbcType=INTEGER},
  88. </if>
  89. <if test="dipPropcode != null" >
  90. #{dipPropcode,jdbcType=VARCHAR},
  91. </if>
  92. <if test="dipPropname != null" >
  93. #{dipPropname,jdbcType=VARCHAR},
  94. </if>
  95. <if test="dipOperationTime != null" >
  96. #{dipOperationTime,jdbcType=TIMESTAMP},
  97. </if>
  98. <if test="dipOperator != null" >
  99. #{dipOperator,jdbcType=VARCHAR},
  100. </if>
  101. <if test="dipSupid != null" >
  102. #{dipSupid,jdbcType=INTEGER},
  103. </if>
  104. <if test="dipIsdel != null" >
  105. #{dipIsdel,jdbcType=INTEGER},
  106. </if>
  107. <if test="dipSort != null" >
  108. #{dipSort,jdbcType=INTEGER},
  109. </if>
  110. </trim>
  111. </insert>
  112. <update id="updateByPrimaryKeySelective" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIoProperty" >
  113. update dic_io_property
  114. <set >
  115. <if test="dioId != null" >
  116. DIO_ID = #{dioId,jdbcType=INTEGER},
  117. </if>
  118. <if test="dipPropcode != null" >
  119. DIP_PropCode = #{dipPropcode,jdbcType=VARCHAR},
  120. </if>
  121. <if test="dipPropname != null" >
  122. DIP_PropName = #{dipPropname,jdbcType=VARCHAR},
  123. </if>
  124. <if test="dipOperationTime != null" >
  125. DIP_Operation_Time = #{dipOperationTime,jdbcType=TIMESTAMP},
  126. </if>
  127. <if test="dipOperator != null" >
  128. DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
  129. </if>
  130. <if test="dipSupid != null" >
  131. DIP_SupID = #{dipSupid,jdbcType=INTEGER},
  132. </if>
  133. <if test="dipIsdel != null" >
  134. DIP_IsDel = #{dipIsdel,jdbcType=INTEGER},
  135. </if>
  136. <if test="dipSort != null" >
  137. DIP_Sort = #{dipSort,jdbcType=INTEGER},
  138. </if>
  139. </set>
  140. where DIP_ID = #{dipId,jdbcType=INTEGER}
  141. </update>
  142. <update id="updateByPrimaryKey" parameterType="com.xinxin.topro.sysservice.dao.mysqlmodel.SysDicIoProperty" >
  143. update dic_io_property
  144. set DIO_ID = #{dioId,jdbcType=INTEGER},
  145. DIP_PropCode = #{dipPropcode,jdbcType=VARCHAR},
  146. DIP_PropName = #{dipPropname,jdbcType=VARCHAR},
  147. DIP_Operation_Time = #{dipOperationTime,jdbcType=TIMESTAMP},
  148. DIP_Operator = #{dipOperator,jdbcType=VARCHAR},
  149. DIP_SupID = #{dipSupid,jdbcType=INTEGER},
  150. DIP_IsDel = #{dipIsdel,jdbcType=INTEGER},
  151. DIP_Sorrt = #{dipSort,jdbcType=INTEGER}
  152. where DIP_ID = #{dipId,jdbcType=INTEGER}
  153. </update>
  154. <update id="delProperty" parameterType="java.lang.Integer" >
  155. update dic_io_property
  156. set DIP_IsDel = -1
  157. where DIP_ID = #{dipId,jdbcType=INTEGER}
  158. </update>
  159. <update id="delPropertyBySupId" parameterType="java.lang.Integer" >
  160. update dic_io_property
  161. set DIP_IsDel = -1
  162. where DIP_SupID = #{supId,jdbcType=INTEGER}
  163. </update>
  164. <update id="delPropertyByDioId" parameterType="java.lang.Integer" >
  165. update dic_io_property
  166. set DIP_IsDel = -1
  167. where DIO_ID = #{dioId,jdbcType=INTEGER}
  168. </update>
  169. <select id="selectByCode" resultMap="BaseResultMap" parameterType="java.lang.String">
  170. select <include refid="Base_Column_List"/>
  171. from dic_io_property
  172. where DIP_PropCode=#{dipPropcode,jdbcType=VARCHAR} and DIP_IsDel=0
  173. </select>
  174. </mapper>