コード例 #1
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 /// <summary>
 /// 检查地址拦截策略是否创建
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <returns></returns>
 public Boolean CheckCloseAddressConfigIsExit(string sellerNick, string buyerName, string buyerPhone)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "select 1 from CloseAddressConfig where sellerNick = @sellerNick and receiverName = @receiverName and phone = @phone";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", sellerNick);
         _DBSession.SetInParam("@receiverName", buyerName);
         _DBSession.SetInParam("@phone", buyerPhone);
         DataTable dt = _DBSession.ExecuteDataTable(query);
         _DBSession.Close();
         if (dt.Rows.Count > 0)
         {
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #2
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 /// <summary>
 /// 删除评价日志
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <returns></returns>
 public Boolean DeleteDefenseLog(string startDate, string endDate)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = @"delete from CloseOrderLog where closeTime >= @startDate and closeTime <= @rateDate  ";
         if (!string.IsNullOrEmpty(startDate))
         {
             _DBSession.SetInParam("@startDate", startDate);
         }
         if (!string.IsNullOrEmpty(endDate))
         {
             _DBSession.SetInParam("@rateDate", endDate);
         }
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #3
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 /// <summary>
 /// 修改卖家差评防御配置
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public bool UpdateCloseOrderConfig(CloseOrderConfig obj)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = @"
                         update CloseOrderConfig
                         set buyerRegDays = @buyerRegDays,
                         buyerCreditFen = @buyerCreditFen,
                         totalBadRateCount = @totalBadRateCount,
                         totalTuiKuanCount = @totalTuiKuanCount,
                         unCertify = @unCertify,
                         cellPhoneClose = @cellPhoneClose,
                         unpayMinutesClose = @unpayMinutesClose,
                         payQuikAddMemo = @payQuikAddMemo,
                         closeStartDate = @closeStartDate,
                         closeEndDate = @closeEndDate,
                         orderGreaterThan = @orderGreaterThan,
                         closeReason = @closeReason,
                         dangerBuyerCloseAndMemo = @dangerBuyerCloseAndMemo,
                         dangerBuyerNotCloseAddMemo = @dangerBuyerNotCloseAddMemo,
                         memoQiZhi = @memoQiZhi,
                         memoContent = @memoContent,
                         updateDate = getdate()
                         where sellerNick = @sellerNick";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", obj.SellerNick);
         _DBSession.SetInParam("@buyerRegDays", obj.BuyerRegDays);
         _DBSession.SetInParam("@buyerCreditFen", obj.BuyerCreditFen);
         _DBSession.SetInParam("@totalBadRateCount", obj.TotalBadRateCount);
         _DBSession.SetInParam("@totalTuiKuanCount", obj.TotalTuiKuanCount);
         _DBSession.SetInParam("@unCertify", obj.UnCertify);
         _DBSession.SetInParam("@cellPhoneClose", obj.CellPhoneClose);
         _DBSession.SetInParam("@unpayMinutesClose", obj.UnpayMinutesClose);
         _DBSession.SetInParam("@payQuikAddMemo", obj.PayQuikAddMemo);
         _DBSession.SetInParam("@closeStartDate", string.IsNullOrEmpty(obj.CloseStartDate) ? "NULL" : obj.CloseStartDate);
         _DBSession.SetInParam("@closeEndDate", string.IsNullOrEmpty(obj.CloseEndDate) ? "NULL" : obj.CloseEndDate);
         _DBSession.SetInParam("@orderGreaterThan", obj.OrderGreaterThan);
         _DBSession.SetInParam("@closeReason", obj.CloseReason);
         _DBSession.SetInParam("@dangerBuyerCloseAndMemo", obj.DangerBuyerCloseAndMemo);
         _DBSession.SetInParam("@dangerBuyerNotCloseAddMemo", obj.DangerBuyerNotCloseAddMemo);
         _DBSession.SetInParam("@memoQiZhi", obj.MemoQiZhi);
         _DBSession.SetInParam("@memoContent", obj.MemoContent);
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #4
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 /// <summary>
 /// 删除卖家黑名单
 /// </summary>
 /// <param name="obj"></param>
 /// <returns></returns>
 public bool DeleteCloseOrderBlaklist(string blakListID)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "delete from BlakListCloseOrder where blakListID = @blakListID";
         // 设置SQL参数
         _DBSession.SetInParam("@blakListID", blakListID);
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #5
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 /// <summary>
 /// 查询卖家设置的防差评策略
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <returns></returns>
 public DataTable GeCloseOrderConfigByNick(string sellerNick)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "select * from CloseOrderConfig where sellerNick = @sellerNick";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", sellerNick);
         DataTable dt = _DBSession.ExecuteDataTable(query);
         _DBSession.Close();
         return(dt);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(null);
     }
 }
