| | |
| | |
|
| | |
|
| | | @Override
|
| | | public List<Object> count24HOderByChannel(String channel, Integer type, String years,
|
| | | public List<Map<String, Object>> count24HOderByChannel(String channel, Integer type, String years,
|
| | | String startTime, String endTime) throws Exception{
|
| | | List<Map<String, Object>> list = hongBaoMapper.count24HOderByChannel(channel, type, years, |
| | | startTime, endTime);
|
| | | |
| | | if (list == null || list.size() == 0) {
|
| | | return null;
|
| | | } |
| | | |
| | | switch (type){
|
| | | case 1: // 按天处理
|
| | | return dayFactory(startTime, endTime, list);
|
| | | case 2: // 按月处理
|
| | | return monthFactory(list);
|
| | | case 3: |
| | | return yearFactory(list);
|
| | | default: |
| | | return null;
|
| | | }
|
| | | |
| | | return hongBaoMapper.count24HOderByChannel(channel, type, years, startTime, endTime);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<Object> countHistoryOderByChannel(String channel, Integer type, String years,
|
| | | public List<Map<String, Object>> countHistoryOderByChannel(String channel, Integer type, String years,
|
| | | String startTime, String endTime) throws Exception{
|
| | |
|
| | | List<Map<String, Object>> list = hongBaoMapper.countHistoryOderByChannel(channel, type, years, |
| | | return hongBaoMapper.countHistoryOderByChannel(channel, type, years, |
| | | startTime, endTime);
|
| | | |
| | | if (list == null || list.size() == 0) {
|
| | | return null;
|
| | | } |
| | | |
| | | switch (type){
|
| | | case 1: // 按天处理
|
| | | return dayFactory(startTime, endTime, list);
|
| | | case 2: // 按月处理
|
| | | return monthFactory(list);
|
| | | case 3: |
| | | return yearFactory(list);
|
| | | default: |
| | | return null;
|
| | | }
|
| | | |
| | | }
|
| | |
|
| | |
|
| | |
| | |
|
| | | for (int j = 0; j < list.size(); j++) {
|
| | | Map<String, Object> map = list.get(j);
|
| | | Object createDate = map.get("createDate");
|
| | | Object createDate = map.get("showDate");
|
| | | String month = createDate.toString();
|
| | | if (plusDay.equalsIgnoreCase(month)) {
|
| | | payMoney = map.get("payMoney");
|
| | |
| | | SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy/MM/dd");
|
| | | Date parseDate = sdf.parse(plusDay.toString());
|
| | |
|
| | | mapObject.put("createDate", sdf2.format(parseDate));
|
| | | mapObject.put("showDate", sdf2.format(parseDate));
|
| | |
|
| | | listObject.add(mapObject);
|
| | |
|
| | |
| | |
|
| | | for (int j = 0; j < list.size(); j++) {
|
| | | Map<String, Object> map = list.get(j);
|
| | | Object createDate = map.get("createDate");
|
| | | Object createDate = map.get("showDate");
|
| | | String month = createDate.toString();
|
| | | if ((i+"").equalsIgnoreCase(month) || i == Integer.parseInt(month)) {
|
| | | payMoney = map.get("payMoney");
|
| | |
| | | }
|
| | | mapObject.put("commision", commision);
|
| | |
|
| | | mapObject.put("createDate", i + "月");
|
| | | mapObject.put("showDate", i + "月");
|
| | |
|
| | | listObject.add(mapObject);
|
| | | }
|
| | |
| | | if (commision == null) {
|
| | | commision = 0;
|
| | | }
|
| | | map.put("commision", commision + "年");
|
| | | |
| | | map.put("commision", commision);
|
| | |
|
| | | listObject.add(map);
|
| | | }
|