| 12345678910111213141516171819202122232425262728293031323334353637383940414243 |
-
- /****** Object: StoredProcedure [dbo].[P_GetBlacklist] Script Date: 05/21/2018 16:50:43 ******/
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
-
-
-
-
- ALTER PROCEDURE [dbo].[P_GetBlacklist]
- (
- @Tel NVARCHAR(50),
- @Callid NVARCHAR(50)
- )
- AS
- BEGIN
-
- SET NOCOUNT ON;
- declare @c int=0;
-
- select top 1 @c=COUNT(1) from T_Call_Blacklist
- where isnull(F_TelPhone,'')like '%'+@Tel+'%'
- and F_IsDelete=0
- and getdate() between F_SetTime and F_RemoveTime
-
- if @c>0
- begin
- --DealType处理方式0:IVR处理1骚扰电话2自助服务3转值班电话4留言5呼损6人工处理
- update T_Call_CallRecords set CallState=1,DealType=1,IsDeal=1 where CallId=@Callid
-
- update T_Call_Blacklist set F_InterceptNum=F_InterceptNum+1
- where isnull(F_TelPhone,'')like '%'+@Tel+'%'
- and F_IsDelete=0
- and getdate() between F_SetTime and F_RemoveTime
- end
-
- select @c as BlackListVerify
- END
-
-
-
|