UploadPfValueConfigMapper.xml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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.predict.mapper.UploadPfValueConfigMapper">
  6. <resultMap type="UploadPfValueConfig" id="UploadPfValueConfigResult">
  7. <result property="pfNo" column="pf_no"/>
  8. <result property="windplantNo" column="windplant_no"/>
  9. <result property="projectNo" column="project_no"/>
  10. <result property="timeScale" column="time_scale"/>
  11. <result property="name" column="name"/>
  12. <result property="nameDesc" column="name_desc"/>
  13. <result property="statTime" column="stat_time"/>
  14. </resultMap>
  15. <sql id="selectUploadPfValueConfigVo">
  16. select pf_no, windplant_no, project_no, time_scale, name, name_desc, stat_time from upload_pf_value_config
  17. </sql>
  18. <select id="selectUploadPfValueConfigList" parameterType="UploadPfValueConfig"
  19. resultMap="UploadPfValueConfigResult">
  20. select
  21. upvc.*,
  22. win.name as "windplantName"
  23. from
  24. upload_pf_value_config upvc
  25. left join windplant win on win.windplant_no = upvc.windplant_no
  26. <where>
  27. <if test="pfNo != null ">and upvc.pf_no = #{pfNo}</if>
  28. <if test="windplantNo != null ">and upvc.windplant_no = #{windplantNo}</if>
  29. <if test="projectNo != null ">and upvc.project_no = #{projectNo}</if>
  30. <if test="timeScale != null ">and upvc.time_scale = #{timeScale}</if>
  31. <if test="name != null and name != ''">and upvc.name like concat(concat('%', #{name}), '%')</if>
  32. <if test="nameDesc != null and nameDesc != ''">and upvc.name_desc = #{nameDesc}</if>
  33. <if test="statTime != null ">and upvc.stat_time = #{statTime}</if>
  34. </where>
  35. order by upvc.windplant_no asc
  36. </select>
  37. <select id="selectUploadPfValueConfigById" parameterType="Long" resultMap="UploadPfValueConfigResult">
  38. <include refid="selectUploadPfValueConfigVo"/>
  39. where pf_no = #{pfNo}
  40. </select>
  41. </mapper>