Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
konke-ai-alibaba-mcp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
何金镒
konke-ai-alibaba-mcp
Commits
800f4f2f
Commit
800f4f2f
authored
Aug 14, 2025
by
何金镒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
建发:共享空间优惠券预约 mcp 接口优化 3
parent
c9dab933
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
src/main/java/com/ikonke/konkeaialibabamcp/aitools/CDCSpacesTools.java
.../com/ikonke/konkeaialibabamcp/aitools/CDCSpacesTools.java
+1
-5
src/main/java/com/ikonke/konkeaialibabamcp/service/cdc/spaces/SpacesService.java
...e/konkeaialibabamcp/service/cdc/spaces/SpacesService.java
+2
-2
No files found.
src/main/java/com/ikonke/konkeaialibabamcp/aitools/CDCSpacesTools.java
View file @
800f4f2f
...
@@ -74,11 +74,7 @@ public class CDCSpacesTools {
...
@@ -74,11 +74,7 @@ public class CDCSpacesTools {
log
.
info
(
"mcp调用--->bookingOrder..预约订单..sn:{},beginTime:{},endTime:{},roomId:{},roomSubspaceId:{},userQuantity:{}"
,
log
.
info
(
"mcp调用--->bookingOrder..预约订单..sn:{},beginTime:{},endTime:{},roomId:{},roomSubspaceId:{},userQuantity:{}"
,
sn
,
beginTime
,
endTime
,
roomId
,
subspaceId
,
userQuantity
);
sn
,
beginTime
,
endTime
,
roomId
,
subspaceId
,
userQuantity
);
try
{
try
{
if
(
spacesService
.
bookingOrder2
(
sn
,
beginTime
,
endTime
,
roomId
,
subspaceId
,
userQuantity
)){
return
spacesService
.
bookingOrder2
(
sn
,
beginTime
,
endTime
,
roomId
,
subspaceId
,
userQuantity
);
return
"预约成功"
;
}
else
{
return
"预约失败"
;
}
}
catch
(
StatefulException
e
){
}
catch
(
StatefulException
e
){
return
e
.
getMessage
();
return
e
.
getMessage
();
}
}
...
...
src/main/java/com/ikonke/konkeaialibabamcp/service/cdc/spaces/SpacesService.java
View file @
800f4f2f
...
@@ -296,7 +296,7 @@ public class SpacesService {
...
@@ -296,7 +296,7 @@ public class SpacesService {
*
*
* 预约订单,不使用钱 使用了优惠卷-自动查找优惠券
* 预约订单,不使用钱 使用了优惠卷-自动查找优惠券
*/
*/
public
boolean
bookingOrder2
(
String
sn
,
String
beginTime
,
String
endTime
,
String
roomId
,
String
subspaceId
,
int
userQuantity
){
public
String
bookingOrder2
(
String
sn
,
String
beginTime
,
String
endTime
,
String
roomId
,
String
subspaceId
,
int
userQuantity
){
if
(
StrUtil
.
isBlank
(
sn
)
||
StrUtil
.
isBlank
(
roomId
)
||
StrUtil
.
isBlank
(
beginTime
)
||
StrUtil
.
isBlank
(
endTime
)
||
userQuantity
<
1
){
if
(
StrUtil
.
isBlank
(
sn
)
||
StrUtil
.
isBlank
(
roomId
)
||
StrUtil
.
isBlank
(
beginTime
)
||
StrUtil
.
isBlank
(
endTime
)
||
userQuantity
<
1
){
throw
new
StatefulException
(
530
,
"参数错误"
);
throw
new
StatefulException
(
530
,
"参数错误"
);
}
}
...
@@ -374,7 +374,7 @@ public class SpacesService {
...
@@ -374,7 +374,7 @@ public class SpacesService {
String
spacesRoomOrder_post
=
cdcHttpUtils
.
post
(
spacesRoomOrderUrl
,
sn
,
param
.
toString
());
String
spacesRoomOrder_post
=
cdcHttpUtils
.
post
(
spacesRoomOrderUrl
,
sn
,
param
.
toString
());
JSONObject
spacesRoomOrder
=
new
JSONObject
(
spacesRoomOrder_post
);
JSONObject
spacesRoomOrder
=
new
JSONObject
(
spacesRoomOrder_post
);
if
(
spacesRoomOrder
.
getInt
(
"code"
)
==
200
){
if
(
spacesRoomOrder
.
getInt
(
"code"
)
==
200
){
return
true
;
return
"预约成功,预约订单号:"
+
spacesRoomOrder
.
getStr
(
"data"
)
;
}
else
{
}
else
{
throw
new
StatefulException
(
539
,
"预约失败"
);
throw
new
StatefulException
(
539
,
"预约失败"
);
}
}
...
...
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