fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMoneyController.java
@@ -189,8 +189,11 @@ // 上月提现 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.extract); typeList.add(UserMoneyDetailTypeEnum.extractNew); typeList.add(UserMoneyDetailTypeEnum.extractVerify); typeList.add(UserMoneyDetailTypeEnum.extractVerifyNew); typeList.add(UserMoneyDetailTypeEnum.extractReject); typeList.add(UserMoneyDetailTypeEnum.extractAutoWX); long timeStamp = System.currentTimeMillis(); Calendar calendar = Calendar.getInstance(); calendar.setTimeInMillis(timeStamp); @@ -210,8 +213,11 @@ calendar.add(Calendar.MONTH, -1); typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.extract); typeList.add(UserMoneyDetailTypeEnum.extractNew); typeList.add(UserMoneyDetailTypeEnum.extractVerify); typeList.add(UserMoneyDetailTypeEnum.extractVerifyNew); typeList.add(UserMoneyDetailTypeEnum.extractReject); typeList.add(UserMoneyDetailTypeEnum.extractAutoWX); vo.setMonthExtractMoney( userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs()); @@ -219,12 +225,16 @@ // 上月收入 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.fanli); typeList.add(UserMoneyDetailTypeEnum.fanliNew); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew); typeList.add(UserMoneyDetailTypeEnum.share); typeList.add(UserMoneyDetailTypeEnum.shareNew); typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan); typeList.add(UserMoneyDetailTypeEnum.invite); typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan); typeList.add(UserMoneyDetailTypeEnum.inviteAndShare); typeList.add(UserMoneyDetailTypeEnum.teamReward); typeList.add(UserMoneyDetailTypeEnum.weiQuan); typeList.add(UserMoneyDetailTypeEnum.hongbao); typeList.add(UserMoneyDetailTypeEnum.hongbaoDeduct); @@ -241,12 +251,16 @@ // 本月到账 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.fanli); typeList.add(UserMoneyDetailTypeEnum.fanliNew); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew); typeList.add(UserMoneyDetailTypeEnum.share); typeList.add(UserMoneyDetailTypeEnum.shareNew); typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan); typeList.add(UserMoneyDetailTypeEnum.invite); typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan); typeList.add(UserMoneyDetailTypeEnum.inviteAndShare); typeList.add(UserMoneyDetailTypeEnum.teamReward); typeList.add(UserMoneyDetailTypeEnum.weiQuan); typeList.add(UserMoneyDetailTypeEnum.hongbao); typeList.add(UserMoneyDetailTypeEnum.hongbaoDeduct); @@ -271,13 +285,18 @@ // 总的到账 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.fanli); typeList.add(UserMoneyDetailTypeEnum.fanliNew); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew); typeList.add(UserMoneyDetailTypeEnum.orderReward); typeList.add(UserMoneyDetailTypeEnum.orderRewardNew); typeList.add(UserMoneyDetailTypeEnum.share); typeList.add(UserMoneyDetailTypeEnum.shareNew); typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan); typeList.add(UserMoneyDetailTypeEnum.invite); typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan); typeList.add(UserMoneyDetailTypeEnum.inviteAndShare); typeList.add(UserMoneyDetailTypeEnum.teamReward); typeList.add(UserMoneyDetailTypeEnum.weiQuan); typeList.add(UserMoneyDetailTypeEnum.hongbao); typeList.add(UserMoneyDetailTypeEnum.hongbaoDeduct); @@ -294,15 +313,20 @@ // 总的自购返利 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.fanli); typeList.add(UserMoneyDetailTypeEnum.fanliNew); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan); typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuanNew); typeList.add(UserMoneyDetailTypeEnum.orderReward); typeList.add(UserMoneyDetailTypeEnum.orderRewardNew); vo.setTotalFanLiMoney( userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs()); // 累计成功提现 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.extract); typeList.add(UserMoneyDetailTypeEnum.extractNew); typeList.add(UserMoneyDetailTypeEnum.extractVerify); typeList.add(UserMoneyDetailTypeEnum.extractVerifyNew); typeList.add(UserMoneyDetailTypeEnum.extractAutoWX); typeList.add(UserMoneyDetailTypeEnum.extractReject); vo.setTotalExtractMoney( @@ -312,6 +336,7 @@ // 总的分享赚 typeList.clear(); typeList.add(UserMoneyDetailTypeEnum.share); typeList.add(UserMoneyDetailTypeEnum.shareNew); typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan); vo.setTotalShareMoney( userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs()); fanli/src/main/java/com/yeshi/fanli/controller/client/v2/UserOrderControllerV2.java
@@ -585,9 +585,6 @@ buyer = UserLevelEnum.daRen; } BigDecimal upperTotalMoney = new BigDecimal(0); List<GoodsRebateVO> voList = new ArrayList<>(); for (HongBaoOrder hongBaoOrder : hoList) { @@ -605,7 +602,10 @@ // 实付款 BigDecimal payment = hongBaoOrder.getCommonOrder().getPayment(); if (hongBaoOrder.getCommonOrder().getSettlement() != null) // 若已结算 -显示结算金额 Integer orderState = hongBaoOrder.getCommonOrder().getState(); if (hongBaoOrder.getCommonOrder().getSettlement() != null && (orderState == CommonOrder.STATE_JS || orderState == CommonOrder.STATE_WQ)) payment = hongBaoOrder.getCommonOrder().getSettlement(); if (payment == null) payment = new BigDecimal(0); fanli/src/main/java/com/yeshi/fanli/dao/dynamic/GoodsEvaluateDao.java
@@ -206,4 +206,19 @@ query.with(new Sort(Sort.Direction.ASC,"createTime")); return mongoTemplate.find(query, GoodsEvaluate.class); } /** * 查询有效 * @param start * @param count * @param key * @return */ public List<GoodsEvaluate> removeDownGoods() { Query query = new Query(); query.addCriteria(Criteria.where("type").is("single")); query.addCriteria(Criteria.where("goods.state").is(1)); return mongoTemplate.find(query, GoodsEvaluate.class); } } fanli/src/main/java/com/yeshi/fanli/service/impl/count/DailyCountUserServiceImpl.java
@@ -216,15 +216,16 @@ for (UserInfoRegister register: listRegister) { String channel = register.getChannel(); if (channelName.equalsIgnoreCase(channel)) { // 当日渠道用户 totalDay ++ ; } Long id = register.getId(); // 判断当前用户是否今日下单 for (Long uid: listOrder) { if (uid.longValue() == id.longValue()) { totalValid ++; break; Long id = register.getId(); // 判断当前用户是否今日下单 for (Long uid: listOrder) { if (uid.longValue() == id.longValue()) { totalValid ++; break; } } } } @@ -276,7 +277,6 @@ if (list != null && list.size() > 0) { System.out.println("***********************" +list.size()); totalUser = list.size(); for (UserInfoRegister user : list) { listUid.add(user.getId()); @@ -286,7 +286,6 @@ if (listUid.size() > 0) { List<Long> listUidDown = commonOrderCountService.getDownOrderUserByListUidAndDate(limitDay, listUid); if (listUidDown != null && listUidDown.size() > 0) { System.out.println("***********************" +listUidDown.size()); for (Long uid: listUid) { int total = 0; for (Long id: listUidDown) { @@ -296,17 +295,11 @@ } if (total > 0) { System.out.println("-----------------------------------------------------"); totalWeek ++; System.out.println(totalWeek); System.out.println("-----------------------------------------------------"); } if (total >= 3) { System.out.println("-----------------------------------------------------"); totalWeek3 ++; System.out.println(totalWeek3); System.out.println("-----------------------------------------------------"); } } } fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -471,7 +471,7 @@ lineNum = 1; } else if (totalImg == 3) { lineNum = 3; } else if (totalImg <= 4) { } else if (totalImg == 2 || totalImg == 4) { lineNum = 2; } else { lineNum = 3; @@ -806,7 +806,7 @@ lineNum = 1; } else if (totalImg == 3) { lineNum = 3; } else if (totalImg <= 4) { } else if (totalImg == 2 || totalImg == 4) { lineNum = 2; } else { lineNum = 3; @@ -1112,7 +1112,7 @@ lineNum = 1; } else if (totalImg == 3) { lineNum = 3; } else if (totalImg <= 4) { } else if (totalImg == 2 || totalImg == 4) { lineNum = 2; } else { lineNum = 3; @@ -1302,7 +1302,7 @@ lineNum = 1; } else if (totalImg == 3) { lineNum = 3; } else if (totalImg <= 4) { } else if (totalImg == 2 || totalImg == 4) { lineNum = 2; } else { lineNum = 3; @@ -1514,6 +1514,8 @@ // 删除已过期 removeOverdue(); removeDownGoods(); } }); @@ -1681,6 +1683,8 @@ // 删除已过期 removeOverdue(); removeDownGoods(); } }); @@ -1929,7 +1933,7 @@ lineNum = 1; } else if (imgList.size() == 3) { lineNum = 3; } else if (imgList.size() <= 4) { } else if (imgList.size() == 2 || imgList.size() == 4) { lineNum = 2; } else { lineNum = 3; @@ -2157,7 +2161,7 @@ lineNum = 1; } else if (imgList.size() == 3) { lineNum = 3; } else if (imgList.size() <= 4) { } else if (imgList.size() == 2 || imgList.size() == 4) { lineNum = 2; } else { lineNum = 3; @@ -2369,6 +2373,9 @@ } /** * 删除已过期时间 */ private void removeOverdue() { List<GoodsEvaluate> list = goodsEvaluateDao.queryOverdue(); if (list == null || list.size() == 0) { @@ -2390,4 +2397,21 @@ } } /** * 删除商品已下架-单品 */ private void removeDownGoods() { try { List<GoodsEvaluate> list = goodsEvaluateDao.removeDownGoods(); if (list == null || list.size() == 0) { return; } for (GoodsEvaluate goodsEvaluate : list) { goodsEvaluateDao.remove(goodsEvaluate); } } catch (Exception e) { e.printStackTrace(); } } } fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/UserMoneyMsgNotificationServiceImpl.java
@@ -37,7 +37,7 @@ @Override public void extractApplay(Extract extract) { MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("人工审核中", extract.getUserInfo().getId(), extract, null, null); null, null, "审核将会在24小时内完成"); try { msgMoneyDetailService.addMsgMoneyDetail(detail); } catch (MsgMoneyDetailException e) { @@ -48,7 +48,7 @@ @Override public void extractFail(Extract extract, String reason) { MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("提现失败", extract.getUserInfo().getId(), extract, reason, null); reason, null, "如有疑问请联系人工客服"); try { msgMoneyDetailService.addMsgMoneyDetail(detail); } catch (MsgMoneyDetailException e) { @@ -59,7 +59,7 @@ @Override public void extractSuccess(Extract extract, String alipayNo) { MsgMoneyDetail detail = MsgMoneyDetailFactory.createExtractMsg("提现成功", extract.getUserInfo().getId(), extract, null, alipayNo); null, alipayNo, "如有疑问请联系人工客服"); try { msgMoneyDetailService.addMsgMoneyDetail(detail); } catch (MsgMoneyDetailException e) { fanli/src/main/java/com/yeshi/fanli/service/impl/order/LostOrderServiceImpl.java
@@ -246,16 +246,17 @@ List<HongBaoOrder> hongBaoOrderList = hongBaoOrderService.listDetailByOrderIdAndSourceType(orderId, orderType); int goodsCount = 0; BigDecimal fanMoney = new BigDecimal(0); for (HongBaoOrder hongBaoOrder : hongBaoOrderList) { if (hongBaoOrder.getCommonOrder().getState() != CommonOrder.STATE_SX) if (hongBaoOrder.getCommonOrder().getState() != CommonOrder.STATE_SX) { goodsCount += hongBaoOrder.getCommonOrder().getCount(); fanMoney = fanMoney.add(hongBaoOrder.getHongBaoV2().getMoney()); } } // TODO 分享订单可找回 if (order != null) userOrderMsgNotificationService.orderFoundSuccess(lo.getUserInfo().getId(), orderId, orderType, Constant.TYPE_REBATE, order.getMoney(), order.getMoney(), goodsCount, new Date(lo.getCreateTime())); Constant.TYPE_REBATE, order.getMoney(), fanMoney, goodsCount, new Date(lo.getCreateTime())); } } } fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgMoneyDetailFactory.java
@@ -29,7 +29,8 @@ * @param beiZhu * @return */ public static MsgMoneyDetail createExtractMsg(String stateDesc, Long uid, Extract extract, String reason, String alipayNo) { public static MsgMoneyDetail createExtractMsg(String stateDesc, Long uid, Extract extract, String reason, String alipayNo, String beizu) { if (extract == null || uid == null) return null; @@ -54,9 +55,8 @@ listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("原因", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO(reason, ClientTextStyleVO.COLOR_CONTENT))); } listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE), new ClientTextStyleVO("如有疑问请联系人工客服", ClientTextStyleVO.COLOR_CONTENT))); new ClientTextStyleVO(beizu, ClientTextStyleVO.COLOR_CONTENT))); MsgMoneyDetail detail = new MsgMoneyDetail(); detail.setBeiZhu(reason);