@RequestMapping( value = "/showDetailPer/{date}", method = {RequestMethod.GET, RequestMethod.POST}) public String showDailyPer(Page page, @PathVariable String date, Map<String, Object> map) { List<BizFinanceTransDetail> list = financeTransDetailService.findByGmtCreate(page, date); List<Map<String, String>> tempList = new ArrayList<Map<String, String>>(); Map<Long, BizMember> cacheMap = new HashMap<Long, BizMember>(); if (!CollectionUtils.isEmpty(list)) { for (BizFinanceTransDetail detail : list) { Map<String, String> tempMap = new HashMap<String, String>(); tempMap.put("id", detail.getId() + ""); tempMap.put("date", DateUtil.date2String(detail.getGmtCreate(), BizConstant.DATE_FORMAT)); tempMap.put("time", DateUtil.date2String(detail.getGmtCreate(), BizConstant.TIME_FORMAT)); TransUserEnum enums = TransUserEnum.getEnum(detail.getTransUse()); if (enums == (TransUserEnum.MEMBER_ATTENT) || enums == TransUserEnum.MEMBER_ATTENT_PROLONG) { String name = "大师"; BizMember tempMem = cacheMap.get(detail.getTransUseId()) == null ? memberService.get(detail.getTransUseId()) : cacheMap.get(detail.getTransUseId()); if (null != tempMem) { name = "大师(" + tempMem.getName() + ")"; } tempMap.put( "summary", StringUtils.replace( TransUserEnum.getEnum(detail.getTransUse()).getName(), "大师", name)); } else { tempMap.put("summary", TransUserEnum.getEnum(detail.getTransUse()).getName()); } long out = 0; long in = 0; tempMap.put("left", detail.getSysLeft() + ""); tempMap.put("type", TransTypeEnum.getEnum(detail.getTransType()).getName()); switch (TransTypeEnum.getEnum(detail.getTransType())) { case IN: in = detail.getValue(); break; case OUT: out = detail.getValue(); break; default: break; } tempMap.put("out", out + ""); tempMap.put("in", in + ""); tempList.add(tempMap); } map.put("page", page); map.put("data", tempList); } return SHOW_DETAIL_PER; }
@RequestMapping( value = "/showLast", method = {RequestMethod.GET, RequestMethod.POST}) public String showLast(Page page, String keywords, Map<String, Object> map) { List<BizTransRecordVO> records = transRecordService.findTransRecordToReview(page); List<Map<String, String>> recordList = new ArrayList<Map<String, String>>(); if (!CollectionUtils.isEmpty(records)) { Map<Long, BizMember> cacheMap = new HashMap<Long, BizMember>(); for (BizTransRecordVO vo : records) { Map<String, String> tempMap = new HashMap<String, String>(); String name = "该用户已经被删除!"; String memberNo = "无"; String isVal = ""; if (!StringUtils.isBlank(vo.getMemberId())) { Long memberId = Long.parseLong(vo.getMemberId()); BizMember member = cacheMap.get(memberId) == null ? memberService.get(memberId) : cacheMap.get(memberId); name = member.getName(); memberNo = member.getMemberNo(); BizInvestion investion = investionService.findByMemberIdAndInvestDirection( Long.parseLong(vo.getMemberId()), vo.getInvestType()); if (null == investion) { isVal = "无"; } else { isVal = StringUtils.equals(investion.getIsValidated(), "1") ? "赛" : "无"; } } tempMap.put("id", vo.getId() + ""); tempMap.put( "investTypeStr", InvestDirectionEnum.getInvestDirectionEnum(vo.getInvestType()).getName()); tempMap.put("name", name); tempMap.put("memberNo", memberNo); tempMap.put("isVal", isVal); tempMap.put("origionValue", getRealString(vo.getOrigionValue()) + ""); tempMap.put("currValue", getRealString(vo.getCurrValue()) + ""); tempMap.put("lastDayValue", getRealString(vo.getLastDayValue()) + ""); tempMap.put("fee", getRealString(vo.getFee()) + ""); tempMap.put("gainsAndLosses", getRealString(vo.getGainsAndLosses()) + ""); tempMap.put("currIncome", getRealString(vo.getCurrIncome()) + ""); tempMap.put("currOutcome", getRealString(vo.getCurrOutcome()) + ""); recordList.add(tempMap); } } map.put("page", page); map.put("records", recordList); map.put("keywords", keywords); return SHOW_LAST; }
@RequestMapping( value = "/list", method = {RequestMethod.GET, RequestMethod.POST}) public String list(Page page, Map<String, Object> map, BizMember member) { BizMember admin = memberService.getAdminAccount(); if (null == admin) { return LIST; } String type = HttpReceiver.getHttpServletReqeuest().getParameter("keywords"); List<BizSiteMessage> list = null; if (StringUtils.isBlank(type)) { list = siteMessageService.findAll(page); } else { list = siteMessageService.findByMessageType(page, type); } List<Map<String, String>> mapList = new ArrayList<Map<String, String>>(); if (CollectionUtils.isNotEmpty(list)) { for (BizSiteMessage message : list) { Map<String, String> tempMap = new HashMap<String, String>(); tempMap.put("type", SiteMessageTypeEnum.getEnum(message.getMessageType()).getName()); BizMember tempMem = memberService.get(message.getMemberId()); tempMap.put("id", message.getId() + ""); tempMap.put("name", (null == tempMem) ? "该用户已经被删除!" : tempMem.getName()); tempMap.put("content", message.getMessageContent()); tempMap.put("status", MsgStatusEnum.getMsgUseEnum(message.getStatus()).getName()); tempMap.put( "time", DateUtil.date2String(message.getGmtCreate(), BizConstant.DATE_TIME_FORMAT)); mapList.add(tempMap); } } List<Map<String, String>> tempList = new ArrayList<Map<String, String>>(); for (SiteMessageTypeEnum enu : SiteMessageTypeEnum.values()) { Map<String, String> temp = new HashMap<String, String>(); temp.put("name", enu.getName()); temp.put("value", enu.getValue()); tempList.add(temp); } map.put("types", tempList); map.put("page", page); map.put("data", mapList); return LIST; }
@RequestMapping( value = "/list", method = {RequestMethod.GET, RequestMethod.POST}) public @ResponseBody String listTop(Page page, Map<String, Object> map) { BizMember member = HttpReceiver.getCurrentMember(); if (null == member) { return PageUtils.toJsonString(page, null); } List<BizMemberCollect> collectList = memberCollectService.findByMemberId(page, member.getId()); List<Map<String, String>> mapList = new ArrayList<Map<String, String>>(); for (BizMemberCollect collect : collectList) { Map<String, String> tempMap = new HashMap<String, String>(); BizMember mem = memberService.get(collect.getCollectedMemberId()); tempMap.put("id", collect.getId() + ""); tempMap.put("name", mem.getName()); tempMap.put("memberNo", mem.getMemberNo()); mapList.add(tempMap); } return PageUtils.toJsonString(page, mapList); }
@RequestMapping( value = "/show/{id}", method = {RequestMethod.POST, RequestMethod.GET}) public String approval(@PathVariable Long id, Map<String, Object> map) { BizSiteMessage siteMessage = siteMessageService.get(id); if (null == siteMessage) { return SHOW; } Map<String, String> dataMap = new HashMap<String, String>(); dataMap.put("content", siteMessage.getMessageContent()); dataMap.put("status", MsgStatusEnum.getMsgUseEnum(siteMessage.getStatus()).getName()); dataMap.put("id", siteMessage.getId() + ""); dataMap.put("type", SiteMessageTypeEnum.getEnum(siteMessage.getMessageType()).getName()); dataMap.put( "createTime", DateUtil.date2String(siteMessage.getGmtCreate(), BizConstant.DATE_TIME_FORMAT)); BizMember mem = memberService.get(siteMessage.getMemberId()); if (null != mem) { dataMap.put("name", (null == mem) ? "该用户已经被删除!" : mem.getName()); } map.put("data", dataMap); return SHOW; }