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
3c009632
Commit
3c009632
authored
Oct 29, 2025
by
何金镒
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
中文
parent
a203daee
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
27 deletions
+35
-27
src/main/java/com/ikonke/konkeaialibabamcp/controller/DifyControllerV2.java
...ikonke/konkeaialibabamcp/controller/DifyControllerV2.java
+10
-3
src/main/java/com/ikonke/konkeaialibabamcp/service/cdc/spaces/SpacesService.java
...e/konkeaialibabamcp/service/cdc/spaces/SpacesService.java
+25
-24
No files found.
src/main/java/com/ikonke/konkeaialibabamcp/controller/DifyControllerV2.java
View file @
3c009632
...
@@ -30,6 +30,9 @@ import org.springframework.web.bind.annotation.*;
...
@@ -30,6 +30,9 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.reactive.function.client.WebClient
;
import
org.springframework.web.reactive.function.client.WebClient
;
import
reactor.core.publisher.Flux
;
import
reactor.core.publisher.Flux
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.nio.charset.StandardCharsets
;
import
java.time.Duration
;
import
java.time.Duration
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
...
@@ -181,7 +184,7 @@ public class DifyControllerV2 {
...
@@ -181,7 +184,7 @@ public class DifyControllerV2 {
@GetMapping
(
"/chatSteamMessages"
)
@GetMapping
(
"/chatSteamMessages"
)
public
Flux
<
String
>
chatSteamMessages
(
@RequestParam
(
name
=
"query"
)
String
query
,
public
Flux
<
String
>
chatSteamMessages
(
@RequestParam
(
name
=
"query"
)
String
query
,
@RequestHeader
(
"sn"
)
String
sn
){
@RequestHeader
(
"sn"
)
String
sn
)
throws
UnsupportedEncodingException
{
log
.
info
(
"【{}】:开始 流式 对话, query:{}"
,
sn
,
query
);
log
.
info
(
"【{}】:开始 流式 对话, query:{}"
,
sn
,
query
);
QueryWrapper
<
CDCToken
>
wrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
CDCToken
>
wrapper
=
new
QueryWrapper
<>();
...
@@ -225,10 +228,14 @@ public class DifyControllerV2 {
...
@@ -225,10 +228,14 @@ public class DifyControllerV2 {
inputs
.
set
(
"communityId"
,
userEntity
.
getCommunityId
());
inputs
.
set
(
"communityId"
,
userEntity
.
getCommunityId
());
inputs
.
set
(
"easId"
,
userEntity
.
getEasId
());
inputs
.
set
(
"easId"
,
userEntity
.
getEasId
());
inputs
.
set
(
"roomId"
,
userEntity
.
getRoomInfo
().
getRoomId
());
inputs
.
set
(
"roomId"
,
userEntity
.
getRoomInfo
().
getRoomId
());
inputs
.
set
(
"roomName"
,
userEntity
.
getRoomInfo
().
getRoomId
());
// inputs.set("roomName",userEntity.getRoomInfo().getRoomName());
inputs
.
set
(
"roomName"
,
URLEncoder
.
encode
(
userEntity
.
getRoomInfo
().
getRoomName
(),
StandardCharsets
.
UTF_8
.
name
()));
inputs
.
set
(
"buildingId"
,
userEntity
.
getRoomInfo
().
getBuildingId
());
inputs
.
set
(
"buildingId"
,
userEntity
.
getRoomInfo
().
getBuildingId
());
inputs
.
set
(
"userPhone"
,
userEntity
.
getPhoneNum
());
inputs
.
set
(
"userPhone"
,
userEntity
.
getPhoneNum
());
inputs
.
set
(
"userName"
,
userEntity
.
getPhoneNum
());
// inputs.set("userName",userEntity.getPhoneNum());
inputs
.
set
(
"userName"
,
URLEncoder
.
encode
(
userEntity
.
getNickName
(),
StandardCharsets
.
UTF_8
.
name
()));
inputs
.
set
(
"today"
,
DateUtil
.
today
());
inputs
.
set
(
"today"
,
DateUtil
.
today
());
JSONObject
body
=
new
JSONObject
();
JSONObject
body
=
new
JSONObject
();
...
...
src/main/java/com/ikonke/konkeaialibabamcp/service/cdc/spaces/SpacesService.java
View file @
3c009632
...
@@ -89,30 +89,31 @@ public class SpacesService {
...
@@ -89,30 +89,31 @@ public class SpacesService {
Double
price
=
0.0
;
Double
price
=
0.0
;
//查详情-子空间-正常
//查详情-子空间-正常
String
s1
=
cdcHttpUtils
.
get
(
getSpacesRoomDetailUrl
+
id
,
sn
);
// String s1 = cdcHttpUtils.get(getSpacesRoomDetailUrl + id, sn);
JSONObject
spacesRoomDetailJson
=
JSONUtil
.
parseObj
(
s1
);
// JSONObject spacesRoomDetailJson = JSONUtil.parseObj(s1);
if
(
spacesRoomDetailJson
.
getInt
(
"code"
)
==
200
){
// if(spacesRoomDetailJson.getInt("code") == 200){
JSONObject
result
=
spacesRoomDetailJson
.
getJSONObject
(
"data"
);
// JSONObject result = spacesRoomDetailJson.getJSONObject("data");
// if(result!=null){
price
=
result
.
getDouble
(
"price"
);
// price = result.getDouble("price");
response_spaces
.
set
(
"price"
,
price
);
// response_spaces.set("price",price);
//
if
(
result
.
containsKey
(
"subspacePd"
)
&&
StrUtil
.
isNotBlank
(
result
.
getStr
(
"subspacePd"
))){
// if(result.containsKey("subspacePd") && StrUtil.isNotBlank(result.getStr("subspacePd"))){
JSONArray
subspacePd
=
result
.
getJSONArray
(
"subspacePd"
);
//子空间
// JSONArray subspacePd = result.getJSONArray("subspacePd");//子空间
JSONArray
child
=
new
JSONArray
();
// JSONArray child = new JSONArray();
for
(
int
j
=
0
;
j
<
subspacePd
.
size
();
j
++){
// for( int j = 0; j < subspacePd.size(); j++){
JSONObject
jsonObject1
=
subspacePd
.
getJSONObject
(
j
);
// JSONObject jsonObject1 = subspacePd.getJSONObject(j);
String
subspacePdName
=
jsonObject1
.
getStr
(
"name"
);
// String subspacePdName = jsonObject1.getStr("name");
String
subspacePdId
=
jsonObject1
.
getStr
(
"id"
);
// String subspacePdId = jsonObject1.getStr("id");
//
JSONObject
childJsonObject
=
new
JSONObject
();
// JSONObject childJsonObject = new JSONObject();
childJsonObject
.
set
(
"subspaceName"
,
subspacePdName
);
// childJsonObject.set("subspaceName", subspacePdName);
childJsonObject
.
set
(
"subspaceId"
,
subspacePdId
);
// childJsonObject.set("subspaceId", subspacePdId);
child
.
set
(
childJsonObject
);
// child.set(childJsonObject);
}
// }
response_spaces
.
set
(
"subspaces"
,
child
);
// response_spaces.set("subspaces", child);
}
// }
}
// }
// }
response
.
set
(
response_spaces
);
response
.
set
(
response_spaces
);
}
}
...
...
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