Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SuperHive
back-end
customer-service
Commits
802de6d9
Commit
802de6d9
authored
Jun 01, 2020
by
huangcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
货主/司机增加评分字段
parent
2734290c
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
545 additions
and
32 deletions
+545
-32
pom.xml
pom.xml
+5
-1
ApplicationLoadRunner.java
...ight/customer/common/component/ApplicationLoadRunner.java
+4
-0
ErrorMessageComponent.java
...ight/customer/common/component/ErrorMessageComponent.java
+6
-0
DriverController.java
...t/customer/module/driver/controller/DriverController.java
+18
-3
DriverDetailDto.java
...v/freight/customer/module/driver/dto/DriverDetailDto.java
+4
-0
DriverInfoEntity.java
...eight/customer/module/driver/entity/DriverInfoEntity.java
+4
-0
AccountScoreForm.java
...freight/customer/module/driver/form/AccountScoreForm.java
+34
-0
DriverInfoService.java
...ght/customer/module/driver/service/DriverInfoService.java
+10
-0
DriverInfoServiceImpl.java
...mer/module/driver/service/impl/DriverInfoServiceImpl.java
+24
-0
DriverDetailVO.java
...esv/freight/customer/module/driver/vo/DriverDetailVO.java
+4
-0
GoodsOwnerController.java
...er/module/goodsowner/controller/GoodsOwnerController.java
+20
-4
AccountInfoDto.java
...reight/customer/module/goodsowner/dto/AccountInfoDto.java
+4
-0
InfoEntity.java
...freight/customer/module/goodsowner/entity/InfoEntity.java
+4
-0
AccountScoreForm.java
...ght/customer/module/goodsowner/form/AccountScoreForm.java
+35
-0
GoodsOwnerInfoService.java
...omer/module/goodsowner/service/GoodsOwnerInfoService.java
+26
-0
GoodsOwnerAccountServiceImpl.java
...goodsowner/service/impl/GoodsOwnerAccountServiceImpl.java
+7
-7
GoodsOwnerInfoServiceImpl.java
...le/goodsowner/service/impl/GoodsOwnerInfoServiceImpl.java
+37
-0
InfoServiceImpl.java
...tomer/module/goodsowner/service/impl/InfoServiceImpl.java
+0
-13
AccountInfoVO.java
.../freight/customer/module/goodsowner/vo/AccountInfoVO.java
+4
-0
GoodsOwnerPayOrderDao.java
...reight/customer/module/pay/dao/GoodsOwnerPayOrderDao.java
+17
-0
GoodsOwnerPayOrderEntity.java
.../customer/module/pay/entity/GoodsOwnerPayOrderEntity.java
+89
-0
GoodsOwnerPayOrderService.java
...ustomer/module/pay/service/GoodsOwnerPayOrderService.java
+16
-0
GoodsOwnerPayOrderServiceImpl.java
...odule/pay/service/impl/GoodsOwnerPayOrderServiceImpl.java
+14
-0
application-dev.yml
src/main/resources/application-dev.yml
+8
-0
application-test.yml
src/main/resources/application-test.yml
+8
-0
DriverAccountDao.xml
src/main/resources/mapper/driver/DriverAccountDao.xml
+2
-2
AccountDao.xml
src/main/resources/mapper/goodsowner/AccountDao.xml
+2
-2
GoodsOwnerPayOrderDao.xml
src/main/resources/mapper/pay/GoodsOwnerPayOrderDao.xml
+26
-0
DriverAccountTest.java
.../customer/module/driver/controller/DriverAccountTest.java
+56
-0
GoodsOwnerControllerTest.java
...odule/goodsowner/controller/GoodsOwnerControllerTest.java
+57
-0
No files found.
pom.xml
View file @
802de6d9
...
@@ -21,7 +21,7 @@
...
@@ -21,7 +21,7 @@
<spring-cloud.version>
Greenwich.SR1
</spring-cloud.version>
<spring-cloud.version>
Greenwich.SR1
</spring-cloud.version>
<alibaba-nacos-discovery.version>
2.1.1.RELEASE
</alibaba-nacos-discovery.version>
<alibaba-nacos-discovery.version>
2.1.1.RELEASE
</alibaba-nacos-discovery.version>
<alibaba-nacos-config.version>
2.1.1.RELEASE
</alibaba-nacos-config.version>
<alibaba-nacos-config.version>
2.1.1.RELEASE
</alibaba-nacos-config.version>
<alibaba-fastjson.version>
1.2.
62
</alibaba-fastjson.version>
<alibaba-fastjson.version>
1.2.
70
</alibaba-fastjson.version>
<alibaba-druid.version>
1.1.22
</alibaba-druid.version>
<alibaba-druid.version>
1.1.22
</alibaba-druid.version>
<apache-commons-lang3.version>
3.7
</apache-commons-lang3.version>
<apache-commons-lang3.version>
3.7
</apache-commons-lang3.version>
<mybatisplus.version>
3.3.1
</mybatisplus.version>
<mybatisplus.version>
3.3.1
</mybatisplus.version>
...
@@ -83,6 +83,10 @@
...
@@ -83,6 +83,10 @@
<artifactId>
commons-lang3
</artifactId>
<artifactId>
commons-lang3
</artifactId>
<version>
${apache-commons-lang3.version}
</version>
<version>
${apache-commons-lang3.version}
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.apache.httpcomponents
</groupId>
<artifactId>
httpclient
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<artifactId>
lombok
</artifactId>
...
...
src/main/java/com/esv/freight/customer/common/component/ApplicationLoadRunner.java
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
common
.
component
;
package
com
.
esv
.
freight
.
customer
.
common
.
component
;
import
com.esv.freight.customer.common.unionpay.SDKConfig
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.boot.ApplicationArguments
;
import
org.springframework.boot.ApplicationArguments
;
...
@@ -25,5 +26,8 @@ public class ApplicationLoadRunner implements ApplicationRunner {
...
@@ -25,5 +26,8 @@ public class ApplicationLoadRunner implements ApplicationRunner {
@Override
@Override
public
void
run
(
ApplicationArguments
var
)
{
public
void
run
(
ApplicationArguments
var
)
{
log
.
info
(
"-------------------- [{}]初始化完成 --------------------"
,
applicationName
);
log
.
info
(
"-------------------- [{}]初始化完成 --------------------"
,
applicationName
);
// 从classpath加载acp_sdk.properties文件
SDKConfig
.
getConfig
().
loadPropertiesFromSrc
();
}
}
}
}
src/main/java/com/esv/freight/customer/common/component/ErrorMessageComponent.java
View file @
802de6d9
...
@@ -102,6 +102,9 @@ public class ErrorMessageComponent {
...
@@ -102,6 +102,9 @@ public class ErrorMessageComponent {
@Value
(
"${error-message.goodsowner.regularly-route.detail.1001}"
)
@Value
(
"${error-message.goodsowner.regularly-route.detail.1001}"
)
private
String
goodsOwnerRegularlyRouteDetail1001
;
private
String
goodsOwnerRegularlyRouteDetail1001
;
@Value
(
"${error-message.goodsowner.score.overall.update.1001}"
)
private
String
goodsOwnerScoreOverallUpdate1001
;
@Value
(
"${error-message.goodsowner.ext.account-address.1001}"
)
@Value
(
"${error-message.goodsowner.ext.account-address.1001}"
)
private
String
goodsOwnerExtAccountAddress1001
;
private
String
goodsOwnerExtAccountAddress1001
;
@Value
(
"${error-message.goodsowner.ext.account-address.1002}"
)
@Value
(
"${error-message.goodsowner.ext.account-address.1002}"
)
...
@@ -234,6 +237,9 @@ public class ErrorMessageComponent {
...
@@ -234,6 +237,9 @@ public class ErrorMessageComponent {
@Value
(
"${error-message.carrier.driver.vehicle-can-bind.1001}"
)
@Value
(
"${error-message.carrier.driver.vehicle-can-bind.1001}"
)
private
String
carrierDriverVehicleCanBind1001
;
private
String
carrierDriverVehicleCanBind1001
;
@Value
(
"${error-message.carrier.driver.score.overall.update.1001}"
)
private
String
carrierDriverScoreOverallUpdate1001
;
@Value
(
"${error-message.carrier.driver.vehicle-bind.1001}"
)
@Value
(
"${error-message.carrier.driver.vehicle-bind.1001}"
)
private
String
carrierDriverVehicleBind1001
;
private
String
carrierDriverVehicleBind1001
;
@Value
(
"${error-message.carrier.driver.vehicle-bind.1002}"
)
@Value
(
"${error-message.carrier.driver.vehicle-bind.1002}"
)
...
...
src/main/java/com/esv/freight/customer/module/driver/controller/DriverController.java
View file @
802de6d9
...
@@ -16,10 +16,12 @@ import com.esv.freight.customer.module.carrier.CarrierConstants;
...
@@ -16,10 +16,12 @@ import com.esv.freight.customer.module.carrier.CarrierConstants;
import
com.esv.freight.customer.module.driver.DriverConstants
;
import
com.esv.freight.customer.module.driver.DriverConstants
;
import
com.esv.freight.customer.module.driver.dto.DriverDetailDto
;
import
com.esv.freight.customer.module.driver.dto.DriverDetailDto
;
import
com.esv.freight.customer.module.driver.entity.DriverAuditHistoryEntity
;
import
com.esv.freight.customer.module.driver.entity.DriverAuditHistoryEntity
;
import
com.esv.freight.customer.module.driver.form.AccountScoreForm
;
import
com.esv.freight.customer.module.driver.form.DriverAuditForm
;
import
com.esv.freight.customer.module.driver.form.DriverAuditForm
;
import
com.esv.freight.customer.module.driver.form.DriverInfoForm
;
import
com.esv.freight.customer.module.driver.form.DriverInfoForm
;
import
com.esv.freight.customer.module.driver.form.DriverQueryForm
;
import
com.esv.freight.customer.module.driver.form.DriverQueryForm
;
import
com.esv.freight.customer.module.driver.service.DriverAccountService
;
import
com.esv.freight.customer.module.driver.service.DriverAccountService
;
import
com.esv.freight.customer.module.driver.service.DriverInfoService
;
import
com.esv.freight.customer.module.driver.validator.groups.ValidatorDetailAccount
;
import
com.esv.freight.customer.module.driver.validator.groups.ValidatorDetailAccount
;
import
com.esv.freight.customer.module.driver.validator.groups.ValidatorLogin
;
import
com.esv.freight.customer.module.driver.validator.groups.ValidatorLogin
;
import
com.esv.freight.customer.module.driver.validator.groups.ValidatorPasswordReset
;
import
com.esv.freight.customer.module.driver.validator.groups.ValidatorPasswordReset
;
...
@@ -55,17 +57,17 @@ import java.util.List;
...
@@ -55,17 +57,17 @@ import java.util.List;
public
class
DriverController
{
public
class
DriverController
{
private
ErrorMessageComponent
errorMessageComponent
;
private
ErrorMessageComponent
errorMessageComponent
;
private
PasswordComponent
passwordComponent
;
private
PasswordComponent
passwordComponent
;
private
DriverAccountService
driverAccountService
;
private
DriverAccountService
driverAccountService
;
private
DriverInfoService
driverInfoService
;
@Autowired
@Autowired
public
DriverController
(
ErrorMessageComponent
errorMessageComponent
,
PasswordComponent
passwordComponent
,
public
DriverController
(
ErrorMessageComponent
errorMessageComponent
,
PasswordComponent
passwordComponent
,
DriverAccountService
driverAccountService
)
{
DriverAccountService
driverAccountService
,
DriverInfoService
driverInfoService
)
{
this
.
errorMessageComponent
=
errorMessageComponent
;
this
.
errorMessageComponent
=
errorMessageComponent
;
this
.
passwordComponent
=
passwordComponent
;
this
.
passwordComponent
=
passwordComponent
;
this
.
driverAccountService
=
driverAccountService
;
this
.
driverAccountService
=
driverAccountService
;
this
.
driverInfoService
=
driverInfoService
;
}
}
/**
/**
...
@@ -312,4 +314,17 @@ public class DriverController {
...
@@ -312,4 +314,17 @@ public class DriverController {
driverAccountService
.
resetDriverPwd
(
form
);
driverAccountService
.
resetDriverPwd
(
form
);
return
EResponse
.
ok
();
return
EResponse
.
ok
();
}
}
/**
* description 更新司机整体评分
* param [form]
* return com.esv.freight.customer.common.response.EResponse
* author HuangChaobin
* createTime 2020/06/01 13:32
**/
@PostMapping
(
"/score/overall/update"
)
public
EResponse
updateOverallScore
(
@RequestBody
@Validated
(
ValidatorUpdate
.
class
)
AccountScoreForm
form
)
throws
EException
{
driverInfoService
.
updateOverallScore
(
form
);
return
EResponse
.
ok
();
}
}
}
src/main/java/com/esv/freight/customer/module/driver/dto/DriverDetailDto.java
View file @
802de6d9
...
@@ -206,4 +206,8 @@ public class DriverDetailDto {
...
@@ -206,4 +206,8 @@ public class DriverDetailDto {
* 备注
* 备注
*/
*/
private
String
remark
;
private
String
remark
;
/**
* 综合评分
*/
private
Integer
overallScore
;
}
}
src/main/java/com/esv/freight/customer/module/driver/entity/DriverInfoEntity.java
View file @
802de6d9
...
@@ -138,6 +138,10 @@ public class DriverInfoEntity implements Serializable {
...
@@ -138,6 +138,10 @@ public class DriverInfoEntity implements Serializable {
* 备注
* 备注
*/
*/
private
String
remark
;
private
String
remark
;
/**
* 综合评分
*/
private
Integer
overallScore
;
/**
/**
* 创建者
* 创建者
*/
*/
...
...
src/main/java/com/esv/freight/customer/module/driver/form/AccountScoreForm.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
driver
.
form
;
import
com.esv.freight.customer.common.validator.groups.ValidatorUpdate
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.hibernate.validator.constraints.Range
;
import
javax.validation.constraints.NotNull
;
/**
* @description:
* @project: freight-customer-service
* @name: com.esv.freight.customer.module.driver.form.AccountScoreForm
* @author: 黄朝斌
* @email: huangchaobin@esvtek.com
* @createTime: 2020/06/01 13:21
* @version:1.0
*/
@Data
public
class
AccountScoreForm
{
@NotNull
(
message
=
"参数id不能为空"
,
groups
=
{
ValidatorUpdate
.
class
})
private
Long
id
;
@NotNull
(
message
=
"参数score不能为空"
,
groups
=
{
ValidatorUpdate
.
class
})
@Range
(
min
=
0
,
message
=
"无效的score"
,
groups
=
{
ValidatorUpdate
.
class
})
private
Integer
score
;
@Override
public
String
toString
()
{
return
ToStringBuilder
.
reflectionToString
(
this
,
ToStringStyle
.
JSON_STYLE
);
}
}
src/main/java/com/esv/freight/customer/module/driver/service/DriverInfoService.java
View file @
802de6d9
...
@@ -2,6 +2,7 @@ package com.esv.freight.customer.module.driver.service;
...
@@ -2,6 +2,7 @@ package com.esv.freight.customer.module.driver.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.esv.freight.customer.module.driver.entity.DriverInfoEntity
;
import
com.esv.freight.customer.module.driver.entity.DriverInfoEntity
;
import
com.esv.freight.customer.module.driver.form.AccountScoreForm
;
/**
/**
* 司机信息表
* 司机信息表
...
@@ -12,5 +13,14 @@ import com.esv.freight.customer.module.driver.entity.DriverInfoEntity;
...
@@ -12,5 +13,14 @@ import com.esv.freight.customer.module.driver.entity.DriverInfoEntity;
*/
*/
public
interface
DriverInfoService
extends
IService
<
DriverInfoEntity
>
{
public
interface
DriverInfoService
extends
IService
<
DriverInfoEntity
>
{
/**
* description 更新司机整体评分
* param [form]
* return java.lang.Integer
* author HuangChaobin
* createTime 2020/06/01 13:24
**/
Integer
updateOverallScore
(
AccountScoreForm
form
);
}
}
src/main/java/com/esv/freight/customer/module/driver/service/impl/DriverInfoServiceImpl.java
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
driver
.
service
.
impl
;
package
com
.
esv
.
freight
.
customer
.
module
.
driver
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.esv.freight.customer.common.component.ErrorMessageComponent
;
import
com.esv.freight.customer.common.exception.EException
;
import
com.esv.freight.customer.module.driver.dao.DriverInfoDao
;
import
com.esv.freight.customer.module.driver.dao.DriverInfoDao
;
import
com.esv.freight.customer.module.driver.entity.DriverInfoEntity
;
import
com.esv.freight.customer.module.driver.entity.DriverInfoEntity
;
import
com.esv.freight.customer.module.driver.form.AccountScoreForm
;
import
com.esv.freight.customer.module.driver.service.DriverInfoService
;
import
com.esv.freight.customer.module.driver.service.DriverInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
@Service
(
"driverInfoService"
)
@Service
(
"driverInfoService"
)
public
class
DriverInfoServiceImpl
extends
ServiceImpl
<
DriverInfoDao
,
DriverInfoEntity
>
implements
DriverInfoService
{
public
class
DriverInfoServiceImpl
extends
ServiceImpl
<
DriverInfoDao
,
DriverInfoEntity
>
implements
DriverInfoService
{
private
ErrorMessageComponent
errorMessageComponent
;
@Autowired
public
DriverInfoServiceImpl
(
ErrorMessageComponent
errorMessageComponent
)
{
this
.
errorMessageComponent
=
errorMessageComponent
;
}
@Override
public
Integer
updateOverallScore
(
AccountScoreForm
form
)
{
DriverInfoEntity
dbEntity
=
this
.
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
DriverInfoEntity
>().
eq
(
DriverInfoEntity:
:
getDriverId
,
form
.
getId
()));
if
(
null
==
dbEntity
)
{
throw
new
EException
(
1001
,
errorMessageComponent
.
getCarrierDriverScoreOverallUpdate1001
());
}
DriverInfoEntity
entity
=
new
DriverInfoEntity
();
entity
.
setId
(
dbEntity
.
getId
());
entity
.
setOverallScore
(
form
.
getScore
());
return
this
.
baseMapper
.
updateById
(
entity
);
}
}
}
\ No newline at end of file
src/main/java/com/esv/freight/customer/module/driver/vo/DriverDetailVO.java
View file @
802de6d9
...
@@ -150,6 +150,10 @@ public class DriverDetailVO {
...
@@ -150,6 +150,10 @@ public class DriverDetailVO {
* 备注
* 备注
*/
*/
private
String
remark
;
private
String
remark
;
/**
* 综合评分
*/
private
Integer
overallScore
;
/**
/**
* 创建者
* 创建者
*/
*/
...
...
src/main/java/com/esv/freight/customer/module/goodsowner/controller/GoodsOwnerController.java
View file @
802de6d9
...
@@ -19,7 +19,9 @@ import com.esv.freight.customer.module.goodsowner.entity.AuditHistoryEntity;
...
@@ -19,7 +19,9 @@ import com.esv.freight.customer.module.goodsowner.entity.AuditHistoryEntity;
import
com.esv.freight.customer.module.goodsowner.form.AccountForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountInfoForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountInfoForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountQueryForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountQueryForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountScoreForm
;
import
com.esv.freight.customer.module.goodsowner.service.GoodsOwnerAccountService
;
import
com.esv.freight.customer.module.goodsowner.service.GoodsOwnerAccountService
;
import
com.esv.freight.customer.module.goodsowner.service.GoodsOwnerInfoService
;
import
com.esv.freight.customer.module.goodsowner.validator.groups.*
;
import
com.esv.freight.customer.module.goodsowner.validator.groups.*
;
import
com.esv.freight.customer.module.goodsowner.vo.AccountInfoVO
;
import
com.esv.freight.customer.module.goodsowner.vo.AccountInfoVO
;
import
com.esv.freight.customer.module.goodsowner.vo.AuditHistoryVO
;
import
com.esv.freight.customer.module.goodsowner.vo.AuditHistoryVO
;
...
@@ -51,17 +53,18 @@ import java.util.List;
...
@@ -51,17 +53,18 @@ import java.util.List;
@Validated
@Validated
public
class
GoodsOwnerController
{
public
class
GoodsOwnerController
{
private
GoodsOwnerAccountService
goodsOwnerAccountService
;
private
ErrorMessageComponent
errorMessageComponent
;
private
ErrorMessageComponent
errorMessageComponent
;
private
PasswordComponent
passwordComponent
;
private
PasswordComponent
passwordComponent
;
private
GoodsOwnerAccountService
goodsOwnerAccountService
;
private
GoodsOwnerInfoService
goodsOwnerInfoService
;
@Autowired
@Autowired
public
GoodsOwnerController
(
GoodsOwnerAccountService
goodsOwnerAccountService
,
ErrorMessageComponent
errorMessageComponent
,
PasswordComponent
passwordComponent
)
{
public
GoodsOwnerController
(
GoodsOwnerAccountService
goodsOwnerAccountService
,
ErrorMessageComponent
errorMessageComponent
,
PasswordComponent
passwordComponent
,
GoodsOwnerInfoService
goodsOwnerInfoService
)
{
this
.
goodsOwnerAccountService
=
goodsOwnerAccountService
;
this
.
goodsOwnerAccountService
=
goodsOwnerAccountService
;
this
.
errorMessageComponent
=
errorMessageComponent
;
this
.
errorMessageComponent
=
errorMessageComponent
;
this
.
passwordComponent
=
passwordComponent
;
this
.
passwordComponent
=
passwordComponent
;
this
.
goodsOwnerInfoService
=
goodsOwnerInfoService
;
}
}
/**
/**
...
@@ -288,4 +291,17 @@ public class GoodsOwnerController {
...
@@ -288,4 +291,17 @@ public class GoodsOwnerController {
public
EResponse
getAllAvailable
()
throws
EException
{
public
EResponse
getAllAvailable
()
throws
EException
{
return
EResponse
.
ok
(
goodsOwnerAccountService
.
selectAllAvailableAccount
());
return
EResponse
.
ok
(
goodsOwnerAccountService
.
selectAllAvailableAccount
());
}
}
/**
* description 更新货主整体评分
* param [form]
* return com.esv.freight.customer.common.response.EResponse
* author HuangChaobin
* createTime 2020/06/01 11:01
**/
@PostMapping
(
"/score/overall/update"
)
public
EResponse
updateOverallScore
(
@RequestBody
@Validated
(
ValidatorUpdate
.
class
)
AccountScoreForm
form
)
throws
EException
{
goodsOwnerInfoService
.
updateOverallScore
(
form
);
return
EResponse
.
ok
();
}
}
}
src/main/java/com/esv/freight/customer/module/goodsowner/dto/AccountInfoDto.java
View file @
802de6d9
...
@@ -153,4 +153,8 @@ public class AccountInfoDto {
...
@@ -153,4 +153,8 @@ public class AccountInfoDto {
* 身份证背面图片URL
* 身份证背面图片URL
*/
*/
private
String
idCardBackUrl
;
private
String
idCardBackUrl
;
/**
* 整体评分
*/
private
Integer
overallScore
;
}
}
src/main/java/com/esv/freight/customer/module/goodsowner/entity/InfoEntity.java
View file @
802de6d9
...
@@ -104,5 +104,9 @@ public class InfoEntity implements Serializable {
...
@@ -104,5 +104,9 @@ public class InfoEntity implements Serializable {
* 身份证背面图片URL
* 身份证背面图片URL
*/
*/
private
String
idCardBackUrl
;
private
String
idCardBackUrl
;
/**
* 综合评分
*/
private
Integer
overallScore
;
}
}
src/main/java/com/esv/freight/customer/module/goodsowner/form/AccountScoreForm.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
goodsowner
.
form
;
import
com.esv.freight.customer.common.validator.groups.ValidatorUpdate
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.hibernate.validator.constraints.Range
;
import
javax.validation.constraints.NotNull
;
/**
* @description:
* @project: freight-customer-service
* @name: com.esv.freight.customer.module.goodsowner.form.AccountScoreForm
* @author: 黄朝斌
* @email: huangchaobin@esvtek.com
* @createTime: 2020/06/01 10:18
* @version:1.0
*/
@Data
public
class
AccountScoreForm
{
@NotNull
(
message
=
"参数id不能为空"
,
groups
=
{
ValidatorUpdate
.
class
})
private
Long
id
;
@NotNull
(
message
=
"参数score不能为空"
,
groups
=
{
ValidatorUpdate
.
class
})
@Range
(
min
=
0
,
message
=
"无效的score"
,
groups
=
{
ValidatorUpdate
.
class
})
private
Integer
score
;
@Override
public
String
toString
()
{
return
ToStringBuilder
.
reflectionToString
(
this
,
ToStringStyle
.
JSON_STYLE
);
}
}
src/main/java/com/esv/freight/customer/module/goodsowner/service/InfoService.java
→
src/main/java/com/esv/freight/customer/module/goodsowner/service/
GoodsOwner
InfoService.java
View file @
802de6d9
...
@@ -2,6 +2,7 @@ package com.esv.freight.customer.module.goodsowner.service;
...
@@ -2,6 +2,7 @@ package com.esv.freight.customer.module.goodsowner.service;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.esv.freight.customer.module.goodsowner.entity.InfoEntity
;
import
com.esv.freight.customer.module.goodsowner.entity.InfoEntity
;
import
com.esv.freight.customer.module.goodsowner.form.AccountScoreForm
;
/**
/**
* 货主信息表
* 货主信息表
...
@@ -10,7 +11,16 @@ import com.esv.freight.customer.module.goodsowner.entity.InfoEntity;
...
@@ -10,7 +11,16 @@ import com.esv.freight.customer.module.goodsowner.entity.InfoEntity;
* @email huangchaobin@esvtek.com
* @email huangchaobin@esvtek.com
* @date 2020-04-17 13:54:57
* @date 2020-04-17 13:54:57
*/
*/
public
interface
InfoService
extends
IService
<
InfoEntity
>
{
public
interface
GoodsOwnerInfoService
extends
IService
<
InfoEntity
>
{
/**
* description 更新货主整体评分
* param [form]
* return java.lang.Integer
* author HuangChaobin
* createTime 2020/06/01 10:20
**/
Integer
updateOverallScore
(
AccountScoreForm
form
);
}
}
src/main/java/com/esv/freight/customer/module/goodsowner/service/impl/GoodsOwnerAccountServiceImpl.java
View file @
802de6d9
...
@@ -25,7 +25,7 @@ import com.esv.freight.customer.module.goodsowner.form.AccountInfoForm;
...
@@ -25,7 +25,7 @@ import com.esv.freight.customer.module.goodsowner.form.AccountInfoForm;
import
com.esv.freight.customer.module.goodsowner.form.AccountQueryForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountQueryForm
;
import
com.esv.freight.customer.module.goodsowner.service.GoodsOwnerAccountService
;
import
com.esv.freight.customer.module.goodsowner.service.GoodsOwnerAccountService
;
import
com.esv.freight.customer.module.goodsowner.service.AuditHistoryService
;
import
com.esv.freight.customer.module.goodsowner.service.AuditHistoryService
;
import
com.esv.freight.customer.module.goodsowner.service.InfoService
;
import
com.esv.freight.customer.module.goodsowner.service.
GoodsOwner
InfoService
;
import
com.esv.freight.customer.module.goodsowner.vo.AccountAvailableVO
;
import
com.esv.freight.customer.module.goodsowner.vo.AccountAvailableVO
;
import
com.esv.freight.customer.module.goodsowner.vo.AccountListVO
;
import
com.esv.freight.customer.module.goodsowner.vo.AccountListVO
;
import
com.esv.gateway.common.GatewayHeaders
;
import
com.esv.gateway.common.GatewayHeaders
;
...
@@ -51,17 +51,17 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
...
@@ -51,17 +51,17 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
private
ErrorMessageComponent
errorMessageComponent
;
private
ErrorMessageComponent
errorMessageComponent
;
private
InfoService
i
nfoService
;
private
GoodsOwnerInfoService
goodsOwnerI
nfoService
;
private
AuditHistoryService
auditHistoryService
;
private
AuditHistoryService
auditHistoryService
;
@Autowired
@Autowired
public
GoodsOwnerAccountServiceImpl
(
FeignBaseService
feignBaseService
,
PasswordComponent
passwordComponent
,
public
GoodsOwnerAccountServiceImpl
(
FeignBaseService
feignBaseService
,
PasswordComponent
passwordComponent
,
ErrorMessageComponent
errorMessageComponent
,
InfoService
i
nfoService
,
AuditHistoryService
auditHistoryService
)
{
ErrorMessageComponent
errorMessageComponent
,
GoodsOwnerInfoService
goodsOwnerI
nfoService
,
AuditHistoryService
auditHistoryService
)
{
this
.
feignBaseService
=
feignBaseService
;
this
.
feignBaseService
=
feignBaseService
;
this
.
passwordComponent
=
passwordComponent
;
this
.
passwordComponent
=
passwordComponent
;
this
.
errorMessageComponent
=
errorMessageComponent
;
this
.
errorMessageComponent
=
errorMessageComponent
;
this
.
infoService
=
i
nfoService
;
this
.
goodsOwnerInfoService
=
goodsOwnerI
nfoService
;
this
.
auditHistoryService
=
auditHistoryService
;
this
.
auditHistoryService
=
auditHistoryService
;
}
}
...
@@ -134,7 +134,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
...
@@ -134,7 +134,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
}
}
infoEntity
.
setOwnerNumber
(
ownerNumber
);
infoEntity
.
setOwnerNumber
(
ownerNumber
);
infoEntity
.
setAccountId
(
accountId
);
infoEntity
.
setAccountId
(
accountId
);
i
nfoService
.
getBaseMapper
().
insert
(
infoEntity
);
goodsOwnerI
nfoService
.
getBaseMapper
().
insert
(
infoEntity
);
// 5.新增帐号审核记录
// 5.新增帐号审核记录
AuditHistoryEntity
auditHistoryEntity
=
new
AuditHistoryEntity
();
AuditHistoryEntity
auditHistoryEntity
=
new
AuditHistoryEntity
();
...
@@ -185,7 +185,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
...
@@ -185,7 +185,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
InfoEntity
infoEntityWrapper
=
new
InfoEntity
();
InfoEntity
infoEntityWrapper
=
new
InfoEntity
();
infoEntityWrapper
.
setAccountId
(
accountId
);
infoEntityWrapper
.
setAccountId
(
accountId
);
Wrapper
<
InfoEntity
>
InfoUpdateWrapper
=
new
UpdateWrapper
<>(
infoEntityWrapper
);
Wrapper
<
InfoEntity
>
InfoUpdateWrapper
=
new
UpdateWrapper
<>(
infoEntityWrapper
);
i
nfoService
.
getBaseMapper
().
update
(
infoEntity
,
InfoUpdateWrapper
);
goodsOwnerI
nfoService
.
getBaseMapper
().
update
(
infoEntity
,
InfoUpdateWrapper
);
}
}
@Override
@Override
...
@@ -320,7 +320,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
...
@@ -320,7 +320,7 @@ public class GoodsOwnerAccountServiceImpl extends ServiceImpl<AccountDao, GoodsO
InfoEntity
infoEntity
=
new
InfoEntity
();
InfoEntity
infoEntity
=
new
InfoEntity
();
infoEntity
.
setOwnerNumber
(
ownerNumber
);
infoEntity
.
setOwnerNumber
(
ownerNumber
);
infoEntity
.
setAccountId
(
accountId
);
infoEntity
.
setAccountId
(
accountId
);
i
nfoService
.
getBaseMapper
().
insert
(
infoEntity
);
goodsOwnerI
nfoService
.
getBaseMapper
().
insert
(
infoEntity
);
// 5.新增帐号审核记录
// 5.新增帐号审核记录
AuditHistoryEntity
auditHistoryEntity
=
new
AuditHistoryEntity
();
AuditHistoryEntity
auditHistoryEntity
=
new
AuditHistoryEntity
();
...
...
src/main/java/com/esv/freight/customer/module/goodsowner/service/impl/GoodsOwnerInfoServiceImpl.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
goodsowner
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.esv.freight.customer.common.component.ErrorMessageComponent
;
import
com.esv.freight.customer.common.exception.EException
;
import
com.esv.freight.customer.module.goodsowner.dao.InfoDao
;
import
com.esv.freight.customer.module.goodsowner.entity.InfoEntity
;
import
com.esv.freight.customer.module.goodsowner.form.AccountScoreForm
;
import
com.esv.freight.customer.module.goodsowner.service.GoodsOwnerInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
@Service
(
"goodsOwnerInfoService"
)
public
class
GoodsOwnerInfoServiceImpl
extends
ServiceImpl
<
InfoDao
,
InfoEntity
>
implements
GoodsOwnerInfoService
{
private
ErrorMessageComponent
errorMessageComponent
;
@Autowired
public
GoodsOwnerInfoServiceImpl
(
ErrorMessageComponent
errorMessageComponent
)
{
this
.
errorMessageComponent
=
errorMessageComponent
;
}
@Override
public
Integer
updateOverallScore
(
AccountScoreForm
form
)
{
InfoEntity
dbEntity
=
this
.
baseMapper
.
selectOne
(
new
LambdaQueryWrapper
<
InfoEntity
>().
eq
(
InfoEntity:
:
getAccountId
,
form
.
getId
()));
if
(
null
==
dbEntity
)
{
throw
new
EException
(
1001
,
errorMessageComponent
.
getGoodsOwnerScoreOverallUpdate1001
());
}
InfoEntity
infoEntity
=
new
InfoEntity
();
infoEntity
.
setId
(
dbEntity
.
getId
());
infoEntity
.
setOverallScore
(
form
.
getScore
());
return
this
.
baseMapper
.
updateById
(
infoEntity
);
}
}
\ No newline at end of file
src/main/java/com/esv/freight/customer/module/goodsowner/service/impl/InfoServiceImpl.java
deleted
100644 → 0
View file @
2734290c
package
com
.
esv
.
freight
.
customer
.
module
.
goodsowner
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.esv.freight.customer.module.goodsowner.dao.InfoDao
;
import
com.esv.freight.customer.module.goodsowner.entity.InfoEntity
;
import
com.esv.freight.customer.module.goodsowner.service.InfoService
;
import
org.springframework.stereotype.Service
;
@Service
(
"infoService"
)
public
class
InfoServiceImpl
extends
ServiceImpl
<
InfoDao
,
InfoEntity
>
implements
InfoService
{
}
\ No newline at end of file
src/main/java/com/esv/freight/customer/module/goodsowner/vo/AccountInfoVO.java
View file @
802de6d9
...
@@ -114,6 +114,10 @@ public class AccountInfoVO implements Serializable {
...
@@ -114,6 +114,10 @@ public class AccountInfoVO implements Serializable {
* 身份证背面图片URL
* 身份证背面图片URL
*/
*/
private
String
idCardBackUrl
;
private
String
idCardBackUrl
;
/**
* 整体评分
*/
private
Integer
overallScore
;
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
...
...
src/main/java/com/esv/freight/customer/module/pay/dao/GoodsOwnerPayOrderDao.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
pay
.
dao
;
import
com.esv.freight.customer.module.pay.entity.GoodsOwnerPayOrderEntity
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 货主支付订单表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-05-30 13:41:51
*/
@Mapper
public
interface
GoodsOwnerPayOrderDao
extends
BaseMapper
<
GoodsOwnerPayOrderEntity
>
{
}
src/main/java/com/esv/freight/customer/module/pay/entity/GoodsOwnerPayOrderEntity.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
pay
.
entity
;
import
com.baomidou.mybatisplus.annotation.FieldFill
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
java.io.Serializable
;
import
java.util.Date
;
import
lombok.Data
;
/**
* 货主支付订单表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-05-30 13:41:51
*/
@Data
@TableName
(
"goods_owner_pay_order"
)
public
class
GoodsOwnerPayOrderEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
*
*/
@TableId
private
Long
id
;
/**
* 租户ID
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Long
tenantId
;
/**
* 部门ID
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Long
departmentId
;
/**
* 支付方式:10-银联
*/
private
Integer
payType
;
/**
* 商户代码(网络货运平台在支付平台的商户号)
*/
private
String
merId
;
/**
* 业务订单号
*/
private
String
orderId
;
/**
* 请求支付平台订单发送时间
*/
private
String
txnTime
;
/**
* 交易金额(单位为分)
*/
private
Long
txnAmt
;
/**
* 订单描述
*/
private
String
orderDesc
;
/**
* 支付平台受理订单号
*/
private
String
tn
;
/**
* 订单状态:1-支付中、2-支付成功、3-支付失败
*/
private
Long
orderStatus
;
/**
* 查询流水号(消费交易的流水号,供后续查询用)
*/
private
String
queryId
;
/**
* 创建时间
*/
@TableField
(
fill
=
FieldFill
.
INSERT
)
private
Date
createTime
;
/**
* 修改时间
*/
private
Date
updateTime
;
/**
* 支付平台回调时间
*/
private
Date
callbackTime
;
}
src/main/java/com/esv/freight/customer/module/pay/service/GoodsOwnerPayOrderService.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
pay
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.esv.freight.customer.module.pay.entity.GoodsOwnerPayOrderEntity
;
/**
* 货主支付订单表
*
* @author 黄朝斌
* @email huangchaobin@esvtek.com
* @date 2020-05-30 13:41:51
*/
public
interface
GoodsOwnerPayOrderService
extends
IService
<
GoodsOwnerPayOrderEntity
>
{
}
src/main/java/com/esv/freight/customer/module/pay/service/impl/GoodsOwnerPayOrderServiceImpl.java
0 → 100644
View file @
802de6d9
package
com
.
esv
.
freight
.
customer
.
module
.
pay
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.esv.freight.customer.module.pay.dao.GoodsOwnerPayOrderDao
;
import
com.esv.freight.customer.module.pay.entity.GoodsOwnerPayOrderEntity
;
import
com.esv.freight.customer.module.pay.service.GoodsOwnerPayOrderService
;
import
org.springframework.stereotype.Service
;
@Service
(
"goodsOwnerPayOrderService"
)
public
class
GoodsOwnerPayOrderServiceImpl
extends
ServiceImpl
<
GoodsOwnerPayOrderDao
,
GoodsOwnerPayOrderEntity
>
implements
GoodsOwnerPayOrderService
{
}
\ No newline at end of file
src/main/resources/application-dev.yml
View file @
802de6d9
...
@@ -124,6 +124,10 @@ error-message:
...
@@ -124,6 +124,10 @@ error-message:
1004
:
无效的收货地址ID
1004
:
无效的收货地址ID
detail
:
detail
:
1001
:
无效的常跑线路ID
1001
:
无效的常跑线路ID
score
:
overall
:
update
:
1001
:
无效的帐号ID
ext
:
ext
:
account-address
:
account-address
:
1001
:
无效的货主ID
1001
:
无效的货主ID
...
@@ -228,6 +232,10 @@ error-message:
...
@@ -228,6 +232,10 @@ error-message:
1001
:
司机与车辆未绑定
1001
:
司机与车辆未绑定
1002
:
无效的司机ID
1002
:
无效的司机ID
1003
:
无效的车辆ID
1003
:
无效的车辆ID
score
:
overall
:
update
:
1001
:
无效的帐号ID
contract
:
contract
:
offline
:
offline
:
goods-owner
:
goods-owner
:
...
...
src/main/resources/application-test.yml
View file @
802de6d9
...
@@ -124,6 +124,10 @@ error-message:
...
@@ -124,6 +124,10 @@ error-message:
1004
:
无效的收货地址ID
1004
:
无效的收货地址ID
detail
:
detail
:
1001
:
无效的常跑线路ID
1001
:
无效的常跑线路ID
score
:
overall
:
update
:
1001
:
无效的帐号ID
ext
:
ext
:
account-address
:
account-address
:
1001
:
无效的货主ID
1001
:
无效的货主ID
...
@@ -228,6 +232,10 @@ error-message:
...
@@ -228,6 +232,10 @@ error-message:
1001
:
司机与车辆未绑定
1001
:
司机与车辆未绑定
1002
:
无效的司机ID
1002
:
无效的司机ID
1003
:
无效的车辆ID
1003
:
无效的车辆ID
score
:
overall
:
update
:
1001
:
无效的帐号ID
contract
:
contract
:
offline
:
offline
:
goods-owner
:
goods-owner
:
...
...
src/main/resources/mapper/driver/DriverAccountDao.xml
View file @
802de6d9
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
select ab.*, b.name, b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url, b.settlement_type, b.sex, b.birth_date,
select ab.*, b.name, b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url, b.settlement_type, b.sex, b.birth_date,
b.nation, b.native_place, b.province_code, b.city_code, b.district_code, b.detail_address, b.driving_license, b.driving_license_type,
b.nation, b.native_place, b.province_code, b.city_code, b.district_code, b.detail_address, b.driving_license, b.driving_license_type,
b.driving_license_start_date, b.driving_license_end_date, b.driving_license_issue_department, b.driving_license_init_date, b.driving_license_url,
b.driving_license_start_date, b.driving_license_end_date, b.driving_license_issue_department, b.driving_license_init_date, b.driving_license_url,
b.certificate_vehicle, b.certificate_end_date, b.certificate_number, b.certificate_url, b.remark
b.certificate_vehicle, b.certificate_end_date, b.certificate_number, b.certificate_url, b.remark
, b.overall_score
from (
from (
select a.*, c.carrier_type as carrierType, c.carrier_full_name as carrierFullName, c.contactor as carrierContactor
select a.*, c.carrier_type as carrierType, c.carrier_full_name as carrierFullName, c.contactor as carrierContactor
from driver_account a, carrier_info c
from driver_account a, carrier_info c
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
select ab.*, b.name, b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url, b.settlement_type, b.sex, b.birth_date,
select ab.*, b.name, b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url, b.settlement_type, b.sex, b.birth_date,
b.nation, b.native_place, b.province_code, b.city_code, b.district_code, b.detail_address, b.driving_license, b.driving_license_type,
b.nation, b.native_place, b.province_code, b.city_code, b.district_code, b.detail_address, b.driving_license, b.driving_license_type,
b.driving_license_start_date, b.driving_license_end_date, b.driving_license_issue_department, b.driving_license_init_date, b.driving_license_url,
b.driving_license_start_date, b.driving_license_end_date, b.driving_license_issue_department, b.driving_license_init_date, b.driving_license_url,
b.certificate_vehicle, b.certificate_end_date, b.certificate_number, b.certificate_url, b.remark
b.certificate_vehicle, b.certificate_end_date, b.certificate_number, b.certificate_url, b.remark
, b.overall_score
from (
from (
select a.*, c.carrier_type as carrierType, c.carrier_full_name as carrierFullName, c.contactor as carrierContactor
select a.*, c.carrier_type as carrierType, c.carrier_full_name as carrierFullName, c.contactor as carrierContactor
from driver_account a, carrier_info c
from driver_account a, carrier_info c
...
...
src/main/resources/mapper/goodsowner/AccountDao.xml
View file @
802de6d9
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
select a.*,
select a.*,
b.owner_type, b.owner_number, b.owner_full_name, b.owner_brief_name, b.uni_credit_code, b.credit_expire_date, b.credit_original_url,
b.owner_type, b.owner_number, b.owner_full_name, b.owner_brief_name, b.uni_credit_code, b.credit_expire_date, b.credit_original_url,
b.credit_copy_url, b.legal_person, b.legal_phone, b.province_code, b.city_code, b.district_code, b.detail_address, b.contactor,
b.credit_copy_url, b.legal_person, b.legal_phone, b.province_code, b.city_code, b.district_code, b.detail_address, b.contactor,
b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url
b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url
, b.overall_score
from goods_owner_account a
from goods_owner_account a
left join goods_owner_info b
left join goods_owner_info b
on a.id = b.account_id
on a.id = b.account_id
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
select a.*,
select a.*,
b.owner_type, b.owner_number, b.owner_full_name, b.owner_brief_name, b.uni_credit_code, b.credit_expire_date, b.credit_original_url,
b.owner_type, b.owner_number, b.owner_full_name, b.owner_brief_name, b.uni_credit_code, b.credit_expire_date, b.credit_original_url,
b.credit_copy_url, b.legal_person, b.legal_phone, b.province_code, b.city_code, b.district_code, b.detail_address, b.contactor,
b.credit_copy_url, b.legal_person, b.legal_phone, b.province_code, b.city_code, b.district_code, b.detail_address, b.contactor,
b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url
b.id_card, b.id_card_expire_date, b.id_card_front_url, b.id_card_back_url
, b.overall_score
from goods_owner_account a
from goods_owner_account a
left join goods_owner_info b
left join goods_owner_info b
on a.id = b.account_id
on a.id = b.account_id
...
...
src/main/resources/mapper/pay/GoodsOwnerPayOrderDao.xml
0 → 100644
View file @
802de6d9
<?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.esv.freight.customer.module.pay.dao.GoodsOwnerPayOrderDao"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.esv.freight.customer.module.pay.entity.GoodsOwnerPayOrderEntity"
id=
"goodsOwnerPayOrderMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"tenantId"
column=
"tenant_id"
/>
<result
property=
"departmentId"
column=
"department_id"
/>
<result
property=
"payType"
column=
"pay_type"
/>
<result
property=
"merId"
column=
"mer_id"
/>
<result
property=
"orderId"
column=
"order_id"
/>
<result
property=
"txnTime"
column=
"txn_time"
/>
<result
property=
"txnAmt"
column=
"txn_amt"
/>
<result
property=
"orderDesc"
column=
"order_desc"
/>
<result
property=
"tn"
column=
"tn"
/>
<result
property=
"orderStatus"
column=
"order_status"
/>
<result
property=
"queryId"
column=
"query_id"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"callbackTime"
column=
"callback_time"
/>
</resultMap>
</mapper>
\ No newline at end of file
src/test/java/com/esv/freight/customer/module/driver/controller/DriverAccountTest.java
View file @
802de6d9
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.esv.freight.customer.BaseTestController
;
import
com.esv.freight.customer.BaseTestController
;
import
com.esv.freight.customer.common.response.ECode
;
import
com.esv.freight.customer.common.response.ECode
;
import
com.esv.freight.customer.module.driver.DriverConstants
;
import
com.esv.freight.customer.module.driver.DriverConstants
;
import
com.esv.freight.customer.module.driver.form.AccountScoreForm
;
import
com.esv.freight.customer.module.driver.form.DriverAuditForm
;
import
com.esv.freight.customer.module.driver.form.DriverAuditForm
;
import
com.esv.freight.customer.module.driver.form.DriverInfoForm
;
import
com.esv.freight.customer.module.driver.form.DriverInfoForm
;
import
com.esv.freight.customer.module.driver.form.DriverQueryForm
;
import
com.esv.freight.customer.module.driver.form.DriverQueryForm
;
...
@@ -751,4 +752,59 @@ public class DriverAccountTest extends BaseTestController {
...
@@ -751,4 +752,59 @@ public class DriverAccountTest extends BaseTestController {
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
Assert
.
assertEquals
(
1001
,
result
.
getIntValue
(
"code"
));
Assert
.
assertEquals
(
1001
,
result
.
getIntValue
(
"code"
));
}
}
/**
* 更新司机整体评分
**/
@Test
public
void
j1_updateOverallScore_success_test
()
throws
Exception
{
String
url
=
"/carrier/driver/score/overall/update"
;
// 构造数据
AccountScoreForm
form
=
new
AccountScoreForm
();
form
.
setId
(
1L
);
form
.
setScore
(
60
);
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
.
headers
(
this
.
getDefaultHttpHeaders
())
.
content
(
form
.
toString
()))
.
andDo
(
MockMvcResultHandlers
.
print
())
.
andExpect
(
MockMvcResultMatchers
.
status
().
isOk
())
.
andReturn
();
String
responseStr
=
mvcResult
.
getResponse
().
getContentAsString
();
log
.
info
(
responseStr
);
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
Assert
.
assertEquals
(
ECode
.
SUCCESS
.
code
(),
result
.
getIntValue
(
"code"
));
}
/**
* 更新司机整体评分
**/
@Test
@Rollback
public
void
j2_updateOverallScore_wrong_id_failure_test
()
throws
Exception
{
String
url
=
"/carrier/driver/score/overall/update"
;
// 构造数据
AccountScoreForm
form
=
new
AccountScoreForm
();
form
.
setId
(
99999L
);
form
.
setScore
(
60
);
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
.
headers
(
this
.
getDefaultHttpHeaders
())
.
content
(
form
.
toString
()))
.
andDo
(
MockMvcResultHandlers
.
print
())
.
andExpect
(
MockMvcResultMatchers
.
status
().
isOk
())
.
andReturn
();
String
responseStr
=
mvcResult
.
getResponse
().
getContentAsString
();
log
.
info
(
responseStr
);
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
Assert
.
assertEquals
(
1001
,
result
.
getIntValue
(
"code"
));
}
}
}
src/test/java/com/esv/freight/customer/module/goodsowner/controller/GoodsOwnerControllerTest.java
View file @
802de6d9
...
@@ -7,6 +7,7 @@ import com.esv.freight.customer.module.goodsowner.GoodsOwnerConstants;
...
@@ -7,6 +7,7 @@ import com.esv.freight.customer.module.goodsowner.GoodsOwnerConstants;
import
com.esv.freight.customer.module.goodsowner.form.AccountForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountInfoForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountInfoForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountQueryForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountQueryForm
;
import
com.esv.freight.customer.module.goodsowner.form.AccountScoreForm
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.junit.Assert
;
import
org.junit.Assert
;
import
org.junit.FixMethodOrder
;
import
org.junit.FixMethodOrder
;
...
@@ -39,6 +40,7 @@ import java.util.UUID;
...
@@ -39,6 +40,7 @@ import java.util.UUID;
@Slf4j
@Slf4j
@FixMethodOrder
(
MethodSorters
.
NAME_ASCENDING
)
@FixMethodOrder
(
MethodSorters
.
NAME_ASCENDING
)
@Transactional
@Transactional
@Rollback
(
false
)
public
class
GoodsOwnerControllerTest
extends
BaseTestController
{
public
class
GoodsOwnerControllerTest
extends
BaseTestController
{
@Test
@Test
...
@@ -821,4 +823,59 @@ public class GoodsOwnerControllerTest extends BaseTestController {
...
@@ -821,4 +823,59 @@ public class GoodsOwnerControllerTest extends BaseTestController {
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
Assert
.
assertEquals
(
1001
,
result
.
getIntValue
(
"code"
));
Assert
.
assertEquals
(
1001
,
result
.
getIntValue
(
"code"
));
}
}
/**
* 更新货主整体评分
**/
@Test
public
void
j1_updateOverallScore_success_test
()
throws
Exception
{
String
url
=
"/goodsowner/account/score/overall/update"
;
// 构造数据
AccountScoreForm
form
=
new
AccountScoreForm
();
form
.
setId
(
1L
);
form
.
setScore
(
60
);
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
.
headers
(
this
.
getDefaultHttpHeaders
())
.
content
(
form
.
toString
()))
.
andDo
(
MockMvcResultHandlers
.
print
())
.
andExpect
(
MockMvcResultMatchers
.
status
().
isOk
())
.
andReturn
();
String
responseStr
=
mvcResult
.
getResponse
().
getContentAsString
();
log
.
info
(
responseStr
);
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
Assert
.
assertEquals
(
ECode
.
SUCCESS
.
code
(),
result
.
getIntValue
(
"code"
));
}
/**
* 更新货主整体评分:无效的帐号ID
**/
@Test
@Rollback
public
void
j1_updateOverallScore_wrong_id_failure_test
()
throws
Exception
{
String
url
=
"/goodsowner/account/score/overall/update"
;
// 构造数据
AccountScoreForm
form
=
new
AccountScoreForm
();
form
.
setId
(
99999L
);
form
.
setScore
(
60
);
MvcResult
mvcResult
=
this
.
getMockMvc
().
perform
(
MockMvcRequestBuilders
.
post
(
url
)
.
contentType
(
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
.
headers
(
this
.
getDefaultHttpHeaders
())
.
content
(
form
.
toString
()))
.
andDo
(
MockMvcResultHandlers
.
print
())
.
andExpect
(
MockMvcResultMatchers
.
status
().
isOk
())
.
andReturn
();
String
responseStr
=
mvcResult
.
getResponse
().
getContentAsString
();
log
.
info
(
responseStr
);
JSONObject
result
=
JSONObject
.
parseObject
(
responseStr
);
Assert
.
assertEquals
(
1001
,
result
.
getIntValue
(
"code"
));
}
}
}
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