Browse Source

fix:banner修改

wenkai 3 days ago
parent
commit
aa94b66130

+ 1 - 1
ruoyi-admin/src/main/java/org/dromara/DromaraApplication.java

@@ -17,7 +17,7 @@ public class DromaraApplication {
         SpringApplication application = new SpringApplication(DromaraApplication.class);
         application.setApplicationStartup(new BufferingApplicationStartup(2048));
         application.run(args);
-        System.out.println("(♥◠‿◠)ノ゙  RuoYi-Vue-Plus启动成功   ლ(´ڡ`ლ)゙");
+        System.out.println("(♥◠‿◠)ノ゙  赛事管理系统启动成功   ლ(´ڡ`ლ)゙");
     }
 
 }

+ 6 - 8
ruoyi-admin/src/main/resources/banner.txt

@@ -1,8 +1,6 @@
-Application Version: ${revision}
-Spring Boot Version: ${spring-boot.version}
-__________            _____.___.__         ____   ____                     __________.__
-\______   \__ __  ____\__  |   |__|        \   \ /   /_ __   ____          \______   \  |  __ __  ______
- |       _/  |  \/  _ \/   |   |  |  ______ \   Y   /  |  \_/ __ \   ______ |     ___/  | |  |  \/  ___/
- |    |   \  |  (  <_> )____   |  | /_____/  \     /|  |  /\  ___/  /_____/ |    |   |  |_|  |  /\___ \
- |____|_  /____/ \____// ______|__|           \___/ |____/  \___  >         |____|   |____/____//____  >
-        \/             \/                                       \/                                   \/
+   _____                      ______               _
+  / ____|                    |  ____|             | |
+ | |  __  __ _ _ __ ___   ___| |____   _____ _ __ | |_
+ | | |_ |/ _` | '_ ` _ \ / _ \  __\ \ / / _ \ '_ \| __|
+ | |__| | (_| | | | | | |  __/ |___\ V /  __/ | | | |_
+  \_____|\__,_|_| |_| |_|\___|______\_/ \___|_| |_|\__|

+ 8 - 0
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/service/IGameEventGroupService.java

@@ -1,5 +1,6 @@
 package org.dromara.system.service;
 
+import org.dromara.system.domain.GameEventGroup;
 import org.dromara.system.domain.vo.GameEventGroupVo;
 import org.dromara.system.domain.bo.GameEventGroupBo;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
@@ -65,4 +66,11 @@ public interface IGameEventGroupService {
      * @return 是否删除成功
      */
     Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    /**
+     * 根据赛事id查询
+     * @param defaultEventId
+     * @return
+     */
+    GameEventGroup queryByEventId(Long defaultEventId);
 }

+ 14 - 0
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/service/impl/GameEventGroupServiceImpl.java

@@ -202,4 +202,18 @@ public class GameEventGroupServiceImpl implements IGameEventGroupService {
         }
         return baseMapper.deleteByIds(ids) > 0;
     }
+
+    /**
+     * 根据赛事id查询
+     *
+     * @param defaultEventId
+     * @return
+     */
+    @Override
+    public GameEventGroup queryByEventId(Long defaultEventId) {
+        return baseMapper.selectOne(
+            Wrappers.lambdaQuery(GameEventGroup.class)
+                .eq(GameEventGroup::getEventId, defaultEventId)
+        );
+    }
 }

+ 25 - 19
ruoyi-modules/ruoyi-game-event/src/main/java/org/dromara/system/service/impl/GameEventServiceImpl.java

@@ -33,6 +33,7 @@ import org.dromara.common.mybatis.core.page.PageQuery;
 import org.dromara.common.mybatis.core.page.TableDataInfo;
 import org.dromara.common.redis.utils.RedisUtils;
 import org.dromara.system.domain.GameEvent;
+import org.dromara.system.domain.GameEventGroup;
 import org.dromara.system.domain.bo.GameAthleteBo;
 import org.dromara.system.domain.bo.GameEventBo;
 import org.dromara.system.domain.bo.GameTeamBo;
