package com.punchsettle.server.service.controller; import com.punchsettle.server.dto.wechat.LoginRequest; import com.punchsettle.server.service.manager.IWechatMiniProgramManager; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * @className WeChatMiniProgramController * @description 微信小程序 * @author ChenYL * @date 2023/07/23 16:08 * @version V1.0 **/ @RestController @RequestMapping("/wechat/miniprogram") public class WechatMiniProgramController { @Autowired private IWechatMiniProgramManager wechatMiniProgramManager; /** * 微信小程序登录 * * @param request * @return 微信登陆后获得的session_key */ @PostMapping("/login") public String login(@RequestBody LoginRequest request) { return wechatMiniProgramManager.login(request); } }