|  | @@ -3,8 +3,10 @@ package com.ym.mec.student.controller;
 | 
											
												
													
														|  |  import com.ym.mec.auth.api.client.SysUserFeignService;
 |  |  import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
											
												
													
														|  |  import com.ym.mec.auth.api.entity.SysUser;
 |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.dto.DegreeRegistrationActivityDto;
 |  |  import com.ym.mec.biz.dal.dto.DegreeRegistrationActivityDto;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.dal.entity.ChildrenDayReserve;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
 |  |  import com.ym.mec.biz.dal.entity.SporadicChargeInfo;
 | 
											
												
													
														|  |  import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 |  |  import com.ym.mec.biz.dal.enums.SporadicChargeTypeEnum;
 | 
											
												
													
														|  | 
 |  | +import com.ym.mec.biz.service.ChildrenDayReserveService;
 | 
											
												
													
														|  |  import com.ym.mec.common.controller.BaseController;
 |  |  import com.ym.mec.common.controller.BaseController;
 | 
											
												
													
														|  |  import com.ym.mec.common.entity.HttpResponseResult;
 |  |  import com.ym.mec.common.entity.HttpResponseResult;
 | 
											
												
													
														|  |  import com.ym.mec.common.exception.BizException;
 |  |  import com.ym.mec.common.exception.BizException;
 | 
											
										
											
												
													
														|  | @@ -26,16 +28,27 @@ import java.util.Objects;
 | 
											
												
													
														|  |  public class ChildrenDayController extends BaseController {
 |  |  public class ChildrenDayController extends BaseController {
 | 
											
												
													
														|  |      @Autowired
 |  |      @Autowired
 | 
											
												
													
														|  |      private SysUserFeignService sysUserFeignService;
 |  |      private SysUserFeignService sysUserFeignService;
 | 
											
												
													
														|  | 
 |  | +    @Autowired
 | 
											
												
													
														|  | 
 |  | +    private ChildrenDayReserveService childrenDayReserveService;
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |      @ApiOperation(value = "占位")
 |  |      @ApiOperation(value = "占位")
 | 
											
												
													
														|  |      @PostMapping("/reserve")
 |  |      @PostMapping("/reserve")
 | 
											
												
													
														|  | -    public HttpResponseResult reserve() {
 |  | 
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<ChildrenDayReserve> reserve() {
 | 
											
												
													
														|  |          SysUser user = sysUserFeignService.queryUserInfo();
 |  |          SysUser user = sysUserFeignService.queryUserInfo();
 | 
											
												
													
														|  |          if (Objects.isNull(user)) {
 |  |          if (Objects.isNull(user)) {
 | 
											
												
													
														|  |              return failed(HttpStatus.FORBIDDEN, "请登录");
 |  |              return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
											
												
													
														|  |          }
 |  |          }
 | 
											
												
													
														|  | 
 |  | +        return succeed(childrenDayReserveService.addReserve(user));
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | -        return succeed();
 |  | 
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "获取占位信息")
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/getReserve")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<ChildrenDayReserve> getReserve() {
 | 
											
												
													
														|  | 
 |  | +        SysUser user = sysUserFeignService.queryUserInfo();
 | 
											
												
													
														|  | 
 |  | +        if (Objects.isNull(user)) {
 | 
											
												
													
														|  | 
 |  | +            return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        return succeed(childrenDayReserveService.getUserReserve(user.getId()));
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  }
 |  |  }
 |