|
@@ -2,13 +2,19 @@ package com.ym.mec.collectfee.controller;
|
|
|
|
|
|
import com.ym.mec.collectfee.common.web.BaseController;
|
|
|
import com.ym.mec.collectfee.service.OrderService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
@RestController()
|
|
|
@RequestMapping("order")
|
|
|
+@Api("订单服务")
|
|
|
public class OrderController extends BaseController {
|
|
|
|
|
|
@Autowired
|
|
@@ -19,7 +25,9 @@ public class OrderController extends BaseController {
|
|
|
* @param userId
|
|
|
* @return
|
|
|
*/
|
|
|
- @PostMapping("/get")
|
|
|
+ @PostMapping("/getOrderList")
|
|
|
+ @ApiOperation(value = "根据学生编号,获取订单列表")
|
|
|
+ @ApiImplicitParams({ @ApiImplicitParam(name = "userId", value = "学生编号", required = true, dataType = "Integer")})
|
|
|
public Object getOrders(Integer userId){
|
|
|
return succeed(orderService.getOrderByUserId(userId));
|
|
|
}
|
|
@@ -31,6 +39,9 @@ public class OrderController extends BaseController {
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/applyNum")
|
|
|
+ @ApiOperation(value = "根据乐团名称、声部名称,查询报名人数")
|
|
|
+ @ApiImplicitParams({ @ApiImplicitParam(name = "poName", value = "乐团名称", required = true, dataType = "String"),
|
|
|
+ @ApiImplicitParam(name = "voicePart", value = "声部名称", required = true, dataType = "String")})
|
|
|
public Object queryNum(String poName,String voicePart){
|
|
|
return orderService.countOrder(poName, voicePart);
|
|
|
}
|
|
@@ -50,9 +61,8 @@ public class OrderController extends BaseController {
|
|
|
* @param schoolId
|
|
|
* @return
|
|
|
*/
|
|
|
- @RequestMapping("/getSchoolDetail")
|
|
|
+ @GetMapping("/getSchoolDetail")
|
|
|
public Object getSchoolDetail(Integer schoolId,Integer clazzId){
|
|
|
return orderService.getSchoolDetail(schoolId,clazzId);
|
|
|
}
|
|
|
-
|
|
|
}
|