| | |
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RequestMethod;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import com.yeshi.fanli.entity.admin.HistorySearchAdmin;
|
| | | import com.yeshi.fanli.entity.admin.ScanHistoryAdmin;
|
| | | import com.yeshi.fanli.service.inter.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.order.PidOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.HistorySearchService;
|
| | | import com.yeshi.fanli.service.inter.user.ScanHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.Utils;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | @Resource
|
| | | private HistorySearchService historySearchService;
|
| | |
|
| | | @Resource
|
| | | private PidOrderService pidOrderService;
|
| | |
|
| | | private final static int TOPSUM = 100;
|
| | | private final static String AWEEK = "1";
|
| | | private final static String HALFMONTH = "2";
|
| | | private final static String AMONTH = "3";
|
| | | private final static String THREEMONTH = "4";
|
| | |
|
| | | @RequestMapping(value = "getdatacount", method = RequestMethod.POST)
|
| | | public void getDataCount(PrintWriter out) {
|
| | | long startTime = TimeUtil.getNextDay(-1).getTime();
|
| | | long endTime = startTime + 86400000;
|
| | |
|
| | | long orderCount = orderService.getOrderCountByTime(startTime, endTime);
|
| | | long shareOrderCount = pidOrderService.getPidOrderNormalCount(new Date(startTime), new Date(endTime));
|
| | | long userCount = userInfoService.getUserCount();
|
| | | long historyCount = scanHistoryService.getScanHistory(startTime, endTime);
|
| | | List<ScanHistoryAdmin> scanHisoryList = scanHistoryService.getTop(startTime, endTime, TOPSUM);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("orderCount", orderCount);
|
| | | data.put("shareOrderCount", shareOrderCount);
|
| | | data.put("userCount", userCount);
|
| | | data.put("historyCount", historyCount);
|
| | | data.put("scanHisoryList", scanHisoryList);
|
| | | out.write(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | @RequestMapping(value = "getGoodsBrowseList", method = RequestMethod.POST)
|
| | | public void getGoodsBrowseList(String type, PrintWriter out) {
|