AiSparringDetailCheckTaskRefMapper.xml 1.84 KB
<?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="cn.com.glsx.dj.mindworkplate.mapper.AiSparringDetailCheckTaskRefMapper" >
    <resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.AiSparringDetailCheckTaskRef" >
        <id column="id" property="id" jdbcType="INTEGER" />
        <result column="task_id" property="taskId" jdbcType="VARCHAR" />
        <result column="task_type" property="taskType" jdbcType="INTEGER" />
        <result column="business_id" property="businessId" jdbcType="VARCHAR" />
        <result column="created_by" property="createdBy" jdbcType="VARCHAR" />
        <result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
        <result column="updated_by" property="updatedBy" jdbcType="VARCHAR" />
        <result column="updated_date" property="updatedDate" jdbcType="TIMESTAMP" />
        <result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
        <result column="task_status" property="taskStatus" jdbcType="INTEGER" />
    </resultMap>

    <select id="findByBusiness" resultMap="BaseResultMap">
        select * from ai_sparring_detail_check_task_ref
        where deleted_flag = 'N' and business_id = #{businessId}
    </select>

    <select id="findByTaskId" resultMap="BaseResultMap">
        select * from ai_sparring_detail_check_task_ref
        where deleted_flag = 'N' and task_id = #{taskId}
    </select>
    <select id="findByBusinessAndType" resultMap="BaseResultMap">
        select * from ai_sparring_detail_check_task_ref
        where deleted_flag = 'N' and business_id = #{businessId} and task_type
        in
        <foreach collection="types" item="type" close=")" open="(" separator=",">
            #{type}
        </foreach>
    </select>
</mapper>