| | |
| | | <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.LightEnergyData"> |
| | | <id property="id" column="id" jdbcType="BIGINT"/> |
| | | <result property="taskId" column="task_id" jdbcType="BIGINT"/> |
| | | <result property="ytdTime" column="ytd_time" jdbcType="TIMESTAMP"/> |
| | | <result property="energy" column="energy" jdbcType="DOUBLE"/> |
| | | <result property="energySaving" column="energy_saving" jdbcType="DOUBLE"/> |
| | | <result property="ytdTime" column="ytd_time" jdbcType="VARCHAR"/> |
| | | <result property="energy" column="energy" jdbcType="DECIMAL"/> |
| | | <result property="energySaving" column="energy_saving" jdbcType="DECIMAL"/> |
| | | <result property="poleId" column="pole_id" jdbcType="BIGINT"/> |
| | | <result property="lightAdderss" column="light_adderss" jdbcType="VARCHAR"/> |
| | | <result property="userId" column="user_id" jdbcType="BIGINT"/> |
| | | <result property="clientId" column="client_id" jdbcType="BIGINT"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | id,task_id,ytd_time, |
| | | energy,energy_saving,user_id, |
| | | client_id |
| | | energy,energy_saving,pole_id, |
| | | light_adderss,user_id,client_id |
| | | </sql> |
| | | <select id="getEnergyList" resultType="com.sandu.ximon.dao.domain.LightEnergyData"> |
| | | SELECT |
| | | * |
| | | FROM |
| | | light_energy_data |
| | | WHERE |
| | | <if test="userId != null"> |
| | | (user_id = #{userId} |
| | | OR client_id = #{userId}) |
| | | AND |
| | | </if> |
| | | ytd_time = #{format} |
| | | </select> |
| | | </mapper> |