Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
extend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
park
extend
Commits
5aba7a0b
Commit
5aba7a0b
authored
Jun 19, 2020
by
lixian7
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
查询年检接口
parent
19deeea7
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
216 additions
and
15 deletions
+216
-15
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/ApiApplication.java
+2
-0
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/H5Controller.java
+4
-3
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/intercept/EncryptResponseBodyAdvice.java
+9
-7
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
+33
-1
infra/pom.xml
+10
-1
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/core/config/RedisCacheConfig.java
+110
-0
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/feign/dcp_service_vehicle/VechicleFeign.java
+13
-0
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/feign/dcp_service_vehicle/param/request/PlateNumAndTypeQueryReq.java
+18
-0
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/BindInfoQuery.java
+6
-3
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/InsuranceInfoRes.java
+7
-0
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/YearCheckInfoRes.java
+3
-0
pom.xml
+1
-0
No files found.
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/ApiApplication.java
View file @
5aba7a0b
...
@@ -5,6 +5,7 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
...
@@ -5,6 +5,7 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
...
@@ -15,6 +16,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -15,6 +16,7 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@EnableFeignClients
(
"com.hikcreate"
)
@EnableFeignClients
(
"com.hikcreate"
)
@EnableEurekaClient
@EnableEurekaClient
@EnableApolloConfig
@EnableApolloConfig
@EnableCaching
public
class
ApiApplication
{
public
class
ApiApplication
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
...
...
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/H5Controller.java
View file @
5aba7a0b
...
@@ -11,6 +11,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ViolationInfo
...
@@ -11,6 +11,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ViolationInfo
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.YearCheckInfoRes
;
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.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -39,7 +40,7 @@ public class H5Controller {
...
@@ -39,7 +40,7 @@ public class H5Controller {
* @date: 2020/6/19 10:32
* @date: 2020/6/19 10:32
*/
*/
@GetMapping
(
"yearCheckInfo"
)
@GetMapping
(
"yearCheckInfo"
)
public
Result
<
YearCheckInfoRes
>
yearCheckInfo
(
@RequestBody
BindInfoQuery
query
)
{
public
Result
<
YearCheckInfoRes
>
yearCheckInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
if
(
query
==
null
)
{
return
Result
.
errorResult
(
ResultCode
.
PARAMETER_ERROR
);
return
Result
.
errorResult
(
ResultCode
.
PARAMETER_ERROR
);
}
}
...
@@ -55,7 +56,7 @@ public class H5Controller {
...
@@ -55,7 +56,7 @@ public class H5Controller {
* @date: 2020/6/19 16:28
* @date: 2020/6/19 16:28
*/
*/
@GetMapping
(
"violationInfo"
)
@GetMapping
(
"violationInfo"
)
public
Result
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
@RequestBody
BindInfoQuery
query
)
{
public
Result
<
ResultList
<
ViolationInfoRes
>>
violationInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
if
(
query
==
null
)
{
return
Result
.
errorResult
(
ResultCode
.
PARAMETER_ERROR
);
return
Result
.
errorResult
(
ResultCode
.
PARAMETER_ERROR
);
}
}
...
@@ -71,7 +72,7 @@ public class H5Controller {
...
@@ -71,7 +72,7 @@ public class H5Controller {
* @date: 2020/6/19 16:28
* @date: 2020/6/19 16:28
*/
*/
@GetMapping
(
"insuranceInfo"
)
@GetMapping
(
"insuranceInfo"
)
public
Result
<
InsuranceInfoRes
>
insuranceInfo
(
@RequestBody
BindInfoQuery
query
)
{
public
Result
<
InsuranceInfoRes
>
insuranceInfo
(
@RequestBody
@Validated
BindInfoQuery
query
)
{
if
(
query
==
null
)
{
if
(
query
==
null
)
{
return
Result
.
errorResult
(
ResultCode
.
PARAMETER_ERROR
);
return
Result
.
errorResult
(
ResultCode
.
PARAMETER_ERROR
);
}
}
...
...
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/intercept/EncryptResponseBodyAdvice.java
View file @
5aba7a0b
...
@@ -40,13 +40,15 @@ public class EncryptResponseBodyAdvice implements ResponseBodyAdvice {
...
@@ -40,13 +40,15 @@ public class EncryptResponseBodyAdvice implements ResponseBodyAdvice {
if
(
ResultCode
.
SUCCESS
.
getCode
().
equals
(
result
.
getCode
())
)
{
if
(
ResultCode
.
SUCCESS
.
getCode
().
equals
(
result
.
getCode
())
)
{
//进行加密
//进行加密
Object
data
=
result
.
getData
();
Object
data
=
result
.
getData
();
String
dataStr
=
objectMapper
.
writeValueAsString
(
data
);
if
(
data
!=
null
)
{
String
encryptStr
=
EncryptStringAes
.
encryptAes
(
dataStr
,
"AES/ECB/PKCS5Padding"
);
String
dataStr
=
objectMapper
.
writeValueAsString
(
data
);
BaseEncryptRes
baseEncryptRes
=
new
BaseEncryptRes
();
String
encryptStr
=
EncryptStringAes
.
encryptAes
(
dataStr
,
"AES/ECB/PKCS5Padding"
);
baseEncryptRes
.
setEncData
(
encryptStr
);
BaseEncryptRes
baseEncryptRes
=
new
BaseEncryptRes
();
result
.
setData
(
baseEncryptRes
);
baseEncryptRes
.
setEncData
(
encryptStr
);
o
=
result
;
result
.
setData
(
baseEncryptRes
);
log
.
info
(
"Response body 密文: {}"
,
objectMapper
.
writeValueAsString
(
o
));
o
=
result
;
log
.
info
(
"Response body 密文: {}"
,
objectMapper
.
writeValueAsString
(
o
));
}
}
}
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
...
domain/src/main/java/com/hikcreate/edl/pub/web/mobile/domain/impl/BindServiceImpl.java
View file @
5aba7a0b
...
@@ -3,6 +3,7 @@ package com.hikcreate.edl.pub.web.mobile.domain.impl;
...
@@ -3,6 +3,7 @@ package com.hikcreate.edl.pub.web.mobile.domain.impl;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.hikcreate.edl.pub.web.mobile.domain.IBindService
;
import
com.hikcreate.edl.pub.web.mobile.domain.IBindService
;
...
@@ -10,6 +11,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.core.Result;
...
@@ -10,6 +11,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.core.Result;
import
com.hikcreate.edl.pub.web.mobile.infra.core.enums.ResultCode
;
import
com.hikcreate.edl.pub.web.mobile.infra.core.enums.ResultCode
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.VechicleFeign
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.VechicleFeign
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.ViolationFeign
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.ViolationFeign
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.PlateNumAndTypeQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.PlateNumQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.PlateNumQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.ViolationPlateNumAndTypeQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.ViolationPlateNumAndTypeQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.response.VehicleRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.response.VehicleRes
;
...
@@ -22,6 +24,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.InsuranceInfo
...
@@ -22,6 +24,7 @@ import com.hikcreate.edl.pub.web.mobile.infra.model.param.response.InsuranceInfo
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.ResultList
;
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.ViolationInfoRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.YearCheckInfoRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.model.param.response.YearCheckInfoRes
;
import
lombok.Data
;
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
;
...
@@ -30,6 +33,7 @@ import org.springframework.stereotype.Service;
...
@@ -30,6 +33,7 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.UUID
;
import
java.util.UUID
;
/**
/**
...
@@ -85,7 +89,22 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -85,7 +89,22 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
Result
.
errorResult
(
ResultCode
.
DATA_ERROR
);
return
Result
.
errorResult
(
ResultCode
.
DATA_ERROR
);
}
}
return
null
;
PlateNumAndTypeQueryReq
req
=
new
PlateNumAndTypeQueryReq
();
req
.
setPlateNum
(
bindInfo
.
getPlateNum
());
req
.
setPlateType
(
bindInfo
.
getPlateType
());
VehicleRes
vehicleRes
=
vechicle
.
getByPlateNumAndType
(
req
);
if
(
Objects
.
isNull
(
vehicleRes
)
)
{
return
Result
.
successResult
();
}
YearCheckInfoRes
yearCheckInfoRes
=
new
YearCheckInfoRes
();
yearCheckInfoRes
.
setYxqz
(
vehicleRes
.
getYxqz
());
Long
checkTime
=
DateUtil
.
parse
(
vehicleRes
.
getYxqz
(),
"yyyy-MM-dd HH:mm:ss"
).
getTime
();
if
(
checkTime
>=
System
.
currentTimeMillis
()
)
{
yearCheckInfoRes
.
setZt
(
"未到期"
);
}
else
{
yearCheckInfoRes
.
setZt
(
"已到期"
);
}
return
Result
.
successResult
(
yearCheckInfoRes
);
}
}
@Override
@Override
...
@@ -94,6 +113,19 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
...
@@ -94,6 +113,19 @@ public class BindServiceImpl extends ServiceImpl<BindInfoMapper, BindInfo> imple
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
if
(
bindInfo
==
null
||
"0"
.
equals
(
bindInfo
.
getStatus
()))
{
return
Result
.
errorResult
(
ResultCode
.
DATA_ERROR
);
return
Result
.
errorResult
(
ResultCode
.
DATA_ERROR
);
}
}
PlateNumAndTypeQueryReq
req
=
new
PlateNumAndTypeQueryReq
();
req
.
setPlateNum
(
bindInfo
.
getPlateNum
());
req
.
setPlateType
(
bindInfo
.
getPlateType
());
VehicleRes
vehicleRes
=
vechicle
.
getByPlateNumAndType
(
req
);
if
(
Objects
.
isNull
(
vehicleRes
)
)
{
return
Result
.
successResult
();
}
InsuranceInfoRes
insuranceInfoRes
=
new
InsuranceInfoRes
();
if
(
StrUtil
.
isNotBlank
(
vehicleRes
.
getBxzzrq
())
)
{
}
else
{
}
return
null
;
return
null
;
}
}
...
...
infra/pom.xml
View file @
5aba7a0b
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
<dependency>
<dependency>
<groupId>
com.ctrip.framework.apollo
</groupId>
<groupId>
com.ctrip.framework.apollo
</groupId>
<artifactId>
apollo-client
</artifactId>
<artifactId>
apollo-client
</artifactId>
<version>
1.6.0
</version>
<version>
${apollo.version}
</version>
</dependency>
</dependency>
<!--Apollo End-->
<!--Apollo End-->
...
@@ -65,6 +65,15 @@
...
@@ -65,6 +65,15 @@
<artifactId>
spring-boot-starter-data-redis
</artifactId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-web
</artifactId>
</dependency>
<dependency>
<groupId>
javax.validation
</groupId>
<artifactId>
validation-api
</artifactId>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/core/config/RedisCacheConfig.java
0 → 100644
View file @
5aba7a0b
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
core
.
config
;
import
com.fasterxml.jackson.annotation.JsonAutoDetect
;
import
com.fasterxml.jackson.annotation.JsonInclude
;
import
com.fasterxml.jackson.annotation.JsonTypeInfo
;
import
com.fasterxml.jackson.annotation.PropertyAccessor
;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.SerializationFeature
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.annotation.CachingConfigurerSupport
;
import
org.springframework.cache.interceptor.KeyGenerator
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.data.redis.cache.RedisCacheConfiguration
;
import
org.springframework.data.redis.cache.RedisCacheManager
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer
;
import
org.springframework.data.redis.serializer.RedisSerializationContext
;
import
org.springframework.data.redis.serializer.RedisSerializer
;
import
org.springframework.data.redis.serializer.StringRedisSerializer
;
import
javax.annotation.Resource
;
import
java.lang.reflect.Method
;
import
java.time.Duration
;
import
java.util.HashMap
;
/**
* @author 赵东
* @create 2019/5/31 17:30
*/
@Slf4j
@Configuration
public
class
RedisCacheConfig
extends
CachingConfigurerSupport
{
@Resource
private
RedisConnectionFactory
connectionFactory
;
/**
* 自定义生成key的规则
*/
@Override
public
KeyGenerator
keyGenerator
()
{
return
(
Object
o
,
Method
method
,
Object
...
objects
)
->
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
o
.
getClass
().
getName
());
sb
.
append
(
method
.
getName
());
for
(
Object
obj
:
objects
)
{
sb
.
append
(
obj
.
toString
());
}
return
sb
.
toString
();
};
}
/**
* 采用RedisCacheManager作为缓存管理器
*
* @return
*/
@Bean
(
"cacheManager"
)
@Override
public
CacheManager
cacheManager
()
{
RedisSerializer
<
String
>
redisSerializer
=
new
StringRedisSerializer
();
Jackson2JsonRedisSerializer
jackson2JsonRedisSerializer
=
new
Jackson2JsonRedisSerializer
(
Object
.
class
);
ObjectMapper
om
=
new
ObjectMapper
();
om
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
// 将类型序列化到属性json字符串中
om
.
enableDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
,
JsonTypeInfo
.
As
.
PROPERTY
);
// 只针对非空的值进行序列化(这个是为了减少json序列化之后所占用的空间)
om
.
setSerializationInclusion
(
JsonInclude
.
Include
.
NON_NULL
);
// 对于找不到匹配属性的时候忽略报错
om
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
false
);
// 不包含任何属性的bean也不报错
om
.
configure
(
SerializationFeature
.
FAIL_ON_EMPTY_BEANS
,
false
);
jackson2JsonRedisSerializer
.
setObjectMapper
(
om
);
RedisCacheConfiguration
defaultCacheConfig
=
RedisCacheConfiguration
.
defaultCacheConfig
()
.
entryTtl
(
Duration
.
ofDays
(
1
))
.
disableCachingNullValues
()
.
computePrefixWith
(
cacheName
->
"park:"
.
concat
(
"extend"
).
concat
(
":"
).
concat
(
cacheName
).
concat
(
":"
))
.
serializeKeysWith
(
RedisSerializationContext
.
SerializationPair
.
fromSerializer
(
redisSerializer
))
.
serializeValuesWith
(
RedisSerializationContext
.
SerializationPair
.
fromSerializer
(
jackson2JsonRedisSerializer
));
return
RedisCacheManager
.
builder
(
connectionFactory
)
.
cacheDefaults
(
defaultCacheConfig
)
.
withInitialCacheConfigurations
(
new
HashMap
<
String
,
RedisCacheConfiguration
>())
.
transactionAware
()
.
build
();
}
@Bean
public
RedisTemplate
<
String
,
String
>
redisTemplate
(
RedisConnectionFactory
factory
)
{
////解决键、值序列化问题
StringRedisTemplate
template
=
new
StringRedisTemplate
(
factory
);
Jackson2JsonRedisSerializer
jackson2JsonRedisSerializer
=
new
Jackson2JsonRedisSerializer
(
Object
.
class
);
ObjectMapper
om
=
new
ObjectMapper
();
om
.
setVisibility
(
PropertyAccessor
.
ALL
,
JsonAutoDetect
.
Visibility
.
ANY
);
om
.
enableDefaultTyping
(
ObjectMapper
.
DefaultTyping
.
NON_FINAL
);
jackson2JsonRedisSerializer
.
setObjectMapper
(
om
);
template
.
setValueSerializer
(
jackson2JsonRedisSerializer
);
template
.
setHashValueSerializer
(
jackson2JsonRedisSerializer
);
template
.
afterPropertiesSet
();
return
template
;
}
}
\ No newline at end of file
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/feign/dcp_service_vehicle/VechicleFeign.java
View file @
5aba7a0b
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
data
.
feign
.
dcp_service_vehicle
;
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
data
.
feign
.
dcp_service_vehicle
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.PlateNumAndTypeQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.PlateNumQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.request.PlateNumQueryReq
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.response.VehicleRes
;
import
com.hikcreate.edl.pub.web.mobile.infra.data.feign.dcp_service_vehicle.param.response.VehicleRes
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
@@ -23,4 +24,16 @@ public interface VechicleFeign {
...
@@ -23,4 +24,16 @@ public interface VechicleFeign {
*/
*/
@PostMapping
(
"/getByPlateNum"
)
@PostMapping
(
"/getByPlateNum"
)
List
<
VehicleRes
>
getByPlateNum
(
@RequestBody
PlateNumQueryReq
req
);
List
<
VehicleRes
>
getByPlateNum
(
@RequestBody
PlateNumQueryReq
req
);
/**
* -----获取车辆信息------
* 查询车辆信息-号牌号码和号牌类型
*
* @param req
* @return
* @param号牌号码
* @param号牌类型
*/
@PostMapping
(
"/getByPlateNumAndType"
)
VehicleRes
getByPlateNumAndType
(
@RequestBody
PlateNumAndTypeQueryReq
req
);
}
}
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/data/feign/dcp_service_vehicle/param/request/PlateNumAndTypeQueryReq.java
0 → 100644
View file @
5aba7a0b
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
data
.
feign
.
dcp_service_vehicle
.
param
.
request
;
import
lombok.Data
;
/**
* 违法
*
* @author MOUBK
* @create 2019/7/5 14:51
*/
@Data
public
class
PlateNumAndTypeQueryReq
{
private
String
plateType
;
private
String
plateNum
;
}
\ No newline at end of file
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/BindInfoQuery.java
View file @
5aba7a0b
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
com.hikcreate.edl.pub.web.mobile.infra.core.page.PageQuery
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.io.Serializable
;
/**
/**
...
@@ -18,14 +18,17 @@ public class BindInfoQuery implements Serializable {
...
@@ -18,14 +18,17 @@ public class BindInfoQuery implements Serializable {
/**
/**
* 绑定信息的唯一标识.
* 绑定信息的唯一标识.
*/
*/
@NotBlank
(
message
=
"绑定信息的唯一标识不能为空"
)
private
String
unqId
;
private
String
unqId
;
/**
/**
* 查询客户的id
* 查询客户的id
*/
*/
@NotBlank
(
message
=
"客户唯一编码不能为空"
)
private
String
userId
;
private
String
userId
;
/**
/**
*查询客户的电话号码
*
查询客户的电话号码
*/
*/
@NotBlank
(
message
=
"客户手机号不能为空"
)
private
String
phone
;
private
String
phone
;
}
}
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/InsuranceInfoRes.java
View file @
5aba7a0b
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
model
.
param
.
response
;
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
model
.
param
.
response
;
import
lombok.Data
;
/**
/**
* @author: xieshixiang
* @author: xieshixiang
* @time:2020/6/19 17:06
* @time:2020/6/19 17:06
**/
**/
@Data
public
class
InsuranceInfoRes
{
public
class
InsuranceInfoRes
{
/**
/**
* 保险类型
*/
private
String
bxlx
=
"交强险"
;
/**
* 有效期始
* 有效期始
*/
*/
private
String
yxqs
;
private
String
yxqs
;
...
...
infra/src/main/java/com/hikcreate/edl/pub/web/mobile/infra/model/param/response/YearCheckInfoRes.java
View file @
5aba7a0b
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
model
.
param
.
response
;
package
com
.
hikcreate
.
edl
.
pub
.
web
.
mobile
.
infra
.
model
.
param
.
response
;
import
lombok.Data
;
/**
/**
* 年检信息返回实体类
* 年检信息返回实体类
* @author: xieshixiang
* @author: xieshixiang
* @time:2020/6/19 16:45
* @time:2020/6/19 16:45
**/
**/
@Data
public
class
YearCheckInfoRes
{
public
class
YearCheckInfoRes
{
...
...
pom.xml
View file @
5aba7a0b
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
<hutoll.version>
5.3.7
</hutoll.version>
<hutoll.version>
5.3.7
</hutoll.version>
<druid.version>
1.1.22
</druid.version>
<druid.version>
1.1.22
</druid.version>
<apollo.version>
1.6.0
</apollo.version>
<apollo.version>
1.6.0
</apollo.version>
<dynamic-datasource.version>
2.5.4
</dynamic-datasource.version>
</properties>
</properties>
<modules>
<modules>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment