/// <summary> /// 自己封装耗时的方法 /// </summary> /// <returns></returns> static Task SendTmpAsync(List <WX_TMP_HIS> his, string accToke) { IBcjStoreService api = ObjectFactory.GetInstance <IBcjStoreService>(); return(Task.Run(() => { foreach (WX_TMP_HIS item in his) { string resot = NetHelper.HttpRequest("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token=" + accToke, item.DETAIL, "POST", 2000, Encoding.UTF8, "application/json"); if (resot.Contains("ok")) { api.UpdateOk(item.ID); } } })); }
public JsonSMsg SendTmpMsg(BCJ_TMP_DETAIL request) { IBcjStoreService _bcjStore = ObjectFactory.GetInstance <IBcjStoreService>(); JsonSMsg msg = new JsonSMsg(); try { if (string.IsNullOrEmpty(request.Template_Code)) { msg.Status = 0; msg.Message = "模板ID不能是空"; return(msg); } BasePage bpage = new BasePage(); string access_token = bpage.MyToken(AppConfig.FWHOriginalID); int str = _bcjStore.SendTmp(request, access_token); if (str == -1) { msg.Status = 0; msg.Message = "没有该模板,请查看模板ID"; return(msg); } msg.Status = 1; msg.Message = "OK"; return(msg); } catch (Exception ex) { msg.Status = 0; msg.Message = ex.Message; return(msg); } }
public BcjMangeController(IBcjStoreService bcjStore, ICustMemberService custMember) { _bcjStore = bcjStore; _custMember = custMember; }
public BcjAPIController(IBcjStoreService bcjStore) { _bcjStore = bcjStore; }
public BcjBookController(ICustMemberService custMember, IBcjBookService book, IBcjStoreService store) { _custMember = custMember; _book = book; _store = store; }
public BcjStoreController(IBcjStoreService bcjStore, IBcjBookService book) { _bcjStore = bcjStore; _book = book; }