MxjbMultipleWayCondMapper.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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.mxjb.mapper.MxjbMultipleWayCondMapper">
  6. <resultMap type="MxjbMultipleWayCond" id="MxjbMultipleWayCondResult">
  7. <result property="id" column="id" />
  8. <result property="direction" column="direction" />
  9. <result property="sort" column="sort" />
  10. <result property="condId" column="condId" />
  11. <result property="type" column="type" />
  12. <result property="sex" column="sex" />
  13. <result property="age" column="age" />
  14. <result property="location" column="location" />
  15. <result property="reverse" column="reverse" />
  16. <result property="optionValues" column="optionValues" />
  17. <result property="message" column="message" />
  18. </resultMap>
  19. <sql id="selectMxjbMultipleWayCondVo">
  20. select id, direction, sort, condId, type, sex, age, location, reverse, optionValues, message from mxjb_multiple_way_cond
  21. </sql>
  22. <select id="selectMxjbMultipleWayCondList" parameterType="MxjbMultipleWayCond" resultMap="MxjbMultipleWayCondResult">
  23. <include refid="selectMxjbMultipleWayCondVo"/>
  24. <where>
  25. <if test="direction != null and direction != ''"> and direction = #{direction}</if>
  26. <if test="sort != null "> and sort = #{sort}</if>
  27. <if test="condId != null "> and condId = #{condId}</if>
  28. <if test="type != null and type != ''"> and type = #{type}</if>
  29. <if test="sex != null and sex != ''"> and sex = #{sex}</if>
  30. <if test="age != null and sex != ''"> and age = #{age}</if>
  31. <if test="location != null and location != ''"> and location = #{location}</if>
  32. <if test="reverse != null "> and reverse = #{reverse}</if>
  33. <if test="optionValues != null and optionValues != ''"> and optionValues = #{optionValues}</if>
  34. <if test="message != null and message != ''"> and message = #{message}</if>
  35. </where>
  36. order by direction, sort
  37. </select>
  38. <select id="selectMxjbMultipleWayCondById" parameterType="Integer" resultMap="MxjbMultipleWayCondResult">
  39. <include refid="selectMxjbMultipleWayCondVo"/>
  40. where id = #{id}
  41. </select>
  42. <insert id="insertMxjbMultipleWayCond" parameterType="MxjbMultipleWayCond" useGeneratedKeys="true" keyProperty="id">
  43. insert into mxjb_multiple_way_cond
  44. <trim prefix="(" suffix=")" suffixOverrides=",">
  45. <if test="direction != null">direction,</if>
  46. <if test="sort != null">sort,</if>
  47. <if test="condId != null">condId,</if>
  48. <if test="type != null">type,</if>
  49. <if test="sex != null">sex,</if>
  50. <if test="age != null">age,</if>
  51. <if test="location != null">location,</if>
  52. <if test="reverse != null">reverse,</if>
  53. <if test="optionValues != null">optionValues,</if>
  54. <if test="message != null">message,</if>
  55. </trim>
  56. <trim prefix="values (" suffix=")" suffixOverrides=",">
  57. <if test="direction != null">#{direction},</if>
  58. <if test="sort != null">#{sort},</if>
  59. <if test="condId != null">#{condId},</if>
  60. <if test="type != null">#{type},</if>
  61. <if test="sex != null">#{sex},</if>
  62. <if test="age != null">#{age},</if>
  63. <if test="location != null">#{location},</if>
  64. <if test="reverse != null">#{reverse},</if>
  65. <if test="optionValues != null">#{optionValues},</if>
  66. <if test="message != null">#{message},</if>
  67. </trim>
  68. </insert>
  69. <update id="updateMxjbMultipleWayCond" parameterType="MxjbMultipleWayCond">
  70. update mxjb_multiple_way_cond
  71. <trim prefix="SET" suffixOverrides=",">
  72. <if test="direction != null">direction = #{direction},</if>
  73. <if test="sort != null">sort = #{sort},</if>
  74. <if test="condId != null">condId = #{condId},</if>
  75. <if test="type != null">type = #{type},</if>
  76. <if test="sex != null">sex = #{sex},</if>
  77. <if test="age != null">age = #{age},</if>
  78. <if test="location != null">location = #{location},</if>
  79. <if test="reverse != null">reverse = #{reverse},</if>
  80. <if test="optionValues != null">optionValues = #{optionValues},</if>
  81. <if test="message != null">message = #{message},</if>
  82. </trim>
  83. where id = #{id}
  84. </update>
  85. <delete id="deleteMxjbMultipleWayCondById" parameterType="Integer">
  86. delete from mxjb_multiple_way_cond where id = #{id}
  87. </delete>
  88. <delete id="deleteMxjbMultipleWayCondByIds" parameterType="String">
  89. delete from mxjb_multiple_way_cond where id in
  90. <foreach item="id" collection="array" open="(" separator="," close=")">
  91. #{id}
  92. </foreach>
  93. </delete>
  94. </mapper>