generated from root/miduo_server
流水日志查询
parent
71cd17b2ac
commit
c2c9492488
|
@ -39,7 +39,8 @@ public class ItemDaoImpl implements ItemDao {
|
|||
public List<MoneyFlow> findMoneyFlowInfo(String serverId, String startTime, String endTime, String userId) throws Exception {
|
||||
String dbName = MongoName.getTlogMongoDBName(Integer.parseInt(serverId));
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
String sql = "{ \"serverId\": \""+serverId+"\", \"uid\": \""+userId+"\", \"time\": { $gte: \""+startTime+"\" }, \"time\": { $lte: \""+endTime+"\" } }";
|
||||
// String sql = "{ \"serverId\": \""+serverId+"\", \"uid\": \""+userId+"\", \"time\": { $gte: \""+startTime+"\" }, \"time\": { $lte: \""+endTime+"\" } }";
|
||||
String sql = "{ \"serverId\": \""+serverId+"\", \"uid\": \""+userId+"\", \"time\": { $gte: \""+startTime+"\", $lte: \""+endTime+"\" } }";
|
||||
BasicQuery basicQuery = new BasicQuery(sql);
|
||||
List<MoneyFlow> moneyFlows = mongoTemplate.find(basicQuery, MoneyFlow.class);
|
||||
return moneyFlows;
|
||||
|
@ -50,7 +51,7 @@ public class ItemDaoImpl implements ItemDao {
|
|||
String dbName = MongoName.getTlogMongoDBName(Integer.parseInt(serverId));
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
//{ "serverId": "10212", "uid": "10004584", "time": { $lte: "2019-04-08 13:39:31" }, "time": { $gte: "2019-04-10 13:39:31" } }
|
||||
String sql = "{ \"serverId\": \""+serverId+"\", \"uid\": \""+userId+"\", \"time\": { $gte: \""+startTime+"\" }, \"time\": { $lte: \""+endTime+"\" } }";
|
||||
String sql = "{ \"serverId\": \""+serverId+"\", \"uid\": \""+userId+"\", \"time\": { $gte: \""+startTime+"\", $lte: \""+endTime+"\" } }";
|
||||
BasicQuery basicQuery = new BasicQuery(sql);
|
||||
List<ItemFlow> itemFlows = mongoTemplate.find(basicQuery, ItemFlow.class);
|
||||
return itemFlows;
|
||||
|
@ -61,8 +62,7 @@ public class ItemDaoImpl implements ItemDao {
|
|||
public List<ShopBuyInfoFlow> findItemFlowInfoBuyShop(String serverId, String startTime, String endTime, String shopId) throws Exception {
|
||||
String dbName = MongoName.getTlogMongoDBName(Integer.parseInt(serverId));
|
||||
MongoTemplate mongoTemplate = connect.getMongoTemplete(dbName);
|
||||
//{ "serverId": "10212", "uid": "10004584", "time": { $lte: "2019-04-08 13:39:31" }, "time": { $gte: "2019-04-10 13:39:31" } }
|
||||
String sql = "{ \"serverId\": \""+serverId+"\", \"shopId\": \""+shopId+"\", \"time\": { $gte: \""+startTime+"\" }, \"time\": { $lte: \""+endTime+"\" } }";
|
||||
String sql = "{ \"serverId\": \""+serverId+"\", \"shopId\": \""+shopId+"\", \"time\": { $gte: \""+startTime+"\", $lte: \""+endTime+"\" } }";
|
||||
BasicQuery basicQuery = new BasicQuery(sql);
|
||||
List<ShopBuyInfoFlow> itemFlows = mongoTemplate.find(basicQuery, ShopBuyInfoFlow.class);
|
||||
return itemFlows;
|
||||
|
|
Loading…
Reference in New Issue