puzhibing
2023-11-28 7b726d5ff439e7b8bb66369ecc5881e370286bc8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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);
    }
 
 
 
}