AiSparringDefencecScriptCheckMapper.xml 2.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.AiSparringDefencecScriptCheckMapper" >
  <resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.AiSparringDefencecScriptCheck" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="main_id" property="mainId" jdbcType="INTEGER" />
    <result column="defence_count" property="defenceCount" jdbcType="INTEGER" />
    <result column="avg_defence" property="avgDefence" jdbcType="VARCHAR" />
    <result column="customer_type" property="customerType" jdbcType="VARCHAR" />
    <result column="failure_reason" property="failureReason" jdbcType="VARCHAR" />
    <result column="summary" property="summary" 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="defence_taskId" property="defenceTaskId" jdbcType="VARCHAR" />
    <result column="defence_result_flag" property="defenceResultFlag" jdbcType="INTEGER" />
    <result column="defence_err_message" property="defenceErrMessage" jdbcType="VARCHAR" />
    <result column="service_attitude" property="serviceAttitude" jdbcType="VARCHAR" />
    <result column="service_description" property="serviceDescription" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    id, main_id, defence_count, avg_defence, customer_type, failure_reason, summary, 
    created_by, created_date, updated_by, updated_date, deleted_flag
  </sql>
  <select id="findDefenceingList"
    resultMap="BaseResultMap">
    select t1.*,t2.task_id as taskId,t2.business_type as businessType from ai_sparring_defencec_script_check t1
    left join ai_sparring_inspection_defence_main t2 on t1.main_id=t2.id
    where defence_result_flag=1
  </select>
  <select id="findNeedDefenceList"
          resultMap="BaseResultMap">
    select t1.*,t2.task_id as taskId,t2.business_type as businessType from ai_sparring_defencec_script_check t1
    left join ai_sparring_inspection_defence_main t2 on t1.main_id=t2.id
    where defence_result_flag=0
  </select>
  <select id="findDefenceDetailByTaskId"
    resultMap="BaseResultMap">
    select t1.*,t2.task_id as taskId,t2.business_type as businessType from ai_sparring_defencec_script_check t1
    left join ai_sparring_inspection_defence_main t2 on t1.main_id=t2.id
    where t2.task_id=#{taskId}
  </select>
</mapper>