|
@ -11,6 +11,7 @@ import com.yihu.wlyy.service.common.account.TokenService;
|
|
|
import com.yihu.wlyy.util.CommonUtil;
|
|
|
import com.yihu.wlyy.util.DateUtil;
|
|
|
import com.yihu.wlyy.util.EncodesUtil;
|
|
|
import com.yihu.wlyy.util.MD5;
|
|
|
import com.yihu.wlyy.web.WeixinBaseController;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@ -19,6 +20,7 @@ import org.json.JSONObject;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.MediaType;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
@ -678,4 +680,27 @@ public class PatientController extends WeixinBaseController {
|
|
|
return error(-1, "手机号更新失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 修改密码
|
|
|
* @param newPassword1 新密码1
|
|
|
* @param newPassword2 新密码2
|
|
|
* @param oldPassword 旧密码
|
|
|
* @param patientCode 患者code
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/updatePassword",method = RequestMethod.POST)
|
|
|
@ResponseBody
|
|
|
public String updatePassword(String newPassword1,
|
|
|
String newPassword2,
|
|
|
String oldPassword,
|
|
|
String patientCode) {
|
|
|
try {
|
|
|
patientInfoService.updatePassword(newPassword1, newPassword2, oldPassword,patientCode);
|
|
|
return write(200, "更新成功");
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
}
|