<?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="org.jeecg.modules.stm.rectify.approve.mapper.StRectifyApproveMapper">
	<select id="queryApproveByPlanId" resultType="org.jeecg.modules.stm.rectify.approve.entity.StRectifyApprove">
		select
		id as id ,
		problem_task_id as problemTaskId ,
		rectify_plan_id as
		rectifyPlanId ,
		approve_flag as approveFlag ,
		approve_time as
		approveTime ,
		approve_des as approveDes ,
		approve_user as approveUser ,
		created_user as createdUser ,
		created_time as createdTime ,
		updated_user as updatedUser ,
		updated_time as updatedTime 
		from
		ST_RECTIFY_APPROVE a
		<where>
			<if test="stRectifyPlanVo.editFlag!=null">
				a.RECTIFY_PLAN_ID = #{stRectifyPlanVo.id}
			</if>
		</where>
		order by a.approve_time asc
	</select>
</mapper>