@@ -40,10 +41,7 @@ import org.dromara.system.domain.bo.GenerateBibBo;
 import org.dromara.system.domain.constant.GameEventConstant;
 import org.dromara.system.domain.vo.*;
 import org.dromara.system.mapper.GameEventMapper;
-import org.dromara.system.service.IGameAthleteService;
-import org.dromara.system.service.IGameEventProjectService;
-import org.dromara.system.service.IGameEventService;
-import org.dromara.system.service.IGameTeamService;
+import org.dromara.system.service.*;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -76,6 +74,8 @@ public class GameEventServiceImpl implements IGameEventService {
     private IGameAthleteService gameAthleteService;
     @Resource
     private IGameEventProjectService gameEventProjectService;
+    @Resource
+    private IGameEventGroupService gameEventGroupService;
 
     /**
      * 查询赛事基本信息
@@ -586,9 +586,11 @@ public class GameEventServiceImpl implements IGameEventService {
         //3.查询赛事所有项目缓存
         Map<Long, String> projectMap = gameEventProjectService.queryListByEventId(defaultEventId)
             .stream().collect(Collectors.toMap(GameEventProjectVo::getProjectId, GameEventProjectVo::getProjectName));
-        //4.根据参数生成号码布
+        //4.查询赛事组别
+        GameEventGroup gameEventGroup = gameEventGroupService.queryByEventId(defaultEventId);
+        //5.根据参数生成号码布
         GameEventVo eventVo = baseMapper.selectVoById(defaultEventId);
-        generateBib(response, bgImage, logo, eventVo.getEventName(), athleteVoList, teamNameMap, projectMap, bibParam);
+        generateBib(response, bgImage, logo, eventVo.getEventName(), gameEventGroup.getGroupName(), athleteVoList, teamNameMap, projectMap, bibParam);
     }
 
     /**
@@ -598,6 +600,7 @@ public class GameEventServiceImpl implements IGameEventService {
      * @param backgroundImage 背景图 (MultipartFile)
      * @param logo            Logo 图片(可选)
      * @param eventName       赛事名称
+     * @param groupName       组别名称
      * @param athleteList     运动员列表
      * @param teamNameMap     队伍id名称映射
      * @param projectMap      项目id名称映射
@@ -608,6 +611,7 @@ public class GameEventServiceImpl implements IGameEventService {
                             MultipartFile backgroundImage,
                             MultipartFile logo,
                             String eventName,
+                            String groupName,
                             List<GameAthleteVo> athleteList,
                             Map<Long, String> teamNameMap,
                             Map<Long, String> projectMap,
@@ -718,22 +722,24 @@ public class GameEventServiceImpl implements IGameEventService {
                         }
                     });
 
-                    // 生成二维码 - 更精确的位置调整
+                    // 生成二维码
                     String qrData = String.format(
                         """
-                            赛事名称:%s,
-                            运动员序号:%d,
-                            运动员编号:%s,
-                            参与项目:%s,
-                            队伍id:%d,
-                            队伍名称:%s,
-                            运动员姓名:%s,
-                            性别:%s,
-                            年龄:%d
-                        """,
+                                {
+                                    赛事名称:%s,
+                                    运动员序号:%d,
+                                    运动员编号:%s,
+                                    参与项目:%s,
+                                    队伍名称:%s,
+                                    运动员姓名:%s,
+                                    性别:%s,
+                                    年龄:%d
+                                    组别:%s
+                                }
+                            """,
                         eventName, athlete.getAthleteId(), athlete.getAthleteCode(),
-                        joinProject.toString(),
-                        athlete.getTeamId(), teamNameMap.get(athlete.getTeamId()), athlete.getName(), athlete.getGender(), athlete.getAge()
+                        joinProject, teamNameMap.get(athlete.getTeamId()), athlete.getName(),
+                        athlete.getGender(), athlete.getAge(), groupName
                     );
 
                     byte[] qrBytes = generateQRCode(qrData, 150, 150);