feiyu02
2022-01-12 1564af04dacafcc08a9682a4ef1e651120c8cc46
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<?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.flightfeather.supervision.domain.mapper.OnLineQuestionMapper" >
  <resultMap id="BaseResultMap" type="cn.flightfeather.supervision.domain.entity.OnLineQuestion" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="OLQ_GUID" property="olqGuid" jdbcType="VARCHAR" />
    <result column="OLQ_Title" property="olqTitle" jdbcType="VARCHAR" />
    <result column="OLQ_ Keywords" property="olqKeywords" jdbcType="VARCHAR" />
    <result column="OLQ_ShowLevel" property="olqShowlevel" jdbcType="TINYINT" />
    <result column="OLQ_FactorType" property="olqFactortype" jdbcType="TINYINT" />
    <result column="OLQ_Workind" property="olqWorkind" jdbcType="TINYINT" />
    <result column="OLQ_ResourceKind" property="olqResourcekind" jdbcType="TINYINT" />
    <result column="OLQ_IsOpen" property="olqIsopen" jdbcType="BIT" />
    <result column="OLQ_IsUse" property="olqIsuse" jdbcType="BIT" />
    <result column="OLQ_IsDirectional" property="olqIsdirectional" jdbcType="BIT" />
    <result column="OLQ_EntGUID" property="olqEntguid" jdbcType="VARCHAR" />
    <result column="OLQ_EntName" property="olqEntname" jdbcType="VARCHAR" />
    <result column="OLQ_Reply" property="olqReply" jdbcType="VARCHAR" />
    <result column="OLQ_IsPaid" property="olqIspaid" jdbcType="BIT" />
    <result column="OLQ_Remuneration" property="olqRemuneration" jdbcType="INTEGER" />
    <result column="OLQ_PaymentRatio" property="olqPaymentratio" jdbcType="VARCHAR" />
    <result column="OLQ_IsFinish" property="olqIsfinish" jdbcType="BIT" />
    <result column="OLQ_CreatorId" property="olqCreatorid" jdbcType="VARCHAR" />
    <result column="OLQ_Creator" property="olqCreator" jdbcType="VARCHAR" />
    <result column="OLQ_CreateDate" property="olqCreatedate" jdbcType="TIMESTAMP" />
    <result column="OLQ_EndDate" property="olqEnddate" jdbcType="TIMESTAMP" />
    <result column="OLQ_UpdateDate" property="olqUpdatedate" jdbcType="TIMESTAMP" />
    <result column="OLQ_Extension1" property="olqExtension1" jdbcType="VARCHAR" />
    <result column="OLQ_Extension2" property="olqExtension2" jdbcType="VARCHAR" />
    <result column="OLQ_Extension3" property="olqExtension3" jdbcType="VARCHAR" />
    <result column="OLQ_Remark" property="olqRemark" jdbcType="VARCHAR" />
  </resultMap>
  <resultMap id="ResultMapWithBLOBs" type="cn.flightfeather.supervision.domain.entity.OnLineQuestion" extends="BaseResultMap" >
    <!--
      WARNING - @mbg.generated
    -->
    <result column="OLQ_Desc" property="olqDesc" jdbcType="LONGVARCHAR" />
    <result column="OLQ_ResourceOutUrls" property="olqResourceouturls" jdbcType="LONGVARCHAR" />
  </resultMap>
  <sql id="Base_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    OLQ_GUID, OLQ_Title, `OLQ_Keywords`, OLQ_ShowLevel, OLQ_FactorType, OLQ_Workind,
    OLQ_ResourceKind, OLQ_IsOpen, OLQ_IsUse, OLQ_IsDirectional, OLQ_EntGUID, OLQ_EntName, 
    OLQ_Reply, OLQ_IsPaid, OLQ_Remuneration, OLQ_PaymentRatio, OLQ_IsFinish, OLQ_CreatorId, 
    OLQ_Creator, OLQ_CreateDate, OLQ_EndDate, OLQ_UpdateDate, OLQ_Extension1, OLQ_Extension2, 
    OLQ_Extension3, OLQ_Remark
  </sql>
  <sql id="Blob_Column_List" >
    <!--
      WARNING - @mbg.generated
    -->
    OLQ_Desc, OLQ_ResourceOutUrls
  </sql>
 
  <select id="findAll" resultMap="BaseResultMap">
    SELECT
    <include refid="Base_Column_List"></include>
    from ec_t_online_q
  </select>
 
  <select id="findAllfalse" resultMap="BaseResultMap">
    SELECT
    <include refid="Base_Column_List"></include>
    from ec_t_online_q
    Where
    OLQ_IsUse='false'
  </select>
 
  <select id="getQDescription" resultType="String">
    SELECT
    OLQ_Desc
    from ec_t_online_q
    Where OLQ_GUID=#{questionId}
  </select>
 
  <select id="getQResource" resultType="String">
    SELECT
    OLQ_ResourceOutUrls
    from ec_t_online_q
    Where OLQ_GUID=#{questionId}
  </select>
 
  <select id="getQByConditions" resultMap="BaseResultMap">
    SELECT
    <include refid="Base_Column_List"></include>
    from ec_t_online_q
    Where OLQ_Keywords LIKE '%${keywords}%'
    AND OLQ_FactorType=#{factorType}
    AND OLQ_ResourceKind=#{resourceKind}
    AND OLQ_ShowLevel=#{showLevel}
    AND OLQ_Workind=#{worKind}
  </select>
 
  <select id="count" resultType="int">
    select count(*) as count from ec_t_online_q
  </select>
 
  <select id="getQByConditionsCounts" resultType="int">
    SELECT
    count(*) as count
    from ec_t_online_q
    Where OLQ_Keywords LIKE '%${keywords}%'
    AND OLQ_FactorType=#{factorType}
    AND OLQ_ResourceKind=#{resourceKind}
    AND OLQ_ShowLevel=#{showLevel}
    AND OLQ_Workind=#{worKind}
  </select>
</mapper>