You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
774 B
38 lines
774 B
1 year ago
|
use main
|
||
|
|
||
|
SELECT count(1) FROM TAppSession
|
||
|
|
||
|
DROP TABLE #Mch
|
||
|
|
||
|
|
||
|
SELECT A.FMchId ,A.FMchNo INTO #Mch
|
||
|
FROM TMerchantLoginLog AS B,TMerchantInfo AS A
|
||
|
WHERE B.FUserType = 'MOBEmployee'
|
||
|
AND B.FTime > '2020-04-30'
|
||
|
AND A.FOwner = 'saidao'
|
||
|
AND A.FMchNo = B.FMchNo
|
||
|
GROUP BY A.FMchId,A.FMchNo
|
||
|
|
||
|
SELECT * FROM #Mch
|
||
|
|
||
|
DELETE TMerchantCOnfig
|
||
|
WHERE FMchId IN(SELECT FMchId FROM #Mch)
|
||
|
AND FKey = 'MobileEmployeeAppDisabled'
|
||
|
|
||
|
INSERT TMerchantCOnfig(FMchId,FKey,FValue)
|
||
|
SELECT FMchId,'MobileEmployeeAppDisabled','true'
|
||
|
FROM #Mch
|
||
|
|
||
|
SELECT * FROM TMerchantCOnfig WHERE FMchId IN(SELECT FMchId FROM #Mch)
|
||
|
AND FKey = 'MobileEmployeeAppDisabled'
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
AND FMchNo IN(SELECT FMchNo FROM TMerchantInfo WHERE FOwner = 'shanxi')
|
||
|
GROUP BY FMchNo
|
||
|
|
||
|
|
||
|
SELECT * FROM TMerchantCOnfig
|
||
|
WHERE FKey like '%dis%'
|