<?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.picc.grab.mapper.YwypzMapper">

	<!-- 通用查询映射结果 -->
	<resultMap id="BaseResultMap" type="com.picc.grab.domain.Ywypz">
		<id column="id" property="id" />
		<result column="wtf_id" property="wtfId" />
		<result column="fgs_id" property="fgsId" />
		<result column="user_id" property="userId" />
		<result column="lxdh" property="lxdh" />
		<result column="create_time" property="createTime" />
		<result column="update_time" property="updateTime" />
	</resultMap>

	<select id="pageFind" resultType="com.picc.grab.domain.Ywypz" resultMap="BaseResultMap">
		SELECT ywy.*,wtf.yjwtf wtfName,fgs.fgs_mc fgsName,u.trueName userXm
		FROM md_ywypz ywy
		LEFT JOIN md_wtf_info wtf ON ywy.wtf_id = wtf.id
		LEFT JOIN md_fgs_info fgs ON ywy.fgs_id = fgs.id
		LEFT JOIN md_user u ON ywy.user_id = u.id
		ORDER BY ywy.update_time DESC
	</select>



</mapper>
