fix:glados域名修复
This commit is contained in:
@@ -17,7 +17,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
|
|||||||
"com.xiang.xservice.application.script.glados.repository",
|
"com.xiang.xservice.application.script.glados.repository",
|
||||||
"com.xiang.xservice.application.script.xb.repository",
|
"com.xiang.xservice.application.script.xb.repository",
|
||||||
"com.xiang.xservice.common.mapper",
|
"com.xiang.xservice.common.mapper",
|
||||||
"com.xiang.xservice.application.script.jntyzx.mapper"
|
|
||||||
})
|
})
|
||||||
@ConfigurationPropertiesScan(basePackages = {
|
@ConfigurationPropertiesScan(basePackages = {
|
||||||
"com.xiang.xservice.config"
|
"com.xiang.xservice.config"
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ public class URLConstants {
|
|||||||
/**
|
/**
|
||||||
* glados 主域名
|
* glados 主域名
|
||||||
*/
|
*/
|
||||||
public static final String GLADOS_URL_PREFIX = "https://www.glados.one";
|
public static final String GLADOS_URL_PREFIX = "https://www.glados.cloud";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 签到
|
* 签到
|
||||||
|
|||||||
@@ -83,18 +83,26 @@ public class GLaDOSServiceImpl implements GLaDOSService{
|
|||||||
log.info("http do post success, response:{}", response);
|
log.info("http do post success, response:{}", response);
|
||||||
|
|
||||||
// 成功签到记录
|
// 成功签到记录
|
||||||
if (0 == gLaDOSResponse.getCode() && Objects.nonNull(gLaDOSResponse.getPoints())) {
|
if (0 == gLaDOSResponse.getCode()) {
|
||||||
log.info("签到成功, 签到积分:{}, 签到消息:{}", gLaDOSResponse.getPoints(), gLaDOSResponse.getMessage());
|
if (Objects.nonNull(gLaDOSResponse.getPoints())) {
|
||||||
sb.append(user.getEmail()).append("签到成功,获得积分:").append(gLaDOSResponse.getPoints()).append("\n");
|
log.info("签到成功, 签到积分:{}, 签到消息:{}", gLaDOSResponse.getPoints(), gLaDOSResponse.getMessage());
|
||||||
try {
|
sb.append(user.getEmail()).append("签到成功,获得积分:").append(gLaDOSResponse.getPoints()).append("\n");
|
||||||
dingTalkService.sendScriptMsg("[时间:" + LocalDateTime.now() + "] 用户: " +
|
try {
|
||||||
user.getEmail() + "签到成功,获得积分:" + gLaDOSResponse.getPoints());
|
dingTalkService.sendScriptMsg("[时间:" + LocalDateTime.now() + "] 用户: " +
|
||||||
} catch (Exception e) {
|
user.getEmail() + "签到成功,获得积分:" + gLaDOSResponse.getPoints());
|
||||||
log.error("发送钉钉消息失败", e);
|
} catch (Exception e) {
|
||||||
|
log.error("发送钉钉消息失败", e);
|
||||||
|
}
|
||||||
|
GladosRunLog build = GladosRunLog.builder().time(LocalDateTime.now()).status(1).code(Integer.valueOf(gLaDOSResponse.getCode().toString())).response(response).user(user.getEmail()).userId(user.getId()).build();
|
||||||
|
gladosMapper.insertScriptRunLog(build);
|
||||||
|
return Boolean.TRUE;
|
||||||
|
} else {
|
||||||
|
log.info("签到异常, 签到消息:{}", gLaDOSResponse.getMessage());
|
||||||
|
sb.append(user.getEmail()).append("签到异常,消息:").append(gLaDOSResponse.getMessage());
|
||||||
|
GladosRunLog build = GladosRunLog.builder().time(LocalDateTime.now()).status(0).code(Integer.valueOf(gLaDOSResponse.getCode().toString())).response(response).user(user.getEmail()).userId(user.getId()).build();
|
||||||
|
gladosMapper.insertScriptRunLog(build);
|
||||||
|
return Boolean.FALSE;
|
||||||
}
|
}
|
||||||
GladosRunLog build = GladosRunLog.builder().time(LocalDateTime.now()).status(1).code(Integer.valueOf(gLaDOSResponse.getCode().toString())).response(response).user(user.getEmail()).userId(user.getId()).build();
|
|
||||||
gladosMapper.insertScriptRunLog(build);
|
|
||||||
return Boolean.TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 重复签到,表示当日签到成功
|
// 重复签到,表示当日签到成功
|
||||||
|
|||||||
Reference in New Issue
Block a user