Explorar el Código

短信发送修改

lyr hace 8 años
padre
commit
be5f0d851b

+ 9 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/RemindExpensesTask.java

@ -43,11 +43,15 @@ public class RemindExpensesTask implements Runnable {
    @Override
    public void run() {
        StringBuffer sb = new StringBuffer();
        for (Patient p : patients) {
            try {
                if (StringUtils.isNotEmpty(p.getMobile())) {
                    JSONObject result = SMSService.sendMsg(p.getMobile(), doctor.getName() + "医生提醒您:为完成家庭医生签约," +
                            "尽早为您提供家庭医生服务,请尽快到" + hospital.getName() + "(地址:" + hospital.getAddress() + ")缴费");
                    if (sb.length() > 0) {
                        sb.append(",");
                    }
                    sb.append(p.getMobile());
                }
                if (StringUtils.isNotEmpty(p.getOpenid())) {
                    // 微信提醒
@ -70,5 +74,8 @@ public class RemindExpensesTask implements Runnable {
                e.printStackTrace();
            }
        }
        JSONObject result = SMSService.sendMsg(sb.toString(), doctor.getName() + "医生提醒您:为完成家庭医生签约," +
                "尽早为您提供家庭医生服务,请尽快到" + hospital.getName() + "(地址:" + hospital.getAddress() + ")缴费");
    }
}