Toggle navigation
Toggle navigation
This project
Loading...
Sign in
jiujian
/
client-customer-order-api
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
zhuyifan
2025-04-16 15:49:07 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3a1580107f2c265b85524af4099f52f11e3b0342
3a158010
1 parent
a1986331
fix
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
src/main/java/com/infoloop/tianting/model/dto/DinerDTO.java
src/main/java/com/infoloop/tianting/service/impl/DinerServiceImpl.java
src/main/java/com/infoloop/tianting/model/dto/DinerDTO.java
View file @
3a15801
...
...
@@ -55,6 +55,9 @@ public class DinerDTO {
@NotNull
(
message
=
"班级不能为空"
)
private
Integer
classId
;
@ApiModelProperty
(
value
=
"学号"
)
private
String
studentNo
;
@ApiModelProperty
(
value
=
"姓名"
)
private
String
name
;
}
...
...
src/main/java/com/infoloop/tianting/service/impl/DinerServiceImpl.java
View file @
3a15801
...
...
@@ -116,11 +116,11 @@ public class DinerServiceImpl implements DinerService {
throw
ClientEndExceptions
.
IncorrectRequestValue
.
build
(
ErrorCodeEnum
.
CLIENT_CODE_NOT_EXISTS
);
}
final
var
singleClientRpcResponse
=
clientsByCodes
.
get
(
0
);
if
(
diner
.
getClientId
()
==
singleClientRpcResponse
.
getId
()
&&
diner
.
getClassId
()
==
updateDinerDTO
.
getClassId
()
&&
!
diner
.
getName
().
equals
(
updateDinerDTO
.
getName
()))
{
if
(
diner
.
getClientId
()
==
singleClientRpcResponse
.
getId
()
&&
diner
.
getClassId
()
==
updateDinerDTO
.
getClassId
()
&&
diner
.
getStudentNo
().
equals
(
updateDinerDTO
.
getStudentNo
())
&&
!
diner
.
getName
().
equals
(
updateDinerDTO
.
getName
()))
{
mealOrderServiceRpcClient
.
updateDiner
(
loginInfo
,
DinerModification
.
newBuilder
().
setId
(
diner
.
getId
()).
setShouldUpdateName
(
true
).
setName
(
updateDinerDTO
.
getName
()).
build
());
return
;
}
final
var
diners
=
mealOrderServiceRpcClient
.
queryDinersByCondition
(
loginInfo
.
getEnterpriseId
(),
List
.
of
(
singleClientRpcResponse
.
getId
()),
List
.
of
(
updateDinerDTO
.
getClassId
()),
diner
.
getStudentNo
());
final
var
diners
=
mealOrderServiceRpcClient
.
queryDinersByCondition
(
loginInfo
.
getEnterpriseId
(),
List
.
of
(
singleClientRpcResponse
.
getId
()),
List
.
of
(
updateDinerDTO
.
getClassId
()),
updateDinerDTO
.
getStudentNo
());
if
(!
diners
.
isEmpty
())
{
throw
ClientEndExceptions
.
IncorrectRequestValue
.
build
(
ErrorCodeEnum
.
DINER_ALREADY_EXISTS
);
}
...
...
Please
register
or
login
to post a comment