|
|
@@ -3,6 +3,7 @@ package org.dromara.system.mapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import org.apache.ibatis.annotations.Mapper;
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
import org.dromara.common.mybatis.annotation.DataColumn;
|
|
|
import org.dromara.common.mybatis.annotation.DataPermission;
|
|
|
@@ -10,6 +11,7 @@ import org.dromara.system.domain.GameAppEvent;
|
|
|
import org.dromara.system.domain.GameEvent;
|
|
|
import org.dromara.system.domain.vo.GameEventVo;
|
|
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
|
|
+import org.dromara.system.domain.vo.app.ExperienceGameEventVo;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@@ -22,42 +24,59 @@ import java.util.List;
|
|
|
@Mapper
|
|
|
public interface GameEventMapper extends BaseMapperPlus<GameEvent, GameEventVo> {
|
|
|
|
|
|
- /**
|
|
|
- * 分页查询赛事列表,并进行数据权限控制
|
|
|
- *
|
|
|
- * @param page 分页参数
|
|
|
- * @param queryWrapper 查询条件
|
|
|
- * @return 分页的赛事信息
|
|
|
- */
|
|
|
- @DataPermission({
|
|
|
- @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
- @DataColumn(key = "userName", value = "create_by")
|
|
|
- })
|
|
|
- default Page<GameEventVo> selectPageEventList(Page<GameEvent> page, Wrapper<GameEvent> queryWrapper) {
|
|
|
- return this.selectVoPage(page, queryWrapper);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 分页查询赛事列表,并进行数据权限控制
|
|
|
+ *
|
|
|
+ * @param page 分页参数
|
|
|
+ * @param queryWrapper 查询条件
|
|
|
+ * @return 分页的赛事信息
|
|
|
+ */
|
|
|
+ @DataPermission({
|
|
|
+ @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
+ @DataColumn(key = "userName", value = "create_by")
|
|
|
+ })
|
|
|
+ default Page<GameEventVo> selectPageEventList(Page<GameEvent> page, Wrapper<GameEvent> queryWrapper) {
|
|
|
+ return this.selectVoPage(page, queryWrapper);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 查询赛事列表,并进行数据权限控制
|
|
|
- *
|
|
|
- * @param queryWrapper 查询条件
|
|
|
- * @return 赛事信息集合
|
|
|
- */
|
|
|
- @DataPermission({
|
|
|
- @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
- @DataColumn(key = "userName", value = "create_by")
|
|
|
- })
|
|
|
- default List<GameEventVo> selectEventList(Wrapper<GameEvent> queryWrapper) {
|
|
|
- return this.selectVoList(queryWrapper);
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 查询赛事列表,并进行数据权限控制
|
|
|
+ *
|
|
|
+ * @param queryWrapper 查询条件
|
|
|
+ * @return 赛事信息集合
|
|
|
+ */
|
|
|
+ @DataPermission({
|
|
|
+ @DataColumn(key = "deptName", value = "create_dept"),
|
|
|
+ @DataColumn(key = "userName", value = "create_by")
|
|
|
+ })
|
|
|
+ default List<GameEventVo> selectEventList(Wrapper<GameEvent> queryWrapper) {
|
|
|
+ return this.selectVoList(queryWrapper);
|
|
|
+ }
|
|
|
|
|
|
- /**
|
|
|
- * 手持端获取该裁判负责的赛事列表
|
|
|
+ /**
|
|
|
+ * 手持端获取该裁判负责的赛事列表
|
|
|
*/
|
|
|
- @Select("SELECT e.event_id as id,e.event_code as bianhao,e.event_name as name,e.create_time,ec.config_value as ServerUrl " +
|
|
|
- "FROM game_event e " +
|
|
|
- "left join game_event_config ec on ec.event_id = e.event_id " +
|
|
|
- "WHERE e.event_id in (select event_id from game_referee where referee_id = #{refereeId}) and e.del_flag = '0' " +
|
|
|
- "and ec.config_key = 'upload_path' ")
|
|
|
+ @Select("SELECT e.event_id as id,e.event_code as bianhao,e.event_name as name,e.create_time,ec.config_value as ServerUrl "
|
|
|
+ +
|
|
|
+ "FROM game_event e " +
|
|
|
+ "left join game_event_config ec on ec.event_id = e.event_id " +
|
|
|
+ "WHERE e.event_id in (select event_id from game_referee where referee_id = #{refereeId}) and e.del_flag = '0' "
|
|
|
+ +
|
|
|
+ "and ec.config_key = 'upload_path' ")
|
|
|
List<GameAppEvent> selectRefereeEventList(Long refereeId);
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 小程序体验端获取赛事列表,并关联查询配置项
|
|
|
+ */
|
|
|
+ @Select("<script>" +
|
|
|
+ "SELECT e.event_id, e.location, e.event_name, e.start_time, e.end_time, ec.config_value as hallImage " +
|
|
|
+ "from game_event e " +
|
|
|
+ "left join game_event_config ec on e.event_id = ec.event_id and ec.config_key = 'hall_image' " +
|
|
|
+ "where e.del_flag = '0' and e.status = '0' " +
|
|
|
+ "<if test=\"ew != null and ew.sqlSegment != null and ew.sqlSegment != ''\">" +
|
|
|
+ " and ${ew.sqlSegment} " +
|
|
|
+ "</if>" +
|
|
|
+ "order by e.start_time desc " +
|
|
|
+ "</script>")
|
|
|
+ List<ExperienceGameEventVo> selectInfoWithConfig(@Param("ew") Wrapper<GameEvent> queryWrapper);
|
|
|
}
|