Newer
Older
huludao / src / main / resources / mapper / EventsManage / PatrolProblemStateDao.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.mobile.dao.PatrolProblemStateDao">

     <!-- 通用映射列 -->
    <resultMap id="BaseResultMap" type="com.newfiber.api.mobile.model.domain.PatrolProblemState">
                    <result column="id"  property="id"/>
                    <result column="patrol_problem_no" property="patrolProblemNo"/>
                    <result column="user_no" property="userNo"/>
                    <result column="problem_state" property="problemState"/>
                    <result column="create_time" property="createTime"/>
            </resultMap>

    <!-- 通用数据库列 -->
    <sql id="Base_Column_List">
              id,
              patrol_problem_no,
              user_no,
              problem_state,
              create_time
          </sql>

    <select id="selectByNameAndNo" resultType="com.newfiber.api.mobile.model.domain.PatrolProblemState">
		select <include refid="Base_Column_List"/>
		from patrol_problem_state pps
		where user_no = #{userName} and patrol_problem_no = #{patrolProblemNo}
	</select>

    <update id="updateByUserNameAndNo">
        update patrol_problem_state set problem_state = #{state}
        where user_no = #{userName} and patrol_problem_no = #{patrolProblemNo}
    </update>
</mapper>