Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
usedCarAuction
/
aus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 11266757
authored
Apr 24, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v1.5.0' of
http://192.168.3.233:8090/usedCarAuction/aus
into v1.5.0
2 parents
342e3593
f1a528c7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
159 additions
and
1 deletions
aus-config/src/main/resources/config/common-dev.yaml
aus-core/src/main/java/com/glsx/usedcar/handler/AliyunOssHandler.java
aus-core/src/main/java/com/glsx/usedcar/handler/AliyunToken.java
aus-core/src/main/java/com/glsx/usedcar/module/auction/service/AuctionOrderService.java
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrAuditService.java
aus-framework/src/main/java/org/summerframework/core/enums/ErrorCodeEnum.java
aus-inspector/src/main/java/com/glsx/usedcar/config/BeanConfig.java → aus-inspector/src/main/java/com/glsx/usedcar/config/InspectorBeanConfig.java
aus-vr-api/src/main/java/com/glsx/usedcar/controller/OssController.java
aus-config/src/main/resources/config/common-dev.yaml
View file @
1126675
...
@@ -103,6 +103,9 @@ aliyun:
...
@@ -103,6 +103,9 @@ aliyun:
accessKeySecret
:
iYJdlgs6khO53YqoQYDOtHXCk83d5C
accessKeySecret
:
iYJdlgs6khO53YqoQYDOtHXCk83d5C
bucketName
:
jinrong-huidan-test
bucketName
:
jinrong-huidan-test
region
:
cn-shenzhen
region
:
cn-shenzhen
roleArn
:
acs:ram::1312972928453148:role/ramosstest
roleSessionName
:
ramoss-aus-session
durationSeconds
:
3600
esign
:
esign
:
appId
:
7439084933
appId
:
7439084933
appKey
:
fecd5f39bf93cdfe6e704b62390bcc29
appKey
:
fecd5f39bf93cdfe6e704b62390bcc29
...
...
aus-core/src/main/java/com/glsx/usedcar/handler/AliyunOssHandler.java
0 → 100644
View file @
1126675
package
com
.
glsx
.
usedcar
.
handler
;
import
com.aliyuncs.DefaultAcsClient
;
import
com.aliyuncs.IAcsClient
;
import
com.aliyuncs.auth.sts.AssumeRoleRequest
;
import
com.aliyuncs.auth.sts.AssumeRoleResponse
;
import
com.aliyuncs.profile.DefaultProfile
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.summerframework.core.enums.ErrorCodeEnum
;
import
org.summerframework.core.exception.BusinessCodeException
;
/**
* @author yangwei
* @version 1.0
* @since 2026/04/24 12:07
*/
@Slf4j
@Component
public
class
AliyunOssHandler
{
@Value
(
"${aliyun.oss.accessKeyId}"
)
private
String
accessKeyId
;
@Value
(
"${aliyun.oss.accessKeySecret}"
)
private
String
accessKeySecret
;
@Value
(
"${aliyun.oss.region}"
)
private
String
regionId
;
@Value
(
"${aliyun.oss.roleArn}"
)
private
String
roleArn
;
@Value
(
"${aliyun.oss.roleSessionName}"
)
private
String
roleSessionName
;
@Value
(
"${aliyun.oss.durationSeconds}"
)
private
Long
durationSeconds
;
/**
* 获取临时角色token
* @author yangwei
* @since 2026/4/24 12:21
* @return com.glsx.usedcar.handler.AliyunToken
*/
public
AliyunToken
getToken
()
{
DefaultProfile
profile
=
DefaultProfile
.
getProfile
(
regionId
,
accessKeyId
,
accessKeySecret
);
AssumeRoleResponse
response
=
getAssumeRoleResponse
(
profile
);
AliyunToken
aliyunToken
=
new
AliyunToken
();
aliyunToken
.
setSecurityToken
(
response
.
getCredentials
().
getSecurityToken
());
aliyunToken
.
setLsaccessKeyId
(
response
.
getCredentials
().
getAccessKeyId
());
aliyunToken
.
setLsaccessKeySecret
(
response
.
getCredentials
().
getAccessKeySecret
());
return
aliyunToken
;
}
/**
* 获取临时安全令牌扮演
* @author yangwei
* @since 2026/4/24 12:20
* @param profile 环境配置文件
* @return com.aliyuncs.auth.sts.AssumeRoleResponse
*/
private
AssumeRoleResponse
getAssumeRoleResponse
(
DefaultProfile
profile
)
{
IAcsClient
client
=
new
DefaultAcsClient
(
profile
);
// 创建获取临时安全令牌的请求
AssumeRoleRequest
request
=
new
AssumeRoleRequest
();
request
.
setRoleArn
(
roleArn
);
request
.
setRoleSessionName
(
roleSessionName
);
request
.
setDurationSeconds
(
durationSeconds
);
// 发送请求并获取临时安全令牌
AssumeRoleResponse
response
;
try
{
response
=
client
.
getAcsResponse
(
request
);
}
catch
(
com
.
aliyuncs
.
exceptions
.
ClientException
e
)
{
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
INSPECTOR_LOGIN_CODE_ERROR
);
}
return
response
;
}
}
aus-core/src/main/java/com/glsx/usedcar/handler/AliyunToken.java
0 → 100644
View file @
1126675
package
com
.
glsx
.
usedcar
.
handler
;
import
lombok.Data
;
import
java.io.Serializable
;
@Data
public
class
AliyunToken
implements
Serializable
{
private
String
lsaccessKeyId
;
private
String
lsaccessKeySecret
;
private
String
securityToken
;
}
aus-core/src/main/java/com/glsx/usedcar/module/auction/service/AuctionOrderService.java
View file @
1126675
...
@@ -166,6 +166,12 @@ public class AuctionOrderService extends AbstractAuctionService {
...
@@ -166,6 +166,12 @@ public class AuctionOrderService extends AbstractAuctionService {
returnDeposit
(
deposit
,
"订单取消,退还保证金,订单号:"
+
auctionOrder
.
getOrderCode
(),
auctionOrder
.
getAccount
());
returnDeposit
(
deposit
,
"订单取消,退还保证金,订单号:"
+
auctionOrder
.
getOrderCode
(),
auctionOrder
.
getAccount
());
auctionOrder
.
setCancelReason
(
order
.
getCancelReason
());
auctionOrder
.
setCancelReason
(
order
.
getCancelReason
());
auctionOrder
.
resetOrderState
(
AuctionOrder
.
OrderState
.
CANCELED
,
Vehicle
.
VehicleState
.
PRICED
);
auctionOrder
.
resetOrderState
(
AuctionOrder
.
OrderState
.
CANCELED
,
Vehicle
.
VehicleState
.
PRICED
);
AuctionVehicle
auctionAndVehicle
=
auctionVehicleDao
.
findTopByAuctionAndVehicle
(
auctionOrder
.
getAuction
(),
auctionOrder
.
getVehicle
());
Vehicle
vehicle
=
auctionAndVehicle
.
getVehicle
();
if
(
vehicle
!=
null
)
{
vehicle
.
setVehicleState
(
Vehicle
.
VehicleState
.
PRICED
);
}
vrAuditService
.
syncVrAuditStatus
(
auctionAndVehicle
);
gscInvoker
.
pushAuction
(
auctionOrder
);
gscInvoker
.
pushAuction
(
auctionOrder
);
return
auctionOrder
;
return
auctionOrder
;
}
}
...
@@ -226,6 +232,10 @@ public class AuctionOrderService extends AbstractAuctionService {
...
@@ -226,6 +232,10 @@ public class AuctionOrderService extends AbstractAuctionService {
Deposit
deposit
=
depositDao
.
findByAuctionVehicle_AuctionAndAuctionVehicle_VehicleAndDepositStateAndAccount
(
auctionOrder
.
getAuction
(),
vehicle
,
Deposit
.
DepositState
.
FREEZE
,
account
);
Deposit
deposit
=
depositDao
.
findByAuctionVehicle_AuctionAndAuctionVehicle_VehicleAndDepositStateAndAccount
(
auctionOrder
.
getAuction
(),
vehicle
,
Deposit
.
DepositState
.
FREEZE
,
account
);
returnDeposit
(
deposit
,
"拍卖成功,退还保证金,订单号:"
+
auctionOrder
.
getOrderCode
(),
account
);
returnDeposit
(
deposit
,
"拍卖成功,退还保证金,订单号:"
+
auctionOrder
.
getOrderCode
(),
account
);
AuctionVehicle
auctionAndVehicle
=
auctionVehicleDao
.
findTopByAuctionAndVehicle
(
auctionOrder
.
getAuction
(),
auctionOrder
.
getVehicle
());
AuctionVehicle
auctionAndVehicle
=
auctionVehicleDao
.
findTopByAuctionAndVehicle
(
auctionOrder
.
getAuction
(),
auctionOrder
.
getVehicle
());
Vehicle
v
=
auctionAndVehicle
.
getVehicle
();
if
(
v
!=
null
)
{
v
.
setVehicleState
(
Vehicle
.
VehicleState
.
COMPLETED
);
}
vrAuditService
.
syncVrAuditStatus
(
auctionAndVehicle
);
vrAuditService
.
syncVrAuditStatus
(
auctionAndVehicle
);
// 审批通过,创建订单快照
// 审批通过,创建订单快照
orderSnapshotService
.
createFromAuctionOrder
(
auctionOrder
);
orderSnapshotService
.
createFromAuctionOrder
(
auctionOrder
);
...
...
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrAuditService.java
View file @
1126675
...
@@ -1135,8 +1135,24 @@ public class VrAuditService {
...
@@ -1135,8 +1135,24 @@ public class VrAuditService {
// 设置评估与交易 EvaluationTransaction
// 设置评估与交易 EvaluationTransaction
EvaluationTransaction
evaluationTransaction
=
new
EvaluationTransaction
();
EvaluationTransaction
evaluationTransaction
=
new
EvaluationTransaction
();
evaluationTransaction
.
setOverallRating
(
1
);
// 车辆整体评级默认1-优
evaluationTransaction
.
setOverallRating
(
1
);
// 车辆整体评级默认1-优
evaluationTransaction
.
setEvalOrderNo
(
""
);
// 评估单编号,默认空
evaluationTransaction
.
setEvalOpinion
(
""
);
// 评估意见,默认空
evaluationTransaction
.
setSellerMerchantName
(
""
);
evaluationTransaction
.
setSellerName
(
""
);
// 销售顾问
vehicle
.
setEvaluationTransaction
(
evaluationTransaction
);
vehicle
.
setEvaluationTransaction
(
evaluationTransaction
);
// 设置车辆保管信息 CustodianInfo
CustodianInfo
custodianInfo
=
new
CustodianInfo
();
custodianInfo
.
setCustodianName
(
""
);
// 保管人姓名,默认发拍人
custodianInfo
.
setCustodianPhone
(
""
);
// 保管人联系方式
vehicle
.
setCustodianInfo
(
custodianInfo
);
// 设置车主信息 OwnerInfo
OwnerInfo
ownerInfo
=
new
OwnerInfo
();
ownerInfo
.
setPreviousOwnerName
(
""
);
// 车主姓名,默认空
ownerInfo
.
setPreviousOwnerPhone
(
""
);
// 车主联系方式,默认空
vehicle
.
setOwnerInfo
(
ownerInfo
);
// 设置车辆图片 carImages
// 设置车辆图片 carImages
List
<
CarImage
>
carImages
=
buildCarImages
(
vrAudit
);
List
<
CarImage
>
carImages
=
buildCarImages
(
vrAudit
);
vehicle
.
setCarImages
(
carImages
);
vehicle
.
setCarImages
(
carImages
);
...
...
aus-framework/src/main/java/org/summerframework/core/enums/ErrorCodeEnum.java
View file @
1126675
...
@@ -23,6 +23,7 @@ public enum ErrorCodeEnum {
...
@@ -23,6 +23,7 @@ public enum ErrorCodeEnum {
BUSINESS_BUSY
(
1010
,
"业务繁忙,请稍后重试"
),
BUSINESS_BUSY
(
1010
,
"业务繁忙,请稍后重试"
),
COMMON_ERROR
(
1000000
,
"{0}"
),
COMMON_ERROR
(
1000000
,
"{0}"
),
DATA_INCOMPLETE
(
1000001
,
"数据不完整:[{0}]"
),
DATA_INCOMPLETE
(
1000001
,
"数据不完整:[{0}]"
),
GET_TEMPORARY_SAFE_TOKEN_FAILED
(
1000002
,
"获取临时安全令牌失败"
),
/* 七位错误码,第一位标志位,前三位模块,后三位具体错误码 */
/* 七位错误码,第一位标志位,前三位模块,后三位具体错误码 */
/** 检测模块 1001 */
/** 检测模块 1001 */
...
...
aus-inspector/src/main/java/com/glsx/usedcar/config/BeanConfig.java
→
aus-inspector/src/main/java/com/glsx/usedcar/config/
Inspector
BeanConfig.java
View file @
1126675
...
@@ -9,7 +9,7 @@ import org.springframework.data.domain.AuditorAware;
...
@@ -9,7 +9,7 @@ import org.springframework.data.domain.AuditorAware;
*
*
*/
*/
@Configuration
@Configuration
public
class
BeanConfig
{
public
class
Inspector
BeanConfig
{
@Bean
@Bean
public
AuditorAware
<
String
>
auditorProvider
()
{
public
AuditorAware
<
String
>
auditorProvider
()
{
...
...
aus-vr-api/src/main/java/com/glsx/usedcar/controller/OssController.java
0 → 100644
View file @
1126675
package
com
.
glsx
.
usedcar
.
controller
;
import
com.glsx.usedcar.handler.AliyunOssHandler
;
import
com.glsx.usedcar.handler.AliyunToken
;
import
com.glsx.usedcar.resp.BaseResp
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.responses.ApiResponse
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @author yangwei
* @version 1.0
* @since 2026/04/24 12:10
*/
@RestController
@RequiredArgsConstructor
@RequestMapping
(
"/rest/oss"
)
@Tag
(
name
=
"aliyun-oss前端控制器"
,
description
=
"阿里云OSS相关操作"
)
public
class
OssController
{
private
final
AliyunOssHandler
aliyunOssHandler
;
@GetMapping
(
"/getToken"
)
@Operation
(
summary
=
"获取token信息"
,
description
=
"获取oss临时凭证"
)
@ApiResponse
(
responseCode
=
"200"
,
description
=
"获取OSS临时凭证"
)
public
BaseResp
<
AliyunToken
>
getToken
()
{
return
BaseResp
.
success
(
aliyunOssHandler
.
getToken
());
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment