Commit 9001566a authored by 赵啸非's avatar 赵啸非

修改部分接口返回参数

parent dc8186e0
...@@ -42,7 +42,7 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements ...@@ -42,7 +42,7 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
@Override @Override
public Rest<LoginRspInfo> deviceLogin(DeviceLoginReq loginReq) { public Rest<LoginRspInfo> deviceLogin(DeviceLoginReq loginReq) {
String deviceLoginApi = host + "self-device-info/login"; String deviceLoginApi = host + "self-device-info/login";
log.info("deviceLoginApi req:{}", JSON.toJSONString(loginReq)); log.info("deviceLoginApi url:{} req:{}", deviceLoginApi, JSON.toJSONString(loginReq));
String rest = HttpUtil.post(deviceLoginApi, JSON.toJSONString(loginReq)); String rest = HttpUtil.post(deviceLoginApi, JSON.toJSONString(loginReq));
log.info("deviceLoginApi resp:{}", rest); log.info("deviceLoginApi resp:{}", rest);
ComplexApiRest<LoginRspInfo> complexApiRest = JSON.parseObject(rest, new TypeReference<ComplexApiRest<LoginRspInfo>>() { ComplexApiRest<LoginRspInfo> complexApiRest = JSON.parseObject(rest, new TypeReference<ComplexApiRest<LoginRspInfo>>() {
...@@ -77,13 +77,13 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements ...@@ -77,13 +77,13 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
@Override @Override
public Rest<List<AcceptRspInfo>> accept(String deviceLogo, AcceptReq acceptReq) { public Rest<List<AcceptRspInfo>> accept(String deviceLogo, AcceptReq acceptReq) {
String deviceLoginApi = host + "self-device-info/acceptHandling"; String deviceLoginApi = host + "self-device-info/acceptHandling";
log.info("accept req==>{}",JSON.toJSONString(acceptReq)); log.info("accept req==>{}", JSON.toJSONString(acceptReq));
String deviceToken = checkToken(deviceLogo); String deviceToken = checkToken(deviceLogo);
String rest = HttpUtil.createPost(deviceLoginApi) String rest = HttpUtil.createPost(deviceLoginApi)
.header("X-Access-Token", deviceToken) .header("X-Access-Token", deviceToken)
.body(JSON.toJSONString(acceptReq)) .body(JSON.toJSONString(acceptReq))
.execute().body(); .execute().body();
log.info("accept resp==>{}",rest); log.info("accept resp==>{}", rest);
ComplexApiRest<List<AcceptRspInfo>> complexApiRest = JSON.parseObject(rest, new TypeReference<ComplexApiRest<List<AcceptRspInfo>>>() { ComplexApiRest<List<AcceptRspInfo>> complexApiRest = JSON.parseObject(rest, new TypeReference<ComplexApiRest<List<AcceptRspInfo>>>() {
}); });
if (complexApiRest.getCode() == 200) { if (complexApiRest.getCode() == 200) {
...@@ -132,9 +132,9 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements ...@@ -132,9 +132,9 @@ public class ComplexMatterServiceImpl extends AbstractComplexService implements
ComplexApiRest<List<MatterWorkInfo>> complexApiRest = JSON.parseObject(rest, new TypeReference<ComplexApiRest<List<MatterWorkInfo>>>() { ComplexApiRest<List<MatterWorkInfo>> complexApiRest = JSON.parseObject(rest, new TypeReference<ComplexApiRest<List<MatterWorkInfo>>>() {
}); });
if (complexApiRest.getCode() == 200) { if (complexApiRest.getCode() == 200) {
if(!ObjectUtils.isEmpty(complexApiRest.getResult())){ if (!ObjectUtils.isEmpty(complexApiRest.getResult())) {
return Rest.ok(complexApiRest.getMessage(), complexApiRest.getResult().get(0)); return Rest.ok(complexApiRest.getMessage(), complexApiRest.getResult().get(0));
}else { } else {
return Rest.fail("查询结果数量为0"); return Rest.fail("查询结果数量为0");
} }
} }
......
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