Commit cd0bb81d by lixian7

调整接口

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