| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.ruoyi.account.api.model.AppUser; |
| | | import com.ruoyi.account.service.IAppUserService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import com.ruoyi.account.service.AppUserService; |
| | | import com.ruoyi.account.vo.*; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.BaseTable; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/11/21 9:47 |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author luodangjia |
| | | * @since 2024-11-21 |
| | | */ |
| | | @Api(tags = {"登录注册-小程序"}) |
| | | @RestController |
| | | @RequestMapping("/appUser") |
| | | @RequestMapping("/app-user") |
| | | public class AppUserController { |
| | | |
| | | |
| | | @Resource |
| | | private IAppUserService appUserService; |
| | | private AppUserService appUserService; |
| | | |
| | | |
| | | /** |
| | | * 根据id获取用户信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/getAppUserById") |
| | | public AppUser getAppUserById(@RequestParam("id") Long id){ |
| | | return appUserService.getById(id); |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/appletLogin") |
| | | @ApiOperation(value = "小程序一键登录") |
| | | public AjaxResult<LoginVo> appletLogin(@RequestBody AppletLogin appletLogin){ |
| | | return appUserService.appletLogin(appletLogin); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/mobileLogin") |
| | | @ApiOperation(value = "手机号登录") |
| | | public AjaxResult<LoginVo> mobileLogin(@RequestBody MobileLogin mobileLogin){ |
| | | return appUserService.mobileLogin(mobileLogin); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSMSCode") |
| | | @ApiOperation(value = "获取短信验证码") |
| | | public AjaxResult getSMSCode(@RequestBody SMSCode smsCode){ |
| | | return appUserService.getSMSCode(smsCode); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/registerAccount") |
| | | @ApiOperation(value = "注册新账号") |
| | | public AjaxResult<LoginVo> registerAccount(@RequestBody RegisterAccount registerAccount){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getReferrer/{id}") |
| | | @ApiOperation(value = "获取推荐人信息") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "id", value = "推荐人id", required = true, dataType = "long") |
| | | }) |
| | | public AjaxResult<String> getReferrer(@PathVariable("id") Long id){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getNearbyReferrer") |
| | | @ApiOperation(value = "获取附近推荐人列表") |
| | | public AjaxResult<BaseTable<NearbyReferrerVo>> getNearbyReferrer(NearbyReferrer nearbyReferrer){ |
| | | // todo 待完善 pu |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | | |