Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
8c3bec79
Commit
8c3bec79
authored
Jun 12, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改实名认证
parent
d654519e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
285 additions
and
119 deletions
+285
-119
TourBanner.java
...c/main/java/com/xxfc/platform/tour/entity/TourBanner.java
+3
-0
TourBannerBiz.java
...c/main/java/com/xxfc/platform/tour/biz/TourBannerBiz.java
+5
-2
TourBannerMapper.java
.../java/com/xxfc/platform/tour/mapper/TourBannerMapper.java
+2
-2
TourBannerController.java
...ava/com/xxfc/platform/tour/rest/TourBannerController.java
+5
-2
CertificationController.java
...latform/universal/controller/CertificationController.java
+5
-8
CertificationService.java
...xxfc/platform/universal/service/CertificationService.java
+118
-90
VehicleModel.java
...n/java/com/xxfc/platform/vehicle/entity/VehicleModel.java
+11
-1
VehicleModelQueryCondition.java
...c/platform/vehicle/entity/VehicleModelQueryCondition.java
+94
-0
VehicleModelBiz.java
...n/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
+12
-0
VehiclePlatCataBiz.java
...ava/com/xxfc/platform/vehicle/biz/VehiclePlatCataBiz.java
+0
-9
VehicleModelMapper.java
.../com/xxfc/platform/vehicle/mapper/VehicleModelMapper.java
+3
-0
VehicleModelController.java
...om/xxfc/platform/vehicle/rest/VehicleModelController.java
+15
-5
VehicleModelMapper.xml
...e-server/src/main/resources/mapper/VehicleModelMapper.xml
+12
-0
No files found.
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/entity/TourBanner.java
View file @
8c3bec79
...
@@ -70,5 +70,8 @@ public class TourBanner implements Serializable {
...
@@ -70,5 +70,8 @@ public class TourBanner implements Serializable {
private
Integer
rank
;
private
Integer
rank
;
@Column
(
name
=
"type"
)
@ApiModelProperty
(
value
=
"类型"
)
private
Integer
type
;
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourBannerBiz.java
View file @
8c3bec79
...
@@ -22,15 +22,18 @@ import java.util.List;
...
@@ -22,15 +22,18 @@ import java.util.List;
@Service
@Service
public
class
TourBannerBiz
extends
BaseBiz
<
TourBannerMapper
,
TourBanner
>
{
public
class
TourBannerBiz
extends
BaseBiz
<
TourBannerMapper
,
TourBanner
>
{
@Autowired
@Autowired
private
RedisTemplate
redisTemplate
;
private
RedisTemplate
redisTemplate
;
// @Cache(key = RedisKey.CONSTANT_CODE_PREFIX_BANNER)
// @Cache(key = RedisKey.CONSTANT_CODE_PREFIX_BANNER)
public
List
<
TourBanner
>
findBannerList
()
{
public
List
<
TourBanner
>
findBannerList
(
Integer
type
)
{
TourBanner
banner
=
new
TourBanner
();
TourBanner
banner
=
new
TourBanner
();
banner
.
setIsDel
(
0
);
banner
.
setIsDel
(
0
);
return
mapper
.
findBannerListByisDelOrderByRank
(
banner
);
banner
.
setType
(
type
);
return
mapper
.
findBannerListByIsDelOrderByRank
(
banner
);
}
}
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/mapper/TourBannerMapper.java
View file @
8c3bec79
...
@@ -17,6 +17,6 @@ import java.util.List;
...
@@ -17,6 +17,6 @@ import java.util.List;
@Repository
@Repository
public
interface
TourBannerMapper
extends
Mapper
<
TourBanner
>
{
public
interface
TourBannerMapper
extends
Mapper
<
TourBanner
>
{
@Select
(
"select * from tour_banner where is_del=${isDel} order by rank ASC"
)
@Select
(
"select * from tour_banner where is_del=${isDel}
and type=${type}
order by rank ASC"
)
List
<
TourBanner
>
findBannerListBy
i
sDelOrderByRank
(
TourBanner
banner
);
List
<
TourBanner
>
findBannerListBy
I
sDelOrderByRank
(
TourBanner
banner
);
}
}
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourBannerController.java
View file @
8c3bec79
...
@@ -27,9 +27,12 @@ public class TourBannerController extends BaseController<TourBannerBiz,TourBanne
...
@@ -27,9 +27,12 @@ public class TourBannerController extends BaseController<TourBannerBiz,TourBanne
* @return
* @return
*/
*/
@GetMapping
(
"/app/unauth/findBannerlist"
)
@GetMapping
(
"/app/unauth/findBannerlist"
)
public
ObjectRestResponse
findBannerlist
(){
public
ObjectRestResponse
findBannerlist
(
@RequestParam
(
"type"
)
Integer
type
){
List
<
TourBanner
>
bannerList
=
bannerBiz
.
findBannerList
();
if
(
type
==
null
||
type
!=
0
||
type
==
1
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
List
<
TourBanner
>
bannerList
=
bannerBiz
.
findBannerList
(
type
);
return
ObjectRestResponse
.
succ
(
bannerList
);
return
ObjectRestResponse
.
succ
(
bannerList
);
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/controller/CertificationController.java
View file @
8c3bec79
...
@@ -34,8 +34,8 @@ public class CertificationController {
...
@@ -34,8 +34,8 @@ public class CertificationController {
@PostMapping
(
"/app/
C
ertificate"
)
@PostMapping
(
"/app/
c
ertificate"
)
public
ObjectRestResponse
C
ertificate
(
@RequestBody
IdInformation
idInformation
,
HttpServletRequest
request
)
{
public
ObjectRestResponse
c
ertificate
(
@RequestBody
IdInformation
idInformation
,
HttpServletRequest
request
)
{
if
(
idInformation
==
null
)
{
if
(
idInformation
==
null
)
{
...
@@ -79,17 +79,14 @@ public class CertificationController {
...
@@ -79,17 +79,14 @@ public class CertificationController {
return
orr
;
return
orr
;
}
}
Integer
am
=
idInformation
.
getAuthenticationMethods
();
Integer
type
=
idInformation
.
getCertificateType
();
Integer
type
=
idInformation
.
getCertificateType
();
try
{
try
{
if
(
type
==
0
&&
am
==
0
){
if
(
type
!=
null
&&
type
==
0
){
return
certificationService
.
stringCertificate
(
idInformation
);
return
certificationService
.
certificate
(
idInformation
);
}
if
(
type
==
0
&&
am
==
1
){
return
certificationService
.
imageCertificate
(
idInformation
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
xx-universal/xx-universal-server/src/main/java/com/xxfc/platform/universal/service/CertificationService.java
View file @
8c3bec79
...
@@ -134,96 +134,115 @@ public class CertificationService {
...
@@ -134,96 +134,115 @@ public class CertificationService {
private
UserFeign
userFeign
;
private
UserFeign
userFeign
;
//身份证号+姓名认证
// //身份证号+姓名认证
//
public
ObjectRestResponse
stringCertificate
(
IdInformation
idInformation
)
{
// public ObjectRestResponse stringCertificate(IdInformation idInformation) {
HashedMap
hashMap
=
new
HashedMap
();
// HashedMap hashMap = new HashedMap();
// 认证状态:true是认证过
// // 认证状态:true是认证过
//
//
// Integer certificateType = idInformation.getCertificateType();
// if (certificateType == 0) {
//
// if (!Validation.isIdCard(idInformation.getIdNumber())) {
// return ObjectRestResponse.createFailedResult(ResultCode.WRONG_FORMAT_OF_ID_CARD, "身份证格式错误");
// }
// }
//
//
// if (idInformation == null) {
//
//
// return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "未填写");
//
//
// }
//
// if (idInformation.getExpirationDate() == null) {
//
// return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "请填写证件到期时间");
// }
//
//
// //判断是否有填写身份证号
// if (StringUtils.isBlank(idInformation.getIdNumber())) {
// return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "请填写身份证号");
//
//
// }
//
// //判断是有否填写名字
// if (StringUtils.isBlank(idInformation.getName())) {
//
// return ObjectRestResponse.createFailedResult(ResultCode.INCOMPLETE_DATA, "请填写姓名");
//
// }
//
// //获取查询参数
// Map<String, String> querys = new HashMap<String, String>();
// querys.put(idCardName, idInformation.getIdNumber());
//
// querys.put(cName, idInformation.getName());
//
// //认证
// String result = certificate(querys);
// System.out.println(result);
//
// //判断返回的值是否为空
// if (!StringUtils.isBlank(result)) {
//
// Map<String, String> resultMap = (Map<String, String>) JSONObject.parse(result);
//
// if (resultMap != null) {
// //认证成功
// if (certifResultCode.equals(resultMap.get(certifRet))) {
// Boolean aBoolean = addIdInformation(idInformation);
// if (aBoolean) {
//
// return ObjectRestResponse.succ();
// }
//
//
// }
// }
// }
// return ObjectRestResponse.createDefaultFail();
//
//
// }
Integer
certificateType
=
idInformation
.
getCertificateType
();
if
(
certificateType
==
0
)
{
if
(!
Validation
.
isIdCard
(
idInformation
.
getIdNumber
()))
{
// 身份证图片进行实名认证
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
WRONG_FORMAT_OF_ID_CARD
,
"身份证格式错误"
);
}
}
public
ObjectRestResponse
certificate
(
IdInformation
idInformation
)
{
//1.判断
//携带返回参数的map
HashedMap
hashMap
=
new
HashedMap
();
// 认证状态:true是认证过
//判断是否map是否为null
if
(
idInformation
==
null
)
{
if
(
idInformation
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"请提供资料"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"未填写"
);
}
if
(
idInformation
.
getExpirationDate
()
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"请填写证件到期时间"
);
}
}
//判断是否有填写身份证号
//判断是否有填写身份证号
if
(
StringUtils
.
isBlank
(
idInformation
.
getIdNumber
()))
{
if
(
StringUtils
.
isBlank
(
idInformation
.
getIdNumber
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"请填写身份证号"
);
}
//判断是有否填写名字
if
(
StringUtils
.
isBlank
(
idInformation
.
getName
()))
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"请填写姓名"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"未填写证件号"
);
}
}
//获取查询参数
if
(!
Validation
.
isIdCard
(
idInformation
.
getIdNumber
()))
{
Map
<
String
,
String
>
querys
=
new
HashMap
<
String
,
String
>();
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
WRONG_FORMAT_OF_ID_CARD
,
"填写的证件格式错误"
);
querys
.
put
(
idCardName
,
idInformation
.
getIdNumber
());
querys
.
put
(
cName
,
idInformation
.
getName
());
//认证
String
result
=
certificate
(
querys
);
System
.
out
.
println
(
result
);
//判断返回的值是否为空
if
(!
StringUtils
.
isBlank
(
result
))
{
Map
<
String
,
String
>
resultMap
=
(
Map
<
String
,
String
>)
JSONObject
.
parse
(
result
);
if
(
resultMap
!=
null
)
{
//认证成功
if
(
certifResultCode
.
equals
(
resultMap
.
get
(
certifRet
)))
{
Boolean
aBoolean
=
addIdInformation
(
idInformation
);
if
(
aBoolean
)
{
return
ObjectRestResponse
.
succ
();
}
}
}
}
}
return
ObjectRestResponse
.
createDefaultFail
();
}
//判断是有否填写名字
if
(
StringUtils
.
isBlank
(
idInformation
.
getName
()))
{
// 身份证图片进行实名认证
public
ObjectRestResponse
imageCertificate
(
IdInformation
idInformation
)
{
//1.判断
//携带返回参数的map
HashedMap
hashMap
=
new
HashedMap
();
// 认证状态:true是认证过
//判断是否map是否为null
if
(
idInformation
==
null
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"
请上传证件照
"
);
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
INCOMPLETE_DATA
,
"
未填写姓名
"
);
}
}
...
@@ -246,42 +265,51 @@ public class CertificationService {
...
@@ -246,42 +265,51 @@ public class CertificationService {
//正面进行解析
//正面进行解析
String
front
=
imageParse
(
idInformation
.
getFrontUrl
(),
frontParameter
);
String
front
=
imageParse
(
idInformation
.
getFrontUrl
(),
frontParameter
);
Map
frontMap
=
(
Map
)
JSONObject
.
parse
(
front
);
//反面进行解析
String
back
=
imageParse
(
idInformation
.
getBackUrl
(),
backParameter
);
String
back
=
imageParse
(
idInformation
.
getBackUrl
(),
backParameter
);
Map
backMap
=
(
Map
)
JSONObject
.
parse
(
back
);
if
(
StringUtils
.
isBlank
(
front
)
||
StringUtils
.
isBlank
(
back
))
{
return
ObjectRestResponse
.
createDefaultFail
();
}
Map
frontData
=
(
Map
)
frontMap
.
get
(
dataNam
);
Map
backData
=
(
Map
)
backMap
.
get
(
dataNam
);
Map
frontMap
=
(
Map
)
JSONObject
.
parse
(
front
);
//反面进行解析
Map
backMap
=
(
Map
)
JSONObject
.
parse
(
back
);
//判断是否调用图片解析的接口是否异常,若果两个次认证都没结果
//判断是否调用图片解析的接口是否异常,若果两个次认证都没结果
if
(
MapUtil
.
isEmpty
(
frontMap
)
if
(
MapUtil
.
isEmpty
(
frontMap
)
||
MapUtil
.
isEmpty
(
backMap
)
||
!(
frontMap
.
get
(
imageRet
).
equals
(
imageResultCode
))
||
!(
frontMap
.
get
(
imageRet
).
equals
(
imageResultCode
))
||
MapUtil
.
isEmpty
(
frontData
)
||
MapUtil
.
isEmpty
(
backMap
)
||
!(
backMap
.
get
(
imageRet
).
equals
(
imageResultCode
))
)
{
){
return
ObjectRestResponse
.
create
FailedResult
(
ResultCode
.
FAILED_CODE
,
"正面照认证失败"
);
return
ObjectRestResponse
.
create
DefaultFail
(
);
}
}
Map
frontData
=
(
Map
)
frontMap
.
get
(
dataNam
);
Map
backData
=
(
Map
)
backMap
.
get
(
dataNam
);
if
(
MapUtil
.
isEmpty
(
frontMap
)
||
MapUtil
.
isEmpty
(
backMap
)
||
!(
backMap
.
get
(
imageRet
).
equals
(
imageResultCode
))
||
MapUtil
.
isEmpty
(
backData
)
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"背面照认证失败"
);
if
(
MapUtil
.
isEmpty
(
backData
)||
MapUtil
.
isEmpty
(
frontData
)){
return
ObjectRestResponse
.
createDefaultFail
();
}
}
//图片解析没问提,进行身份认证
//解析通过,进行匹配
String
name
=
(
String
)
frontData
.
get
(
iName
);
String
number
=
(
String
)
frontData
.
get
(
numberName
);
;
if
(
idInformation
.
getName
().
equals
(
name
))
{
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"姓名不一致"
);
}
if
(
idInformation
.
getIdNumber
().
equals
(
number
))
{
ObjectRestResponse
.
createFailedResult
(
ResultCode
.
FAILED_CODE
,
"证件号不一致"
);
}
Map
<
String
,
String
>
authMap
=
new
HashMap
<>();
Map
<
String
,
String
>
authMap
=
new
HashMap
<>();
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleModel.java
View file @
8c3bec79
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.entity;
...
@@ -3,6 +3,7 @@ package com.xxfc.platform.vehicle.entity;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
javax.persistence.*
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
...
@@ -111,6 +112,15 @@ public class VehicleModel implements Serializable {
...
@@ -111,6 +112,15 @@ public class VehicleModel implements Serializable {
@Column
(
name
=
"score"
)
@Column
(
name
=
"score"
)
@ApiModelProperty
(
value
=
"评分"
)
@ApiModelProperty
(
value
=
"评分"
)
private
Integer
score
;
private
Integer
score
;
@ApiModelProperty
(
value
=
"车型对应的车辆"
)
private
List
<
Vehicle
>
vehicles
;
@ApiModelProperty
(
value
=
"车辆总数"
)
private
Integer
sum
;
@ApiModelProperty
(
value
=
"可租借数量"
)
private
Integer
leasableQuantity
;
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleModelQueryCondition.java
0 → 100644
View file @
8c3bec79
package
com
.
xxfc
.
platform
.
vehicle
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
/**
* 接收车型查询条件
*/
@Data
public
class
VehicleModelQueryCondition
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
//主键
@ApiModelProperty
(
"主键"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"名称"
)
private
String
name
;
@ApiModelProperty
(
value
=
"配置"
)
private
List
<
String
>
config
;
@ApiModelProperty
(
value
=
"关键字id"
)
private
List
<
String
>
keyword
;
@ApiModelProperty
(
value
=
"房车展示"
)
private
String
modelShow
;
@ApiModelProperty
(
value
=
"参数"
)
private
List
<
String
>
modelParam
;
//价格
@ApiModelProperty
(
value
=
"价格"
)
private
BigDecimal
price
;
//价格
@ApiModelProperty
(
value
=
"押金"
)
private
BigDecimal
deposit
;
//创建时间
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Date
crtTime
;
//创建者id
@ApiModelProperty
(
value
=
"创建者id"
)
private
Integer
crtUser
;
//创建者名称
@ApiModelProperty
(
value
=
"创建者名称"
)
private
String
crtName
;
//创建者host
@Column
(
name
=
"crt_host"
)
@ApiModelProperty
(
value
=
"创建者host"
)
private
String
crtHost
;
//修改时间
@ApiModelProperty
(
value
=
"修改时间"
,
hidden
=
true
)
private
Date
updTime
;
//修改者
@ApiModelProperty
(
value
=
"修改者"
)
private
Integer
updUser
;
//修改者名称
@ApiModelProperty
(
value
=
"修改者名称"
)
private
String
updName
;
//修改者host
@ApiModelProperty
(
value
=
"修改者host"
)
private
String
updHost
;
//评分
@ApiModelProperty
(
value
=
"评分"
)
private
Integer
score
;
@ApiModelProperty
(
value
=
"车辆总数"
)
private
Integer
sum
;
@ApiModelProperty
(
value
=
"可租借数量"
)
private
Integer
leasableQuantity
;
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehicleModelBiz.java
View file @
8c3bec79
package
com
.
xxfc
.
platform
.
vehicle
.
biz
;
package
com
.
xxfc
.
platform
.
vehicle
.
biz
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.xxfc.platform.vehicle.entity.VehicleModelQueryCondition
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
...
@@ -25,4 +27,14 @@ public class VehicleModelBiz extends BaseBiz<VehicleModelMapper,VehicleModel> {
...
@@ -25,4 +27,14 @@ public class VehicleModelBiz extends BaseBiz<VehicleModelMapper,VehicleModel> {
updateSelectiveById
(
model
);
updateSelectiveById
(
model
);
}
}
public
VehicleModel
findVehicleModelPage
(
VehicleModelQueryCondition
vmqc
){
PageDataVO
<
VehicleModel
>
mPageDataVO
=
PageDataVO
.
pageInfo
(
vmqc
.
getPage
(),
vmqc
.
getLimit
(),
()
->
mapper
.
findVehicleModelPage
(
vmqc
));
return
null
;
}
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/biz/VehiclePlatCataBiz.java
View file @
8c3bec79
...
@@ -116,13 +116,4 @@ public class VehiclePlatCataBiz extends BaseBiz<VehiclePlatCataMapper, VehiclePl
...
@@ -116,13 +116,4 @@ public class VehiclePlatCataBiz extends BaseBiz<VehiclePlatCataMapper, VehiclePl
}
}
}
}
public
VehicleModel
findVehicleModelPage
(
VehicleModel
vm
){
return
null
;
}
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/mapper/VehicleModelMapper.java
View file @
8c3bec79
package
com
.
xxfc
.
platform
.
vehicle
.
mapper
;
package
com
.
xxfc
.
platform
.
vehicle
.
mapper
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModelQueryCondition
;
import
tk.mybatis.mapper.common.Mapper
;
import
tk.mybatis.mapper.common.Mapper
;
/**
/**
...
@@ -11,4 +12,6 @@ import tk.mybatis.mapper.common.Mapper;
...
@@ -11,4 +12,6 @@ import tk.mybatis.mapper.common.Mapper;
* @date 2019-05-21 14:15:27
* @date 2019-05-21 14:15:27
*/
*/
public
interface
VehicleModelMapper
extends
Mapper
<
VehicleModel
>
{
public
interface
VehicleModelMapper
extends
Mapper
<
VehicleModel
>
{
VehicleModel
findVehicleModelPage
(
VehicleModelQueryCondition
vmqc
);
}
}
xx-vehicle/xx-vehicle-server/src/main/java/com/xxfc/platform/vehicle/rest/VehicleModelController.java
View file @
8c3bec79
...
@@ -9,6 +9,7 @@ import com.xxfc.platform.vehicle.biz.VehicleModelBiz;
...
@@ -9,6 +9,7 @@ import com.xxfc.platform.vehicle.biz.VehicleModelBiz;
import
com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz
;
import
com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.common.RestResponse
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModel
;
import
com.xxfc.platform.vehicle.entity.VehicleModelQueryCondition
;
import
com.xxfc.platform.vehicle.pojo.VModelDetailVO
;
import
com.xxfc.platform.vehicle.pojo.VModelDetailVO
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -24,6 +25,9 @@ public class VehicleModelController extends BaseController<VehicleModelBiz,Vehic
...
@@ -24,6 +25,9 @@ public class VehicleModelController extends BaseController<VehicleModelBiz,Vehic
@Autowired
@Autowired
VehiclePlatCataBiz
vehiclePlatCataBiz
;
VehiclePlatCataBiz
vehiclePlatCataBiz
;
@Autowired
VehicleModelBiz
vehicleModelBiz
;
//修改评分
//修改评分
@RequestMapping
(
value
=
"/app/addScore"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/app/addScore"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
addScore
(
public
RestResponse
addScore
(
...
@@ -47,17 +51,23 @@ public class VehicleModelController extends BaseController<VehicleModelBiz,Vehic
...
@@ -47,17 +51,23 @@ public class VehicleModelController extends BaseController<VehicleModelBiz,Vehic
return
new
ObjectRestResponse
().
data
(
vModelDetailVO
);
return
new
ObjectRestResponse
().
data
(
vModelDetailVO
);
}
}
/**
* 车型列表查询
* @param vmqc 条件
* @return
*/
@ApiOperation
(
"车型列表"
)
@ApiOperation
(
"车型列表"
)
@RequestMapping
(
value
=
"/app/findVehicleModelPage"
,
method
=
RequestMethod
.
GET
)
@PostMapping
(
value
=
"/app/findVehicleModelPage"
)
public
ObjectRestResponse
<
VModelDetailVO
>
findVehicleModelPage
(
@RequestBody@ApiParam
(
"查询信息"
)
VehicleModel
vm
){
public
ObjectRestResponse
<
VModelDetailVO
>
findVehicleModelPage
(
@RequestBody@ApiParam
(
"查询条件"
)
VehicleModelQueryCondition
vmqc
){
if
(
vm
==
null
)
{
if
(
vm
qc
==
null
||
vmqc
.
getPage
()<
0
||
vmqc
.
getLimit
()<=
0
)
{
return
ObjectRestResponse
.
createDefaultFail
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
VehicleModel
vehicleModel
=
vehiclePlatCataBiz
.
findVehicleModelPage
(
vm
);
VehicleModel
vehicleModel
=
vehicleModelBiz
.
findVehicleModelPage
(
vmqc
);
return
ObjectRestResponse
.
succ
(
vehicleModel
);
return
ObjectRestResponse
.
succ
(
vehicleModel
);
}
}
...
...
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/VehicleModelMapper.xml
0 → 100644
View file @
8c3bec79
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.xxfc.platform.vehicle.mapper.VehicleModelMapper"
>
<select
id=
"findVehicleModelPage"
parameterType=
"com.xxfc.platform.vehicle.entity.VehicleModel"
parameterMap=
"vehicleModel"
>
select * from vehicle_model vm left join vehicle v on vm.id=v.model_id and 1=1
<if
test=
""
>
</if>
</select>
</mapper>
\ No newline at end of file
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