| | |
| | | import com.ruoyi.auth.service.SysLoginService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.system.api.model.OauthUrlVo; |
| | | import com.ruoyi.system.api.model.OauthUserVo; |
| | | import com.ruoyi.system.api.model.QwH5LoginVo; |
| | | import com.ruoyi.system.api.model.QwUserDetailDto; |
| | | import com.ruoyi.system.api.model.*; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | // 通过code获取访问用户敏感信息 |
| | | JSONObject result = qywxInnerService.getOauthUser(code); |
| | | QwUserDetailDto qwUserDetail = JSONObject.parseObject(result.toJSONString(), QwUserDetailDto.class); |
| | | //QwUserDetailDto qwUserDetail = new QwUserDetailDto(); |
| | | //qwUserDetail.setMobile("13882237106"); |
| | | //qwUserDetail.setUserid("146"); |
| | | // 1、查数据库获取人员 |
| | | QwH5LoginVo qwH5LoginVo = sysLoginService.qwH5Login(qwUserDetail); |
| | | // 2、生成Token |
| | | return R.ok(tokenService.createQwH5Token(qwH5LoginVo)); |
| | | } |
| | | |
| | | @GetMapping("/h5/getAgentConfig") |
| | | @ApiOperation("通过code获取访问用户登录") |
| | | public R<AgentConfigVo> getAgentConfig(@ApiParam(value = "url", required = true) String url, @ApiParam(value = "type", required = false) String type) throws IOException { |
| | | AgentConfigVo agentConfigVo = qywxInnerService.getAgentConfig(url, type); |
| | | return R.ok(agentConfigVo); |
| | | } |
| | | |
| | | |
| | | } |