diff --git a/mt/src/main/java/com/ccsens/mt/api/CompeteVideoController.java b/mt/src/main/java/com/ccsens/mt/api/CompeteVideoController.java index a508ebdd..8b61d6a4 100644 --- a/mt/src/main/java/com/ccsens/mt/api/CompeteVideoController.java +++ b/mt/src/main/java/com/ccsens/mt/api/CompeteVideoController.java @@ -82,7 +82,6 @@ public class CompeteVideoController { log.info("添加用户观看开幕式视频记录(签到用):{}",params); List list=iCompeteVedioService.selectTwoProject(params); return JsonResponse.newInstance().ok(list); - } @MustLogin @ApiOperation(value = "查找所有参赛单位", notes = "Mr.王---------去那个competeProject表下面查") diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java index 71dbd537..48169c73 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfig.java @@ -8,6 +8,8 @@ public class CompeteProjectConfig implements Serializable { private Long projectId; + private Long projectDuration; + private Integer siteNum; private Long startTime; @@ -20,7 +22,11 @@ public class CompeteProjectConfig implements Serializable { private Byte recStatus; - private Long projectDuration; + private Long videoStartTime; + + private Long videoEndTime; + + private Byte restrict; private static final long serialVersionUID = 1L; @@ -40,6 +46,14 @@ public class CompeteProjectConfig implements Serializable { this.projectId = projectId; } + public Long getProjectDuration() { + return projectDuration; + } + + public void setProjectDuration(Long projectDuration) { + this.projectDuration = projectDuration; + } + public Integer getSiteNum() { return siteNum; } @@ -88,12 +102,28 @@ public class CompeteProjectConfig implements Serializable { this.recStatus = recStatus; } - public Long getProjectDuration() { - return projectDuration; + public Long getVideoStartTime() { + return videoStartTime; } - public void setProjectDuration(Long projectDuration) { - this.projectDuration = projectDuration; + public void setVideoStartTime(Long videoStartTime) { + this.videoStartTime = videoStartTime; + } + + public Long getVideoEndTime() { + return videoEndTime; + } + + public void setVideoEndTime(Long videoEndTime) { + this.videoEndTime = videoEndTime; + } + + public Byte getRestrict() { + return restrict; + } + + public void setRestrict(Byte restrict) { + this.restrict = restrict; } @Override @@ -104,13 +134,16 @@ public class CompeteProjectConfig implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", projectId=").append(projectId); + sb.append(", projectDuration=").append(projectDuration); sb.append(", siteNum=").append(siteNum); sb.append(", startTime=").append(startTime); sb.append(", endTime=").append(endTime); sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); - sb.append(", projectDuration=").append(projectDuration); + sb.append(", videoStartTime=").append(videoStartTime); + sb.append(", videoEndTime=").append(videoEndTime); + sb.append(", restrict=").append(restrict); sb.append("]"); return sb.toString(); } diff --git a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java index 60c3f955..88ff98a4 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java +++ b/mt/src/main/java/com/ccsens/mt/bean/po/CompeteProjectConfigExample.java @@ -225,6 +225,66 @@ public class CompeteProjectConfigExample { return (Criteria) this; } + public Criteria andProjectDurationIsNull() { + addCriterion("project_duration is null"); + return (Criteria) this; + } + + public Criteria andProjectDurationIsNotNull() { + addCriterion("project_duration is not null"); + return (Criteria) this; + } + + public Criteria andProjectDurationEqualTo(Long value) { + addCriterion("project_duration =", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationNotEqualTo(Long value) { + addCriterion("project_duration <>", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationGreaterThan(Long value) { + addCriterion("project_duration >", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationGreaterThanOrEqualTo(Long value) { + addCriterion("project_duration >=", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationLessThan(Long value) { + addCriterion("project_duration <", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationLessThanOrEqualTo(Long value) { + addCriterion("project_duration <=", value, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationIn(List values) { + addCriterion("project_duration in", values, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationNotIn(List values) { + addCriterion("project_duration not in", values, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationBetween(Long value1, Long value2) { + addCriterion("project_duration between", value1, value2, "projectDuration"); + return (Criteria) this; + } + + public Criteria andProjectDurationNotBetween(Long value1, Long value2) { + addCriterion("project_duration not between", value1, value2, "projectDuration"); + return (Criteria) this; + } + public Criteria andSiteNumIsNull() { addCriterion("site_num is null"); return (Criteria) this; @@ -585,63 +645,183 @@ public class CompeteProjectConfigExample { return (Criteria) this; } - public Criteria andProjectDurationIsNull() { - addCriterion("project_duration is null"); + public Criteria andVideoStartTimeIsNull() { + addCriterion("video_start_time is null"); return (Criteria) this; } - public Criteria andProjectDurationIsNotNull() { - addCriterion("project_duration is not null"); + public Criteria andVideoStartTimeIsNotNull() { + addCriterion("video_start_time is not null"); return (Criteria) this; } - public Criteria andProjectDurationEqualTo(Long value) { - addCriterion("project_duration =", value, "projectDuration"); + public Criteria andVideoStartTimeEqualTo(Long value) { + addCriterion("video_start_time =", value, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationNotEqualTo(Long value) { - addCriterion("project_duration <>", value, "projectDuration"); + public Criteria andVideoStartTimeNotEqualTo(Long value) { + addCriterion("video_start_time <>", value, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationGreaterThan(Long value) { - addCriterion("project_duration >", value, "projectDuration"); + public Criteria andVideoStartTimeGreaterThan(Long value) { + addCriterion("video_start_time >", value, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationGreaterThanOrEqualTo(Long value) { - addCriterion("project_duration >=", value, "projectDuration"); + public Criteria andVideoStartTimeGreaterThanOrEqualTo(Long value) { + addCriterion("video_start_time >=", value, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationLessThan(Long value) { - addCriterion("project_duration <", value, "projectDuration"); + public Criteria andVideoStartTimeLessThan(Long value) { + addCriterion("video_start_time <", value, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationLessThanOrEqualTo(Long value) { - addCriterion("project_duration <=", value, "projectDuration"); + public Criteria andVideoStartTimeLessThanOrEqualTo(Long value) { + addCriterion("video_start_time <=", value, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationIn(List values) { - addCriterion("project_duration in", values, "projectDuration"); + public Criteria andVideoStartTimeIn(List values) { + addCriterion("video_start_time in", values, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationNotIn(List values) { - addCriterion("project_duration not in", values, "projectDuration"); + public Criteria andVideoStartTimeNotIn(List values) { + addCriterion("video_start_time not in", values, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationBetween(Long value1, Long value2) { - addCriterion("project_duration between", value1, value2, "projectDuration"); + public Criteria andVideoStartTimeBetween(Long value1, Long value2) { + addCriterion("video_start_time between", value1, value2, "videoStartTime"); return (Criteria) this; } - public Criteria andProjectDurationNotBetween(Long value1, Long value2) { - addCriterion("project_duration not between", value1, value2, "projectDuration"); + public Criteria andVideoStartTimeNotBetween(Long value1, Long value2) { + addCriterion("video_start_time not between", value1, value2, "videoStartTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeIsNull() { + addCriterion("video_end_time is null"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeIsNotNull() { + addCriterion("video_end_time is not null"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeEqualTo(Long value) { + addCriterion("video_end_time =", value, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeNotEqualTo(Long value) { + addCriterion("video_end_time <>", value, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeGreaterThan(Long value) { + addCriterion("video_end_time >", value, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeGreaterThanOrEqualTo(Long value) { + addCriterion("video_end_time >=", value, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeLessThan(Long value) { + addCriterion("video_end_time <", value, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeLessThanOrEqualTo(Long value) { + addCriterion("video_end_time <=", value, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeIn(List values) { + addCriterion("video_end_time in", values, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeNotIn(List values) { + addCriterion("video_end_time not in", values, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeBetween(Long value1, Long value2) { + addCriterion("video_end_time between", value1, value2, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andVideoEndTimeNotBetween(Long value1, Long value2) { + addCriterion("video_end_time not between", value1, value2, "videoEndTime"); + return (Criteria) this; + } + + public Criteria andRestrictIsNull() { + addCriterion("restrict is null"); + return (Criteria) this; + } + + public Criteria andRestrictIsNotNull() { + addCriterion("restrict is not null"); + return (Criteria) this; + } + + public Criteria andRestrictEqualTo(Byte value) { + addCriterion("restrict =", value, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictNotEqualTo(Byte value) { + addCriterion("restrict <>", value, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictGreaterThan(Byte value) { + addCriterion("restrict >", value, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictGreaterThanOrEqualTo(Byte value) { + addCriterion("restrict >=", value, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictLessThan(Byte value) { + addCriterion("restrict <", value, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictLessThanOrEqualTo(Byte value) { + addCriterion("restrict <=", value, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictIn(List values) { + addCriterion("restrict in", values, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictNotIn(List values) { + addCriterion("restrict not in", values, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictBetween(Byte value1, Byte value2) { + addCriterion("restrict between", value1, value2, "restrict"); + return (Criteria) this; + } + + public Criteria andRestrictNotBetween(Byte value1, Byte value2) { + addCriterion("restrict not between", value1, value2, "restrict"); return (Criteria) this; } } diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteExcelVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteExcelVo.java index f1fd1a83..00f8b89a 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteExcelVo.java +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteExcelVo.java @@ -80,6 +80,8 @@ public class CompeteExcelVo { private String projectName; @ApiModelProperty("时间") private String startTime; + @ApiModelProperty("是否不限组别") + private int joinRule; @ApiModelProperty("项目信息") private List projectList; } diff --git a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java index 5c9c52f1..ca154140 100644 --- a/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java +++ b/mt/src/main/java/com/ccsens/mt/bean/vo/CompeteVo.java @@ -549,6 +549,8 @@ public class CompeteVo { @ApiModelProperty("姓名") private String name; + @ApiModelProperty("场次") + private Byte competeOrder; @ApiModelProperty("场地信息") private Byte site; @ApiModelProperty("备注") diff --git a/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteScoreDao.java b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteScoreDao.java index be47127c..c4abbf49 100644 --- a/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteScoreDao.java +++ b/mt/src/main/java/com/ccsens/mt/persist/dao/CompeteScoreDao.java @@ -1,12 +1,8 @@ package com.ccsens.mt.persist.dao; -import com.ccsens.mt.bean.po.CompeteCoach; -import com.ccsens.mt.bean.po.CompeteCompany; import com.ccsens.mt.bean.vo.CompeteExcelVo; import com.ccsens.mt.bean.vo.CompeteVo; -import com.ccsens.mt.bean.vo.ProvinceCompeteVo; import com.ccsens.mt.bean.vo.ScoreVo; -import com.ccsens.mt.persist.mapper.CompeteCompanyMapper; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -93,9 +89,10 @@ public interface CompeteScoreDao { /** * 统计花样赛成绩 * @param projectId 项目ID + * @param page 第几条 * @return 成绩 */ - List queryVarietyScore(@Param("projectId") Long projectId); + List queryVarietyScore(@Param("projectId") Long projectId, @Param("page") int page); /** * 查询花样赛某一场的成绩 @@ -118,4 +115,11 @@ public interface CompeteScoreDao { * @return */ List selAllOrder(@Param("type") byte type); + + /** + * 查找计数赛分数 + * @param siteId + * @return + */ + ScoreVo.CountScoreCurrentSite getCountScoreByOrderId(@Param("siteId")Long siteId); } diff --git a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java index 0a2b9c39..d4d6e19d 100644 --- a/mt/src/main/java/com/ccsens/mt/service/CompeteService.java +++ b/mt/src/main/java/com/ccsens/mt/service/CompeteService.java @@ -214,7 +214,7 @@ public class CompeteService implements ICompeteService { @Override public PageInfo showResult(ScoreDto.ShowResultW param) { PageHelper.startPage(param.getPageNum(), param.getPageSize()); - List list = competeScoreDao.queryVarietyScore(param.getProjectId()); + List list = competeScoreDao.queryVarietyScore(param.getProjectId(), (param.getPageNum()-1)*param.getPageSize() ); return new PageInfo<>(list); } // public List showResult(ScoreDto.ShowResultW param) { @@ -1422,19 +1422,24 @@ public class CompeteService implements ICompeteService { @Override public List countScoreCurrentSite(CompeteDto.CompeteSite params) { Long siteId = params.getSiteId(); - List countScoreCurrentSites = competeScoreDao.selectCountScoreCurrentSite(siteId); - countScoreCurrentSites.forEach(mes->{ - CompeteStartOrder competeStartOrder = competeStartOrderMapper.selectByPrimaryKey(siteId); - CompeteVideoExample competeVideoExample = new CompeteVideoExample(); - competeVideoExample.createCriteria().andProjectIdEqualTo(competeStartOrder.getProjectId()).andPlayerIdEqualTo(competeStartOrder.getPlayerId()); - List competeVideos = competeVideoMapper.selectByExample(competeVideoExample); - if(competeVideos.size()>0) { - CompeteVideo competeVideo = competeVideos.get(0); - String path = competeVideo.getVideoUrl(); - mes.setVideoUrl(path); - } - }); - return countScoreCurrentSites; + List scoreCurrentSiteList = new ArrayList<>(); + ScoreVo.CountScoreCurrentSite countScoreCurrentSite = competeScoreDao.getCountScoreByOrderId(siteId); + scoreCurrentSiteList.add(countScoreCurrentSite); + + +// List countScoreCurrentSites = competeScoreDao.selectCountScoreCurrentSite(siteId); +// countScoreCurrentSites.forEach(mes->{ +// CompeteStartOrder competeStartOrder = competeStartOrderMapper.selectByPrimaryKey(siteId); +// CompeteVideoExample competeVideoExample = new CompeteVideoExample(); +// competeVideoExample.createCriteria().andProjectIdEqualTo(competeStartOrder.getProjectId()).andPlayerIdEqualTo(competeStartOrder.getPlayerId()); +// List competeVideos = competeVideoMapper.selectByExample(competeVideoExample); +// if(competeVideos.size()>0) { +// CompeteVideo competeVideo = competeVideos.get(0); +// String path = competeVideo.getVideoUrl(); +// mes.setVideoUrl(path); +// } +// }); + return scoreCurrentSiteList; } @Override @@ -1745,6 +1750,8 @@ public class CompeteService implements ICompeteService { } } + //场次信息 + selScropeVo.setCompeteOrder(competeStartOrder1.getCompeteOrder()); //场地信息 selScropeVo.setSite(competeStartOrder1.getSite()); diff --git a/mt/src/main/java/com/ccsens/mt/service/CompeteTaskService.java b/mt/src/main/java/com/ccsens/mt/service/CompeteTaskService.java index 594e14a6..be461a9a 100644 --- a/mt/src/main/java/com/ccsens/mt/service/CompeteTaskService.java +++ b/mt/src/main/java/com/ccsens/mt/service/CompeteTaskService.java @@ -525,6 +525,7 @@ public class CompeteTaskService implements ICompeteTaskService { if(memberJsonResponse.getCode() == 200){ MemberVo.Member member = memberJsonResponse.getData(); if(ObjectUtil.isNotNull(member)){ + memberId = member.getMemberId(); userId = member.getUserId(); } } @@ -551,6 +552,7 @@ public class CompeteTaskService implements ICompeteTaskService { MemberVo.MemberList memberList = memberListJsonResponse.getData(); if (ObjectUtil.isNotNull(memberList)) { + memberId = memberList.getMemberId(); userId = memberList.getUserId(); } @@ -636,6 +638,7 @@ public class CompeteTaskService implements ICompeteTaskService { competeJudgment.setRoleId(roleId); competeJudgment.setMemberId(memberId); competeJudgment.setUserId(userId); + log.info("添加教练信息:{}",competeJudgment); competeJudgmentDao.insertSelective(competeJudgment); } diff --git a/mt/src/main/java/com/ccsens/mt/service/ExcelService.java b/mt/src/main/java/com/ccsens/mt/service/ExcelService.java index 47c29f3b..1e64fb7e 100644 --- a/mt/src/main/java/com/ccsens/mt/service/ExcelService.java +++ b/mt/src/main/java/com/ccsens/mt/service/ExcelService.java @@ -22,7 +22,6 @@ import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import org.apache.poi.ss.usermodel.Table; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.eclipse.jetty.util.StringUtil; @@ -38,9 +37,7 @@ import java.io.OutputStream; import java.text.SimpleDateFormat; import java.util.ArrayList; -import java.util.Comparator; import java.util.Date; -import java.util.LinkedList; import java.util.List; @Slf4j @@ -649,20 +646,31 @@ public class ExcelService implements IExcelService { List three = new ArrayList<>(); PoiUtil.PoiUtilCell three1; PoiUtil.PoiUtilCell three2; + PoiUtil.PoiUtilCell three3 = null; if (q == 0) { three1 = new PoiUtil.PoiUtilCell(project.getStartTime(), 1, j); three2 = new PoiUtil.PoiUtilCell(project.getProjectName(), 1, j); + if(project.getJoinRule() == 1) { + three3 = new PoiUtil.PoiUtilCell("不限组别", 1, j); + } q++; + } else { three1 = new PoiUtil.PoiUtilCell(); three2 = new PoiUtil.PoiUtilCell(); + if(project.getJoinRule() == 1) { + three3 = new PoiUtil.PoiUtilCell(); + } } - PoiUtil.PoiUtilCell three3; - if (t == 0) { - three3 = new PoiUtil.PoiUtilCell(project.getProjectList().get(k).getGroupName(), 1, project.getProjectList().get(k).getCompanyNameList().size()); - ++t; - } else { - three3 = new PoiUtil.PoiUtilCell(); +// PoiUtil.PoiUtilCell three3 = null; + if(project.getJoinRule() == 0) { + if (t == 0) { + three3 = new PoiUtil.PoiUtilCell(project.getProjectList().get(k).getGroupName(), 1, project.getProjectList().get(k).getCompanyNameList().size()); + ++t; + + } else { + three3 = new PoiUtil.PoiUtilCell(); + } } PoiUtil.PoiUtilCell three4 = new PoiUtil.PoiUtilCell(project.getProjectList().get(k).getCompanyNameList().get(m).getStartOrder(), 1, 1); PoiUtil.PoiUtilCell three5 = new PoiUtil.PoiUtilCell(project.getProjectList().get(k).getCompanyNameList().get(m).getCompanyName(), 1, 1); @@ -1251,7 +1259,7 @@ public class ExcelService implements IExcelService { @Override public String patternExpTable(ScoreDto.ShowResultNoPage param) { //List totalScoreDisplays = competeService.showResultPage(param); - List totalScoreDisplays = competeScoreDao.queryVarietyScore(param.getProjectId()); + List totalScoreDisplays = competeScoreDao.queryVarietyScore(param.getProjectId(), 0); List> list = new ArrayList<>(); List zero=new ArrayList<>(); PoiUtil.PoiUtilCell zeroOne=new PoiUtil.PoiUtilCell("比赛成绩公示(花样赛)", 14, 1); diff --git a/mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml b/mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml index d9578c8f..3fbc2fe2 100644 --- a/mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteProjectConfigDao.xml @@ -16,7 +16,9 @@ + + @@ -336,7 +338,9 @@ so.id as startOrderId, so.compete_order as competeOrder, so.site as site, - pc.start_time as endTime, + pc.video_start_time as startTime, + pc.video_end_time as endTime, + pc.video_restrict as videoRestrict, pr.id as projectId, pr.`name` as projectName, pr.`team` as team, diff --git a/mt/src/main/resources/mapper_dao/CompeteScoreDao.xml b/mt/src/main/resources/mapper_dao/CompeteScoreDao.xml index 189f89fd..d70632ec 100644 --- a/mt/src/main/resources/mapper_dao/CompeteScoreDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteScoreDao.xml @@ -92,7 +92,7 @@ cs.final_score as finalScore FROM t_compete_start_order so - LEFT JOIN t_compete_count_score cs on cs.site_order_id = so.id + LEFT JOIN t_compete_count_score cs on cs.site_order_id = so.id and cs.rec_status = 0 LEFT JOIN t_compete_project cp on so.project_id = cp.id LEFT JOIN t_compete_project_player pp on so.player_id = pp.id LEFT JOIN t_compete_player p on pp.player_id = p.id @@ -100,7 +100,6 @@ LEFT JOIN t_compete_company c on p.company_id = c.id WHERE so.id = #{siteId} - and cs.rec_status = 0 and so.rec_status = 0 and cp.rec_status = 0 and pp.rec_status = 0 @@ -726,7 +725,7 @@ group by s.site_order_id order by result desc )t, - (SELECT @rownum := 0)t1 + (SELECT @rownum := ${page})t1 +