From fe86da92bf703556de6030ec40f3c3bf5b999f91 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Fri, 23 Apr 2021 14:47:02 +0800
Subject: [PATCH] 20210423

---
 src/main/java/com/xcong/excoin/modules/agent/controller/AgentController.java |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/modules/agent/controller/AgentController.java b/src/main/java/com/xcong/excoin/modules/agent/controller/AgentController.java
index 62d1c14..96fcbba 100644
--- a/src/main/java/com/xcong/excoin/modules/agent/controller/AgentController.java
+++ b/src/main/java/com/xcong/excoin/modules/agent/controller/AgentController.java
@@ -2,6 +2,7 @@
 
 import com.baomidou.mybatisplus.core.toolkit.StringPool;
 import com.xcong.excoin.common.annotation.ControllerEndpoint;
+import com.xcong.excoin.common.annotation.SubmitRepeat;
 import com.xcong.excoin.common.controller.BaseController;
 import com.xcong.excoin.common.entity.FebsResponse;
 import com.xcong.excoin.common.entity.QueryRequest;
@@ -41,11 +42,13 @@
         return new FebsResponse().success().data(map);
     }
 
+//    @SubmitRepeat
     @PostMapping("add")
     @RequiresPermissions("agent:add")
     @ControllerEndpoint(operation = "新增代理商", exceptionMessage = "新增代理商失败")
     public FebsResponse add(@Valid AgentUser agentUser) {
         User user = getCurrentUser();
+        log.info("{}添加代理商{}", user.getInviteId(), agentUser.getInviteId());
         agentService.addAgent(agentUser, user);
         return new FebsResponse().success();
     }
@@ -66,4 +69,13 @@
         agentService.resetPwd(id);
         return new FebsResponse().success();
     }
+
+    @PostMapping("edit")
+    @RequiresPermissions("agent:edit")
+    @ControllerEndpoint(operation = "修改代理商", exceptionMessage = "修改代理商失败")
+    public FebsResponse edit(@Valid AgentUser agentUser) {
+        User user = getCurrentUser();
+        agentService.editAgent(agentUser, user);
+        return new FebsResponse().success();
+    }
 }

--
Gitblit v1.9.1