13 changed files with 496 additions and 15 deletions
@ -0,0 +1,18 @@ |
|||
package com.ccsens.mt.persist.dao; |
|||
|
|||
import com.ccsens.mt.bean.dto.VideoDto; |
|||
import com.ccsens.mt.bean.vo.VideoProjectVo; |
|||
import com.ccsens.mt.persist.mapper.CompeteCompanyMapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author Mr.王 |
|||
*/ |
|||
public interface CompeteVideoDao extends CompeteCompanyMapper { |
|||
|
|||
List<VideoProjectVo.PeoSignStatu> selectCompanySignStatus(@Param("param") VideoDto.GetTeamSignStatu param); |
|||
|
|||
List<VideoProjectVo.CoachSignStatu> selectCoachSignStatus(@Param("param") VideoDto.GetTeamSignStatu param); |
|||
} |
@ -1,5 +1,5 @@ |
|||
spring: |
|||
profiles: |
|||
active: test |
|||
include: common, util-test |
|||
active: dev |
|||
include: common, util-dev |
|||
|
|||
|
@ -0,0 +1,63 @@ |
|||
<?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$GetTeamSignStatu" 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$GetTeamSignStatu" 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> |
Loading…
Reference in new issue