|
|
@@ -7,6 +7,7 @@
|
|
|
<resultMap id="stdResult" type="cn.tr.module.smart.common.controller.vo.BizReasearchQueueVO">
|
|
|
<result property="id" column="id" />
|
|
|
<result property="name" column="name" />
|
|
|
+ <result property="questionGroupId" column="question_group_id" />
|
|
|
<result property="questionGroupName" column="question_group_name" />
|
|
|
<result property="timePointsShow" column="time_points_show" />
|
|
|
<result property="clinicCount" column="clinic_count" />
|
|
|
@@ -19,6 +20,7 @@
|
|
|
SELECT
|
|
|
brq.id as id,
|
|
|
brq.name as name,
|
|
|
+ bqg.id as question_group_id,
|
|
|
bqg.name as question_group_name,
|
|
|
brq.time_points_show as time_points_show,
|
|
|
brq.clinic_count as clinic_count,
|
|
|
@@ -27,21 +29,36 @@
|
|
|
FROM
|
|
|
biz_reasearch_queue as brq
|
|
|
left join biz_question_group as bqg on brq.bind_question_id = bqg.id
|
|
|
- WHERE
|
|
|
- 1=1
|
|
|
- <if test="query.name != null and query.name != ''">
|
|
|
- AND brq.name LIKE CONCAT('%',#{query.name},'%')
|
|
|
- </if>
|
|
|
- <if test="query.status != null and query.status != ''">
|
|
|
- AND brq.status = #{query.status}
|
|
|
- </if>
|
|
|
- <if test="query.createTime != null and query.createTime.size() > 0">
|
|
|
- <if test="query.createTime.size() == 1">
|
|
|
- AND brq.create_time >= #{query.createTime[0]}
|
|
|
+ <where>
|
|
|
+ <if test="query.name != null and query.name != ''">
|
|
|
+ AND brq.name LIKE CONCAT('%',#{query.name},'%')
|
|
|
</if>
|
|
|
- <if test="query.createTime.size() == 2">
|
|
|
- AND brq.create_time BETWEEN #{query.createTime[0]} AND #{query.createTime[1]}
|
|
|
+ <if test="query.status != null and query.status != ''">
|
|
|
+ AND brq.status = #{query.status}
|
|
|
</if>
|
|
|
- </if>
|
|
|
+ <if test="query.createTime != null and query.createTime.size() > 0">
|
|
|
+ <if test="query.createTime.size() == 1">
|
|
|
+ AND brq.create_time >= #{query.createTime[0]}
|
|
|
+ </if>
|
|
|
+ <if test="query.createTime.size() == 2">
|
|
|
+ AND brq.create_time BETWEEN #{query.createTime[0]} AND #{query.createTime[1]}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+ <select id="stdSelectBizReasearchQueueById" resultMap="stdResult">
|
|
|
+ SELECT
|
|
|
+ brq.id as id,
|
|
|
+ brq.name as name,
|
|
|
+ bqg.id as question_group_id,
|
|
|
+ bqg.name as question_group_name,
|
|
|
+ brq.time_points_show as time_points_show,
|
|
|
+ brq.clinic_count as clinic_count,
|
|
|
+ brq.create_time as create_time,
|
|
|
+ brq.status as status
|
|
|
+ FROM
|
|
|
+ biz_reasearch_queue as brq
|
|
|
+ left join biz_question_group as bqg on brq.bind_question_id = bqg.id
|
|
|
+ WHERE brq.id = #{id}
|
|
|
</select>
|
|
|
</mapper>
|