TFivesToolOpl.xml 2 KB
Newer Older
Rensq's avatar
Rensq committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<?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.testor.module.fives.dao.TFivesToolOplDao">
    <!-- 开启二级缓存 -->
    <!-- <cache type="org.mybatis.caches.ehcache.LoggingEhcache"/> -->
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.testor.module.fives.model.domain.TFivesToolOpl">
        <id column="id" property="id"/>
        <id column="ref_id" property="refId"/>
        <id column="parent_id" property="parentId"/>
        <id column="tenant_id" property="tenantId"/>
        <id column="process_id" property="processId"/>
        <id column="process_status" property="processStatus"/>
        <id column="kap_type" property="kapType"/>
        <id column="theme_name" property="themeName"/>
        <id column="group_name" property="groupName"/>
        <id column="course_des" property="courseDes"/>
        <id column="image_1" property="image1"/>
        <id column="image_2" property="image2"/>
        <id column="image_3" property="image3"/>
    </resultMap>

    <select id="oplReport" resultType="com.testor.module.fives.model.excel.TFivesToolOplReport">
        SELECT
            tfto.theme_name,
            tftu.create_date,
            tftu.grain_org_id,
            tftu.area_org_id,
            tftu.serial_number,
            tsu.user_name AS create_by,
            tfto.kap_type,
            tfto.group_name,
            tfto.course_des,
            CASE
                tftu.score_type
                WHEN '7' THEN
                    '未评'
                WHEN '6' THEN
                    '评价中' ELSE tftu.score
                END AS score
        FROM
            t_fives_tool_use AS tftu
                LEFT JOIN t_fives_tool_opl AS tfto ON tftu.id = tfto.parent_id
                LEFT JOIN t_sys_user AS tsu ON tftu.create_by = tsu.user_id
        WHERE
            tftu.use_type = 0
          AND tftu.STATUS = '0'
    </select>
</mapper>