| | |
| | | import com.dsh.account.dto.BindDto; |
| | | import com.dsh.account.dto.SelectDto; |
| | | import com.dsh.account.dto.UpdateInfoDto; |
| | | import com.dsh.account.entity.Coach; |
| | | import com.dsh.account.entity.TAppUser; |
| | | import com.dsh.account.entity.TCourseInfoRecord; |
| | | import com.dsh.account.entity.*; |
| | | import com.dsh.account.model.*; |
| | | import com.dsh.account.model.query.appUserQuery.QueryAppUser; |
| | | import com.dsh.account.model.vo.QueryAppUserVO; |
| | | import com.dsh.account.service.IVipPaymentService; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.service.TCourseInfoRecordService; |
| | | import com.dsh.account.service.*; |
| | | import com.dsh.account.util.PayMoneyUtil; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.util.TokenUtil; |
| | |
| | | try { |
| | | ResultUtil smsCode = appUserService.getSMSCode(type, phone); |
| | | return smsCode; |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private TStudentService studentService; |
| | | @ResponseBody |
| | | @PostMapping("/base/appUser/logOff") |
| | | @ApiOperation(value = "注销", tags = {"注销"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "账号id", name = "appId", dataType = "int", required = true) |
| | | }) |
| | | public ResultUtil<String> logOff(Integer appId){ |
| | | try { |
| | | |
| | | appUserService.removeById(appId); |
| | | studentService.remove(new QueryWrapper<TStudent>().eq("appUserId",appId)); |
| | | |
| | | return ResultUtil.success("注销成功"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private UserIntegralChangesService userIntegralChangesService; |
| | | /** |
| | | * 修改用户信息 |
| | | * @param appUser |
| | |
| | | public void updateAppUser(@RequestBody TAppUser appUser){ |
| | | try { |
| | | appUserService.updateById(appUser); |
| | | UserIntegralChanges userIntegralChanges = new UserIntegralChanges(); |
| | | userIntegralChanges.setAppUserId(appUser.getId()); |
| | | userIntegralChanges.setOldIntegral(appUser.getIntegral()+appUser.getPoints()); |
| | | userIntegralChanges.setType(5); |
| | | userIntegralChanges.setNewIntegral(appUser.getIntegral()); |
| | | userIntegralChanges.setInsertTime(new Date()); |
| | | userIntegralChanges.setCategory(2); |
| | | userIntegralChangesService.save(userIntegralChanges); |
| | | |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |