给华众的Other业务添加一个续费提醒,新注册业务的提醒
给华众的Other业务添加一个续费提醒,新注册业务的提醒
华众程序的用户,应该有很多人用过Other类型的产品。但是Other产品有一个缺点,那就是会员新注业务和续费业务没有提醒。这样就增大了该类产品的维护成本(时间)。今天我给大家带来一种解决方案。
我们以ot2为例,在ot2lst中添加字段肯定是不可取的方案,我的方案是添加一个表。malst,字段设置如下:
ma_id 自动编号
ma_otid 对应的ot2list.s_id
ma_otstr ot2,如果改成ot1,ma_otid就是ot1lst.s_id
ma_lastdate 到期日期+1天
加表的好处如下:无需修改任何子平台,主平台只需修改后台的1个文件。 需要修改视图: 在合适的位置添加链接: 处理日期的程序: 如果other产品有产品,请用以下代码升级。
原理如下:
1.新注册业务,ma_lastdate字段为空,我们处理后,值变成了到期日期+1天
2.续费业务,到期日期比原来有所增加,但是ma_lastdate字段并未变化,所以查询到期日期
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
ALTER VIEW dbo.v_ot2lst
AS
SELECT dbo.pdtlst.*, dbo.ot2lst.*, dbo.memlst.u_rotnme AS u_rotnme,
dbo.memlst.u_myare AS u_myare, dbo.memlst.u_nme AS u_nme,
dbo.memlst.u_eml AS u_eml, dbo.memlst.u_fatstr AS u_fatstr,
dbo.memlst.u_fatnme AS u_fatnme,dbo.malst.ma_lastdate as lastmanager
FROM dbo.ot2lst LEFT OUTER JOIN
dbo.pdtlst ON dbo.ot2lst.s_prd = dbo.pdtlst.g_prd LEFT OUTER JOIN
dbo.memlst ON dbo.ot2lst.s_unme = dbo.memlst.u_nme LEFT JOIN dbo.malst on dbo.malst.ma_otid=dbo.ot2lst.s_id and dbo.malst.ma_otstr=’ot2′
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
在判断中添加:
master/ot2_mng/ot2_lst.asp中添加判断。
elseif querytype=175 then
qstring=qstring&" and lastmanager is null"
elseif querytype=176 then
qstring=qstring&" and lastmanager is not null and s_exptme>lastmanager"
<a class=commonface href="ot2_lst.asp?querytype=175">待处理申请业务</a>
<a class=commonface href="ot2_lst.asp?querytype=176">待处理续费业务</a>
< %
's_exptme 业务到期日期
'sid 业务ID
set rs=server.createobject("ADODB.recordset")
rs.open "select * from malst where ma_otstr='ot2' and ma_otid="&sid,conn,3,2
if rs.eof then
rs.addnew
rs("ma_otstr")="ot2"
rs("ma_otid")=sid
rs("ma_lastdate")=s_exptme+1
else
rs("ma_lastdate")=s_exptme+1
end if
rs.update
rs.close
set rs=nothing
%>
'Name:addLastManager.vbs
'Desc:给所有ot型业务添加lastmanager记录
'Auth:猫七(Miaoqiyuan.cn)
set conn=createobject("ADODB.connection")
conn.open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=hzhost7;Password=********;Initial Catalog=hzhost7;Data Source=********"
set rs=conn.execute("select * from ot2lst where s_id>10000000")
do while not rs.eof
if conn.execute("select * from malst where ma_otstr='ot2' and ma_otid="&rs("s_id")).eof then
conn.execute("insert into malst(ma_otstr,ma_otid,ma_lastdate)values('ot2',"&rs("s_id")&",'"&rs("s_exptme")+1&"')")
wscript.echo "insert into:"&rs("s_id")
else
wscript.echo rs("s_id")&" ishave."
end if
rs.movenext
loop
技术出身 华众 我觉得是IDC里面很专业的软件了 。