|
|
@@ -2,22 +2,59 @@ package com.ytpm.controller;
|
|
|
|
|
|
import com.ytpm.agent.view.AgentUserInfo;
|
|
|
import com.ytpm.general.Result;
|
|
|
+import com.ytpm.general.ResultTable;
|
|
|
+import com.ytpm.middle.param.AgentUserListParam;
|
|
|
+import com.ytpm.middle.param.MiddleUserParam;
|
|
|
+import com.ytpm.middle.view.MiddleUserInfo;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.security.core.annotation.AuthenticationPrincipal;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
import springfox.documentation.annotations.ApiIgnore;
|
|
|
|
|
|
@Api(tags = "用户管理模块")
|
|
|
@RestController
|
|
|
@RequestMapping("/ytUser")
|
|
|
-public class UserController{
|
|
|
+public class UserController {
|
|
|
|
|
|
@ApiOperation(value = "获取当前登录用户", notes = "无需传参")
|
|
|
@GetMapping("/curUser")
|
|
|
- public Result<AgentUserInfo> getCurrentUser(@ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo){
|
|
|
+ public Result<AgentUserInfo> getCurrentUser(@ApiIgnore @AuthenticationPrincipal AgentUserInfo userInfo) {
|
|
|
return Result.resultObjOk(userInfo);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation("查询渠道所属用户列表")
|
|
|
+ @PostMapping("/queryList")
|
|
|
+ public ResultTable<MiddleUserInfo> queryList(@RequestBody AgentUserListParam param) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("新增渠道所属用户")
|
|
|
+ @PostMapping("/addOne")
|
|
|
+ public Result<String> addOne(@RequestBody MiddleUserParam param, @ApiIgnore @AuthenticationPrincipal MiddleUserInfo userInfo) {
|
|
|
+ param.setOperatorId(userInfo.getUserId());
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("修改渠道所属用户")
|
|
|
+ @PostMapping("/updateOne")
|
|
|
+ public Result<String> updateOne(@RequestBody MiddleUserParam param, @ApiIgnore @AuthenticationPrincipal MiddleUserInfo userInfo) {
|
|
|
+ param.setOperatorId(userInfo.getUserId());
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("删除渠道所属用户")
|
|
|
+ @ApiImplicitParam(name = "userId", value = "用户ID", required = true)
|
|
|
+ @GetMapping("/deleteOne")
|
|
|
+ public Result<String> deleteOne(@RequestParam(name = "userId")String userId) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
}
|