电速宝智配引擎
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

SchemeExplorationMapper.xml 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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.system.mapper.SchemeExplorationMapper">
  6. <resultMap type="SchemeExploration" id="SchemeExplorationResult">
  7. <id property="id" column="id"/>
  8. <result property="explorationData" column="exploration_data"/>
  9. <result property="explorationType" column="exploration_type"/>
  10. <result property="createBy" column="create_by"/>
  11. <result property="createTime" column="create_time"/>
  12. <result property="updateBy" column="update_by"/>
  13. <result property="updateTime" column="update_time"/>
  14. </resultMap>
  15. <sql id="selectSchemeExplorationVo">
  16. select id, exploration_data, exploration_type, create_by, create_time, update_by, update_time
  17. from scheme_exploration
  18. </sql>
  19. <select id="selectSchemeExplorationList" parameterType="SchemeExploration" resultMap="SchemeExplorationResult">
  20. <include refid="selectSchemeExplorationVo"/>
  21. <where>
  22. <if test="userId != null and userId != ''">
  23. AND user_id = #{userId}
  24. </if>
  25. <if test="params.beginTime != null and params.beginTime != ''">
  26. and date_format(create_time,'%Y%m%d') &gt;= date_format(#{params.beginTime},'%Y%m%d')
  27. </if>
  28. <if test="params.endTime != null and params.endTime != ''">
  29. and date_format(create_time,'%Y%m%d') &lt;= date_format(#{params.endTime},'%Y%m%d')
  30. </if>
  31. </where>
  32. </select>
  33. <select id="selectSchemeExplorationById" parameterType="Long" resultMap="SchemeExplorationResult">
  34. <include refid="selectSchemeExplorationVo"/>
  35. where create_by = #{createBy}
  36. </select>
  37. <insert id="insertSchemeExploration" parameterType="SchemeExploration">
  38. insert into scheme_exploration (
  39. <if test="explorationData != null">exploration_data,</if>
  40. <if test="explorationType != null">exploration_type,</if>
  41. <if test="createBy != null">create_by,</if>
  42. create_time
  43. )values(
  44. <if test="explorationData != null">#{explorationData},</if>
  45. <if test="explorationType != null">#{explorationType},</if>
  46. <if test="createBy != null">#{createBy},</if>
  47. sysdate()
  48. )
  49. </insert>
  50. <update id="updateSchemeExploration" parameterType="SchemeExploration">
  51. update scheme_exploration
  52. <set>
  53. <if test="explorationData != null">exploration_data = #{explorationData},</if>
  54. <if test="explorationType != null">exploration_type = #{explorationType},</if>
  55. <if test="updateBy != null">update_by = #{updateBy},</if>
  56. update_time = sysdate()
  57. </set>
  58. where id = #{id}
  59. </update>
  60. <delete id="deleteSchemeExplorationById" parameterType="Long">
  61. delete from scheme_exploration where id = #{id}
  62. </delete>
  63. <delete id="deleteSchemeExplorationByIds" parameterType="Long">
  64. delete from scheme_exploration where id in
  65. <foreach item="id" collection="array" open="(" separator="," close=")">
  66. #{id}
  67. </foreach>
  68. </delete>
  69. </mapper>