//获取微信消息模板的ID public static string getMessageID1(string companyID, string templateBH) { string sql = "select * from asm_company where id=" + companyID; DataTable dt = DbHelperSQL.Query(sql).Tables[0]; wxHelper wx = new wxHelper(companyID); string token = Util.GetTokenInfo(OpenPFConfig.Appid, dt.Rows[0]["appId"].ToString(), Util.getComAccessToken(), dt.Rows[0]["refresh_token"].ToString()).authorizer_access_token; string templageID = wx.getTemplateId(token, templateBH); Util.Debuglog("templageID=" + templageID, "_获取模板ID"); if (templageID != "") { return(templageID); } return("0"); }