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.
sql-tools/禁用app.sql

52 lines
1.2 KiB

1 year ago
use main
INSERT TMerchantConfig(FMchId,FKey,FValue)
SELECT dbo.FNClientId(FClientNo),'MobileEmployeeAppDisabled','false'
FROM TClientLoginLog
WHERE FTime > '2018-11-01'
AND FUserType = 'MOBEmployee'
AND FMessage = '<EFBFBD><EFBFBD>½<EFBFBD>ɹ<EFBFBD>'
GROUP BY FClientNO
UPDATE TMerchantConfig
SET FValue = 'true'
WHERE FKey = 'MobileEmployeeAppDisabled'
AND FMchId IN(SELECT C.FClientId FROM TClientInfo AS C WHERE FClientNo IN(
SELECT FClientNo FROM
(
SELECT FClientNO ,SUM(1) AS FCount
FROM TClientLoginLog
WHERE FTime > '2018-11-18'
AND FUserType = 'MOBEmployee'
AND FMessage = '<EFBFBD><EFBFBD>½<EFBFBD>ɹ<EFBFBD>'
--AND FClientNo IN(SELECT FClientNo FROM TClientInfo WHERE FOwner = 'shanxi')
GROUP BY FClientNO
-- ORDER BY SUM(1) ASC
) AS A
WHERE A.FCount <= 100
))
AND FValue = 'false'
use saidao_main
SELECT * FROM TClientLoginLog WHERE FMessage like '%app%'
AND FTime > '2018-11-01'
SELECT * FROM TClientInfo WHERE FClientNO = '0715xha'
PGetConnInfo '0715XHA'
SELECT * FROM TClientInfo WHERE FClientNO = '0715XHA'
SELECT * FROM TServerInfo WHERE FServerId = 104
SELECT * FROM TClientLoginLog
WHERE 1=1
--AND FClientNO = '0715xha'
AND FTime > '2018-11-13'
AND FUserType = 'MOBEmployee'
ORDER BY FTime DESC