Sfoglia il codice sorgente

Merge branch 'dev' of chenweida/patient-co-management into dev

chenweida 8 anni fa
parent
commit
4f9b3ec555

+ 6 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/interceptors/DoctorInterceptor.java

@ -15,8 +15,8 @@ import java.util.Date;
/**
 * 医生权限校验
 * @author George
 *
 * @author George
 */
public class DoctorInterceptor extends BaseInterceptor {
@ -34,7 +34,11 @@ public class DoctorInterceptor extends BaseInterceptor {
			String tokenStr = json.has("token") ? json.getString("token") : "";
			String uid = json.has("uid") ? json.getString("uid") : "";
			String imei = json.has("imei") ? json.getString("imei") : "";
			String observer = json.has("observer") ? json.getString("observer") : "";
			//如果是观察者直接返回true
			if (!org.springframework.util.StringUtils.isEmpty(observer) && observer.equals("1")) {
				return true;
			}
			if (StringUtils.isEmpty(tokenStr) || StringUtils.isEmpty(imei) || StringUtils.isEmpty(uid)) {
				response.getOutputStream().write(error(SystemConf.NOT_LOGIN, "请登录后再操作!").getBytes());
				return false;

+ 3 - 3
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/common/account/PatientService.java

@ -207,11 +207,11 @@ public class PatientService extends TokenService {
        IdcardInfoExtractor ie = new IdcardInfoExtractor(idcard);
        String code = getCode();
        String sql = "insert wlyy_patient(code,idcard,name,ssc,mobile,password,salt,openid" +
                ",status,birthday,sex,czrq,disease,disease_condition,record_amount,points)" +
                " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
                ",status,birthday,sex,czrq,openid_time,disease,disease_condition,record_amount,points)" +
                " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        jdbcTemplate.update(sql, new Object[]{code, idcard, name, ssc, mobile, password, salt, imei, 1, ie.getBirthday()
                , ie.getGender(), clock.getCurrentDate(), 0, 0, 0, 0});
                , ie.getGender(), clock.getCurrentDate(),clock.getCurrentDate(), 0, 0, 0, 0});
        Patient temp = patientDao.findByCode(code);
        if (temp != null) {