|
@@ -2,6 +2,7 @@ package cn.reghao.tnb.user.app.controller;
|
|
|
|
|
|
|
|
import cn.reghao.jutil.jdk.result.Result;
|
|
import cn.reghao.jutil.jdk.result.Result;
|
|
|
import cn.reghao.jutil.web.WebResult;
|
|
import cn.reghao.jutil.web.WebResult;
|
|
|
|
|
+import cn.reghao.tnb.account.api.dto.AccountAvatar;
|
|
|
import cn.reghao.tnb.common.auth.AuthUser;
|
|
import cn.reghao.tnb.common.auth.AuthUser;
|
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
import cn.reghao.tnb.common.auth.UserContext;
|
|
|
import cn.reghao.tnb.user.app.model.dto.*;
|
|
import cn.reghao.tnb.user.app.model.dto.*;
|
|
@@ -21,6 +22,7 @@ import java.util.List;
|
|
|
@Tag(name = "用户联系人接口")
|
|
@Tag(name = "用户联系人接口")
|
|
|
@RestController
|
|
@RestController
|
|
|
@RequestMapping("/api/user/contact")
|
|
@RequestMapping("/api/user/contact")
|
|
|
|
|
+@AuthUser
|
|
|
public class UserContactController {
|
|
public class UserContactController {
|
|
|
private final ContactService contactService;
|
|
private final ContactService contactService;
|
|
|
|
|
|
|
@@ -28,6 +30,21 @@ public class UserContactController {
|
|
|
this.contactService = contactService;
|
|
this.contactService = contactService;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Operation(summary = "获取联系人列表", description = "N")
|
|
|
|
|
+ @GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
+ public String getContactList(@RequestParam("pn") int pageNumber) {
|
|
|
|
|
+ List<AccountAvatar> list = contactService.getContactList(pageNumber);
|
|
|
|
|
+ return WebResult.success(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @Operation(summary = "获取联系人列表", description = "N")
|
|
|
|
|
+ @GetMapping(value = "/list1", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
+ public String contactList() {
|
|
|
|
|
+ long loginUser = UserContext.getUserId();
|
|
|
|
|
+ List<ContactInfo> list = contactService.getContactList(loginUser);
|
|
|
|
|
+ return WebResult.success(list);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@Operation(summary = "查找联系人", description = "N")
|
|
@Operation(summary = "查找联系人", description = "N")
|
|
|
@GetMapping(value = "/search", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@GetMapping(value = "/search", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public String contactSearch(@RequestParam("mobile") String mobile) {
|
|
public String contactSearch(@RequestParam("mobile") String mobile) {
|
|
@@ -91,15 +108,6 @@ public class UserContactController {
|
|
|
return WebResult.success();
|
|
return WebResult.success();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- @AuthUser
|
|
|
|
|
- @Operation(summary = "获取联系人列表", description = "N")
|
|
|
|
|
- @GetMapping(value = "/list", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
|
|
- public String contactList() {
|
|
|
|
|
- long loginUser = UserContext.getUserId();
|
|
|
|
|
- List<ContactInfo> list = contactService.getContactList(loginUser);
|
|
|
|
|
- return WebResult.success(list);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
@Operation(summary = "设置联系人备注", description = "N")
|
|
@Operation(summary = "设置联系人备注", description = "N")
|
|
|
@PostMapping(value = "/remark", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
@PostMapping(value = "/remark", produces = MediaType.APPLICATION_JSON_VALUE)
|
|
|
public String contactEditRemark(@RequestBody @Validated ContactRemark contactRemark) {
|
|
public String contactEditRemark(@RequestBody @Validated ContactRemark contactRemark) {
|