From f76808245011479bdaee411f7392478ab2e65541 Mon Sep 17 00:00:00 2001 From: Notmoo Date: Sun, 30 Jul 2017 22:19:15 +0200 Subject: [PATCH] =?UTF-8?q?Module=20Server,=20clss=20SimpleMessageHandler?= =?UTF-8?q?=20:=20correction=20r=C3=A9ponse=20queryStat=20+=20update=20ins?= =?UTF-8?q?tantiation=20des=20services?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/pqt/server/controller/SimpleMessageHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java b/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java index cbbaef1c..4269be93 100644 --- a/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java +++ b/Workspace/server/src/main/WEB-INF/classes/com/pqt/server/controller/SimpleMessageHandler.java @@ -40,8 +40,8 @@ public class SimpleMessageHandler implements IMessageHandler { serverStateService = new ServerStateService(); accountService = new AccountService(); clientService = new ClientService(); - saleService = new SaleService(); stockService = new StockService(); + saleService = new SaleService(stockService); statisticsService = new StatisticsService(stockService, saleService); messageToolFactory = new GSonMessageToolFactory(); @@ -81,8 +81,8 @@ public class SimpleMessageHandler implements IMessageHandler { fields.put("top_popular_products", messageToolFactory.getListFormatter(LightweightProduct.class).format(statisticsService.getTopPopularProducts(5))); fields.put("staff_sale_worth",Double.toString(statisticsService.getStaffSaleWorth())); fields.put("staff_sale_amount",Integer.toString(statisticsService.getStaffSaleAmount())); - fields.put("guest_sale_worth",Double.toString(statisticsService.getGuestSaleAmount())); - fields.put("guest_sale_amount",Integer.toString(statisticsService.getStaffSaleAmount())); + fields.put("guest_sale_worth",Double.toString(statisticsService.getGuestSaleWorth())); + fields.put("guest_sale_amount",Integer.toString(statisticsService.getGuestSaleAmount())); return new Message(MessageType.MSG_STAT, serverStateService.getServer(), message.getEmitter(), message.getUser(), message, fields); });