| | |
| | | soil_sum_humidity4, soil_sum_humidity5, soil_sum_temperature1, soil_sum_temperature2, |
| | | soil_sum_temperature3, soil_sum_temperature4, soil_sum_temperature5 |
| | | </sql> |
| | | <sql id="Part_Column_List"> |
| | | <!--@mbg.generated--> |
| | | id, soil_id, dt, ymd, soil_humidity1, soil_humidity2, soil_humidity3, soil_humidity4, |
| | | soil_humidity5, soil_temperature1, soil_temperature2, soil_temperature3, soil_temperature4, |
| | | soil_temperature5 |
| | | </sql> |
| | | <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap"> |
| | | <!--@mbg.generated--> |
| | | select |
| | |
| | | <if test="stSoilId != null and stSoilId != ''"> |
| | | and soil_id = #{stSoilId} |
| | | </if> |
| | | <if test="ymd != null and ymd != ''"> |
| | | <if test="ymd != null"> |
| | | and ymd = #{ymd} |
| | | </if> |
| | | </where> |
| | | limit 0,1 |
| | | </select> |
| | | |
| | | |
| | | <!--根据指定条件获取记录--> |
| | | <select id="selectOneBySoilId" resultType="com.dy.pipIrrGlobal.voRm.VoSoilDay"> |
| | | select |
| | | <include refid="Part_Column_List" /> |
| | | from rm_soil_day |
| | | <where> |
| | | <if test="soilId != null"> |
| | | and soil_id = #{soilId} |
| | | </if> |
| | | <if test="ymd != null"> |
| | | and ymd = #{ymd} |
| | | </if> |
| | | </where> |
| | | limit 0,1 |
| | | </select> |
| | | |
| | | |
| | | |
| | | <!--根据指定条件查询记录数量--> |
| | | <select id="selectCount" resultType="java.lang.Long"> |
| | | SELECT |
| | | COUNT(*) AS recordCount |
| | | FROM rm_soil_day ltb |
| | | INNER JOIN pr_st_soil mtb ON mtb.id = ltb.soil_id |
| | | <where> |
| | | <if test="soilId != null"> |
| | | AND ltb.soil_id = #{soilId} |
| | | </if> |
| | | <if test = "no != null"> |
| | | AND mtb.no = #{no} |
| | | </if> |
| | | <if test = "name != null and name !=''"> |
| | | AND mtb.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test = "timeStart != null and timeStop != null"> |
| | | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件查询记录--> |
| | | <select id="selectSome" resultType="com.dy.pipIrrGlobal.voRm.VoSoilDay"> |
| | | SELECT |
| | | <include refid="Base_Column_List" />, |
| | | mtb.`name` AS soilName |
| | | FROM rm_soil_day ltb |
| | | INNER JOIN pr_st_soil mtb ON mtb.id = ltb.soil_id |
| | | <where> |
| | | <if test="soilId != null"> |
| | | AND ltb.soil_id = #{soilId} |
| | | </if> |
| | | <if test = "no != null"> |
| | | AND mtb.no = #{no} |
| | | </if> |
| | | <if test = "name != null and name !=''"> |
| | | AND mtb.name LIKE CONCAT('%',#{name},'%') |
| | | </if> |
| | | <if test = "timeStart != null and timeStop != null"> |
| | | AND ltb.dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | </where> |
| | | ORDER BY ltb.soil_id DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
| | | <!--@mbg.generated--> |
| | | delete from rm_soil_day |