Exemplo n.º 1
0
  /**
   * 广播所有消息班级关联的家长(教育机构)
   *
   * @param msg
   * @return
   */
  public void pushMsgToParentByPxStudent(
      int type, String type_uuid, String student_uuids, String msg) throws Exception {
    String title = getPushMsgTitleByType(type);

    Session s = this.nSimpleHibernateDao.getHibernateTemplate().getSessionFactory().openSession();

    // from StudentContactRealation where student_uuid in( select uuid from
    // Student where classuuid =?)
    String sql =
        "select DISTINCT parent_uuid from px_pxstudentcontactrealation  where student_uuid in ("
            + DBUtil.stringsToWhereInValue(student_uuids)
            + ")";
    Query q = s.createSQLQuery(sql);
    List<String> parentuuidlist = q.list();
    pushMsgToParentByParentuuidList(type, type_uuid, parentuuidlist, msg);
  }