| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.vo.*; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | |
| | | @PostMapping("/registerAccount") |
| | | @ApiOperation(value = "注册新账号") |
| | | public AjaxResult<LoginVo> registerAccount(@RequestBody RegisterAccount registerAccount){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | return appUserService.registerAccount(registerAccount); |
| | | } |
| | | |
| | | |
| | |
| | | @ApiImplicitParam(name = "id", value = "推荐人id", required = true, dataType = "long") |
| | | }) |
| | | public AjaxResult<String> getReferrer(@PathVariable("id") Long id){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | AppUser appUser = appUserService.getById(id); |
| | | String phone = appUser.getPhone(); |
| | | phone = phone.substring(0, 3) + "****" + phone.substring(7); |
| | | return AjaxResult.success(appUser.getName() + "-" + phone); |
| | | } |
| | | |
| | | |
| | |
| | | @GetMapping("/getNearbyReferrer") |
| | | @ApiOperation(value = "获取附近推荐人列表") |
| | | public AjaxResult<BaseTable<NearbyReferrerVo>> getNearbyReferrer(NearbyReferrer nearbyReferrer){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | BaseTable<NearbyReferrerVo> baseTable = appUserService.getNearbyReferrer(nearbyReferrer); |
| | | return AjaxResult.success(baseTable); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |