feat:用户token更新

This commit is contained in:
Xiang
2025-12-16 09:49:40 +08:00
parent d7b49281c1
commit d942b31c8b
3 changed files with 4 additions and 5 deletions

View File

@@ -30,6 +30,6 @@ public interface IJntyzxHttpService {
* @param openId openid
* @return
*/
JntyzxResponse<Void> healthDeclaration(String token, String openId);
JntyzxResponse healthDeclaration(String token, String openId);
}

View File

@@ -142,7 +142,7 @@ public class JntyzxHttpServiceImpl implements IJntyzxHttpService {
}
@Override
public JntyzxResponse<Void> healthDeclaration(String token, String openId) {
public JntyzxResponse healthDeclaration(String token, String openId) {
Map<String, String> headers = Maps.newHashMap();
headers.put("X-Access-Token", token);
Map<String, String> params = Maps.newHashMap();
@@ -152,8 +152,7 @@ public class JntyzxHttpServiceImpl implements IJntyzxHttpService {
if (StringUtils.isBlank(respStr)) {
return null;
}
JntyzxResponse jntyzxResponse = JSON.parseObject(respStr, JntyzxResponse.class);
return jntyzxResponse;
return JSON.parseObject(respStr, JntyzxResponse.class);
}
private static JSONObject buildParamJsonObj() {

View File

@@ -49,7 +49,7 @@ public class UserTokenInfoServiceImpl implements IUserTokenInfoService {
}
private boolean healthDeclaration(UserTokenInfoDO userTokenInfoDO) {
JntyzxResponse<Void> jntyzxResponse = jntyzxHttpService.healthDeclaration(userTokenInfoDO.getToken(), userTokenInfoDO.getOpenId());
JntyzxResponse jntyzxResponse = jntyzxHttpService.healthDeclaration(userTokenInfoDO.getToken(), userTokenInfoDO.getOpenId());
if (Objects.isNull(jntyzxResponse)) {
log.info("用户名:{}心跳监测失败!", userTokenInfoDO.getName());
}