|
@@ -7,6 +7,7 @@ import com.ym.mec.collectfee.service.ApplyInfoService;
|
|
|
import com.ym.mec.collectfee.service.CourseGroupInfoService;
|
|
|
import com.ym.mec.collectfee.service.OrderService;
|
|
|
import com.ym.mec.collectfee.service.SchoolService;
|
|
|
+import com.ym.mec.collectfee.utils.Constants;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiImplicitParam;
|
|
|
import io.swagger.annotations.ApiImplicitParams;
|
|
@@ -20,6 +21,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
|
|
|
@RestController()
|
|
|
@RequestMapping("user")
|
|
@@ -48,7 +50,7 @@ public class UserController extends BaseController {
|
|
|
@ApiImplicitParam(name = "clazzId", value = "乐团编号", required = true, dataType = "Integer")})
|
|
|
public Object getUserDetailByPhone(String phone,Integer clazzId){
|
|
|
if(StringUtils.isEmpty(phone) || clazzId == null){
|
|
|
- return failed("参数校验异常");
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
}
|
|
|
ApplyInfo userByPhone = applyInfoService.findUserByPhone(phone, clazzId);
|
|
|
School school = schoolService.get(clazzId);
|
|
@@ -79,7 +81,7 @@ public class UserController extends BaseController {
|
|
|
return failed("报名失败");
|
|
|
}
|
|
|
}
|
|
|
- return failed();
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -92,6 +94,9 @@ public class UserController extends BaseController {
|
|
|
@ApiImplicitParams({ @ApiImplicitParam(name = "clazzId", value = "乐团编号", required = true, dataType = "Integer"),
|
|
|
@ApiImplicitParam(name = "schoolId", value = "学校编号", required = true, dataType = "Integer")})
|
|
|
public Object getSchoolDetail(Integer schoolId,Integer clazzId){
|
|
|
+ if(schoolId == null || clazzId == null){
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
+ }
|
|
|
return succeed(orderService.getSchoolDetail(schoolId,clazzId));
|
|
|
}
|
|
|
|
|
@@ -103,6 +108,9 @@ public class UserController extends BaseController {
|
|
|
@ApiOperation(value = "根据学生编号获取乐团注册页面数据")
|
|
|
@PostMapping("/getUserRegisterViewDetail")
|
|
|
public Object getUserRegisterViewDetail(Integer stuId){
|
|
|
+ if(stuId == null){
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
+ }
|
|
|
return succeed(applyInfoService.getUserRegisterViewDetail(stuId));
|
|
|
}
|
|
|
|
|
@@ -123,6 +131,9 @@ public class UserController extends BaseController {
|
|
|
@ApiOperation(value = "根据乐团编号,获取乐团课程组列表")
|
|
|
@ApiImplicitParams({ @ApiImplicitParam(name = "clazzId", value = "乐团编号", required = true, dataType = "Integer")})
|
|
|
public Object getCourses(Integer clazzId){
|
|
|
+ if(clazzId == null){
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
+ }
|
|
|
return succeed(courseGroupInfoService.getCourses(clazzId));
|
|
|
}
|
|
|
|
|
@@ -147,6 +158,9 @@ public class UserController extends BaseController {
|
|
|
@ApiOperation(value = "获取学校详情")
|
|
|
@GetMapping("/getSchool")
|
|
|
public Object getSchool(Integer schoolId){
|
|
|
+ if(schoolId == null){
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
+ }
|
|
|
return succeed(applyInfoService.get(schoolId));
|
|
|
}
|
|
|
|
|
@@ -154,11 +168,11 @@ public class UserController extends BaseController {
|
|
|
* 保存学校列表
|
|
|
* @return
|
|
|
*/
|
|
|
- @GetMapping("/saveSeminary")
|
|
|
- public Object saveSeminary(){
|
|
|
- applyInfoService.saveSeminary();
|
|
|
- return succeed();
|
|
|
- }
|
|
|
+// @GetMapping("/saveSeminary")
|
|
|
+// public Object saveSeminary(){
|
|
|
+// applyInfoService.saveSeminary();
|
|
|
+// return succeed();
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 修改乐团信息
|
|
@@ -185,12 +199,26 @@ public class UserController extends BaseController {
|
|
|
return succeed("修改成功");
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 修改学生信息
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation(value = "批量调剂学员专业")
|
|
|
+ @PostMapping("/updateUserSub")
|
|
|
+ public Object updateUserSub(String userId,Integer subId,Integer courseId){
|
|
|
+ if(StringUtils.isEmpty(userId) || subId == null || courseId == null){
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
+ }
|
|
|
+ applyInfoService.updateUserSub(userId,subId,courseId);
|
|
|
+ return succeed("修改成功");
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value = "学员课程班查询,本接口用于查询指定学员报名的课程班(小课或乐团)列表")
|
|
|
@PostMapping("/queryUserCourse")
|
|
|
@ApiImplicitParams({ @ApiImplicitParam(name = "userId", value = "用户编号", required = true, dataType = "Integer")})
|
|
|
public Object queryUserCourse(Integer userId){
|
|
|
if(userId == null){
|
|
|
- return failed("参数校验异常");
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
}
|
|
|
return succeed(applyInfoService.queryUserCourse(userId));
|
|
|
}
|
|
@@ -199,11 +227,11 @@ public class UserController extends BaseController {
|
|
|
* 推送学生续费成功的订单数据到mec
|
|
|
* @return
|
|
|
*/
|
|
|
- @PostMapping("/pushRenew")
|
|
|
- public Object pushRenew(RenewBean renewBean){
|
|
|
- applyInfoService.pushRenew(renewBean);
|
|
|
- return succeed();
|
|
|
- }
|
|
|
+// @PostMapping("/pushRenew")
|
|
|
+// public Object pushRenew(RenewBean renewBean){
|
|
|
+// applyInfoService.pushRenew(renewBean);
|
|
|
+// return succeed();
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 查询mec用户信息
|
|
@@ -211,6 +239,9 @@ public class UserController extends BaseController {
|
|
|
*/
|
|
|
@PostMapping("/findMecUser")
|
|
|
public Object findMecUser(Integer userId){
|
|
|
+ if(userId == null){
|
|
|
+ return failed(Constants.PARAM_VERIFY_ERROR_MSG);
|
|
|
+ }
|
|
|
return succeed(applyInfoService.findMecUser(userId));
|
|
|
}
|
|
|
}
|