12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- 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;
- }
- }
|