|
@ -78,7 +78,7 @@ public class WechatController extends WeixinBaseController {
|
|
|
* @param idCard
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "getMobile",method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "getMobile", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String getPatientInfoByIdCard(@RequestParam(value = "idCard", required = true) String idCard) {
|
|
|
Patient temp = patientService.findByIdcard(idCard);
|
|
@ -107,7 +107,7 @@ public class WechatController extends WeixinBaseController {
|
|
|
* @param mobile 手机号
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/check_regist_info",method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "/check_regist_info", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String checkRegistInfo(String name, String idcard, String ssc, String mobile) {
|
|
|
try {
|
|
@ -177,7 +177,7 @@ public class WechatController extends WeixinBaseController {
|
|
|
* @param captcha 手机验证码
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "regist",method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "regist", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String regist(@RequestParam(value = "name", required = true) String name,
|
|
|
@RequestParam(value = "idcard", required = true) String idcard,
|
|
@ -302,7 +302,7 @@ public class WechatController extends WeixinBaseController {
|
|
|
* @param password 登录密码
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "login",method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "login", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String login(
|
|
|
@RequestParam(required = false) String mobile,
|
|
@ -387,9 +387,11 @@ public class WechatController extends WeixinBaseController {
|
|
|
|
|
|
loginLog.setLoginType("1");
|
|
|
loginLogService.saveLog(loginLog);
|
|
|
//给患者打微信标签
|
|
|
weiXinTagUtil.addTagWithOpenid(openid,p.getCode(),p.getName());
|
|
|
|
|
|
//判断是否打过标签
|
|
|
if (!(Patient.isWchatTage.yes.getValue() == p.getIsWxtag())) {
|
|
|
//给患者打微信标签
|
|
|
weiXinTagUtil.addTagWithOpenid(openid, p.getCode(), p.getName());
|
|
|
}
|
|
|
return write(200, "登录成功", "data", map);
|
|
|
} else {
|
|
|
errorMessage = "密码错误,登录失败";
|
|
@ -482,8 +484,11 @@ public class WechatController extends WeixinBaseController {
|
|
|
}
|
|
|
loginLog.setType("1");
|
|
|
loginLogService.saveLog(loginLog);
|
|
|
//给患者打微信标签
|
|
|
weiXinTagUtil.addTagWithOpenid(openid,p.getCode(),p.getName());
|
|
|
//判断是否打过标签
|
|
|
if (!(Patient.isWchatTage.yes.getValue() == p.getIsWxtag())) {
|
|
|
//给患者打微信标签
|
|
|
weiXinTagUtil.addTagWithOpenid(openid, p.getCode(), p.getName());
|
|
|
}
|
|
|
return write(200, "登录成功", "data", map);
|
|
|
}
|
|
|
}
|
|
@ -504,7 +509,7 @@ public class WechatController extends WeixinBaseController {
|
|
|
* @param pageUrl 需要签名的页面全地址(?后的也需要除了#后的不需要)
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "getSign",method = RequestMethod.POST)
|
|
|
@RequestMapping(value = "getSign", method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String getSign(String pageUrl) {
|
|
|
try {
|
|
@ -538,7 +543,7 @@ public class WechatController extends WeixinBaseController {
|
|
|
* @param code
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "getOpenidByCode",method = {RequestMethod.POST,RequestMethod.GET})
|
|
|
@RequestMapping(value = "getOpenidByCode", method = {RequestMethod.POST, RequestMethod.GET})
|
|
|
@ResponseBody
|
|
|
public String getOpenidByCode(String code) {
|
|
|
try {
|