You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.2 KiB
63 lines
2.2 KiB
<?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.ccsens.mt.persist.dao.CompeteVideoDao">
|
|
|
|
<select id="selectCompanySignStatus" parameterType="com.ccsens.mt.bean.dto.VideoDto$GetSignStatus" resultType="com.ccsens.mt.bean.vo.VideoProjectVo$PeoSignStatu">
|
|
select
|
|
tcc.name as name,
|
|
tcc.`contacts_phone` as phone,
|
|
tcpl.`look_time` as `time`
|
|
from
|
|
t_compete_company tcc
|
|
LEFT JOIN t_compete_time tct on tct.id=tcc.compete_time_id
|
|
LEFT JOIN (
|
|
select company_id,max(look_time) as `look_time`
|
|
FROM t_compete_player_look
|
|
where `rec_status`=0
|
|
<if test="param.signEndTime!=null">
|
|
and t_compete_player_look.`look_time` <= #{param.signEndTime}
|
|
</if>
|
|
) tcpl on tcpl.company_id=tcc.id
|
|
where
|
|
tct.id= #{param.id}
|
|
<if test="param.name!=null">
|
|
and tcc.`name`=#{param.name}
|
|
</if>
|
|
<if test="param.phone!=null">
|
|
and tcc.`contacts_name`=#{param.phone}
|
|
</if>
|
|
and tcc.`rec_status`=0
|
|
and tct.`rec_status`=0
|
|
</select>
|
|
<select id="selectCoachSignStatus" parameterType="com.ccsens.mt.bean.dto.VideoDto$GetSignStatus" resultType="com.ccsens.mt.bean.vo.VideoProjectVo$CoachSignStatu" >
|
|
select
|
|
tcj.`name` as `name`,
|
|
tcj.`phone` as `phone`,
|
|
tcj.`chief_judgment` as `chiefJudgment`,
|
|
tt.`cr` as `time`
|
|
FROM
|
|
t_compete_judgment tcj
|
|
left join (
|
|
select
|
|
max(created_at) as cr,
|
|
user_id
|
|
From tall.t_sys_log
|
|
where `url`='/users/signin' and `rec_status`=0
|
|
<if test="param.signEndTime!=null">
|
|
and tall.t_sys_log.created_at <= #{param.signEndTime}
|
|
</if>
|
|
) tt on tt.`user_id`=tcj.`user_id`
|
|
LEFT JOIN t_compete_time tct on tct.id =tcj.`compete_time_id`
|
|
WHERE
|
|
tct.id=#{param.id}
|
|
<if test="param.name!=null">
|
|
and tcj.`name`=#{param.name}
|
|
</if>
|
|
<if test="param.phone!=null">
|
|
and tcj.`phone`=#{param.phone}
|
|
</if>
|
|
and tcj.`rec_status`=0
|
|
and tct.`rec_status`=0
|
|
|
|
</select>
|
|
</mapper>
|