|
@@ -14,6 +14,7 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
|
@@ -65,10 +66,10 @@ public class BizRouteInterfaceController extends BaseController {
|
|
|
}
|
|
|
|
|
|
// 添加路由接口
|
|
|
- @RequiresPermissions("bizRoute:bizRouteList:edit")
|
|
|
+// @RequiresPermissions("bizRoute:bizRouteList:edit")
|
|
|
@RequestMapping(value = "routesave")
|
|
|
@ResponseBody
|
|
|
- public String routesave(BizRoute bizRoute, Model model, RedirectAttributes redirectAttributes) {
|
|
|
+ public String routesave(@RequestBody BizRoute bizRoute, Model model, RedirectAttributes redirectAttributes) {
|
|
|
String randomId = getRandomId(ROUTE);
|
|
|
bizRoute.setRouteId(randomId);
|
|
|
if(bizRoute.getId() == null){
|
|
@@ -82,10 +83,10 @@ public class BizRouteInterfaceController extends BaseController {
|
|
|
}
|
|
|
|
|
|
// 添加应用接口
|
|
|
- @RequiresPermissions("bizApp:bizAppList:edit")
|
|
|
+// @RequiresPermissions("bizApp:bizAppList:edit")
|
|
|
@RequestMapping(value = "appsave")
|
|
|
@ResponseBody
|
|
|
- public String appsave(BizApp bizApp, Model model, RedirectAttributes redirectAttributes) {
|
|
|
+ public String appsave(@RequestBody BizApp bizApp, Model model, RedirectAttributes redirectAttributes) {
|
|
|
String randomId = getRandomId(APP);
|
|
|
bizApp.setAppId(randomId);
|
|
|
if(bizApp.getId() == null){
|
|
@@ -98,10 +99,10 @@ public class BizRouteInterfaceController extends BaseController {
|
|
|
}
|
|
|
|
|
|
// 添加签名
|
|
|
- @RequiresPermissions("bizSign:bizSignList:edit")
|
|
|
+// @RequiresPermissions("bizSign:bizSignList:edit")
|
|
|
@RequestMapping(value = "signsave")
|
|
|
@ResponseBody
|
|
|
- public void signsave(BizSign bizSign, Model model, RedirectAttributes redirectAttributes) {
|
|
|
+ public void signsave(@RequestBody BizSign bizSign, Model model, RedirectAttributes redirectAttributes) {
|
|
|
if(bizSign.getId() == null){
|
|
|
KeyPair keyPair = null;
|
|
|
try {
|
|
@@ -124,10 +125,10 @@ public class BizRouteInterfaceController extends BaseController {
|
|
|
|
|
|
|
|
|
// 添加鉴权
|
|
|
- @RequiresPermissions("gateway:auth:edit")
|
|
|
+// @RequiresPermissions("gateway:auth:edit")
|
|
|
@RequestMapping(value = "authsave")
|
|
|
@ResponseBody
|
|
|
- public void authsave(Auth auth, Model model, RedirectAttributes redirectAttributes) {
|
|
|
+ public void authsave(@RequestBody Auth auth, Model model, RedirectAttributes redirectAttributes) {
|
|
|
if (auth.getId() == null) {
|
|
|
auth.setCreatedBy(UserUtils.getUser().getName());
|
|
|
}
|
|
@@ -135,9 +136,10 @@ public class BizRouteInterfaceController extends BaseController {
|
|
|
}
|
|
|
|
|
|
// 添加计费
|
|
|
- @RequiresPermissions("gateway:charge:edit")
|
|
|
+// @RequiresPermissions("gateway:charge:edit")
|
|
|
@RequestMapping(value = "chargesave")
|
|
|
- public void chargesave(Charge charge, Model model, RedirectAttributes redirectAttributes) {
|
|
|
+ @ResponseBody
|
|
|
+ public void chargesave(@RequestBody Charge charge, Model model, RedirectAttributes redirectAttributes) {
|
|
|
if (charge.getId() == null) {
|
|
|
charge.setCreatedBy(UserUtils.getUser().getName());
|
|
|
charge.setCreatedAt(new Date());
|