コード例 #6
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 public bool DeleteCloseAddressConfig(CloseAddressConfig obj)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = @"delete from CloseAddressConfig where id = @id";
         // 设置SQL参数
         _DBSession.SetInParam("@id", obj.Id);
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #7
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 public Boolean UpdateCloseDate(string sellerNick)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "update CloseOrderConfig set closeStartDate = null,closeEndDate = null where sellerNick = @sellerNick";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", sellerNick);
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #8
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 public Boolean UpdateAutoCloseOrderStatus(string sellerNick, int openStatus)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "update CloseOrderConfig set isAutoCloseOrder = @isAutoCloseOrder where sellerNick = @sellerNick";
         // 设置SQL参数
         _DBSession.SetInParam("@isAutoCloseOrder", openStatus);
         _DBSession.SetInParam("@sellerNick", sellerNick);
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #9
0
ファイル: RatingDAL.cs プロジェクト: fubendong/--CTCRM
 public bool DeleteSellerNifty(String sellerID)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = @"delete from CusPermitConfig where nick = @nick";
         // 设置SQL参数
         SqlParameter[] param = new SqlParameter[]
         {
             new SqlParameter("@nick", sellerID)
         };
         DataBase.ExecuteSql(query, param);
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #10
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 public DataTable GetAddressCloseConfig(string sellerNick)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = @"
                         select id,receiverName,receiverAddress,phone,                               
                         memo,case status when 1 then '已生效' when 0 then '已暂停' end as status
                         from CloseAddressConfig where sellerNick = @sellerNick order by createDate desc";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", sellerNick);
         DataTable dt = _DBSession.ExecuteDataTable(query);
         _DBSession.Close();
         return(dt);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(null);
     }
 }
コード例 #11
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 public int GetBlakListCloseOrderCount(string sellerNick)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "select count(1) as blakListCount from BlakListCloseOrder where sellerNick = @sellerNick";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", sellerNick);
         DataTable dt = _DBSession.ExecuteDataTable(query);
         _DBSession.Close();
         if (dt.Rows.Count > 0)
         {
             return(Convert.ToInt32(dt.Rows[0]["blakListCount"].ToString()));
         }
         return(0);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(0);
     }
 }
コード例 #12
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 public bool AddCloseAddressConfig(CloseAddressConfig obj)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = @"insert into CloseAddressConfig(sellerNick,receiverName,phone,status,createDate)
                          values(@sellerNick,@receiverName,@phone,@status,getdate())";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", obj.SellerNick);
         _DBSession.SetInParam("@receiverName", obj.ReceiverName);
         _DBSession.SetInParam("@phone", obj.Phone);
         _DBSession.SetInParam("@status", obj.Status);
         _DBSession.ExecuteNonQuery(query);
         _DBSession.Close();
         return(true);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }
コード例 #13
0
ファイル: ShieldRulesDAL.cs プロジェクト: fubendong/--CTCRM
 /// <summary>
 /// 检查用户是否开通了秒评和自动评价
 /// </summary>
 /// <param name="sellerNick"></param>
 /// <returns></returns>
 public Boolean CheckIsMiaoPingAuto(string sellerNick)
 {
     try
     {
         ComDbOpen.DbOpen(_DBSession);
         //清空参数
         _DBSession.ClearParam();
         string query = "select isMiaoRate from RateConfig where sellerNick = @sellerNick and isAutoRating = 1";
         // 设置SQL参数
         _DBSession.SetInParam("@sellerNick", sellerNick);
         DataTable dt = _DBSession.ExecuteDataTable(query);
         _DBSession.Close();
         if (dt.Rows.Count > 0)
         {
             return(Convert.ToBoolean(dt.Rows[0]["isMiaoRate"].ToString()));
         }
         return(false);
     }
     catch (Exception ex)
     {
         ExceptionReporter.WriteLog(ex, ExceptionPostion.TBApply_Data);
         return(false);
     }
 }