<?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.module.custom.ocr.dataDao.UserapproveMybatisDao">
	<resultMap id="BaseResultMap" type="org.jeecg.module.custom.ocr.dataobject.Userapprove">
		<id column="ID" property="id" jdbcType="BIGINT"/>
		<result column="USERID" property="userid" jdbcType="BIGINT"/>
		<result column="FORMID" property="formid" jdbcType="BIGINT"/>
		<result column="TASKNAME" property="taskname" jdbcType="VARCHAR"/>
		<result column="STATSHIS" property="statshis" jdbcType="INTEGER"/>
		<result column="COMMENTHIS" property="commenthis" jdbcType="VARCHAR"/>
		<result column="TASKINDEX" property="taskindex" jdbcType="INTEGER"/>
		<result column="TASKNO" property="taskno" jdbcType="VARCHAR"/>
	</resultMap>
	<sql id="Base_Column_List">
		ID AS id,
		USERID AS userid,
		FORMID AS formid
	</sql>

	<sql id="Base_Where">
		<where>
			<trim prefixOverrides="and|or">
				<if test="id != null"> and ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}</if>
				<if test="formid != null"> and FORMID ${formid.dataOp} ${formid.likestar}#{formid.value}${formid.likeend}</if>
				<if test="taskname != null"> and TASKNAME ${taskname.dataOp} ${taskname.likestar}#{taskname.value}${taskname.likeend}</if>
				<if test="statshis != null"> and STATSHIS ${statshis.dataOp} ${statshis.likestar}#{statshis.value}${statshis.likeend}</if>
				<if test="commenthis != null"> and COMMENTHIS ${commenthis.dataOp} ${commenthis.likestar}#{commenthis.value}${commenthis.likeend}</if>
				<if test="taskindex != null"> and TASKINDEX ${taskindex.dataOp} ${taskindex.likestar}#{taskindex.value}${taskindex.likeend}</if>
				<if test="taskno != null"> and TASKNO ${taskno.dataOp} ${taskno.likestar}#{taskno.value}${taskno.likeend}</if>
				<if test="userid != null"> and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>

			</trim>
		</where>
		<if test="page != null">
			<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if> 
			limit ${page.start}, ${page.Pagesize}
		</if>
	</sql>

</mapper>
