From 1c23bfe752fea2e815daa4bdd93859dee9e5b87c Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Thu, 22 Apr 2021 18:44:50 +0800
Subject: [PATCH] 20210422
---
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