|
|
CustomerSqlConn.op("insert into UserFriend (Id) select Id from Users where AuthFlag=1 and AuthDate<'" + Month + "-01 00:00:00' and Id not in (select UserId from PosMachinesTwo where `Status`>-1 and BuyUserId!=UserId and UserId not in (select UserId from PullnewSummary) and UserId not in (select BuyUserId from PosMachinesTwo where `Status`>-1))", conn);
|
|
CustomerSqlConn.op("insert into UserFriend (Id) select Id from Users where AuthFlag=1 and AuthDate<'" + Month + "-01 00:00:00' and Id not in (select UserId from PosMachinesTwo where `Status`>-1 and BuyUserId!=UserId and UserId not in (select UserId from PullnewSummary) and UserId not in (select BuyUserId from PosMachinesTwo where `Status`>-1))", conn);
|
|
|
CustomerSqlConn.op("insert into UserAccountRecord (CreateDate,UpdateDate,UserId,ChangeType,ChangeAmount,BeforeTotalAmount,AfterTotalAmount,BeforeFreezeAmount,AfterFreezeAmount,BeforeBalanceAmount,AfterBalanceAmount) select now(),now(),Id,125,BalanceAmount,TotalAmount BeforeTotalAmount,TotalAmount AfterTotalAmount,FreezeAmount,FreezeAmount,BalanceAmount BeforeBalanceAmount,BalanceAmount-BalanceAmount AfterBalanceAmount from UserAccount where Id in (select Id from UserFriend) and BalanceAmount>0 and BalanceAmount<10", conn);
|
|
CustomerSqlConn.op("insert into UserAccountRecord (CreateDate,UpdateDate,UserId,ChangeType,ChangeAmount,BeforeTotalAmount,AfterTotalAmount,BeforeFreezeAmount,AfterFreezeAmount,BeforeBalanceAmount,AfterBalanceAmount) select now(),now(),Id,125,BalanceAmount,TotalAmount BeforeTotalAmount,TotalAmount AfterTotalAmount,FreezeAmount,FreezeAmount,BalanceAmount BeforeBalanceAmount,BalanceAmount-BalanceAmount AfterBalanceAmount from UserAccount where Id in (select Id from UserFriend) and BalanceAmount>0 and BalanceAmount<10", conn);
|
|
|
CustomerSqlConn.op("insert into UserAccountRecord (CreateDate,UpdateDate,UserId,ChangeType,ChangeAmount,BeforeTotalAmount,AfterTotalAmount,BeforeFreezeAmount,AfterFreezeAmount,BeforeBalanceAmount,AfterBalanceAmount) select now(),now(),Id,125,10,TotalAmount BeforeTotalAmount,TotalAmount AfterTotalAmount,FreezeAmount,FreezeAmount,BalanceAmount BeforeBalanceAmount,BalanceAmount-10 AfterBalanceAmount from UserAccount where Id in (select Id from UserFriend) and BalanceAmount>=10;", conn);
|
|
CustomerSqlConn.op("insert into UserAccountRecord (CreateDate,UpdateDate,UserId,ChangeType,ChangeAmount,BeforeTotalAmount,AfterTotalAmount,BeforeFreezeAmount,AfterFreezeAmount,BeforeBalanceAmount,AfterBalanceAmount) select now(),now(),Id,125,10,TotalAmount BeforeTotalAmount,TotalAmount AfterTotalAmount,FreezeAmount,FreezeAmount,BalanceAmount BeforeBalanceAmount,BalanceAmount-10 AfterBalanceAmount from UserAccount where Id in (select Id from UserFriend) and BalanceAmount>=10;", conn);
|