add 联联平台请求设备认证接口

This commit is contained in:
Lemon
2023-04-24 13:55:33 +08:00
parent 1227ed92c5
commit a18c693d4c
7 changed files with 169 additions and 2 deletions

View File

@@ -4,9 +4,11 @@ import com.alibaba.fastjson2.JSONObject;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.QueryEquipmentDTO;
import com.jsowell.pile.dto.QueryStationInfoDTO;
import com.jsowell.thirdparty.domain.StationStatsInfo;
import com.jsowell.thirdparty.service.LianLianService;
import com.jsowell.thirdparty.vo.EquipmentAuthVO;
import com.jsowell.thirdparty.vo.LianLianPageResponse;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -92,4 +94,24 @@ public class LianLianController extends BaseController {
logger.info("联联平台查询统计信息 result :{}", response);
return response;
}
/**
* 请求设备认证
* @param dto
* @return
*/
@PostMapping("/query_equip_auth")
public RestApiResponse<?> query_equip_auth(@RequestBody QueryEquipmentDTO dto) {
logger.info("联联平台请求设备认证 params :{}", JSONObject.toJSONString(dto));
RestApiResponse<?> response;
try {
EquipmentAuthVO equipmentAuthVO = lianLianService.query_equip_auth(dto);
response = new RestApiResponse<>(equipmentAuthVO);
} catch (Exception e) {
logger.error("联联平台请求设备认证 error", e);
response = new RestApiResponse<>(e);
}
logger.info("联联平台请求设备认证 result :{}", response);
return response;
}
}