| | |
| | | calendar.setTime(new Date()); |
| | | calendar.add(Calendar.MONTH, time); |
| | | Date dateAfterOneMonth = calendar.getTime(); |
| | | byId.setTime(dateAfterOneMonth); |
| | | dateAfterOneMonth.setHours(23); |
| | | dateAfterOneMonth.setMinutes(59); |
| | | dateAfterOneMonth.setSeconds(59); |
| | | byId1.setVipEndTime(dateAfterOneMonth); |
| | | byId.setTime(dateAfterOneMonth); |
| | | |
| | | } else { |
| | | // 不是首次 判断vipEndTime 是否到期 如果没有 加指定月份时间 如果到期了 将会员到期时间从当前增加指定月份 |
| | | if (byId1.getVipEndTime().getTime() < new Date().getTime()) { |
| | |
| | | calendar.setTime(new Date()); |
| | | calendar.add(Calendar.MONTH, time); |
| | | Date dateAfterOneMonth = calendar.getTime(); |
| | | dateAfterOneMonth.setHours(23); |
| | | dateAfterOneMonth.setMinutes(59); |
| | | dateAfterOneMonth.setSeconds(59); |
| | | byId.setTime(dateAfterOneMonth); |
| | | byId1.setVipEndTime(dateAfterOneMonth); |
| | | } else { |
| | |
| | | calendar.setTime(byId1.getVipEndTime()); |
| | | calendar.add(Calendar.MONTH, time); |
| | | Date dateAfterOneMonth = calendar.getTime(); |
| | | dateAfterOneMonth.setHours(23); |
| | | dateAfterOneMonth.setMinutes(59); |
| | | dateAfterOneMonth.setSeconds(59); |
| | | byId.setTime(dateAfterOneMonth); |
| | | byId1.setVipEndTime(dateAfterOneMonth); |
| | | } |
| | |
| | | calendar.setTime(new Date()); |
| | | calendar.add(Calendar.MONTH, time); |
| | | Date dateAfterOneMonth = calendar.getTime(); |
| | | dateAfterOneMonth.setHours(23); |
| | | dateAfterOneMonth.setMinutes(59); |
| | | dateAfterOneMonth.setSeconds(59); |
| | | byId.setTime(dateAfterOneMonth); |
| | | byId1.setVipEndTime(dateAfterOneMonth); |
| | | } else { |
| | |
| | | calendar.setTime(new Date()); |
| | | calendar.add(Calendar.MONTH, time); |
| | | Date dateAfterOneMonth = calendar.getTime(); |
| | | dateAfterOneMonth.setHours(23); |
| | | dateAfterOneMonth.setMinutes(59); |
| | | dateAfterOneMonth.setSeconds(59); |
| | | byId.setTime(dateAfterOneMonth); |
| | | byId1.setVipEndTime(dateAfterOneMonth); |
| | | } else { |
| | |
| | | calendar.setTime(byId1.getVipEndTime()); |
| | | calendar.add(Calendar.MONTH, time); |
| | | Date dateAfterOneMonth = calendar.getTime(); |
| | | dateAfterOneMonth.setHours(23); |
| | | dateAfterOneMonth.setMinutes(59); |
| | | dateAfterOneMonth.setSeconds(59); |
| | | byId.setTime(dateAfterOneMonth); |
| | | byId1.setVipEndTime(dateAfterOneMonth); |
| | | } |
| | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * 获取用户信息 |
| | | * |
| | | * @return 用户信息 |
| | | */ |
| | | @GetMapping("/userInfo") |
| | | @ApiOperation(value = "用户详情", tags = {"用户详情"}) |
| | | public R<TUser> userInfo() { |
| | | return R.ok(userService.lambdaQuery().eq(TUser::getId,tokenService.getLoginUserStudy().getUserid()).one()); |
| | | } |
| | | |
| | | @PostMapping("/deleteUser") |
| | | @ApiOperation(value = "注销当前帐号", tags = {"家长端-个人中心"}) |
| | | @ApiImplicitParams({ |