|
@ -78,8 +78,6 @@ public class WechatInfoEndPoint extends EnvelopRestEndpoint {
|
|
|
String str = "jsapi_ticket=" + ticket + "&noncestr=" + noncestr + "×tamp=" + timestamp + "&url=" + url;
|
|
|
// sha1加密
|
|
|
String signature = SHA1(str);
|
|
|
|
|
|
|
|
|
map.put("noncestr", noncestr);
|
|
|
map.put("timestamp", timestamp);
|
|
|
map.put("signature", signature);
|
|
@ -97,8 +95,9 @@ public class WechatInfoEndPoint extends EnvelopRestEndpoint {
|
|
|
*/
|
|
|
@RequestMapping(value = "getOpenidByCode", method = {RequestMethod.POST, RequestMethod.GET})
|
|
|
@ResponseBody
|
|
|
public String getOpenidByCode(String code) throws Exception {
|
|
|
return wechatInfoService.getOpenidByCode(code,wxId);
|
|
|
public Envelop getOpenidByCode(String code) throws Exception {
|
|
|
String openid = wechatInfoService.getOpenidByCode(code, wxId);
|
|
|
return success(PatientRequestMapping.Wechat.api_success,openid);
|
|
|
}
|
|
|
|
|
|
/**
|