Commit e18c06c3 by xieshixiang

修改BUG

parent f302218e
......@@ -218,12 +218,12 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
/**
* 查询违章信息
*/
ViolationPlateNumAndTypeQueryReq req = new ViolationPlateNumAndTypeQueryReq();
req.setPlateNum(bindInfo.getPlateNum());
req.setPlateType(bindInfo.getPlateType());
req.setTimeEnd(new Date());
req.setTimeStart(DateUtil.offsetMonth(new Date(),-12));
List<ViolationRes> byPlateNumAndType = violationCache.getByPlateNumAndType(req);
ViolationPlateNumAndTypeQueryReq queryReq = new ViolationPlateNumAndTypeQueryReq();
queryReq.setPlateNum(bindInfo.getPlateNum());
queryReq.setPlateType(bindInfo.getPlateType());
queryReq.setTimeEnd(new Date());
queryReq.setTimeStart(DateUtil.offsetMonth(new Date(),-12));
List<ViolationRes> byPlateNumAndType = violationCache.getByPlateNumAndType(queryReq);
/**
* 构建违章信息返回列表
......
......@@ -25,7 +25,7 @@ public class ViolationCache {
* @param req 号牌+号牌类型,时间开始-结束
* @return
*/
@Cacheable(value = "violations", key = "'plateNum:'+#req.plateNum+':plateType:'+req.plateType+':timeStart:'+#req" +
@Cacheable(value = "violations", key = "'plateNum:'+#req.plateNum+':plateType:'+#req.plateType+':timeStart:'+#req" +
".timeStart.toString()+':timeEnd:'+#req.timeEnd.toString()", unless = "#result==null or #result.size()==0")
public List<ViolationRes> getByPlateNumAndType(ViolationPlateNumAndTypeQueryReq req) {
return violatio.getByPlateNumAndType(req);
......
......@@ -14,7 +14,7 @@ import java.util.List;
* @author: xieshixiang
* @time:2020/6/19 15:26
**/
@FeignClient(name = "dcp-service-vehicle", path = "violation", contextId = "dcp" +
@FeignClient(url="http://10.197.236.100:40204",name = "dcp-service-vehicle",path = "dcp/violation", contextId = "dcp" +
"-service-vehicle-violation")
public interface ViolationFeign {
/**
......
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