public ChargeCommand CreateCmd(string weixinId, string libId, string libraryCode, int needTransfrom, ChargeCommand cmd) { SessionInfo sessionInfo = (SessionInfo)HttpContext.Current.Session[WeiXinConst.C_Session_sessioninfo]; ChargeCommandContainer cmdContainer = sessionInfo.cmdContainer; if (sessionInfo.ActiveUser == null) { dp2WeiXinService.Instance.WriteDebug("提交流通API时,发现session失效了。"); } try { // 执行命令 return(cmdContainer.AddCmd(//sessionInfo.Active, weixinId, libId, libraryCode, needTransfrom, cmd)); } catch (Exception ex) { cmd.errorInfo = ex.Message; cmd.state = -1; dp2WeiXinService.Instance.WriteErrorLog("借还时出错:" + ex.Message); return(cmd); } }
public ChargeCommandResult GetCommands(string libId) { ChargeCommandResult result = new ChargeCommandResult(); SessionInfo sessionInfo = (SessionInfo)HttpContext.Current.Session[WeiXinConst.C_Session_sessioninfo]; ChargeCommandContainer cmdContainer = sessionInfo.cmdContainer; result.cmds = cmdContainer; return(result); }