예제 #1
0
 public FeedBackInfo Get(string feedBackID)
 {
     FeedBackInfo info = new FeedBackInfo();
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("SELECT * FROM vshop_FeedBackNotify WHERE FeedBackId=@FeedBackId");
     this.database.AddInParameter(sqlStringCommand, "FeedBackId", DbType.String, feedBackID);
     using (IDataReader reader = this.database.ExecuteReader(sqlStringCommand))
     {
         return ReaderConvert.ReaderToModel<FeedBackInfo>(reader);
     }
 }
예제 #2
0
 public bool Save(FeedBackInfo info)
 {
     DbCommand sqlStringCommand = this.database.GetSqlStringCommand("INSERT INTO vshop_FeedBackNotify (AppId, TimeStamp, OpenId, MsgType, FeedBackId, TransId, Reason, Solution, ExtInfo) VALUES (@AppId, @TimeStamp, @OpenId, @MsgType, @FeedBackId, @TransId, @Reason, @Solution, @ExtInfo)");
     this.database.AddInParameter(sqlStringCommand, "AppId", DbType.String, info.AppId);
     this.database.AddInParameter(sqlStringCommand, "TimeStamp", DbType.DateTime, info.TimeStamp);
     this.database.AddInParameter(sqlStringCommand, "OpenId", DbType.String, info.OpenId);
     this.database.AddInParameter(sqlStringCommand, "MsgType", DbType.String, info.MsgType);
     this.database.AddInParameter(sqlStringCommand, "FeedBackId", DbType.String, info.FeedBackId);
     this.database.AddInParameter(sqlStringCommand, "TransId", DbType.String, info.TransId);
     this.database.AddInParameter(sqlStringCommand, "Reason", DbType.String, info.Reason);
     this.database.AddInParameter(sqlStringCommand, "Solution", DbType.String, info.Solution);
     this.database.AddInParameter(sqlStringCommand, "ExtInfo", DbType.String, info.ExtInfo);
     return (this.database.ExecuteNonQuery(sqlStringCommand) > 0);
 }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Write("success");
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     FeedBackNotify feedBackNotify = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey).GetFeedBackNotify(base.Request.InputStream);
     if (feedBackNotify != null)
     {
         string msgType = feedBackNotify.MsgType;
         if (msgType != null)
         {
             if (!(msgType == "request"))
             {
                 if (msgType == "confirm")
                 {
                     feedBackNotify.MsgType = "已完成";
                 }
             }
             else
             {
                 feedBackNotify.MsgType = "未处理";
             }
         }
         if (VShopHelper.GetFeedBack(feedBackNotify.FeedBackId) != null)
         {
             VShopHelper.UpdateFeedBackMsgType(feedBackNotify.FeedBackId, feedBackNotify.MsgType);
         }
         else
         {
             FeedBackInfo info = new FeedBackInfo {
                 AppId = feedBackNotify.AppId,
                 ExtInfo = feedBackNotify.ExtInfo,
                 FeedBackId = feedBackNotify.FeedBackId,
                 MsgType = feedBackNotify.MsgType,
                 OpenId = feedBackNotify.OpenId,
                 Reason = feedBackNotify.Reason,
                 Solution = feedBackNotify.Solution,
                 TransId = feedBackNotify.TransId
             };
             VShopHelper.SaveFeedBack(info);
         }
     }
 }
예제 #4
0
 public static bool SaveFeedBack(FeedBackInfo info)
 {
     return new FeedBackDao().Save(info);
 }