//当活动未过期时,返回的空优惠券 //private readonly CouponDTO _noCoupon = new CouponDTO() { // title = "已参与", // subTitle = "谢谢参与", // status = CouponState.BeParticipatedIn //}; public CouponService() { _actBll = new BLL.wx_dzpActionInfo(); _utbll = new BLL.wx_dzpUsersTemp(); _ubll = new BLL.wx_dzpAwardUser(); _itemBll = new BLL.wx_dzpAwardItem(); //_repository = new CouponRepository(); //_userRepository = new UserRepository(); }
/// <summary> /// 大转盘回复内容 /// </summary> /// <param name="id">模块主键Id</param> /// <param name="apiid">微帐号主键id</param> /// <param name="openid">openid</param> /// <param name="responseType">回复类型:1纯文字,2图文</param> /// <param name="responseVaule">回复的内容</param> private IList <Model.ResponseContentEntity> DZPReponse(int id, int apiid, string openid) { IList <Model.ResponseContentEntity> responselist = new List <Model.ResponseContentEntity>(); Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity(); responseEntity.id = id; responseEntity.wid = apiid; BLL.wx_dzpActionInfo ggkActBll = new BLL.wx_dzpActionInfo(); Model.wx_dzpActionInfo actModel = ggkActBll.GetModel(id); if (actModel.beginDate > DateTime.Now) { //活动尚未开始 responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "活动【" + actModel.actName + "】将于" + actModel.beginDate + "开始。"; } else if (actModel.endDate <= DateTime.Now) { //活动结束 responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.endNotice; responseEntity.rContent2 = actModel.endContent; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/dzp/end.aspx?wid=" + apiid + "&aid=" + id; responseEntity.picUrl = actModel.endPic; } else { //活动正在进行中 responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.actName; responseEntity.rContent2 = actModel.brief; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/dzp/index.aspx?wid=" + apiid + "&aid=" + id; responseEntity.picUrl = actModel.beginPic; } responselist.Add(responseEntity); return(responselist); }
/// <summary> /// 大转盘回复内容 /// </summary> /// <param name="id">模块主键Id</param> /// <param name="apiid">微帐号主键id</param> /// <param name="openid">openid</param> /// <param name="responseType">回复类型:1纯文字,2图文</param> /// <param name="responseVaule">回复的内容</param> private IList<Model.ResponseContentEntity> DZPReponse(int id, int apiid, string openid) { IList<Model.ResponseContentEntity> responselist = new List<Model.ResponseContentEntity>(); Model.ResponseContentEntity responseEntity = new Model.ResponseContentEntity(); responseEntity.id = id; responseEntity.wid = apiid; BLL.wx_dzpActionInfo ggkActBll = new BLL.wx_dzpActionInfo(); Model.wx_dzpActionInfo actModel = ggkActBll.GetModel(id); if (actModel.beginDate > DateTime.Now) { //活动尚未开始 responseEntity.rcType = Model.ReponseContentType.text; responseEntity.rContent = "活动【" + actModel.actName + "】将于" + actModel.beginDate + "开始。"; } else if (actModel.endDate <= DateTime.Now) { //活动结束 responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.endNotice; responseEntity.rContent2 = actModel.endContent; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/dzp/end.aspx?wid=" + apiid + "&aid=" + id; responseEntity.picUrl = actModel.endPic; } else { //活动正在进行中 responseEntity.rcType = Model.ReponseContentType.txtpic; responseEntity.rContent = actModel.actName; responseEntity.rContent2 = actModel.brief; responseEntity.detailUrl = MyCommFun.getWebSite() + "/weixin/dzp/index.aspx?wid=" + apiid + "&aid=" + id; responseEntity.picUrl = actModel.beginPic; } responselist.Add(responseEntity); return responselist; }