Commit 5a291ad0 authored by liming's avatar liming

团练通知

parent 087ca3d1
...@@ -11,17 +11,17 @@ import javax.annotation.Resource; ...@@ -11,17 +11,17 @@ import javax.annotation.Resource;
@Service @Service
@Slf4j @Slf4j
public class TeamTrainingChangeNotifyService { public class TeamTrainingChangeNotifyService {
@Value("${simple-match-change-notify-url}") @Value("${team-training-change-notify-url}")
private String simpleMatchChangeNotifyUrl; private String teamTrainingChangeNotifyUrl;
@Resource @Resource
private RestTemplate restTemplate; private RestTemplate restTemplate;
@Async("asyncTaskExecutor") @Async("asyncTaskExecutor")
public void notifyGameServerSimpleMatchChange() { public void notifyGameServerTeamTrainingChange() {
log.info("异步通知比赛列表变更"); log.info("异步通知比赛列表变更");
String result = "执行失败"; String result = "执行失败";
try { try {
result = restTemplate.getForObject(simpleMatchChangeNotifyUrl, String.class); result = restTemplate.getForObject(teamTrainingChangeNotifyUrl, String.class);
} catch (Exception ex) { } catch (Exception ex) {
log.error(ex.getMessage()); log.error(ex.getMessage());
} }
......
...@@ -75,7 +75,7 @@ public class TeamTrainingService { ...@@ -75,7 +75,7 @@ public class TeamTrainingService {
teamTraining.setStatus(10); teamTraining.setStatus(10);
} }
teamTrainingMapper.updateById(teamTraining); teamTrainingMapper.updateById(teamTraining);
// simpleMatchChangeNotifyService.notifyGameServerSimpleMatchChange(); teamTrainingChangeNotifyService.notifyGameServerTeamTrainingChange();
} }
public TeamTrainingResponseDTO getTraining(Long trainingId) { public TeamTrainingResponseDTO getTraining(Long trainingId) {
...@@ -127,7 +127,7 @@ public class TeamTrainingService { ...@@ -127,7 +127,7 @@ public class TeamTrainingService {
training.setLeaderId(loginUser.getId()); training.setLeaderId(loginUser.getId());
teamTrainingMapper.insert(training); teamTrainingMapper.insert(training);
} }
// teamTrainingChangeNotifyService.notifyGameServerSimpleMatchChange(); teamTrainingChangeNotifyService.notifyGameServerTeamTrainingChange();
} }
} }
...@@ -21,4 +21,4 @@ aliyun: ...@@ -21,4 +21,4 @@ aliyun:
bucket-name: antai-sport bucket-name: antai-sport
cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/ cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/
simple-match-change-notify-url: http://47.100.168.51:3281/api/match/update team-training-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file \ No newline at end of file
...@@ -20,4 +20,4 @@ aliyun: ...@@ -20,4 +20,4 @@ aliyun:
bucket-name: antai-sport bucket-name: antai-sport
cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/ cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/
simple-match-change-notify-url: http://47.100.168.51:3281/api/match/update team-training-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file \ No newline at end of file
...@@ -21,7 +21,7 @@ aliyun: ...@@ -21,7 +21,7 @@ aliyun:
bucket-name: shanghaijingji-sport-prod bucket-name: shanghaijingji-sport-prod
cdn-url: https://shanghaijingji-sport-prod.oss-cn-shanghai.aliyuncs.com/ 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: logging:
config: classpath:logback-spring-prod.xml config: classpath:logback-spring-prod.xml
\ No newline at end of file
...@@ -21,4 +21,4 @@ aliyun: ...@@ -21,4 +21,4 @@ aliyun:
bucket-name: antai-sport bucket-name: antai-sport
cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/ cdn-url: http://antai-sport.oss-cn-beijing.aliyuncs.com/
simple-match-change-notify-url: http://47.100.168.51:3281/api/match/update team-training-change-notify-url: http://47.100.168.51:3281/api/match/update
\ No newline at end of file \ 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