|
@@ -1,5 +1,8 @@
|
|
|
package com.itstyle.modules.web.controller;
|
|
|
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
@@ -8,23 +11,25 @@ import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import com.itstyle.common.utils.DateUtil;
|
|
|
-
|
|
|
+@Api(tags ="支付后台")
|
|
|
@Controller
|
|
|
@RequestMapping(value = "pay")
|
|
|
public class PayController {
|
|
|
private static final Logger logger = LoggerFactory.getLogger(PayController.class);
|
|
|
|
|
|
- @RequestMapping("/index")
|
|
|
+ @ApiOperation(value="登陆首页")
|
|
|
+ @RequestMapping(value="index",method=RequestMethod.GET)
|
|
|
public String index() {
|
|
|
logger.info("登陆首页");
|
|
|
return "web/index";
|
|
|
}
|
|
|
- @RequestMapping(value = "login")
|
|
|
- @ResponseBody
|
|
|
- public String login(HttpServletRequest request, HttpServletResponse response,
|
|
|
+ @ApiOperation(value="登陆")
|
|
|
+ @RequestMapping(value="login",method=RequestMethod.POST)
|
|
|
+ public @ResponseBody String login(HttpServletRequest request, HttpServletResponse response,
|
|
|
String account,String password) throws Exception {
|
|
|
logger.info("登陆");
|
|
|
String param = "false";
|
|
@@ -33,7 +38,8 @@ public class PayController {
|
|
|
}
|
|
|
return param;
|
|
|
}
|
|
|
- @RequestMapping(value = "main")
|
|
|
+ @ApiOperation(value="后台展示")
|
|
|
+ @RequestMapping(value="main",method=RequestMethod.GET)
|
|
|
public String main(HttpServletRequest request, HttpServletResponse response,Model model) throws Exception {
|
|
|
model.addAttribute("ip", "192.168.1.66");
|
|
|
model.addAttribute("address", "青岛");
|