|
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.iformall.mapper.WxEnergyReadingCalcuteMapper">
- <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxEnergyReadingCalcute">
- <id column="id" jdbcType="BIGINT" property="id"/>
- <result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
- <result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
- <result column="create_by" jdbcType="BIGINT" property="createBy"/>
- <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/>
- <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
- <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/>
- <result column="remark" jdbcType="VARCHAR" property="remark"/>
- <result column="time_id" jdbcType="BIGINT" property="timeId"/>
- <result column="fees_id" jdbcType="BIGINT" property="feesId"/>
- <result column="is_calcuted" jdbcType="INTEGER" property="isCalcuted"/>
- <result column="is_imported" jdbcType="INTEGER" property="isImported"/>
- </resultMap>
-
- <sql id="allColumns">
- `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`create_by`,`create_by_name`,
- `update_by`,`update_by_name`,`remark`,`time_id`,`fees_id`,`is_calcuted`,`is_imported`
- </sql>
-
- <sql id="dynamicWhereConditions">
- where 1=1
- <if test=" null != id ">and `id` = #{id}</if>
- <if test=" null != tenantId and '' != tenantId">
- and `tenant_id` = #{tenantId}
- </if>
- <if test=" null != parentTenantId and '' != parentTenantId">
- and `parent_tenant_id` = #{parentTenantId}
- </if>
- <if test=" null != createBy ">and `create_by` = #{createBy}</if>
- <if test=" null != timeId ">and `time_id` = #{timeId}</if>
- <if test=" null != feesId ">and `fees_id` = #{feesId}</if>
- <if test=" null != isCalcuted ">and `is_calcuted` = #{isCalcuted}</if>
- <if test=" null != isImported ">and `is_imported` = #{isImported}</if>
- <if test=" null != ids ">
- and id in
- <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
- #{idItem}
- </foreach>
- </if>
- <if test=" null != sortColumns">order by ${sortColumns}</if>
- </sql>
-
- <select id="findList" parameterType="com.iformall.domain.po.WxEnergyReadingCalcute" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_energy_reading_calcute
- <include refid="dynamicWhereConditions"/>
- </select>
-
- <select id="selectById" parameterType="HashMap" resultMap="BaseResultMap">
- select
- <include refid="allColumns"/>
- from wx_energy_reading_calcute where id = #{id} and `tenant_id` = #{tenantId}
- </select>
-
- </mapper>
|