Commit cd0bb81d by lixian7

调整接口

parent 2a125726
......@@ -122,7 +122,7 @@ public class H5Controller {
* @return
*/
@PostMapping("checkValidity")
public Response<CheckValidityRes> checkValidity( @RequestBody BindInfoQuery query) {
public Response<CheckValidityRes> checkValidity( @RequestBody @Validated BindInfoQuery query) {
if (query == null) {
return ResponseGenerator.fail(StatusCode.PARAM_ERROR);
}
......
......@@ -24,11 +24,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.data.mapper.VerifyInfoMapper;
import com.hikcreate.edl.pub.web.mobile.infra.model.BindInfo;
import com.hikcreate.edl.pub.web.mobile.infra.model.BindInfoQuery;
import com.hikcreate.edl.pub.web.mobile.infra.model.VerifyInfo;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.DrivingLicenseInfoRes;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.InsuranceInfoRes;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ResultList;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ViolationInfoRes;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.YearCheckInfoRes;
import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
......@@ -107,13 +103,15 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
}
YearCheckInfoRes yearCheckInfoRes = new YearCheckInfoRes();
yearCheckInfoRes.setPlateNum(bindInfo.getPlateNum());
yearCheckInfoRes.setValidityTime(vehicleRes.getYxqz());
if ( StrUtil.isNotBlank(vehicleRes.getYxqz()) ) {
yearCheckInfoRes.setValidityTime(vehicleRes.getYxqz().substring(0,10));
Long checkTime = DateUtil.parse(vehicleRes.getYxqz(), "yyyy-MM-dd HH:mm:ss").getTime();
if (checkTime >= System.currentTimeMillis()) {
if ( checkTime >= System.currentTimeMillis() ) {
yearCheckInfoRes.setStatus("未到期");
} else {
yearCheckInfoRes.setStatus("已到期");
}
}
return ResponseGenerator.success(yearCheckInfoRes);
}
......
package com.hikcreate.edl.pub.web.mobile.infra.model;
import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import java.io.Serializable;
......@@ -18,6 +19,7 @@ public class BindInfo implements Serializable {
/**
* 绑定信息唯一标识,使用UUID
*/
@TableId
private String unqId;
/**
* 客户id
......
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