feat:用户token更新
This commit is contained in:
@@ -30,6 +30,6 @@ public interface IJntyzxHttpService {
|
|||||||
* @param openId openid
|
* @param openId openid
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JntyzxResponse<Void> healthDeclaration(String token, String openId);
|
JntyzxResponse healthDeclaration(String token, String openId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class JntyzxHttpServiceImpl implements IJntyzxHttpService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JntyzxResponse<Void> healthDeclaration(String token, String openId) {
|
public JntyzxResponse healthDeclaration(String token, String openId) {
|
||||||
Map<String, String> headers = Maps.newHashMap();
|
Map<String, String> headers = Maps.newHashMap();
|
||||||
headers.put("X-Access-Token", token);
|
headers.put("X-Access-Token", token);
|
||||||
Map<String, String> params = Maps.newHashMap();
|
Map<String, String> params = Maps.newHashMap();
|
||||||
@@ -152,8 +152,7 @@ public class JntyzxHttpServiceImpl implements IJntyzxHttpService {
|
|||||||
if (StringUtils.isBlank(respStr)) {
|
if (StringUtils.isBlank(respStr)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
JntyzxResponse jntyzxResponse = JSON.parseObject(respStr, JntyzxResponse.class);
|
return JSON.parseObject(respStr, JntyzxResponse.class);
|
||||||
return jntyzxResponse;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static JSONObject buildParamJsonObj() {
|
private static JSONObject buildParamJsonObj() {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class UserTokenInfoServiceImpl implements IUserTokenInfoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean healthDeclaration(UserTokenInfoDO userTokenInfoDO) {
|
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)) {
|
if (Objects.isNull(jntyzxResponse)) {
|
||||||
log.info("用户名:{}心跳监测失败!", userTokenInfoDO.getName());
|
log.info("用户名:{}心跳监测失败!", userTokenInfoDO.getName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user