|
@@ -75,8 +75,31 @@ public class EdsSocialApplicationController {
|
|
|
@PathVariable String type,
|
|
@PathVariable String type,
|
|
|
@PathVariable String account,
|
|
@PathVariable String account,
|
|
|
@PathVariable String friendAccount) {
|
|
@PathVariable String friendAccount) {
|
|
|
|
|
+ return friendDetail(cid, type, account, friendAccount, "");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 好友详情(好友账号走查询参数)。
|
|
|
|
|
+ *
|
|
|
|
|
+ * <p>源数据里好友账号可能为空;空路径段会被 Web 容器归一化后匹配不到路由,
|
|
|
|
|
+ * 前端在账号为空时改用本接口,避免 404「资源不存在」。空账号由 SQL 按
|
|
|
|
|
+ * {@code friend_account is null} 匹配,并可用好友昵称进一步缩小范围。</p>
|
|
|
|
|
+ */
|
|
|
|
|
+ @GetMapping("/friendDetail/{cid}/{type}/{account}")
|
|
|
|
|
+ public Result<EdsSocialApplicationFriendAccountDTO> getFriendDetailByQuery(
|
|
|
|
|
+ @PathVariable String cid,
|
|
|
|
|
+ @PathVariable String type,
|
|
|
|
|
+ @PathVariable String account,
|
|
|
|
|
+ @RequestParam(defaultValue = "") String friendAccount,
|
|
|
|
|
+ @RequestParam(defaultValue = "") String friendNickname) {
|
|
|
|
|
+ return friendDetail(cid, type, account, friendAccount, friendNickname);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private Result<EdsSocialApplicationFriendAccountDTO> friendDetail(
|
|
|
|
|
+ String cid, String type, String account, String friendAccount, String friendNickname) {
|
|
|
EdsSocialApplicationQuery query = query(cid, type, account, 1, -1);
|
|
EdsSocialApplicationQuery query = query(cid, type, account, 1, -1);
|
|
|
query.setFriendAccount(friendAccount);
|
|
query.setFriendAccount(friendAccount);
|
|
|
|
|
+ query.setFriendNickname(friendNickname);
|
|
|
return Result.succeed(socialService.getFriendDetail(query));
|
|
return Result.succeed(socialService.getFriendDetail(query));
|
|
|
}
|
|
}
|
|
|
|
|
|