学生端教学实验列表增加systemId

hehai
rong.liu 4 years ago
parent 31764df441
commit 88a5f68d65
  1. 84
      src/main/resources/mapper/tms/ExperimentalTeachingDao.xml

@ -3,29 +3,75 @@
<mapper namespace="com.msdw.tms.dao.ExperimentalTeachingDao"> <mapper namespace="com.msdw.tms.dao.ExperimentalTeachingDao">
<!--SELECT
id,
experimental_class_name,
experimental_name,
project_id,
project_name,
(select count(*)
from tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0) as experimental_number,
experiment_duration,
type,
start_time,
stop_time,
status,
invitation_code,
is_code,
user_id,
creation_time,
surplus_time
FROM
tms_experimental_teaching
WHERE
is_del = 0
<if test="exp.type!=null">
AND `type`=#{exp.type,jdbcType=INTEGER}
</if>
<if test="exp.status!=null">
AND `status`=#{exp.status,jdbcType=INTEGER}
</if>
<if test="exp.systemId!=null">
AND `system_id`=#{exp.systemId,jdbcType=INTEGER}
</if>
<if test='exp.startTime!=null and exp.stopTime!=null'>
AND creation_time between #{exp.startTime} and #{exp.stopTime}
</if>
<if test="exp.searchContent!=null">
AND (experimental_name like concat('%',#{exp.searchContent},'%') or experimental_class_name like concat('%',#{exp.searchContent},'%') )
</if>
<if test="exp.month!=null">
AND DATE_SUB(CURDATE(), INTERVAL #{exp.month} month ) &lt;= date(creation_time)
</if>
<if test='exp.schoolId!=null and exp.schoolId!=null'>
AND (user_id in (select userId FROM staff WHERE schoolId = #{exp.schoolId} AND isdel = 0 AND FIND_IN_SET(roleId,'1,2,3') )
OR user_id IN ( SELECT userId FROM hr_user_info WHERE disableAccount = 0 AND isdel = 0 AND FIND_IN_SET( roleId, '1' ) ) )
</if>
order by creation_time desc-->
<select id="queryExperimentalTeaching" resultType="com.msdw.tms.entity.ExperimentalTeachingEntity"> <select id="queryExperimentalTeaching" resultType="com.msdw.tms.entity.ExperimentalTeachingEntity">
SELECT SELECT
id, id,
experimental_class_name, experimental_class_name,
experimental_name, experimental_name,
project_id, project_id,
project_name, project_name,
(select count(*) ( SELECT count( * ) FROM tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0 ) AS experimental_number,
from tms_project_record WHERE projectId = project_id AND tms_project_record.isdel = 0) as experimental_number, experiment_duration,
experiment_duration, type,
type, start_time,
start_time, stop_time,
stop_time, STATUS,
status, invitation_code,
invitation_code, is_code,
is_code, user_id,
user_id, creation_time,
creation_time, surplus_time ,
surplus_time systemId
FROM FROM
tms_experimental_teaching tms_experimental_teaching t
inner join hr_project_management m on m.projectId = t.project_id
WHERE WHERE
is_del = 0 t.is_del = 0
<if test="exp.type!=null"> <if test="exp.type!=null">
AND `type`=#{exp.type,jdbcType=INTEGER} AND `type`=#{exp.type,jdbcType=INTEGER}
</if> </if>

Loading…
Cancel
Save