Commit 2d9f5f1c by 陶光胜

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0 into developer

parents 572dd1c9 95c07348
......@@ -12,6 +12,7 @@ import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.web.anno.IgnoreLogin;
import com.gic.haoban.manage.web.auth.AuthRequestUtil;
import com.gic.haoban.manage.web.config.Config;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.vo.LoginVO;
import com.gic.wechat.api.service.qywx.QywxCorpApiService;
......@@ -31,6 +32,9 @@ public class LoginController extends WebBaseController{
public static final String redirectUri = "https://www.gicdev.com/haoban-manage3-web/login";
@Autowired
private Config config;
@RequestMapping("login")
public HaobanResponse login(String code) {
String userId = qywxCorpApiService.getUserInfoSimple(siteId,code);
......@@ -48,7 +52,8 @@ public class LoginController extends WebBaseController{
@RequestMapping("get-login-qrcode")
public HaobanResponse getLoginQrcode(){
String url = "https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid=wweac4ef962720aa12&redirectUri="+redirectUri+"&state=web_login@gyoss9&usertype=admin";
String corpid = config.getCorpid();
String url = "https://open.work.weixin.qq.com/wwopen/sso/3rd_qrConnect?appid="+corpid+"&redirectUri="+redirectUri+"&state=web_login@gyoss9&usertype=admin";
//String url = qywxCorpApiService.getGrantAuthorizationUrl(siteId, redirectUri);
return resultResponse(HaoBanErrCode.ERR_1,url);
......
......@@ -35,7 +35,7 @@ public class WebBaseController {
public HaobanResponse resultResponse(HaoBanErrCode errCode) {
return resultResponse(errCode, null, null);
}
public HaobanResponse resultResponse(HaoBanErrCode errCode, String message) {
public HaobanResponse resultResponse(HaoBanErrCode errCode, String message,Object data,String detailError) {
HaobanResponse response = new HaobanResponse();
response.setMessage(message);
response.setErrorCode(errCode.getCode());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment