|
@ -229,8 +229,8 @@ public class DoctorBirthdayWishesEndpoint extends BaseController {
|
|
|
//根据openid进行发送祝福
|
|
|
String patient = one.getPatientCode();
|
|
|
if (StringUtils.isNotBlank(patient)){
|
|
|
String sql = " select p.id as patient,p.name,we.openid from base_patient p inner join base_patient_wechat we on p.id = we.patient_id " +
|
|
|
"and we.patient_id = '"+patient+"' " +
|
|
|
String sql = " select p.id as patient,p.name,we.openid from base_patient p Left join base_patient_wechat we on p.id = we.patient_id " +
|
|
|
"where p.id = '"+patient+"' " +
|
|
|
" order by we.create_time desc ";
|
|
|
List<Map<String,Object>> patients = jdbcTemplate.queryForList(sql);
|
|
|
if (patients.size()>0){//发送生日祝福
|
|
@ -244,8 +244,13 @@ public class DoctorBirthdayWishesEndpoint extends BaseController {
|
|
|
// json.put("content", one.getContent());
|
|
|
// json.put("openid",tmp.get("openid").toString());
|
|
|
// json.put("represented","");//被代理人
|
|
|
boolean success = messageUtil.putTemplateWxMessage(wxId,"template_success_notice","srzf",tmp.get("openid").toString(),first,
|
|
|
null,one.getContent(),26,json,"已发送", DateUtil.dateToChineseTime(new Date()));
|
|
|
boolean success=false;
|
|
|
if (null!=tmp.get("openid")&&StringUtils.isNotBlank(tmp.get("openid").toString())) {
|
|
|
success = messageUtil.putTemplateWxMessage(wxId, "template_success_notice", "srzf", tmp.get("openid").toString(), first,
|
|
|
null, one.getContent(), 26, json, "已发送", DateUtil.dateToChineseTime(new Date()));
|
|
|
}else {
|
|
|
success=true;
|
|
|
}
|
|
|
if (success){
|
|
|
SystemMessageDO messageDO = new SystemMessageDO();
|
|
|
messageDO.setTitle("收到来自"+one.getDoctorName()+"的关怀祝福:祝您"+tmp.get("name").toString()+"节日快乐!");
|