예제 #1
0
 /**
  * TODO 查询用户数量相关统计数据.
  *
  * <p>方法详细说明,如果要换行请使用<br>
  * 标签 <br>
  * author: 周震 date: 2015年7月10日 上午10:13:29
  *
  * @param buyer
  * @return
  */
 @ResponseBody
 @RequestMapping("/getUserDataCount")
 public Map<String, Object> getUserDataCount(
     @RequestParam(required = false, defaultValue = "") String keyword1,
     @RequestParam(required = false, defaultValue = "") String keyword2,
     @RequestParam(required = false, defaultValue = "") String keyword3,
     @RequestParam(required = false, defaultValue = "") String keyword4) {
   Map<String, Object> map = new HashMap<String, Object>();
   try {
     int registerUserCount =
         buyerStatisticsDao.getRegisterUserCount(keyword1, keyword2, keyword3, keyword4);
     //			int vipUserCount = buyerStatisticsDao.getVIPUserCount(keyword1,
     //					keyword2, keyword3, keyword4);
     int onlineUserCount = buyerStatisticsDao.getOnlineUserCount();
     int newUserCount = buyerStatisticsDao.getNewUserCount(keyword1, keyword2, keyword3, keyword4);
     int loseUserCount =
         buyerStatisticsDao.getLoseUserCount(keyword1, keyword2, keyword3, keyword4);
     map.put("registerUserCount", registerUserCount);
     map.put("vipUserCount", 0);
     map.put("onlineUserCount", onlineUserCount);
     map.put("newUserCount", newUserCount);
     map.put("loseUserCount", loseUserCount);
     map.put("success", true);
     logger.debug("操作成功");
   } catch (Exception e) {
     map.put("success", false);
     logger.debug("操作失败");
   }
   return map;
 }
예제 #2
0
 /**
  * TODO 查询点赞和评论相关统计数据.
  *
  * <p>方法详细说明,如果要换行请使用<br>
  * 标签 <br>
  * author: 周震 date: 2015年7月10日 上午10:13:29
  *
  * @param buyer
  * @return
  */
 @ResponseBody
 @RequestMapping("/getPraiseAndDiscussDataCount")
 public Map<String, Object> getPraiseAndDiscussDataCount(
     @RequestParam(required = false, defaultValue = "") String keyword1,
     @RequestParam(required = false, defaultValue = "") String keyword2,
     @RequestParam(required = false, defaultValue = "") String keyword3,
     @RequestParam(required = false, defaultValue = "") String keyword4) {
   Map<String, Object> map = new HashMap<String, Object>();
   try {
     int praiseCount = buyerStatisticsDao.getTotalPraiseCount();
     int discussCount =
         buyerStatisticsDao.getTotalDiscussCount(keyword1, keyword2, keyword3, keyword4);
     map.put("praiseCount", praiseCount);
     map.put("discussCount", discussCount);
     map.put("success", true);
     logger.debug("操作成功");
   } catch (Exception e) {
     map.put("success", false);
     logger.debug("操作失败");
   }
   return map;
 }
예제 #3
0
 /**
  * TODO 查询设计师相关统计数据.
  *
  * <p>方法详细说明,如果要换行请使用<br>
  * 标签 <br>
  * author: 周震 date: 2015年7月10日 上午10:13:29
  *
  * @param buyer
  * @return
  */
 @ResponseBody
 @RequestMapping("/getDesignerDataCount")
 public Map<String, Object> getDesignerDataCount(
     @RequestParam(required = false, defaultValue = "") String keyword1,
     @RequestParam(required = false, defaultValue = "") String keyword2,
     @RequestParam(required = false, defaultValue = "") String keyword3,
     @RequestParam(required = false, defaultValue = "") String keyword4) {
   Map<String, Object> map = new HashMap<String, Object>();
   try {
     double designerTradeAmount =
         buyerStatisticsDao.getDesignerTradeAmount(keyword1, keyword2, keyword3, keyword4);
     int designerBillCount =
         buyerStatisticsDao.getDesignerBillCount(keyword1, keyword2, keyword3, keyword4);
     map.put("designerTradeAmount", designerTradeAmount);
     map.put("designerBillCount", designerBillCount);
     map.put("success", true);
     logger.debug("操作成功");
   } catch (Exception e) {
     map.put("success", false);
     logger.debug("操作失败");
   }
   return map;
 }
예제 #4
0
 /**
  * TODO 查询订单相关统计数据.
  *
  * <p>方法详细说明,如果要换行请使用<br>
  * 标签 <br>
  * author: 周震 date: 2015年7月10日 上午10:13:29
  *
  * @param buyer
  * @return
  */
 @ResponseBody
 @RequestMapping("/getOrderDataCount")
 public Map<String, Object> getOrderDataCount(
     @RequestParam(required = false, defaultValue = "") String keyword1,
     @RequestParam(required = false, defaultValue = "") String keyword2,
     @RequestParam(required = false, defaultValue = "") String keyword3,
     @RequestParam(required = false, defaultValue = "") String keyword4) {
   Map<String, Object> map = new HashMap<String, Object>();
   try {
     int cancelOrderCount =
         buyerStatisticsDao.getCancelOrderCount(keyword1, keyword2, keyword3, keyword4);
     int successOrderCount =
         buyerStatisticsDao.getSuccessOrderCount(keyword1, keyword2, keyword3, keyword4);
     map.put("cancelOrderCount", cancelOrderCount);
     map.put("successOrderCount", successOrderCount);
     map.put("success", true);
     logger.debug("操作成功");
   } catch (Exception e) {
     map.put("success", false);
     logger.debug("操作失败");
   }
   return map;
 }