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 0fa9ab7f
authored
Apr 18, 2026
by
章家宝
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat:【发拍小程序】发拍下架
1 parent
4be87096
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
5 deletions
aus-config/src/main/resources/config/aus-vr-api-dev.yaml
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-vr-api/pom.xml
aus-vr-api/src/main/java/com/glsx/usedcar/controller/VrAuditController.java
aus-config/src/main/resources/config/aus-vr-api-dev.yaml
View file @
0fa9ab7
...
@@ -19,9 +19,6 @@ spring:
...
@@ -19,9 +19,6 @@ spring:
shutdown
:
shutdown
:
await-termination
:
true
await-termination
:
true
await-termination-period
:
30s
await-termination-period
:
30s
thread-name-prefix
:
inspector
-dev-
thread-name-prefix
:
vr-api
-dev-
application
:
jwt
:
expiration
:
2592000
aus-core/src/main/java/com/glsx/usedcar/module/vrsystem/service/VrAuditService.java
View file @
0fa9ab7
...
@@ -227,6 +227,32 @@ public class VrAuditService {
...
@@ -227,6 +227,32 @@ public class VrAuditService {
}
}
/**
/**
* 下架发拍单
* <p>仅草稿状态(DRAFT)和待拍卖状态(WAIT_AUCTION)可以下架,下架后状态变更为已下架(OFF_SHELF)</p>
*
* @param id 发拍单ID
* @param operator 操作人名称
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
offShelf
(
Long
id
,
String
operator
)
{
VrAudit
entity
=
vrAuditRepository
.
findByIdAndDeleteFlag
(
id
,
"N"
)
.
orElseThrow
(()
->
new
BusinessCodeException
(
ErrorCodeEnum
.
DATA_NOT_EXIST
));
Integer
currentStatus
=
entity
.
getStatus
();
if
(
currentStatus
==
null
||
(
currentStatus
!=
VrAudit
.
PublishStatus
.
DRAFT
.
getValue
()
&&
currentStatus
!=
VrAudit
.
PublishStatus
.
WAIT_AUCTION
.
getValue
()))
{
log
.
warn
(
"下架发拍单失败,id={},当前status={}不允许下架"
,
id
,
currentStatus
);
throw
new
BusinessCodeException
(
ErrorCodeEnum
.
VR_AUDIT_STATUS_NOT_OFF_SHELF
);
}
entity
.
setStatus
(
VrAudit
.
PublishStatus
.
OFF_SHELF
.
getValue
());
vrAuditRepository
.
save
(
entity
);
log
.
info
(
"发拍单下架成功,id={},publishNo={},operator={},原状态={}"
,
entity
.
getId
(),
entity
.
getPublishNo
(),
operator
,
currentStatus
);
}
/**
* 生成发拍单号:FP + yyyyMMddHHmmss + 4位随机数
* 生成发拍单号:FP + yyyyMMddHHmmss + 4位随机数
*/
*/
private
String
generatePublishNo
()
{
private
String
generatePublishNo
()
{
...
...
aus-framework/src/main/java/org/summerframework/core/enums/ErrorCodeEnum.java
View file @
0fa9ab7
...
@@ -59,6 +59,7 @@ public enum ErrorCodeEnum {
...
@@ -59,6 +59,7 @@ public enum ErrorCodeEnum {
VR_TOKEN_STORE_ERROR
(
1002006
,
"Failed to store token"
),
VR_TOKEN_STORE_ERROR
(
1002006
,
"Failed to store token"
),
VR_VEHICLE_ALREADY_HAS_AUDIT
(
1002007
,
"该车辆已存在发拍单,不允许重复创建"
),
VR_VEHICLE_ALREADY_HAS_AUDIT
(
1002007
,
"该车辆已存在发拍单,不允许重复创建"
),
VR_AUDIT_STATUS_NOT_EDITABLE
(
1002008
,
"当前发拍单状态不允许编辑,仅草稿和已下架状态可编辑"
),
VR_AUDIT_STATUS_NOT_EDITABLE
(
1002008
,
"当前发拍单状态不允许编辑,仅草稿和已下架状态可编辑"
),
VR_AUDIT_STATUS_NOT_OFF_SHELF
(
1002009
,
"当前发拍单状态不允许下架,仅草稿和待拍卖状态可下架"
),
;
;
private
final
Integer
code
;
private
final
Integer
code
;
private
final
String
message
;
private
final
String
message
;
...
...
aus-vr-api/pom.xml
View file @
0fa9ab7
...
@@ -182,7 +182,7 @@
...
@@ -182,7 +182,7 @@
</dependencies>
</dependencies>
<build>
<build>
<finalName>
aus-
inspector
-1.0.0
</finalName>
<finalName>
aus-
vr-api
-1.0.0
</finalName>
<plugins>
<plugins>
<!-- 编译插件:配置Lombok和Spring Boot配置处理器 -->
<!-- 编译插件:配置Lombok和Spring Boot配置处理器 -->
<plugin>
<plugin>
...
...
aus-vr-api/src/main/java/com/glsx/usedcar/controller/VrAuditController.java
View file @
0fa9ab7
...
@@ -65,4 +65,16 @@ public class VrAuditController {
...
@@ -65,4 +65,16 @@ public class VrAuditController {
Page
<
VrAuditRespVO
>
result
=
vrAuditService
.
pageList
(
pagination
);
Page
<
VrAuditRespVO
>
result
=
vrAuditService
.
pageList
(
pagination
);
return
BaseResp
.
success
(
result
);
return
BaseResp
.
success
(
result
);
}
}
/**
* 下架发拍单
* <p>仅草稿状态和待拍卖状态可以下架</p>
*/
@PostMapping
(
"/offShelf/{id}"
)
@Operation
(
summary
=
"下架发拍单"
,
description
=
"仅草稿状态和待拍卖状态可以下架,下架后状态变更为已下架"
)
public
BaseResp
<
Void
>
offShelf
(
@PathVariable
Long
id
)
{
String
operator
=
UserContext
.
getUser
().
getUserName
();
vrAuditService
.
offShelf
(
id
,
operator
);
return
BaseResp
.
success
(
null
,
"下架成功"
);
}
}
}
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