Commit 5a291ad0 authored by liming's avatar liming

团练通知

parent 087ca3d1
......@@ -11,17 +11,17 @@ import javax.annotation.Resource;
@Service
@Slf4j
public class TeamTrainingChangeNotifyService {
@Value("${simple-match-change-notify-url}")
private String simpleMatchChangeNotifyUrl;
@Value("${team-training-change-notify-url}")
private String teamTrainingChangeNotifyUrl;
@Resource
private RestTemplate restTemplate;
@Async("asyncTaskExecutor")
public void notifyGameServerSimpleMatchChange() {
public void notifyGameServerTeamTrainingChange() {
log.info("异步通知比赛列表变更");
String result = "执行失败";
try {
result = restTemplate.getForObject(simpleMatchChangeNotifyUrl, String.class);
result = restTemplate.getForObject(teamTrainingChangeNotifyUrl, String.class);
} catch (Exception ex) {
log.error(ex.getMessage());
}
......
......@@ -75,7 +75,7 @@ public class TeamTrainingService {
teamTraining.setStatus(10);
}
teamTrainingMapper.updateById(teamTraining);
// simpleMatchChangeNotifyService.notifyGameServerSimpleMatchChange();
teamTrainingChangeNotifyService.notifyGameServerTeamTrainingChange();
}
public TeamTrainingResponseDTO getTraining(Long trainingId) {
......@@ -127,7 +127,7 @@ public class TeamTrainingService {
training.setLeaderId(loginUser.getId());
teamTrainingMapper.insert(training);
}
// teamTrainingChangeNotifyService.notifyGameServerSimpleMatchChange();
teamTrainingChangeNotifyService.notifyGameServerTeamTrainingChange();
}
}
......@@ -21,4 +21,4 @@ aliyun:
bucket-name: antai-sport
cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/
simple-match-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file
team-training-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file
......@@ -20,4 +20,4 @@ aliyun:
bucket-name: antai-sport
cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/
simple-match-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file
team-training-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file
......@@ -21,7 +21,7 @@ aliyun:
bucket-name: shanghaijingji-sport-prod
cdn-url: https://shanghaijingji-sport-prod.oss-cn-shanghai.aliyuncs.com/
simple-match-change-notify-url: http://127.0.0.1:3281/api/match/update
team-training-change-notify-url: http://127.0.0.1:3281/api/team/training/update
logging:
config: classpath:logback-spring-prod.xml
\ No newline at end of file
......@@ -21,4 +21,4 @@ aliyun:
bucket-name: antai-sport
cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/
simple-match-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file
team-training-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment