|
@@ -8,15 +8,13 @@ import org.apache.ibatis.annotations.Select;
|
|
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
|
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
|
|
import org.dromara.system.domain.GameAthlete;
|
|
import org.dromara.system.domain.GameAthlete;
|
|
|
-import org.dromara.system.domain.GameEventProject;
|
|
|
|
|
import org.dromara.system.domain.bo.GameAthleteBo;
|
|
import org.dromara.system.domain.bo.GameAthleteBo;
|
|
|
import org.dromara.system.domain.vo.GameAthleteVo;
|
|
import org.dromara.system.domain.vo.GameAthleteVo;
|
|
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
|
-import org.dromara.system.domain.vo.GameEventProjectVo;
|
|
|
|
|
|
|
+import org.dromara.system.domain.vo.GameTeamVo;
|
|
|
|
|
|
|
|
import java.util.Collection;
|
|
import java.util.Collection;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 参赛队员Mapper接口
|
|
* 参赛队员Mapper接口
|
|
@@ -30,16 +28,16 @@ public interface GameAthleteMapper extends BaseMapperPlus<GameAthlete, GameAthle
|
|
|
* 分页查询运动员列表
|
|
* 分页查询运动员列表
|
|
|
*/
|
|
*/
|
|
|
@DataPermission({
|
|
@DataPermission({
|
|
|
- @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
|
|
- @DataColumn(key = "userName", value = "create_by")
|
|
|
|
|
|
|
+ @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
|
|
+ @DataColumn(key = "userName", value = "create_by")
|
|
|
})
|
|
})
|
|
|
default Page<GameAthleteVo> selectPageAthleteList(Page<GameAthlete> page, Wrapper<GameAthlete> queryWrapper) {
|
|
default Page<GameAthleteVo> selectPageAthleteList(Page<GameAthlete> page, Wrapper<GameAthlete> queryWrapper) {
|
|
|
return this.selectVoPage(page, queryWrapper);
|
|
return this.selectVoPage(page, queryWrapper);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
@DataPermission({
|
|
@DataPermission({
|
|
|
- @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
|
|
- @DataColumn(key = "userName", value = "create_by")
|
|
|
|
|
|
|
+ @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
|
|
+ @DataColumn(key = "userName", value = "create_by")
|
|
|
})
|
|
})
|
|
|
default List<GameAthleteVo> selectAthleteList(Wrapper<GameAthlete> queryWrapper) {
|
|
default List<GameAthleteVo> selectAthleteList(Wrapper<GameAthlete> queryWrapper) {
|
|
|
return this.selectVoList(queryWrapper);
|
|
return this.selectVoList(queryWrapper);
|
|
@@ -56,15 +54,25 @@ public interface GameAthleteMapper extends BaseMapperPlus<GameAthlete, GameAthle
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 根据项目id列表查询运动员(批量查询)
|
|
* 根据项目id列表查询运动员(批量查询)
|
|
|
|
|
+ *
|
|
|
* @param projectIds 项目id列表
|
|
* @param projectIds 项目id列表
|
|
|
* @return 运动员列表
|
|
* @return 运动员列表
|
|
|
*/
|
|
*/
|
|
|
@Select("<script>" +
|
|
@Select("<script>" +
|
|
|
- "SELECT * FROM game_athlete " +
|
|
|
|
|
- "WHERE del_flag = '0' and(" +
|
|
|
|
|
- "<foreach collection='projectIds' item='projectId' separator=' OR '>" +
|
|
|
|
|
- "JSON_CONTAINS(project_value, CAST(#{projectId} AS JSON))" +
|
|
|
|
|
- "</foreach>" +")"+
|
|
|
|
|
- "</script>")
|
|
|
|
|
|
|
+ "SELECT * FROM game_athlete " +
|
|
|
|
|
+ "WHERE del_flag = '0' AND (" +
|
|
|
|
|
+ "<foreach collection='projectIds' item='projectId' separator=' OR '>" +
|
|
|
|
|
+ "(JSON_CONTAINS(project_value, CAST(#{projectId} AS JSON)) OR JSON_CONTAINS(project_value, JSON_ARRAY(CAST(#{projectId} AS CHAR))))" +
|
|
|
|
|
+ "</foreach>" + ")" +
|
|
|
|
|
+ "</script>")
|
|
|
List<GameAthleteBo> findByProjectIds(@Param("projectIds") Collection<Long> projectIds);
|
|
List<GameAthleteBo> findByProjectIds(@Param("projectIds") Collection<Long> projectIds);
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 根据项目ID分页查询队伍详细信息
|
|
|
|
|
+ */
|
|
|
|
|
+ @Select("SELECT DISTINCT gt.* FROM game_team gt " +
|
|
|
|
|
+ "JOIN game_athlete ga ON ga.team_id = gt.team_id " +
|
|
|
|
|
+ "WHERE ga.del_flag = '0' AND gt.del_flag = '0' " +
|
|
|
|
|
+ "AND (JSON_CONTAINS(ga.project_value, CAST(#{projectId} AS JSON)) OR JSON_CONTAINS(ga.project_value, JSON_ARRAY(CAST(#{projectId} AS CHAR))))")
|
|
|
|
|
+ Page<GameTeamVo> selectTeamPageByProjectId(Page<GameTeamVo> page, @Param("projectId") Long projectId);
|
|
|
}
|
|
}
|