|
@@ -23,10 +23,11 @@ select t1.tenterprise_userid
|
|
|
when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
|
|
when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
|
|
|
(t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
|
|
(t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then 1
|
|
|
else 0 end as fisneedpay,
|
|
else 0 end as fisneedpay,
|
|
|
- case
|
|
|
|
|
- when t6.tpayinfoid IS null and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
|
|
|
|
|
- (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then '当前账号未激活'
|
|
|
|
|
- else '' end as fioserrmsg,
|
|
|
|
|
|
|
+ case when t6.tpayinfoid IS null and not exists(select *from tpayinfo where tagentsid=t1.tagentsid OR tenterprise_userid=t1.tenterprise_userid) and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
|
|
|
|
|
+ (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then '当前账号未激活'
|
|
|
|
|
+ when t6.tpayinfoid IS null and exists(select *from tpayinfo where tagentsid=t1.tagentsid OR tenterprise_userid=t1.tenterprise_userid) and ((t1.fusertype = '经销商' and t5.fagentamount > 0) or
|
|
|
|
|
+ (t1.fusertype = '企业' and t5.FENTERPRISEUSERAMOUNT > 0)) then '账号已到期,请前往续费'
|
|
|
|
|
+ else '' end as fioserrmsg,
|
|
|
case
|
|
case
|
|
|
when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
|
|
when t6.tpayinfoid IS null and t1.fusertype = '经销商' then t5.fagentamount
|
|
|
when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
|
|
when t6.tpayinfoid IS null and t1.fusertype = '企业' then t5.FENTERPRISEUSERAMOUNT
|