package com.stylefeng.guns.modular.api;
|
|
import com.stylefeng.guns.modular.system.service.IAppUserService;
|
import com.stylefeng.guns.modular.system.util.ResultUtil;
|
import com.stylefeng.guns.modular.system.warpper.req.RegisterAccountReq;
|
import com.stylefeng.guns.modular.system.warpper.res.AppletLoginRes;
|
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParams;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* @author zhibing.pu
|
* @Date 2023/11/7 11:07
|
*/
|
@RestController
|
@RequestMapping("")
|
public class AppUserController {
|
|
@Autowired
|
private IAppUserService appUserService;
|
|
|
|
@ResponseBody
|
@PostMapping("/base/appUser/appletLogin")
|
@ApiOperation(value = "微信小程序登录", tags = {"登录注册"})
|
@ApiImplicitParams({
|
@ApiImplicitParam(name = "jscode", value = "微信jscode", required = true)
|
})
|
public ResultUtil<AppletLoginRes> appletLogin(String jscode){
|
return appUserService.appletLogin(jscode);
|
}
|
|
|
|
@ResponseBody
|
@PostMapping("/base/appUser/registerAccount")
|
@ApiOperation(value = "小程序注册账户", tags = {"登录注册"})
|
public ResultUtil<AppletLoginRes> registerAccount(RegisterAccountReq req){
|
return appUserService.registerAccount(req);
|
}
|
|
|
|
}
|