Skip to content

Commit ae68c47

Browse files
committed
Merge branch 'lopdop'
2 parents d123560 + a996b36 commit ae68c47

File tree

6 files changed

+19
-18
lines changed

6 files changed

+19
-18
lines changed

CrazyChatParent/parent/group/src/main/java/com/crazychat/group/controller/GroupController.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public Result groupMembers(@PathVariable("group_id") String groupId) {
111111
* @return
112112
*/
113113
@GetMapping("/name/{group_id}")
114-
public String getGroupNameById(@PathVariable("group_id") String groupId) {
115-
return groupService.getGroupById(groupId).getName();
114+
public byte[] getGroupNameById(@PathVariable("group_id") String groupId) {
115+
return groupService.getGroupById(groupId).getName().getBytes();
116116
}
117117

118118
/**
@@ -172,8 +172,8 @@ public Result createGroup(@RequestBody Map<String, Object> map) {
172172
* @return
173173
*/
174174
@GetMapping("/group_picture/{group_id}")
175-
public String getGroupPictureById(@PathVariable("group_id") String groupId) {
176-
return groupService.getGroupById(groupId).getPicture();
175+
public byte[] getGroupPictureById(@PathVariable("group_id") String groupId) {
176+
return groupService.getGroupById(groupId).getPicture().getBytes();
177177
}
178178

179179
/**

CrazyChatParent/parent/relationchat/src/main/java/com/crazychat/relationchat/client/GroupClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ public interface GroupClient {
1616
* @return
1717
*/
1818
@GetMapping("/group/name/{group_id}")
19-
String getGroupNameById(@PathVariable("group_id") String groupId);
19+
byte[] getGroupNameById(@PathVariable("group_id") String groupId);
2020

2121
/**
2222
* 获取群聊的图片
2323
* @param groupId
2424
* @return
2525
*/
2626
@GetMapping("/group/group_picture/{group_id}")
27-
String getGroupPictureById(@PathVariable("group_id") String groupId);
27+
byte[] getGroupPictureById(@PathVariable("group_id") String groupId);
2828
}

CrazyChatParent/parent/relationchat/src/main/java/com/crazychat/relationchat/client/impl/GroupClientImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
public class GroupClientImpl implements GroupClient {
99

1010
@Override
11-
public String getGroupNameById(String groupId) {
12-
return "NOT AVALIABLE";
11+
public byte[] getGroupNameById(String groupId) {
12+
return "NOT AVALIABLE".getBytes();
1313
}
1414

1515
@Override
16-
public String getGroupPictureById(String groupId) {
17-
return "NOT AVALIABLE";
16+
public byte[] getGroupPictureById(String groupId) {
17+
return "NOT AVALIABLE".getBytes();
1818
}
1919
}

CrazyChatParent/parent/relationchat/src/main/java/com/crazychat/relationchat/service/RelationChatService.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ public class RelationChatService {
3131
@Resource
3232
private ChatClient chatClient;
3333

34-
@Resource(name = "idWorker")
35-
private IdWorker idCreater;
36-
3734
@Resource
3835
private RedisTemplate redisTemplate;
3936

@@ -65,9 +62,9 @@ public List<Map<String, Object>> getRelatioChatList(String userId) {
6562
map.put("lastMsg", message);
6663
} else {
6764
// 群
68-
String groupName = groupClient.getGroupNameById(relationChat.getOtherId());
65+
String groupName = new String(groupClient.getGroupNameById(relationChat.getOtherId()));
6966
map.put("name", groupName);
70-
String picture = groupClient.getGroupPictureById(relationChat.getOtherId());
67+
String picture = new String(groupClient.getGroupPictureById(relationChat.getOtherId()));
7168
map.put("picture", picture);
7269
// 返回的data数据
7370
Map<String, String> map1 = new HashMap<>();

CrazyChatParent/parent/user/src/main/resources/application.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ server:
44
web-resource-path: C:\Users\Eric Jin\Desktop\static\
55

66
spring:
7-
# 配置静态路径
8-
resources:
9-
static-locations: classpath:/META-INF/resources/, classpath:/static, classpath:/resources/, classpath:/public/, file:${web-resource-path}
107
application:
118
name: crazychat-user
129
datasource: # 配置数据源

CrazyChatParent/parent/web/src/main/resources/application.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
server:
22
port: 4140
3+
4+
5+
web-resource-path: C:\Users\Eric Jin\Desktop\static\
36
spring:
47
application:
58
name: crazychat-web
9+
# 配置静态路径
10+
resources:
11+
static-locations: classpath:/META-INF/resources/, classpath:/static, classpath:/resources/, classpath:/public/, file:${web-resource-path}
12+
613
eureka:
714
client:
815
serviceUrl:

0 commit comments

Comments
 (0)