BBusiHollandRecordsMapper.xml 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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.syzy.mapper.BBusiHollandRecordsMapper">
  6. <resultMap type="BBusiHollandRecords" id="BBusiHollandRecordsResult">
  7. <result property="id" column="id" />
  8. <result property="customerCode" column="customerCode" />
  9. <result property="code" column="code" />
  10. <result property="wants1" column="wants1" />
  11. <result property="wants2" column="wants2" />
  12. <result property="wants3" column="wants3" />
  13. <result property="ruleCode" column="ruleCode" />
  14. <result property="scorer" column="score_r" />
  15. <result property="scorei" column="score_i" />
  16. <result property="scorea" column="score_a" />
  17. <result property="scores" column="score_s" />
  18. <result property="scoree" column="score_e" />
  19. <result property="scorec" column="score_c" />
  20. <result property="createTime" column="createTime" />
  21. <result property="status" column="status" />
  22. </resultMap>
  23. <sql id="selectBBusiHollandRecordsVo">
  24. select id, customerCode, code, wants1, wants2, wants3, ruleCode, score_r, score_i, score_a, score_s, score_e, score_c, createTime, status from b_busi_holland_records
  25. </sql>
  26. <select id="selectBBusiHollandRecordsList" parameterType="BBusiHollandRecords" resultMap="BBusiHollandRecordsResult">
  27. <include refid="selectBBusiHollandRecordsVo" />
  28. <where>
  29. <if test="customerCode != null and customerCode != ''"> and customerCode = #{customerCode}</if>
  30. <if test="code != null and code != ''"> and code = #{code}</if>
  31. <if test="wants1 != null and wants1 != ''"> and wants1 = #{wants1}</if>
  32. <if test="wants2 != null and wants2 != ''"> and wants2 = #{wants2}</if>
  33. <if test="wants3 != null and wants3 != ''"> and wants3 = #{wants3}</if>
  34. <if test="ruleCode != null and ruleCode != ''"> and ruleCode = #{ruleCode}</if>
  35. <if test="scorer != null "> and score_r = #{scorer}</if>
  36. <if test="scorei != null "> and score_i = #{scorei}</if>
  37. <if test="scorea != null "> and score_a = #{scorea}</if>
  38. <if test="scores != null "> and score_s = #{scores}</if>
  39. <if test="scoree != null "> and score_e = #{scoree}</if>
  40. <if test="scorec != null "> and score_c = #{scorec}</if>
  41. <if test="createTime != null "> and createTime = #{createTime}</if>
  42. <if test="status != null "> and status = #{status}</if>
  43. </where>
  44. order by id desc
  45. </select>
  46. <select id="selectBBusiHollandRecordsById" parameterType="Long" resultMap="BBusiHollandRecordsResult">
  47. <include refid="selectBBusiHollandRecordsVo" />
  48. where id = #{id}
  49. </select>
  50. <insert id="insertBBusiHollandRecords" parameterType="BBusiHollandRecords" useGeneratedKeys="true" keyProperty="id">
  51. insert into b_busi_holland_records
  52. <trim prefix="(" suffix=")" suffixOverrides=",">
  53. <if test="customerCode != null and customerCode != ''">customerCode,</if>
  54. <if test="code != null and code != ''">code,</if>
  55. <if test="wants1 != null">wants1,</if>
  56. <if test="wants2 != null">wants2,</if>
  57. <if test="wants3 != null">wants3,</if>
  58. <if test="ruleCode != null and ruleCode != ''">ruleCode,</if>
  59. <if test="scorer != null">score_r,</if>
  60. <if test="scorei != null">score_i,</if>
  61. <if test="scorea != null">score_a,</if>
  62. <if test="scores != null">score_s,</if>
  63. <if test="scoree != null">score_e,</if>
  64. <if test="scorec != null">score_c,</if>
  65. <if test="createTime != null">createTime,</if>
  66. <if test="status != null">status,</if>
  67. </trim>
  68. <trim prefix="values (" suffix=")" suffixOverrides=",">
  69. <if test="customerCode != null and customerCode != ''">#{customerCode},</if>
  70. <if test="code != null and code != ''">#{code},</if>
  71. <if test="wants1 != null">#{wants1},</if>
  72. <if test="wants2 != null">#{wants2},</if>
  73. <if test="wants3 != null">#{wants3},</if>
  74. <if test="ruleCode != null and ruleCode != ''">#{ruleCode},</if>
  75. <if test="scorer != null">#{scorer},</if>
  76. <if test="scorei != null">#{scorei},</if>
  77. <if test="scorea != null">#{scorea},</if>
  78. <if test="scores != null">#{scores},</if>
  79. <if test="scoree != null">#{scoree},</if>
  80. <if test="scorec != null">#{scorec},</if>
  81. <if test="createTime != null">#{createTime},</if>
  82. <if test="status != null">#{status},</if>
  83. </trim>
  84. </insert>
  85. <update id="updateBBusiHollandRecords" parameterType="BBusiHollandRecords">
  86. update b_busi_holland_records
  87. <trim prefix="SET" suffixOverrides=",">
  88. <if test="customerCode != null and customerCode != ''">customerCode = #{customerCode},</if>
  89. <if test="code != null and code != ''">code = #{code},</if>
  90. <if test="wants1 != null">wants1 = #{wants1},</if>
  91. <if test="wants2 != null">wants2 = #{wants2},</if>
  92. <if test="wants3 != null">wants3 = #{wants3},</if>
  93. <if test="ruleCode != null and ruleCode != ''">ruleCode = #{ruleCode},</if>
  94. <if test="scorer != null">score_r = #{scorer},</if>
  95. <if test="scorei != null">score_i = #{scorei},</if>
  96. <if test="scorea != null">score_a = #{scorea},</if>
  97. <if test="scores != null">score_s = #{scores},</if>
  98. <if test="scoree != null">score_e = #{scoree},</if>
  99. <if test="scorec != null">score_c = #{scorec},</if>
  100. <if test="createTime != null">createTime = #{createTime},</if>
  101. <if test="status != null">status = #{status},</if>
  102. </trim>
  103. where id = #{id}
  104. </update>
  105. <delete id="deleteBBusiHollandRecordsById" parameterType="Long">
  106. delete from b_busi_holland_records where id = #{id}
  107. </delete>
  108. <delete id="deleteBBusiHollandRecordsByIds" parameterType="String">
  109. delete from b_busi_holland_records where id in
  110. <foreach item="id" collection="array" open="(" separator="," close=")">
  111. #{id}
  112. </foreach>
  113. </delete>
  114. </mapper>