| | |
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | |
| | | private CommonOrderService commonOrderService;
|
| | |
|
| | | @Resource
|
| | | private HongBaoService hongBaoService;
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | |
|
| | | /**
|
| | | * 订单列表
|
| | |
| | |
|
| | | try {
|
| | | if (slotTime != null) {
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
|
| | | endTime= sd.format(new Date());
|
| | | startTime = convertDate(slotTime, endTime);
|
| | | SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd");
|
| | | endTime= sd.format(new Date());
|
| | | startTime = convertDate(slotTime, endTime);
|
| | | }
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | |
| | | // 需要统计筛选信息 :未失效的总金额 以及订单
|
| | | if (needCount && page == 1) {
|
| | |
|
| | | todayMoney = commonOrderService.countBonusOrderMoney(uid, type, dateType, startTime, endTime);
|
| | | Map<String, Object> shareMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, type,
|
| | | dateType, startTime, endTime);
|
| | |
|
| | | todayTotal = commonOrderService.countBonusOrderNumber(uid, type, dateType, startTime, endTime);
|
| | | if (shareMap != null) {
|
| | | Object totalNum = shareMap.get("totalNum");
|
| | | if (totalNum != null) {
|
| | | todayTotal = (long) totalNum;
|
| | | }
|
| | | |
| | | Object totalmoney = shareMap.get("totalmoney");
|
| | | if (totalmoney != null) {
|
| | | todayMoney = (BigDecimal) totalmoney;
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | // 统计有效的订单数量 、 失效订单数量 、维权订单数量
|
| | | Map<String, BigDecimal> countOrder = commonOrderService.countByUidAndOrderState(uid, type,
|
| | |
| | |
|
| | | try {
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | // 分享统计
|
| | | BigDecimal sharemoney = commonOrderService.countBonusOrderMoney(uid,2, dateType, null, null);
|
| | | Object shareCount = 0;
|
| | | BigDecimal sharemoney = new BigDecimal(0.00);
|
| | | Object inviteCount = 0;
|
| | | BigDecimal inviteMoney = new BigDecimal(0.00);
|
| | |
|
| | | data.put("shareCount", commonOrderService.countBonusOrderNumber(uid, 2, dateType, null, null));
|
| | | data.put("sharemoney", sharemoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | Map<String, Object> shareMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 2 , dateType, null, null);
|
| | | if (shareMap != null) {
|
| | | Object totalNum = shareMap.get("totalNum");
|
| | | if (totalNum != null) {
|
| | | shareCount = totalNum;
|
| | | }
|
| | | |
| | | Object totalmoney = shareMap.get("totalmoney");
|
| | | if (totalmoney != null) {
|
| | | sharemoney = (BigDecimal) totalmoney;
|
| | | sharemoney = sharemoney.setScale(2, BigDecimal.ROUND_DOWN);
|
| | | }
|
| | | }
|
| | |
|
| | | // 邀请统计
|
| | | BigDecimal inviteMoney = commonOrderService.countBonusOrderMoney(uid,3, dateType, null, null);
|
| | | Map<String, Object> inviteMap = commonOrderService.countBonusOrderMoneyAndNumber(uid, 3 , dateType, null, null);
|
| | | if (inviteMap != null) {
|
| | | Object totalNum = inviteMap.get("totalNum");
|
| | | if (totalNum != null) {
|
| | | inviteCount = totalNum;
|
| | | }
|
| | | |
| | | Object totalmoney = inviteMap.get("totalmoney");
|
| | | if (totalmoney != null) {
|
| | | sharemoney = (BigDecimal) totalmoney;
|
| | | inviteMoney = sharemoney.setScale(2, BigDecimal.ROUND_DOWN);
|
| | | }
|
| | | }
|
| | |
|
| | | data.put("inviteCount", commonOrderService.countBonusOrderNumber(uid, 3, dateType, null, null));
|
| | | data.put("inviteMoney", inviteMoney.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
|
| | | data.put("showTiCheng", hongBaoService.getTotalTiChengCount(uid) > 0);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("shareCount", shareCount);
|
| | | data.put("sharemoney", sharemoney);
|
| | | data.put("inviteCount", inviteCount);
|
| | | data.put("inviteMoney", inviteMoney);
|
| | |
|
| | | data.put("showTiCheng", hongBaoV2CountService.getTotalTiChengCount(uid) > 0);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
|
| | | } catch (Exception e) {
|