mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
update吉林省地锁控制
This commit is contained in:
@@ -9,6 +9,7 @@ import com.jsowell.common.response.RestApiResponse;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.thirdparty.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.lianlian.common.CommonResult;
|
||||
import com.jsowell.thirdparty.platform.dto.QueryParkingLockDTO;
|
||||
import com.jsowell.thirdparty.platform.service.ThirdPartyPlatformService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
@@ -383,6 +384,44 @@ public class JiLinPlatformController extends ThirdPartyBaseController{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 控制地锁
|
||||
* @param request
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/v1/query_parking_lock")
|
||||
public CommonResult<?> query_parking_lock(HttpServletRequest request, @RequestBody CommonParamsDTO dto) {
|
||||
logger.info("{}-控制地锁 params:{}" , platformName , JSON.toJSONString(dto));
|
||||
try {
|
||||
// 校验令牌
|
||||
if (!verifyToken(request.getHeader("Authorization"))) {
|
||||
// 校验失败
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.TOKEN_ERROR);
|
||||
}
|
||||
|
||||
// 校验签名
|
||||
if (!verifySignature(dto)) {
|
||||
// 签名错误
|
||||
return CommonResult.failed(ThirdPartyReturnCodeEnum.SIGN_ERROR);
|
||||
}
|
||||
|
||||
// 解析入参
|
||||
QueryParkingLockDTO queryParkingLockDTO = parseParamsDTO(dto, QueryParkingLockDTO.class);
|
||||
// 执行逻辑
|
||||
Map<String, String> map = platformLogic.queryParkingLock(queryParkingLockDTO); // 控制地锁
|
||||
logger.info("{}-控制地锁 result:{}" , platformName , map);
|
||||
return CommonResult.success(0 , "控制地锁成功!" , map.get("Data") , map.get("Sig"));
|
||||
} catch (Exception e) {
|
||||
logger.info("{}-控制地锁 error:" , platformName , e);
|
||||
}
|
||||
return CommonResult.failed("控制地锁发生异常");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user