|
@ -2,17 +2,13 @@ package com.yihu.jw.patient.service.personal_Info;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.yihu.jw.entity.base.patient.BasePatientDO;
|
|
|
import com.yihu.jw.entity.base.sms.SmsTemplateDO;
|
|
|
import com.yihu.jw.patient.dao.personal_info.BasePatientDao;
|
|
|
import com.yihu.jw.patient.dao.personal_info.PatientDao;
|
|
|
import com.yihu.jw.patient.service.BasePatientService;
|
|
|
import com.yihu.jw.patient.util.ConstantUtils;
|
|
|
import com.yihu.jw.sms.service.BaseSmsGatewayService;
|
|
|
import com.yihu.jw.sms.service.BaseSmsService;
|
|
|
import com.yihu.jw.sms.service.BaseSmsTemplateService;
|
|
|
import com.yihu.utils.security.MD5;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
/**
|
|
@ -23,7 +19,7 @@ import org.springframework.stereotype.Service;
|
|
|
public class PatientService extends BasePatientService {
|
|
|
|
|
|
@Autowired
|
|
|
private BasePatientDao basePatientDao;
|
|
|
private PatientDao patientDao;
|
|
|
|
|
|
@Autowired
|
|
|
private BaseSmsService baseSmsService;
|
|
@ -40,7 +36,7 @@ public class PatientService extends BasePatientService {
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
|
return result;
|
|
|
}
|
|
|
BasePatientDO patient = basePatientDao.findOne(id);
|
|
|
BasePatientDO patient = patientDao.findOne(id);
|
|
|
if(null == patient){
|
|
|
result.put("msg","当前居民不存在:【 " + id + "】");
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
@ -62,7 +58,7 @@ public class PatientService extends BasePatientService {
|
|
|
*/
|
|
|
public JSONObject resetPassword(String id,String newPassword,String captcha){
|
|
|
JSONObject result = new JSONObject();
|
|
|
BasePatientDO patient = basePatientDao.findOne(id);
|
|
|
BasePatientDO patient = patientDao.findOne(id);
|
|
|
if(null == patient){
|
|
|
result.put("msg","当前居民不存在:【 " + id + "】");
|
|
|
result.put("response", ConstantUtils.FAIL);
|
|
@ -82,7 +78,7 @@ public class PatientService extends BasePatientService {
|
|
|
*/
|
|
|
public JSONObject updateMobile(String id,String newMobile,String captcha){
|
|
|
JSONObject result = new JSONObject();
|
|
|
BasePatientDO patient = basePatientDao.findOne(id);
|
|
|
BasePatientDO patient = patientDao.findOne(id);
|
|
|
if(null == patient){
|
|
|
result.put("msg","当前居民不存在:【 " + id + "】");
|
|
|
result.put("response", ConstantUtils.FAIL);
|