Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanbaoming
jiedao-api-boot-master
Commits
c12d9a8c
Commit
c12d9a8c
authored
Oct 19, 2024
by
zhengyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
检查目的国与渠道是否匹配
parent
7d745210
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
WarehouseController.java
...itory/controller/admin/warehouse/WarehouseController.java
+4
-0
AppWarehouseController.java
...tory/controller/app/warehouse/AppWarehouseController.java
+4
-0
No files found.
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/admin/warehouse/WarehouseController.java
View file @
c12d9a8c
...
@@ -33,6 +33,7 @@ import java.io.IOException;
...
@@ -33,6 +33,7 @@ import java.io.IOException;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
error
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
operatelog
.
core
.
enums
.
OperateTypeEnum
.
EXPORT
;
...
@@ -216,6 +217,9 @@ public class WarehouseController {
...
@@ -216,6 +217,9 @@ public class WarehouseController {
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
applicationContext
.
publishEvent
(
channelInfoEvent
);
applicationContext
.
publishEvent
(
channelInfoEvent
);
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
requestVO
.
getDestCountryId
())
&&
requestVO
.
getDestCountryId
()
>
0L
&&
requestVO
.
getDestCountryId
()
!=
channelInfoEvent
.
getCountryId
())
{
return
error
(
400
,
"目的国与渠道不匹配"
);
}
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
}
}
}
}
...
...
yudao-module-depository/yudao-module-depository-rest/src/main/java/cn/iocoder/yudao/module/depository/controller/app/warehouse/AppWarehouseController.java
View file @
c12d9a8c
...
@@ -29,6 +29,7 @@ import javax.validation.Valid;
...
@@ -29,6 +29,7 @@ import javax.validation.Valid;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
error
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
import
static
cn
.
iocoder
.
yudao
.
framework
.
common
.
pojo
.
CommonResult
.
success
;
@Api
(
tags
=
"app-web - 仓库"
)
@Api
(
tags
=
"app-web - 仓库"
)
...
@@ -137,6 +138,9 @@ public class AppWarehouseController {
...
@@ -137,6 +138,9 @@ public class AppWarehouseController {
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
channelInfoEvent
.
setChannelId
(
requestVO
.
getChannelId
());
applicationContext
.
publishEvent
(
channelInfoEvent
);
applicationContext
.
publishEvent
(
channelInfoEvent
);
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
channelInfoEvent
.
getCountryId
())
&&
channelInfoEvent
.
getCountryId
()
>
0L
){
if
(
Objects
.
nonNull
(
requestVO
.
getDestCountryId
())
&&
requestVO
.
getDestCountryId
()
>
0L
&&
requestVO
.
getDestCountryId
()
!=
channelInfoEvent
.
getCountryId
())
{
return
error
(
400
,
"目的国与渠道不匹配"
);
}
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
requestVO
.
setDestCountryId
(
channelInfoEvent
.
getCountryId
());
}
}
}
}
...
...
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