|
@ -1099,4 +1099,32 @@ public class DoctorFamilyContractController extends WeixinBaseController {
|
|
|
return error(-1, "微信关注提醒失败");
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 是否已提醒关注
|
|
|
*
|
|
|
* @param patient
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/is_patient_remind_focus")
|
|
|
@ResponseBody
|
|
|
public String isPatientRemindFocusToday(String patient){
|
|
|
try {
|
|
|
if (StringUtils.isEmpty(patient)) {
|
|
|
return error(-1, "患者不能为空");
|
|
|
}
|
|
|
int result = 0;
|
|
|
String epTime = redisTemplate.opsForValue().get("wechat:focus:remind:" + patient);
|
|
|
|
|
|
if (StringUtils.isEmpty(epTime)) {
|
|
|
result = 0;
|
|
|
} else {
|
|
|
result = new SimpleDateFormat("yyyy-MM-dd").format(new Date()).equals(epTime) ? 1 : 0;
|
|
|
}
|
|
|
return write(200, "查询成功", "data", result);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
return error(-1, "查询失败");
|
|
|
}
|
|
|
}
|
|
|
}
|