Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
foodNexus-admin
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
副食品筹措管理平台
foodNexus-admin
Commits
68132d17
Commit
68132d17
authored
Oct 18, 2025
by
杨浩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
配送端
parent
3f4e305f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
2 deletions
+25
-2
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/controller/admin/deliverystaff/DeliveryStaffController.java
+10
-1
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/controller/admin/deliverystaff/vo/DeliveryStaffRespVO.java
+5
-0
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/enums/ErrorCodeConstants.java
+1
-0
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/service/deliverystaff/DeliveryStaffServiceImpl.java
+9
-0
foodnexus-module-mall/foodnexus-module-order/src/main/java/cn/iocoder/foodnexus/module/order/controller/app/delivery/DeliverySaleOrderController.java
+0
-1
No files found.
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/controller/admin/deliverystaff/DeliveryStaffController.java
View file @
68132d17
...
...
@@ -2,6 +2,9 @@ package cn.iocoder.foodnexus.module.operations.controller.admin.deliverystaff;
import
cn.iocoder.foodnexus.module.operations.service.deliverystaffcustomer.DeliveryStaffCustomerService
;
import
cn.iocoder.foodnexus.module.operations.service.vehicleinfo.VehicleInfoService
;
import
cn.iocoder.foodnexus.module.system.dal.dataobject.user.AdminUserDO
;
import
cn.iocoder.foodnexus.module.system.service.user.AdminUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
jakarta.annotation.Resource
;
import
org.springframework.validation.annotation.Validated
;
...
...
@@ -46,6 +49,9 @@ public class DeliveryStaffController {
@Resource
private
VehicleInfoService
vehicleInfoService
;
@Autowired
private
AdminUserService
userService
;
@PostMapping
(
"/create"
)
@Operation
(
summary
=
"创建配送员信息"
)
@PreAuthorize
(
"@ss.hasPermission('operation:delivery-staff:create')"
)
...
...
@@ -122,6 +128,7 @@ public class DeliveryStaffController {
item
.
setCustomerList
(
deliveryStaffCustomerService
.
queryCustomerListByDeliveryStaffId
(
item
.
getId
()));
item
.
setVehicleInfo
(
vehicleInfoService
.
queryByStaffId
(
item
.
getId
()));
item
.
setCustomerDeptList
(
deliveryStaffCustomerService
.
queryDeptListByStaffId
(
item
.
getId
()));
item
.
setUserName
(
Optional
.
ofNullable
(
userService
.
getUser
(
item
.
getUserId
())).
map
(
AdminUserDO:
:
getUsername
).
orElse
(
""
));
}));
}
...
...
@@ -130,7 +137,9 @@ public class DeliveryStaffController {
@PreAuthorize
(
"@ss.hasPermission('operation:delivery-staff:query')"
)
public
CommonResult
<
PageResult
<
DeliveryStaffRespVO
>>
getDeliveryStaffPage
(
@Valid
DeliveryStaffPageReqVO
pageReqVO
)
{
PageResult
<
DeliveryStaffDO
>
pageResult
=
deliveryStaffService
.
getDeliveryStaffPage
(
pageReqVO
);
return
success
(
BeanUtils
.
toBean
(
pageResult
,
DeliveryStaffRespVO
.
class
));
return
success
(
BeanUtils
.
toBean
(
pageResult
,
DeliveryStaffRespVO
.
class
,
item
->
{
item
.
setUserName
(
Optional
.
ofNullable
(
userService
.
getUser
(
item
.
getUserId
())).
map
(
AdminUserDO:
:
getUsername
).
orElse
(
""
));
}));
}
@GetMapping
(
"/export-excel"
)
...
...
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/controller/admin/deliverystaff/vo/DeliveryStaffRespVO.java
View file @
68132d17
...
...
@@ -80,6 +80,11 @@ public class DeliveryStaffRespVO {
@ExcelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@Schema
(
description
=
"关联系统用户id"
)
private
Long
userId
;
@Schema
(
description
=
"关联系统用户名"
)
private
String
userName
;
@Schema
(
description
=
"绑定车辆信息"
)
private
VehicleInfoRespVO
vehicleInfo
;
...
...
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/enums/ErrorCodeConstants.java
View file @
68132d17
...
...
@@ -16,6 +16,7 @@ public interface ErrorCodeConstants {
// ========== 配送员信息 1_008_011_000 ==========
ErrorCode
DELIVERY_STAFF_NOT_EXISTS
=
new
ErrorCode
(
1_008_011_000
,
"配送员信息不存在"
);
ErrorCode
DELIVERY_STAFF_ID_NUMBER_EXISTS
=
new
ErrorCode
(
1_008_011_001
,
"身份证号已存在"
);
// ========== 配送员客户绑定 1_008_012_000 ==========
ErrorCode
DELIVERY_STAFF_CUSTOMER_NOT_EXISTS
=
new
ErrorCode
(
1_008_012_000
,
"配送员客户绑定不存在"
);
...
...
foodnexus-module-mall/foodnexus-module-operations/src/main/java/cn/iocoder/foodnexus/module/operations/service/deliverystaff/DeliveryStaffServiceImpl.java
View file @
68132d17
...
...
@@ -56,6 +56,7 @@ public class DeliveryStaffServiceImpl implements DeliveryStaffService, DeliveryS
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
Long
createDeliveryStaff
(
DeliveryStaffSaveReqVO
createReqVO
)
{
validStaff
(
createReqVO
);
// 插入
DeliveryStaffDO
deliveryStaff
=
BeanUtils
.
toBean
(
createReqVO
,
DeliveryStaffDO
.
class
);
String
userName
=
validStaffName
(
createReqVO
.
getName
(),
1
);
...
...
@@ -82,6 +83,14 @@ public class DeliveryStaffServiceImpl implements DeliveryStaffService, DeliveryS
return
deliveryStaff
.
getId
();
}
private
void
validStaff
(
DeliveryStaffSaveReqVO
createReqVO
)
{
if
(
deliveryStaffMapper
.
exists
(
Wrappers
.<
DeliveryStaffDO
>
lambdaQuery
()
.
eq
(
DeliveryStaffDO:
:
getIdNumber
,
createReqVO
.
getIdNumber
())))
{
throw
exception
(
DELIVERY_STAFF_ID_NUMBER_EXISTS
);
}
}
private
String
validStaffName
(
String
name
,
int
suffix
)
{
AdminUserDO
user
=
userService
.
getUserByUsername
(
name
);
if
(
CommonUtil
.
isNotEmpty
(
user
))
{
...
...
foodnexus-module-mall/foodnexus-module-order/src/main/java/cn/iocoder/foodnexus/module/order/controller/app/delivery/DeliverySaleOrderController.java
View file @
68132d17
...
...
@@ -98,7 +98,6 @@ public class DeliverySaleOrderController {
@Operation
(
summary
=
"接单大厅 - 查询配送单"
)
@Parameter
(
name
=
"type"
,
description
=
"0-待接单 1-待配送 2-配送中"
,
required
=
true
,
example
=
"1024"
)
public
CommonResult
<
PageResult
<
DeliverySaleOrderRespVO
>>
getSaleOrderPage
(
@Valid
PageParam
pageReq
,
@InEnum
(
value
=
SaleOrderPickUpStatus
.
class
)
@RequestParam
(
"type"
)
Integer
type
)
{
ErpSaleOrderPageReqVO
pageReqVO
=
new
ErpSaleOrderPageReqVO
();
...
...
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