Newer
Older
huludao / src / main / resources / mapper / RiverManage / ProblemLongTermExpMapper.xml
<?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.newfiber.api.pc.dao.RiverManage.ProblemLongTermExpMapper">

     <!-- 通用映射列 -->
    <resultMap id="BaseResultMap" type="com.newfiber.api.pc.model.River.ProblemLongTermExp">
                    <result column="id"  property="id"/>
                    <result column="total_class"  property="totalClass"/>
                    <result column="total_class_name" property="totalClassName"/>
                    <result column="type"  property="type"/>
                    <result column="type_name" property="typeName"/>
                    <result column="unit"  property="unit"/>
                    <result column="unit_name" property="unitName"/>
                    <result column="function" property="function"/>
                    <result column="problem_desc" property="problemDesc"/>
                    <result column="reason" property="reason"/>
                    <result column="solution" property="solution"/>
                    <result column="description" property="description"/>
                    <result column="push_plan" property="pushPlan"/>
                    <result column="create_user_no" property="createUserNo"/>
                    <result column="update_user_no" property="updateUserNo"/>
                    <result column="create_time"  property="createTime"/>
                    <result column="update_time"  property="updateTime"/>
            </resultMap>

    <!-- 通用数据库列 -->
    <sql id="Base_Column_List">
              id,
              total_class,
              total_class_name,
              type,
              type_name,
              unit,
              unit_name,
              `function`,
              problem_desc,
              reason,
              solution,
              description,
              push_plan,
              create_user_no,
              update_user_no,
              create_time,
              update_time
          </sql>

    <select id="selectByIds" resultType="com.newfiber.api.pc.model.River.ProblemLongTermExp">
        select <include refid="Base_Column_List"/>
        from problem_long_term_exp
        where 1 = 1
        <if test="list != null and list.size() > 0">
            and id in
            <foreach collection="list" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
        </if>
    </select>
</mapper>