| | |
| | | package com.qxueyou.scc.sys.action; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.servlet.http.HttpSession; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.qxueyou.scc.base.util.*; |
| | | import com.qxueyou.scc.wx.service.IWechatService; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.kafka.common.network.LoginType; |
| | | import org.apache.tomcat.util.net.openssl.ciphers.Authentication; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Qualifier; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | |
| | | @Autowired |
| | | private IOrganizationService organizationService; |
| | | |
| | | public static String UUNUMBER="QXYUUNUMBER"; |
| | | /** |
| | | * 小程序appID |
| | | */ |
| | | @Value("${wx.appId}") |
| | | private String appId; |
| | | |
| | | |
| | | /** |
| | | * 小程序secret |
| | | */ |
| | | @Value("${wx.secret}") |
| | | private String secret; |
| | | |
| | | |
| | | public static String UUNUMBER="QXYUUNUMBER"; |
| | | |
| | | @Autowired |
| | | IWechatService wechatService; |
| | | |
| | | /** |
| | | * 微信登录 |
| | | * |
| | | * @param uid |
| | | * @throws IOException |
| | | */ |
| | | @PostMapping("/auth/wechat/login") |
| | | @ApiOperation("微信登录") |
| | | public Result wechatLogin(String code) { |
| | | JSONObject sessionKeyOrOpenId = wechatService.getSessionKeyOrOpenId(code); |
| | | System.out.println(sessionKeyOrOpenId); |
| | | return new Result(true,"cg",sessionKeyOrOpenId); |
| | | // return new Result(true,"token",securityProperties.getTokenStartWith() + token,"user",user); |
| | | } |
| | | |
| | | @ApiOperation(value = "登入接口", notes = "") |
| | | @ApiImplicitParams({ |