Browse Source

20210629

pt
zy_Java 4 years ago
parent
commit
c0b6b9b9ee
  1. 4
      cloudutil/src/main/resources/application-util-greenvalley.yml
  2. 4
      ht/src/main/resources/application.yml
  3. 11
      mt/src/main/java/com/ccsens/mt/service/ImportService.java
  4. 4
      mt/src/main/resources/druid-dev.yml
  5. 4
      mt/src/main/resources/mapper_dao/CompeteProjectDao.xml
  6. 24
      tall/src/main/java/com/ccsens/tall/rabbitMQ/MessageTest.java
  7. 2
      tall/src/main/resources/application-greenvalley.yml
  8. 4
      tall/src/main/resources/application.yml
  9. 1
      tall/src/main/resources/druid-greenvalley.yml

4
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

4
ht/src/main/resources/application.yml

@ -1,4 +1,4 @@
spring:
profiles:
active: prod
include: common, util-prod
active: dev
include: common, util-dev

11
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());

4
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

4
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}

24
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);
// }
}

2
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创时代

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring:
profiles:
active: dev
include: util-dev,common
active: greenvalley
include: util-greenvalley,common

1
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

Loading…
Cancel
Save