|
|
+ sql += "insert into SubsidyRecord (CreateDate,SeoKeyword,SeoTitle,ParentNav,BrandId,UserId,ProfitAmount) select now(),'root','" + date + "',(select ParentNav from Users where Id=p.SubsidyUserId)," + i + ",SubsidyUserId,sum(SubsidyProfitRate) from ProfitSubsidyDetail p where Status=1 and BrandId=" + i + " and TradeMonth='" + date + "' GROUP BY SubsidyUserId;\n";
|