From c0b6b9b9eeac3fca8d6c4f71f5ebbfadb5b85304 Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Tue, 29 Jun 2021 09:50:26 +0800 Subject: [PATCH] 20210629 --- .../application-util-greenvalley.yml | 4 ++-- ht/src/main/resources/application.yml | 4 ++-- .../com/ccsens/mt/service/ImportService.java | 11 +++++++-- mt/src/main/resources/druid-dev.yml | 4 ++-- .../mapper_dao/CompeteProjectDao.xml | 4 ++-- .../com/ccsens/tall/rabbitMQ/MessageTest.java | 24 +++++++++---------- .../resources/application-greenvalley.yml | 2 +- tall/src/main/resources/application.yml | 4 ++-- tall/src/main/resources/druid-greenvalley.yml | 1 + 9 files changed, 33 insertions(+), 25 deletions(-) diff --git a/cloudutil/src/main/resources/application-util-greenvalley.yml b/cloudutil/src/main/resources/application-util-greenvalley.yml index 48f3e771..0551b88f 100644 --- a/cloudutil/src/main/resources/application-util-greenvalley.yml +++ b/cloudutil/src/main/resources/application-util-greenvalley.yml @@ -19,8 +19,8 @@ eureka: client: service-url: # 指定eureka server通信地址,注意/eureka/小尾巴不能少 -# defaultZone: http://admin:admin@82.156.116.247:7010/eureka/ - defaultZone: http://admin:admin@49.232.6.143:7010/eureka/ + defaultZone: http://admin:admin@82.157.24.76:7010/eureka/ +# defaultZone: http://admin:admin@49.232.6.143:7010/eureka/ instance: # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server prefer-ip-address: true diff --git a/ht/src/main/resources/application.yml b/ht/src/main/resources/application.yml index d082c0ea..5c2cd5c4 100644 --- a/ht/src/main/resources/application.yml +++ b/ht/src/main/resources/application.yml @@ -1,4 +1,4 @@ spring: profiles: - active: prod - include: common, util-prod \ No newline at end of file + active: dev + include: common, util-dev \ No newline at end of file diff --git a/mt/src/main/java/com/ccsens/mt/service/ImportService.java b/mt/src/main/java/com/ccsens/mt/service/ImportService.java index f0f42afb..83ade455 100644 --- a/mt/src/main/java/com/ccsens/mt/service/ImportService.java +++ b/mt/src/main/java/com/ccsens/mt/service/ImportService.java @@ -113,7 +113,7 @@ public class ImportService implements IImportService{ groupMap.put(competeGroup.getGroupName(),competeGroup); } } - for (int i = 1; i < sheet.getLastRowNum(); i++) { + for (int i = 1; i <= sheet.getLastRowNum(); i++) { //参赛单位 String companyCell = StringUtil.replaceStrSpace(ExcelUtil.getCellValue(sheet.getRow(i).getCell(0))); //参赛项目 @@ -150,6 +150,8 @@ public class ImportService implements IImportService{ BeanUtil.copyProperties(competeCoach,newCoach); newCoach.setId(snowflake.nextId()); newCoach.setCompanyId(newCompany.getId()); + newCoach.setCreatedAt(null); + newCoach.setUpdatedAt(null); coachMapper.insertSelective(newCoach); } } @@ -200,8 +202,13 @@ public class ImportService implements IImportService{ CompeteProject project = projectMap.get(projectCell); if (ObjectUtil.isNotNull(project)){ + if(i == 276 || i == 277 || i == 207){ + System.out.println(playerCell); + } + log.info("第{}行",i); //个人项目 if (0 == project.getTeam()){ + CompeteProjectPlayer projectPlayer = new CompeteProjectPlayer(); projectPlayer.setId(snowflake.nextId()); projectPlayer.setPlayerId(playerMap.get(playerCell).getId()); @@ -212,7 +219,7 @@ public class ImportService implements IImportService{ } //团队项目 if (1 == project.getTeam()){ - if (groupCell.contains("男子") || groupCell.contains("女子")){ + if (groupCell.contains("男子") || groupCell.contains("女子") || groupCell.contains("混合")){ CompeteTeam newTeam = new CompeteTeam(); newTeam.setId(snowflake.nextId()); newTeam.setProjectId(projectMap.get(projectCell).getId()); diff --git a/mt/src/main/resources/druid-dev.yml b/mt/src/main/resources/druid-dev.yml index 0069ab94..21d1d9c5 100644 --- a/mt/src/main/resources/druid-dev.yml +++ b/mt/src/main/resources/druid-dev.yml @@ -28,8 +28,8 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 - url: jdbc:mysql://49.233.89.188:3306/mt?useUnicode=true&characterEncoding=UTF-8 -# url: jdbc:mysql://www.tall.wiki/mt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true +# url: jdbc:mysql://49.233.89.188:3306/mt?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://www.tall.wiki/mt?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true username: root validationQuery: SELECT 1 FROM DUAL # env: CCSENS_GAME diff --git a/mt/src/main/resources/mapper_dao/CompeteProjectDao.xml b/mt/src/main/resources/mapper_dao/CompeteProjectDao.xml index 4ec883b8..25b718cc 100644 --- a/mt/src/main/resources/mapper_dao/CompeteProjectDao.xml +++ b/mt/src/main/resources/mapper_dao/CompeteProjectDao.xml @@ -95,7 +95,7 @@ and g.rec_status = 0 FROM t_compete_project_player pp LEFT JOIN t_compete_player p on pp.player_id = p.id and p.rec_status = 0 - LEFT JOIN t_compete_group g on p.compete_group_id = g.id and g.rec_status = 0 and g.type = 6 + LEFT JOIN t_compete_group g on p.compete_group_id = g.id and g.rec_status = 0 and g.type = 7 LEFT JOIN t_compete_company c on p.company_id = c.id WHERE pp.project_id = #{projectId} @@ -110,7 +110,7 @@ and g.rec_status = 0 t.id FROM t_compete_team t - LEFT JOIN t_compete_group g on t.group_remark = g.group_remark and t.gender_group = g.sex and g.rec_status = 0 and g.type = 6 + LEFT JOIN t_compete_group g on t.group_remark = g.group_remark and t.gender_group = g.sex and g.rec_status = 0 and g.type = 7 LEFT JOIN t_compete_company c on t.company_id = c.id WHERE t.project_id = #{projectId} diff --git a/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java b/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java index 52333846..3202751e 100644 --- a/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java +++ b/tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java @@ -11,16 +11,16 @@ import org.springframework.amqp.core.AmqpTemplate; import org.springframework.beans.factory.annotation.Autowired; @Slf4j public class MessageTest { - @Autowired - private AmqpTemplate rabbitTemplate; - - public void messageTest() throws Exception { - ServerMessage serverMessage = new ServerMessage(); - serverMessage.setType("Ping"); - InMessage inMessage = InMessage.newToServerMessage(MessageConstant.DomainType.Server,serverMessage); - String j = JacksonUtil.beanToJson(inMessage); - log.info(j); - //FixMe 发送到消息队列 - rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,j); - } +// @Autowired +// private AmqpTemplate rabbitTemplate; +// +// public void messageTest() throws Exception { +// ServerMessage serverMessage = new ServerMessage(); +// serverMessage.setType("Ping"); +// InMessage inMessage = InMessage.newToServerMessage(MessageConstant.DomainType.Server,serverMessage); +// String j = JacksonUtil.beanToJson(inMessage); +// log.info(j); +// //FixMe 发送到消息队列 +// rabbitTemplate.convertAndSend(RabbitMQConfig.MESSAGE_QUEUE_NAME,j); +// } } diff --git a/tall/src/main/resources/application-greenvalley.yml b/tall/src/main/resources/application-greenvalley.yml index f6f7264a..61d1bfff 100644 --- a/tall/src/main/resources/application-greenvalley.yml +++ b/tall/src/main/resources/application-greenvalley.yml @@ -32,7 +32,7 @@ swagger: eureka: instance: # ip-address: 82.156.116.247 - ip-address: 49.232.6.143 + ip-address: 82.157.24.76 # 平台信息 0绿谷 1创时代 diff --git a/tall/src/main/resources/application.yml b/tall/src/main/resources/application.yml index b5408a3a..9e02c3e8 100644 --- a/tall/src/main/resources/application.yml +++ b/tall/src/main/resources/application.yml @@ -1,5 +1,5 @@ spring: profiles: - active: dev - include: util-dev,common + active: greenvalley + include: util-greenvalley,common diff --git a/tall/src/main/resources/druid-greenvalley.yml b/tall/src/main/resources/druid-greenvalley.yml index 193bb4ed..fd0ed8d5 100644 --- a/tall/src/main/resources/druid-greenvalley.yml +++ b/tall/src/main/resources/druid-greenvalley.yml @@ -28,6 +28,7 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 +# url: jdbc:mysql://82.157.24.76/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true username: root validationQuery: SELECT 1 FROM DUAL