|
@@ -1,33 +1,46 @@
|
|
|
-//package com.ym.mec.collectfee.controller;
|
|
|
-//
|
|
|
-//import com.ym.mec.collectfee.common.web.BaseController;
|
|
|
-//import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-//import org.springframework.validation.annotation.Validated;
|
|
|
-//import org.springframework.web.bind.annotation.*;
|
|
|
-//
|
|
|
-///**
|
|
|
-// * 乐团
|
|
|
-// */
|
|
|
-//@RestController
|
|
|
-//@RequestMapping("orchestra")
|
|
|
-//public class OrchestraController extends BaseController {
|
|
|
-//
|
|
|
-// @Autowired
|
|
|
-// ApplyInfoService applyInfoService;
|
|
|
-//
|
|
|
-// /**
|
|
|
-// * 乐团报名
|
|
|
-// */
|
|
|
-// @PostMapping("/apply")
|
|
|
-// public void apply(@ModelAttribute @Validated ApplyInfo applyInfo) throws Exception {
|
|
|
-// long id = applyInfoService.insert(applyInfo);
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-// @GetMapping("/applyinfo")
|
|
|
-// public void applyInfo(int id){
|
|
|
-// applyInfoService
|
|
|
-// }
|
|
|
-//
|
|
|
-//
|
|
|
-//}
|
|
|
+package com.ym.mec.collectfee.controller;
|
|
|
+
|
|
|
+import com.ym.mec.collectfee.common.web.BaseController;
|
|
|
+import com.ym.mec.collectfee.entity.ApplyInfo;
|
|
|
+import com.ym.mec.collectfee.service.ApplyInfoService;
|
|
|
+
|
|
|
+import org.apache.ibatis.annotations.Param;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 乐团
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("orchestra")
|
|
|
+public class OrchestraController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private ApplyInfoService applyInfoService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 乐团报名
|
|
|
+ */
|
|
|
+ @PostMapping("/apply")
|
|
|
+ public Object apply(@ModelAttribute @Validated ApplyInfo applyInfo) throws Exception {
|
|
|
+ System.out.println(applyInfo);
|
|
|
+ return applyInfoService.insert(applyInfo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据手机获取报名信息
|
|
|
+ * @param mobile
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @RequestMapping("/applyinfo")
|
|
|
+ public ApplyInfo applyInfo(@Param("patriarchPhone") String mobile) {
|
|
|
+ System.out.println(mobile);
|
|
|
+ ApplyInfo applyInfoByMobile = applyInfoService.getApplyInfoByMobile(mobile);
|
|
|
+ System.out.println(applyInfoByMobile);
|
|
|
+ return applyInfoByMobile;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|