Browse Source

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

lyr 8 năm trước cách đây
mục cha
commit
bd24bd312f

+ 28 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -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, "查询失败");
        }
    }
}