Merge remote-tracking branch 'origin/div' into div
| | |
| | | HttpServletResponse response = servletContainer.getResponse(); |
| | | String callback = request.getParameter("callback"); |
| | | if (StringUtil.isNullOrEmpty(callback)) { |
| | | response.getWriter().print(JsonUtil.loadFalseResult(1, "请先登录")); |
| | | response.getWriter().print(JsonUtil.loadFalseResult(10001, "请先登录")); |
| | | } else { |
| | | response.getWriter().print(callback + "(" + JsonUtil.loadFalseResult(1, "请先登录") + ")"); |
| | | response.getWriter().print(callback + "(" + JsonUtil.loadFalseResult(10001, "请先登录") + ")"); |
| | | } |
| | | |
| | | return null; |
| | |
| | | import com.yeshi.fanli.service.inter.user.vip.UserLevelUpgradedNotifyService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVIPPreInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private ThreeSaleSerivce threeSaleSerivce;
|
| | | |
| | | @Resource
|
| | | private UserVipConfigService userVipConfigService;
|
| | | |
| | |
|
| | | /**
|
| | | * s 首页配置信息
|
| | |
| | | // TODO 验证是否是导师
|
| | |
|
| | | JSONObject inner = new JSONObject();
|
| | | inner.put("link", "https://www.baidu.com/");
|
| | | inner.put("link", userVipConfigService.getByKey("vip_link"));
|
| | | inner.put("ion", "http://img.flqapp.com/resource/vip/icon_vip.png");
|
| | | inner.put("title", "免费升级 享会员权益");
|
| | | inner.put("btnName", "升级会员");
|
| | | if (uid != null) {
|
| | | // 是否导师 TODO
|
| | | |
| | | if (userVIPInfoService.isVIP(uid)) {
|
| | | inner.put("link", "https://www.baidu.com/");
|
| | | inner.put("link", userVipConfigService.getByKey("vip_link"));
|
| | | inner.put("ion", "http://img.flqapp.com/resource/vip/icon_tearcher.png");
|
| | | inner.put("title", "拿五险与津贴 享导师权益");
|
| | | inner.put("btnName", "升级会员");
|
| | |
| | |
|
| | | // 上月提现
|
| | | typeList.clear();
|
| | |
|
| | | typeList.add(UserMoneyDetailTypeEnum.extract);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractReject);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractVerify);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractReject);
|
| | | long timeStamp = System.currentTimeMillis();
|
| | | Calendar calendar = Calendar.getInstance();
|
| | | calendar.setTimeInMillis(timeStamp);
|
| | |
| | | calendar.add(Calendar.MONTH, -1);
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | |
|
| | | vo.setLastMonthExtractMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
|
| | | |
| | | // 本月提现
|
| | | maxDate = new Date(timeStamp);
|
| | | calendar = Calendar.getInstance();
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.extract);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractVerify);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractReject);
|
| | | vo.setMonthExtractMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
|
| | | |
| | | |
| | | if (!VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 上月收入
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanli);
|
| | |
| | |
|
| | | vo.setLatestThreeMonthRecievedMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | // 本月提现
|
| | | maxDate = new Date(timeStamp);
|
| | | calendar = Calendar.getInstance();
|
| | | minDate = new Date(TimeUtil
|
| | | .convertToTimeTemp(calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1), "yyyy-M"));
|
| | | calendar.add(Calendar.MONTH, -1);
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.extract);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractReject);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractVerify);
|
| | |
|
| | | vo.setMonthExtractMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | // 本月到账
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanli);
|
| | |
| | | typeList.add(UserMoneyDetailTypeEnum.weiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.hongbao);
|
| | | typeList.add(UserMoneyDetailTypeEnum.hongbaoDeduct);
|
| | |
|
| | | vo.setMonthRecievedMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | // 总的邀请赚
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.invite);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteAndShare);
|
| | |
|
| | | minDate = new Date(0L);
|
| | | maxDate = new Date(timeStamp);
|
| | | vo.setTotalInviteMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | // 总的到账
|
| | |
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanli);
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.share);
|
| | | typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.invite);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteAndShare);
|
| | | typeList.add(UserMoneyDetailTypeEnum.weiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.hongbao);
|
| | | typeList.add(UserMoneyDetailTypeEnum.hongbaoDeduct);
|
| | | vo.setTotalRecievedMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | // 总的分享赚
|
| | |
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.share);
|
| | | typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
|
| | |
|
| | | vo.setTotalShareMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | |
|
| | | minDate = new Date(TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(timeStamp, "yyyy-MM"), "yyyy-MM"));
|
| | | Calendar ca = Calendar.getInstance();
|
| | |
| | | ca.add(Calendar.MONTH, 1);
|
| | | maxDate = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy-MM"), "yyyy-MM"));
|
| | |
|
| | | // 本月未到账
|
| | | BigDecimal monthUnRecievedMoney = hongBaoV2Service.getUnRecievedMoneyWithPreGetTime(uid, minDate, maxDate);
|
| | | vo.setMonthUnRecievedMoney(monthUnRecievedMoney);
|
| | |
| | | minDate = new Date(0);
|
| | | maxDate = new Date(timeStamp);
|
| | | vo.setTotalUnRecievedMoney(hongBaoV2Service.getUnRecievedMoneyWithCreateTime(uid, minDate, maxDate));
|
| | | |
| | | // 总的到账
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanli);
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.orderReward);
|
| | | typeList.add(UserMoneyDetailTypeEnum.share);
|
| | | typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.invite);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteAndShare);
|
| | | typeList.add(UserMoneyDetailTypeEnum.weiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.hongbao);
|
| | | typeList.add(UserMoneyDetailTypeEnum.hongbaoDeduct);
|
| | | typeList.add(UserMoneyDetailTypeEnum.subsidy);
|
| | | typeList.add(UserMoneyDetailTypeEnum.orderTeamDividents);
|
| | | vo.setTotalRecievedMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | }
|
| | | |
| | | minDate = new Date(0L);
|
| | | maxDate = new Date(timeStamp);
|
| | | |
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 总的自购返利
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanli);
|
| | | typeList.add(UserMoneyDetailTypeEnum.fanliWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.orderReward);
|
| | | vo.setTotalFanLiMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | |
| | | // 累计成功提现
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.extract);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractVerify);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractAutoWX);
|
| | | typeList.add(UserMoneyDetailTypeEnum.extractReject);
|
| | | vo.setTotalExtractMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate, 1).abs());
|
| | | }
|
| | | |
| | | // 总的分享赚
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.share);
|
| | | typeList.add(UserMoneyDetailTypeEnum.shareWeiQuan);
|
| | | vo.setTotalShareMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | |
| | | // 总的邀请赚
|
| | | typeList.clear();
|
| | | typeList.add(UserMoneyDetailTypeEnum.invite);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteWeiQuan);
|
| | | typeList.add(UserMoneyDetailTypeEnum.inviteAndShare);
|
| | | if (VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | typeList.add(UserMoneyDetailTypeEnum.subsidy);
|
| | | typeList.add(UserMoneyDetailTypeEnum.orderTeamDividents);
|
| | | }
|
| | | vo.setTotalInviteMoney(
|
| | | userMoneyDetailService.statisticUserTypeMoneyWithDate(uid, typeList, minDate, maxDate).abs());
|
| | | |
| | | |
| | | GsonBuilder builder = new GsonBuilder();
|
| | | builder.registerTypeAdapter(BigDecimal.class, new JsonSerializer<BigDecimal>() {
|
| | | @Override
|
| | |
| | | }
|
| | | });
|
| | |
|
| | | if (VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 获取提现中的信息
|
| | | BigDecimal extractingMoney = extractService.sumVerifyingMoney(uid);
|
| | | if (extractingMoney.compareTo(new BigDecimal(0)) > 0)
|
| | | vo.setExtractingMoneyInfo("提现中:¥" + extractingMoney.setScale(2, RoundingMode.HALF_UP));
|
| | | |
| | | if (VersionUtil.greaterThan_2_0(acceptData.getPlatform(), acceptData.getVersion()) && !VersionUtil.greaterThan_2_1(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | // 获取是否绑定了微信
|
| | | if (!StringUtil.isNullOrEmpty(user.getWxUnionId())) {
|
| | | vo.setBindingWX(true);
|
| | |
| | |
|
| | | String shareRate = "可享佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String fansRate = "最高佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String fansIndirect = "团队分红池<label style=\"color:#E5005C;\">%s</label>";
|
| | | String fansIndirect = "最高佣金的<label style=\"color:#E5005C;\">%s</label>";
|
| | | String teamBonus = "团队分红池<label style=\"color:#E5005C;\">%s</label>";
|
| | | // 达人版
|
| | | JSONObject jsonrRed1 = new JSONObject();
|
| | |
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.account.UserUtil;
|
| | | import com.yeshi.fanli.util.user.UserLevelUtil;
|
| | | import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
|
| | | import com.yeshi.fanli.vo.order.CommonOrderVO;
|
| | | import com.yeshi.fanli.vo.order.CurrentBonusVO;
|
| | | import com.yeshi.fanli.vo.order.GoodsRebateVO;
|
| | | import com.yeshi.fanli.vo.order.HongBaoCountVO;
|
| | | import com.yeshi.fanli.vo.order.OrderCountVO;
|
| | | import com.yeshi.fanli.vo.order.OrderRebateVO;
|
| | | import com.yeshi.fanli.vo.order.TeamBonusVO;
|
| | | import com.yeshi.fanli.vo.user.UserInfoExtraVO;
|
| | | import com.yeshi.fanli.vo.user.UserSettingsVO;
|
| | |
|
| | |
| | | data.put("count", count);
|
| | | data.put("result_list", JsonUtil.getApiCommonGson().toJson(list));
|
| | | data.put("helpUrl", configService.get(ConfigKeyEnum.orderListHelp.getKey()));
|
| | | data.put("bonusLink", configService.get(ConfigKeyEnum.orderBonusLink.getKey()));
|
| | | data.put("validMoney", "¥ " + validMoney);
|
| | | data.put("invalidMoney", "¥ " + invalidMoney);
|
| | | data.put("findOrderHelpUrl", orderFindUrl);
|
| | |
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 团队收益统计 统计已到账未到账 : 累计只统计已到账
|
| | | * @param acceptData
|
| | | * @param uid
|
| | | * @param type 1-团队补贴 2-团队奖励 3-导师津贴
|
| | | */
|
| | | @RequestMapping(value = "getTeamBonus", method = RequestMethod.POST)
|
| | | public void getTeamBonus(AcceptData acceptData, Long uid, Integer type, PrintWriter out) {
|
| | | if (uid == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户未登录"));
|
| | | return;
|
| | | }
|
| | |
|
| | | UserInfo user = userInfoService.selectByPKey(uid);
|
| | | if (user == null) {
|
| | | out.print(JsonUtil.loadFalseResult(1, "用户不存在"));
|
| | | return;
|
| | | }
|
| | |
|
| | | if (type == null || type < 1 || type > 3) {
|
| | | type = 1;
|
| | | }
|
| | |
|
| | | if (type == 1) {
|
| | | // 补贴
|
| | | sumTeamSubsidy(out, user);
|
| | | } else if (type == 2) {
|
| | | // 奖励
|
| | | //TODO 团队奖励已经删除
|
| | | } else {
|
| | | // 导师津贴
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("exist", false);
|
| | | data.put("link", configService.get(ConfigKeyEnum.tutorSubsidyLink.getKey()));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | | }
|
| | |
|
| | | /**
|
| | | * 统计补贴
|
| | | * @param out
|
| | | * @param user
|
| | | */
|
| | | private void sumTeamSubsidy(PrintWriter out, UserInfo user) {
|
| | | Long uid = user.getId();
|
| | | // 是否VIP
|
| | | boolean vip = userVIPInfoService.isVIP(uid);
|
| | |
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("link", configService.get(ConfigKeyEnum.orderTeamSubsidyLink.getKey()));
|
| | | if (!vip) {
|
| | | data.put("exist", false);
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | return;
|
| | | }
|
| | |
|
| | | data.put("exist", true);
|
| | | data.put("portrait", user.getPortrait());
|
| | |
|
| | | // 今日统计
|
| | | BigDecimal todayDirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 1,
|
| | | InviteOrderSubsidy.LEVEL_ONE);
|
| | | if (todayDirect == null) {
|
| | | todayDirect = new BigDecimal(0);
|
| | | }
|
| | | BigDecimal todayIndirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 1,
|
| | | InviteOrderSubsidy.LEVEL_TWO);
|
| | | if (todayIndirect == null) {
|
| | | todayIndirect = new BigDecimal(0);
|
| | | }
|
| | | TeamBonusVO today = new TeamBonusVO();
|
| | | today.setDirect(todayDirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | today.setIndirect(todayIndirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | today.setTotal(
|
| | | MoneyBigDecimalUtil.add(todayDirect, todayIndirect).setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
|
| | | // 昨日统计
|
| | | BigDecimal yesterdayDirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 2,
|
| | | InviteOrderSubsidy.LEVEL_ONE);
|
| | | if (yesterdayDirect == null) {
|
| | | yesterdayDirect = new BigDecimal(0);
|
| | | }
|
| | | BigDecimal yesterdayIndirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 2,
|
| | | InviteOrderSubsidy.LEVEL_TWO);
|
| | | if (yesterdayIndirect == null) {
|
| | | yesterdayIndirect = new BigDecimal(0);
|
| | | }
|
| | | TeamBonusVO yesterday = new TeamBonusVO();
|
| | | yesterday.setDirect(yesterdayDirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | yesterday.setIndirect(yesterdayIndirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | yesterday.setTotal(MoneyBigDecimalUtil.add(yesterdayDirect, yesterdayIndirect)
|
| | | .setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
|
| | | // 本月统计
|
| | | BigDecimal thisMonthDirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 3,
|
| | | InviteOrderSubsidy.LEVEL_ONE);
|
| | | if (thisMonthDirect == null) {
|
| | | thisMonthDirect = new BigDecimal(0);
|
| | | }
|
| | | BigDecimal thisMonthIndirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 3,
|
| | | InviteOrderSubsidy.LEVEL_TWO);
|
| | | if (thisMonthIndirect == null) {
|
| | | thisMonthIndirect = new BigDecimal(0);
|
| | | }
|
| | | TeamBonusVO thisMonth = new TeamBonusVO();
|
| | | thisMonth.setDirect(thisMonthDirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | thisMonth.setIndirect(thisMonthIndirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | thisMonth.setTotal(MoneyBigDecimalUtil.add(thisMonthDirect, thisMonthIndirect)
|
| | | .setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
|
| | | // 本月统计
|
| | | BigDecimal lastMonthDirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 4,
|
| | | InviteOrderSubsidy.LEVEL_ONE);
|
| | | if (lastMonthDirect == null) {
|
| | | lastMonthDirect = new BigDecimal(0);
|
| | | }
|
| | | BigDecimal lastMonthIndirect = inviteOrderSubsidyServiceV2.sumValidMoneyByUidAndDate(uid, 4,
|
| | | InviteOrderSubsidy.LEVEL_TWO);
|
| | | if (lastMonthIndirect == null) {
|
| | | lastMonthIndirect = new BigDecimal(0);
|
| | | }
|
| | | TeamBonusVO lastMonth = new TeamBonusVO();
|
| | | lastMonth.setDirect(lastMonthDirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | lastMonth.setIndirect(lastMonthIndirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | lastMonth.setTotal(MoneyBigDecimalUtil.add(lastMonthDirect, lastMonthIndirect)
|
| | | .setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | |
|
| | | BigDecimal direct = inviteOrderSubsidyServiceV2.sumRecievedMoneyByUid(uid, InviteOrderSubsidy.LEVEL_ONE);
|
| | | if (direct == null) {
|
| | | direct = new BigDecimal(0);
|
| | | }
|
| | | BigDecimal indirect = inviteOrderSubsidyServiceV2.sumRecievedMoneyByUid(uid, InviteOrderSubsidy.LEVEL_TWO);
|
| | | if (indirect == null) {
|
| | | indirect = new BigDecimal(0);
|
| | | }
|
| | | BigDecimal total = MoneyBigDecimalUtil.add(direct, indirect);
|
| | |
|
| | | data.put("today", today);
|
| | | data.put("yesterday", yesterday);
|
| | | data.put("thisMonth", thisMonth);
|
| | | data.put("lastMonth", lastMonth);
|
| | | data.put("total", total.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("direct", direct.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | data.put("indirect", indirect.setScale(2, BigDecimal.ROUND_DOWN).toString());
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 返利说明
|
| | |
| | | }
|
| | | }
|
| | | orderRebateVO.setFanLiDesc(predictDesc + typeName);
|
| | | orderRebateVO.setFanLi("¥" + hongBao.setScale(2));
|
| | | orderRebateVO.setFanLi("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN));
|
| | |
|
| | | HongBaoV2 hongBaoV2 = hoList.get(0).getHongBaoV2();
|
| | | UserLevelEnum userLevel = UserLevelUtil.getByOrderRank(hongBaoV2.getUrank());
|
| | |
| | | payment = hongBaoOrder.getCommonOrder().getSettlement();
|
| | | if (payment == null)
|
| | | payment = new BigDecimal(0);
|
| | | goodsVO.setActualPay("¥" + payment.setScale(2));
|
| | | goodsVO.setActualPay("¥" + payment.setScale(2, BigDecimal.ROUND_DOWN));
|
| | |
|
| | | BigDecimal commission = orderHongBaoMoneyComputeService.computeBaseFanliMoney(commonOrder);
|
| | | if (type == 3) { // 奖金
|
| | |
| | |
|
| | | // 平台补贴
|
| | | BigDecimal vipFanli = hongBaoOrder.getHongBaoV2().getMoney();
|
| | | goodsVO.setSubsidy("¥" + vipFanli.subtract(commission).setScale(2));
|
| | | goodsVO.setSubsidy("¥" + vipFanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN));
|
| | | // 达人补贴
|
| | | if (userLevel != UserLevelEnum.daRen) {
|
| | | BigDecimal darenFanli = orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder, UserLevelEnum.daRen);
|
| | | goodsVO.setOriginSubsidy("¥" + darenFanli.subtract(commission).setScale(2) + "");
|
| | | goodsVO.setOriginSubsidy("¥" + darenFanli.subtract(commission).setScale(2, BigDecimal.ROUND_DOWN) + "");
|
| | | }
|
| | |
|
| | | voList.add(goodsVO);
|
| | |
|
| | | if (type == 1 ) {
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeFanliMoney(commonOrder, upperLevel));
|
| | | } else if (type == 2) {
|
| | | upperTotalMoney = upperTotalMoney.add(orderHongBaoMoneyComputeService.computeShareMoney(commonOrder, upperLevel));
|
| | | }
|
| | | }
|
| | |
|
| | | // 团队补贴
|
| | |
| | | }
|
| | |
|
| | | if (userLevel != UserLevelEnum.daRen) {
|
| | | orderRebateVO.setOriginSubsidy("¥" + lowerSubsidy.setScale(2));
|
| | | orderRebateVO.setOriginSubsidy("¥" + lowerSubsidy.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | }
|
| | | orderRebateVO.setSubsidyDesc("团队补贴");
|
| | | orderRebateVO.setSubsidy("¥" + teamSubsidy.setScale(2) +"");
|
| | | orderRebateVO.setSubsidy("¥" + teamSubsidy.setScale(2, BigDecimal.ROUND_DOWN) +"");
|
| | | |
| | | upperTotalMoney = upperTotalMoney.add(teamSubsidy);
|
| | | }
|
| | |
|
| | | orderRebateVO.setType(type);
|
| | |
| | |
|
| | | // 上级返利
|
| | | if (upperLevel != null) {
|
| | | upperTotalMoney = upperTotalMoney.add(hongBao);
|
| | | orderRebateVO.setUpperFanLi("¥" + upperTotalMoney);
|
| | | orderRebateVO.setJumpLink(upperLevel.getDetailLink());
|
| | | }
|
| | |
| | | orderRebateVO.setCouponType(1);
|
| | | orderRebateVO.setCouponUse(true);
|
| | | orderRebateVO.setCouponText("奖励成功");
|
| | | orderRebateVO.setCouponDesc("已再返¥" +couponMoney.setScale(2));
|
| | | orderRebateVO.setCouponDesc("已再返¥" +couponMoney.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | orderRebateVO.setCouponParams(params.toString());
|
| | | orderRebateVO.setCouponJumpDetail(jumpDetailV2Service.getByTypeCache("rewardCouponDetail"));
|
| | | } else if (freeState > 0) { // 已使用免单券
|
| | |
| | | * @return
|
| | | */
|
| | | BigDecimal getTotalMoneyByTypeAndUidWithDate(@Param("uid") Long uid, @Param("typeList") List<String> typeList,
|
| | | @Param("minDate") Date minDate, @Param("maxDate") Date maxDate);
|
| | | @Param("minDate") Date minDate, @Param("maxDate") Date maxDate, @Param("show")Integer show);
|
| | |
|
| | | /**
|
| | | * 根据类型,用户ID,唯一标识查询
|
| | |
| | | fanliWeiQuan("资金退回","http://img.flqapp.com/resource/msg/icon_msg_fanli.png"),
|
| | | shareWeiQuan("资金退回", "http://img.flqapp.com/resource/msg/icon_msg_share_money.png"),
|
| | | extractAutoWX("自动提现", "http://img.flqapp.com/resource/money_detail/icon_system.png"),
|
| | | extractValid("提现账号验证", "http://img.flqapp.com/resource/msg/icon_msg_extract.png"),
|
| | | extractValid("提现验证", "http://img.flqapp.com/resource/msg/icon_msg_extract.png"),
|
| | | inviteWeiQuan("团队奖金扣除", "http://img.flqapp.com/resource/msg/icon_msg_invite_money.png"),
|
| | | orderReward("返利奖励","http://img.flqapp.com/resource/msg/icon_msg_order_reward.png"),
|
| | | systemEqualize("系统补齐","http://img.flqapp.com/resource/money_detail/icon_system.png"),
|
| | |
| | | @Map("private_key")
|
| | | private String privateKey;
|
| | |
|
| | | @Map("account_name")
|
| | | private String accountName;
|
| | |
|
| | | public String getAppId() {
|
| | | return appId;
|
| | | }
|
| | |
| | | this.privateKey = privateKey;
|
| | | }
|
| | |
|
| | | public String getAccountName() {
|
| | | return accountName;
|
| | | }
|
| | |
|
| | | public void setAccountName(String accountName) {
|
| | | this.accountName = accountName;
|
| | | }
|
| | |
|
| | | |
| | | }
|
| | |
| | | taobaoOrderParseJS("taobao_order_parse_js", "淘宝订单解析脚本"), |
| | | autoFindTaobaoOrder("auto_find_taobao_order", "是否开启淘宝自动找单"), |
| | | orderListHelp("order_list_help", "订单列表帮助链接"), |
| | | orderBonusLink("order_bonus_link", "奖金跳转订单筛选列表帮助链接"), |
| | | lostOrderHelpWhat("lost_order_help_what", "订单找回-订单找回是什么"), |
| | | lostOrderHelpReason("lost_order_help_reason", "订单找回-找回失败原因"), |
| | | orderFindNotifyUrl("order_find_notify_url", "订单列表-订单找回帮助链接"), |
| | |
| | | evaluateEmojis("evaluate_emojis", "发圈评论Emojis"), |
| | | evaluateText("evaluate_text", "发圈评论文本"), |
| | | |
| | | orderRebateDescLink("order_rebate_desc_link", "订单返利计算说明链接"), |
| | | orderTeamSubsidyLink("order_team_subsidy_link", "订单补贴帮助链接"), |
| | | orderTeamRewardLink("order_team_reward_link", "订单奖励帮助链接"), |
| | | tutorSubsidyLink("tutor_subsidy_link", "导师津贴帮助链接"), |
| | | |
| | | vipUpgradeLink("vip_upgrade_link", "我的界面-会员升级链接"), |
| | | |
| | | orderRebateDescLink("order_rebate_desc_link", "订单返利计算说明链接"), |
| | | bonusCountLinkFanli("bonus_count_link_fanli", "自购返利统计页面问号"), |
| | | bonusCountLinkShare("bonus_count_link_share", "分享奖金统计页面问号"), |
| | | bonusCountLinkTeam("bonus_count_link_team", "团队奖励统计页面问号"), |
| | |
| | | d.`umd_uid`=#{uid} AND d.umd_type='extract' )) a</select>
|
| | | <select id="getTotalMoneyByTypeAndUidWithDate" resultType="java.math.BigDecimal">select
|
| | | sum(umd_money) from yeshi_ec_user_money_detail where umd_uid=#{uid}
|
| | | <if test="show != null"> AND umd_show = #{show}</if>
|
| | | and umd_createtime>=#{minDate} and umd_createtime<![CDATA[<]]>#{maxDate}
|
| | | <foreach collection="typeList" item="item" open=" and ("
|
| | | separator=" or " close=")">umd_type=#{item}</foreach>
|
| | |
| | | for (UserMoneyDetailTypeEnum type : typeList) {
|
| | | list.add(type.name());
|
| | | }
|
| | | BigDecimal money = userMoneyDetailMapper.getTotalMoneyByTypeAndUidWithDate(uid, list, minDate, maxDate);
|
| | | BigDecimal money = userMoneyDetailMapper.getTotalMoneyByTypeAndUidWithDate(uid, list, minDate, maxDate, null);
|
| | | return money == null ? new BigDecimal(0) : money;
|
| | | }
|
| | |
|
| | | @Override
|
| | | public BigDecimal statisticUserTypeMoneyWithDate(Long uid, List<UserMoneyDetailTypeEnum> typeList, Date minDate,
|
| | | Date maxDate, Integer show) {
|
| | | List<String> list = new ArrayList<>();
|
| | | if (typeList != null)
|
| | | for (UserMoneyDetailTypeEnum type : typeList) {
|
| | | list.add(type.name());
|
| | | }
|
| | | BigDecimal money = userMoneyDetailMapper.getTotalMoneyByTypeAndUidWithDate(uid, list, minDate, maxDate, show);
|
| | | return money == null ? new BigDecimal(0) : money;
|
| | | }
|
| | |
|
| | |
| | | @Override
|
| | | public void alipayAccountValid(AlipayAccountValidNormalHistory history, String limitDay, boolean change) {
|
| | | MsgMoneyDetail detail = MsgMoneyDetailFactory.createAlipayAccountValidMsg(history, history.getUid(),
|
| | | Constant.systemCommonConfig.getProjectChineseName(), new BigDecimal("0.1"), limitDay, change);
|
| | | Constant.alipayConfig.getAccountName(), new BigDecimal("0.1"), limitDay, change);
|
| | | try {
|
| | | msgMoneyDetailService.addMsgMoneyDetail(detail);
|
| | | } catch (MsgMoneyDetailException e) {
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgOtherDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
|
| | | import com.yeshi.fanli.exception.msg.MsgOtherDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgOtherDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class MsgOtherDetailServiceImpl implements MsgOtherDetailService {
|
| | |
| | | @Resource
|
| | | private UserMsgReadStateService userMsgReadStateService;
|
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | | |
| | | |
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void addMsgOtherDetail(MsgOtherDetail detail) throws MsgOtherDetailException {
|
| | | if (detail == null || detail.getUser() == null || StringUtil.isNullOrEmpty(detail.getExtraInfo())) {
|
| | | throw new MsgOtherDetailException(1, "消息内容不全");
|
| | | }
|
| | | |
| | | msgOtherDetailMapper.insertSelective(detail);
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_OTHER);
|
| | | userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | }
|
| | |
|
| | |
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgOtherDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgOtherDetailService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserOtherMsgNotificationService;
|
| | | import com.yeshi.fanli.util.factory.msg.MsgOtherDetailFactory;
|
| | |
| | | @Resource
|
| | | private MsgOtherDetailService msgOtherDetailService;
|
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | | |
| | |
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void saveMsgDetail(MsgOtherDetail detail) {
|
| | | try {
|
| | | msgOtherDetailService.addMsgOtherDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_INVITE);
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgInviteDetailMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.exception.msg.MsgInviteDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.MsgInviteDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class MsgInviteDetailServiceImpl implements MsgInviteDetailService {
|
| | |
| | | @Resource
|
| | | private UserMsgReadStateService userMsgReadStateService;
|
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | | |
| | | |
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void addMsgInviteDetail(MsgInviteDetail detail) throws MsgInviteDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgInviteDetailException(1, "消息为空");
|
| | |
|
| | | if (detail.getInviteUser() == null || detail.getMsgType() == null || detail.getUser() == null
|
| | | || detail.getDesc() == null)
|
| | | if (detail.getMsgType() == null || detail.getUser() == null || StringUtil.isNullOrEmpty(detail.getExtraInfo()))
|
| | | throw new MsgInviteDetailException(2, "消息内容不完整");
|
| | |
|
| | | // 查询是否已存在该邀请ID
|
| | | MsgInviteDetail oldDetail = msgInviteDetailMapper.selectByThreeSaleId(detail.getInviteUser().getId());
|
| | | if (oldDetail == null) {
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgInviteDetailMapper.insertSelective(detail);
|
| | | } else {
|
| | | MsgInviteDetail update = new MsgInviteDetail();
|
| | | update.setId(oldDetail.getId());
|
| | | if (!detail.getInviteUser().getState()) {
|
| | | if (detail.getInviteUser().getExpire() == ThreeSale.EXPIRE_NORMAL) {
|
| | | update.setDesc("恭喜你,有新粉丝加入你的队列,若对方60天内未激活将会与你脱离邀请关系");
|
| | | } else {
|
| | | update.setDesc("抱歉,该粉丝因60天内未激活,已脱离了你的队列,可以试着重新邀请");
|
| | | }
|
| | | } else {
|
| | | update.setDesc("恭喜你,成功邀请一个粉丝");
|
| | | }
|
| | | update.setUpdateTime(new Date());
|
| | | update.setRead(false);
|
| | | msgInviteDetailMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_INVITE);
|
| | | userMsgReadStateService.addInviteMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | }
|
| | |
|
| | |
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dto.msg.MsgInviteContentDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
|
| | | import com.yeshi.fanli.exception.msg.MsgInviteDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.push.PushService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.MsgInviteDetailService;
|
| | | import com.yeshi.fanli.service.inter.user.invite.UserInviteMsgNotificationService;
|
| | |
| | | @Resource
|
| | | private MsgInviteDetailService msgInviteDetailService;
|
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Resource
|
| | | private PushService pushService;
|
| | |
| | | private void saveMsgDetail(MsgInviteDetail detail) {
|
| | | try {
|
| | | msgInviteDetailService.addMsgInviteDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_INVITE);
|
| | | } catch (MsgInviteDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void fansPreDivorced(Long uid, String rankName, String nickName, String item, Date time) {
|
| | | saveMsgDetail(MsgInviteDetailFactory.fansPreDivorced(uid, rankName, nickName, item, time));
|
| | | public void fansPreDivorced(Long uid, String rankName, String nickName, Date time) {
|
| | | saveMsgDetail(MsgInviteDetailFactory.fansPreDivorced(uid, rankName, nickName, time));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void fansPredivorcedIndirect(Long uid, String rankName, String nickName, String fansName,
|
| | | String item, Date time) {
|
| | | saveMsgDetail(MsgInviteDetailFactory.fansPredivorcedIndirect(uid, rankName, nickName, fansName, item, time));
|
| | | public void fansPredivorcedIndirect(Long uid, String rankName, String nickName, String fansName, Date time) {
|
| | | saveMsgDetail(MsgInviteDetailFactory.fansPredivorcedIndirect(uid, rankName, nickName, fansName, time));
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgAccountDetailMapper;
|
| | | import com.yeshi.fanli.dto.msg.MsgAccountVipDTO;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.exception.msg.MsgAccountDetailException;
|
| | | import com.yeshi.fanli.exception.msg.MsgOtherDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.msg.UserMsgReadStateService;
|
| | | import com.yeshi.fanli.service.inter.user.msg.MsgAccountDetailService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | |
| | | @Resource
|
| | | private UserMsgReadStateService userMsgReadStateService;
|
| | |
|
| | | @Resource
|
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void addMsgAccountDetail(MsgAccountDetail detail) throws MsgAccountDetailException {
|
| | | if (detail == null)
|
| | | throw new MsgAccountDetailException(1, "消息为空");
|
| | | if (StringUtil.isNullOrEmpty(detail.getTitle()) || StringUtil.isNullOrEmpty(detail.getContent())
|
| | | || detail.getType() == null || detail.getUser() == null)
|
| | | throw new MsgAccountDetailException(2, "消息内容不完整");
|
| | | if (detail == null || detail.getUser() == null || detail.getType() == null
|
| | | || StringUtil.isNullOrEmpty(detail.getExtraInfo()))
|
| | | throw new MsgAccountDetailException(1, "消息信息不全");
|
| | | // 持久化到数据库
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setUpdateTime(new Date());
|
| | | detail.setRead(false);
|
| | | msgAccountDetailMapper.insertSelective(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | // 红点
|
| | | userMsgReadStateService.addAccountMsgUnReadCount(detail.getUser().getId(), 1);
|
| | | }
|
| | |
|
| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgExtra;
|
| | | import com.yeshi.fanli.exception.msg.MsgAccountDetailException;
|
| | | import com.yeshi.fanli.service.inter.msg.MsgExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.msg.MsgAccountDetailService;
|
| | |
| | | private MsgExtraService msgExtraService;
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void bindingSuccess(Long uid, int type) {
|
| | | saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_BIND));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void unBindingSuccess(Long uid, int type) {
|
| | | saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_UNBIND));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void changeBindingSuccess(Long uid, int type) {
|
| | | saveDetail(MsgAccountDetailFactory.createBindSuccess(uid, type, MsgAccountDetailFactory.WAY_CHANGE));
|
| | | }
|
| | |
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void taoBaoAuthFail(Long uid, String taoBaoNickName, String reason) {
|
| | | saveDetail(MsgAccountDetailFactory.createBindFail(uid, MsgAccountDetailFactory.TYPE_TB,
|
| | | MsgAccountDetailFactory.WAY_CHANGE, reason));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void createChangeInviteCode(Long uid, String oldCode, String newCode) {
|
| | | saveDetail(MsgAccountDetailFactory.createChangeInviteCode(uid, oldCode, newCode));
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void vipPreUpgrade(Long uid, String originalName, String upName, int days, long targetNum1, Long targetNum2,Integer type) {
|
| | | saveDetail( MsgAccountDetailFactory.vipPreUpgrade(uid, originalName, upName, days, targetNum1,
|
| | | targetNum2, type, null));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void vipUpgradeSuccess(Long uid, int days) {
|
| | | saveDetail(MsgAccountDetailFactory.vipUpgradeSuccess(uid, days));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void vipUpgradeFail(Long uid, String reason) {
|
| | | saveDetail(MsgAccountDetailFactory.vipUpgradeFail(uid, reason));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void teacherInvite(Long uid, String nickname,String kefuName, String kefuWX) {
|
| | | saveDetail(MsgAccountDetailFactory.teacherInvite(uid, nickname, kefuName, kefuWX));
|
| | | }
|
| | |
|
| | | @Override
|
| | | @Transactional(rollbackFor = Exception.class)
|
| | | public void teacherSuccess(Long uid, int days, String kefuName, String kefuWX) {
|
| | | saveDetail(MsgAccountDetailFactory.teacherSuccess(uid, days, kefuName, kefuWX));
|
| | | }
|
| | |
|
| | | |
| | | @Transactional(rollbackFor = Exception.class)
|
| | | private void saveDetail(MsgAccountDetail detail) {
|
| | | try {
|
| | | msgAccountDetailService.addMsgAccountDetail(detail);
|
| | | // 消息内容
|
| | | msgExtraService.addMsgExtra(detail.getId(), detail.getExtraInfo(), MsgExtra.MSG_TYPE_ACCOUNT);
|
| | | } catch (MsgAccountDetailException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | userInviteSeparateService.addPreSeparateRecord(uid, bossId);
|
| | |
|
| | | // 直接粉丝脱离-开始脱离提醒
|
| | | userInviteMsgNotificationService.fansPreDivorced(bossId, rankName, userInfo.getNickName(), item, time);
|
| | | userInviteMsgNotificationService.fansPreDivorced(bossId, rankName, userInfo.getNickName(), time);
|
| | |
|
| | | //间接粉丝脱离-开始脱离提醒
|
| | | if (threeSaleSuper != null) {
|
| | | UserInfo boss = userInfoService.selectByPKey(bossId);
|
| | | Long bossIdSuper = threeSaleSuper.getBoss().getId();
|
| | | userInviteMsgNotificationService.fansPredivorcedIndirect(bossIdSuper, rankName, userInfo.getNickName(),
|
| | | boss.getNickName(), item, time);
|
| | | boss.getNickName(), time);
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | Date maxDate);
|
| | |
|
| | | /**
|
| | | * 分类型与时间统计用户的资金总和
|
| | | * |
| | | * @param uid
|
| | | * @param typeList
|
| | | * @param minDate
|
| | | * @param maxDate
|
| | | * @return
|
| | | */
|
| | | public BigDecimal statisticUserTypeMoneyWithDate(Long uid, List<UserMoneyDetailTypeEnum> typeList, Date minDate,
|
| | | Date maxDate, Integer show);
|
| | | |
| | | /**
|
| | | * 根据类型,用户ID与唯一标识符查询
|
| | | *
|
| | | * @param type
|
| | |
| | |
|
| | | import java.util.Date;
|
| | |
|
| | | import com.yeshi.fanli.dto.msg.MsgInviteContentDTO;
|
| | |
|
| | | /**
|
| | | * 用户邀请消息通知
|
| | | *
|
| | |
| | | * @param item
|
| | | * @param time
|
| | | */
|
| | | public void fansPreDivorced(Long uid, String rankName, String nickName, String item, Date time);
|
| | | public void fansPreDivorced(Long uid, String rankName, String nickName, Date time);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | | * @param item
|
| | | * @param time
|
| | | */
|
| | | public void fansPredivorcedIndirect(Long uid, String rankName, String nickName, String fansName, String item, Date time);
|
| | | public void fansPredivorcedIndirect(Long uid, String rankName, String nickName, String fansName, Date time);
|
| | |
|
| | |
|
| | | /**
|
| | |
| | |
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("绑定详情", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("恭喜你!" + info +"-"+ way, ClientTextStyleVO.COLOR_CONTENT)));
|
| | | new ClientTextStyleVO("很抱歉!" + info +"-"+ way, ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("绑定账号", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(typeName, ClientTextStyleVO.COLOR_CONTENT)));
|
| | | if (!StringUtil.isNullOrEmpty(reason)) {
|
| | |
| | | return null;
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("恭喜你!团队增加直接粉丝:", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("",ClientTextStyleVO.COLOR_CONTENT, portrait));
|
| | | contentList.add(new ClientTextStyleVO("、" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("直接粉丝", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | contentList.add(new ClientTextStyleVO("&" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝信息", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝类别", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("直接粉丝", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("加入时间", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(TimeUtil.formatDate(time), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
| | |
| | | return null;
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("恭喜你!团队增加直接粉丝:", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("",ClientTextStyleVO.COLOR_CONTENT, portrait));
|
| | | contentList.add(new ClientTextStyleVO("、" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("间接粉丝", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | |
| | | contentList.add(new ClientTextStyleVO("&" + nickName, ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝信息", ClientTextStyleVO.COLOR_TITLE),contentList));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("粉丝类别", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("间接粉丝", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("由直接粉丝", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO(inviteName,ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | |
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public static MsgInviteDetail fansPreDivorced(Long uid, String rankName, String nickName, String item, Date time) {
|
| | | if (nickName == null || uid == null || item == null || time == null)
|
| | | public static MsgInviteDetail fansPreDivorced(Long uid, String rankName, String nickName, Date time) {
|
| | | if (nickName == null || uid == null || time == null)
|
| | | return null;
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | |
| | | * @param time
|
| | | * @return
|
| | | */
|
| | | public static MsgInviteDetail fansPredivorcedIndirect(Long uid, String rankName, String nickName, String fansName,
|
| | | String item, Date time) {
|
| | | if (nickName == null || uid == null || item == null || time == null)
|
| | | public static MsgInviteDetail fansPredivorcedIndirect(Long uid, String rankName, String nickName, String fansName, Date time) {
|
| | | if (nickName == null || uid == null || time == null)
|
| | | return null;
|
| | |
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | |
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Calendar;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | |
| | | new ClientTextStyleVO(String.format("支付宝:%s-姓名:%s",account, name), ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("¥" + extract.getMoney().setScale(2), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO("¥" + extract.getMoney().setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | if (!StringUtil.isNullOrEmpty(alipayNo)) {
|
| | | contentList.add(new ClientTextStyleVO(String.format("&支付宝订单号: %s", "*" + alipayNo.substring(alipayNo.length() - 10)), ClientTextStyleVO.COLOR_CONTENT));
|
| | | }
|
| | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("提现账号", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(String.format("支付宝:%s-姓名:%s",account, name), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("打款金额", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(money + "", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("提现账号", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(String.format("提现账号收到一笔,来自%s的转账,即绑定成功", appName), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | new ClientTextStyleVO("¥" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT)));
|
| | | |
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("提现账号收到一笔,来自", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO(appName, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("的转账,即绑定成功", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("说明", ClientTextStyleVO.COLOR_TITLE),contentList2));
|
| | | |
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO(String.format("成功%s的提现账号", changeWay), ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList.add(new ClientTextStyleVO( limitDay+"", ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | |
| | | if (change) {
|
| | | changeWay = "修改";
|
| | | }
|
| | | String name = filterName(valid.getName());
|
| | | String account = filterAccount(valid.getAccount());
|
| | |
|
| | | List<CommonMsgItemVO> listMsg = new ArrayList<>();
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("验证状态", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(String.format("提现账号%s失败", changeWay), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("提现账号", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(String.format("支付宝:%s-姓名:%s",account, name), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | new ClientTextStyleVO(String.format("支付宝:%s-姓名:%s",valid.getAccount(), valid.getName()), ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("原因", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("请仔细核对填写账号是否有误或距上一次修改时长是否超过30天", ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | |
| | | sourceName += "-返利订单";
|
| | | typeEnum = MsgTypeMoneyTypeEnum.fanli;
|
| | | } else if (Constant.TYPE_SHAER == type) {
|
| | | fanliName = "分享奖金:";
|
| | | fanliName = "分享奖金";
|
| | | sourceName += "-分享订单";
|
| | | typeEnum = MsgTypeMoneyTypeEnum.share;
|
| | | }
|
| | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("到账详情", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(sourceName, ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("订单号", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT), true));
|
| | | new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("下单时间:" + TimeUtil.formatDate(downTime), ClientTextStyleVO.COLOR_CONTENT));
|
| | |
| | | new ClientTextStyleVO(fanliName, ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money, ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("(账户余额¥)"+ balance, ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("(账户余额¥"+ balance.setScale(2, BigDecimal.ROUND_DOWN) + ")", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("到账金额", ClientTextStyleVO.COLOR_TITLE), contentList2));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("如有疑问请联系人工客服", ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("退回详情", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(sourceName, ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("订单号", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT), true));
|
| | | new ClientTextStyleVO(orderId, ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | List<ClientTextStyleVO> contentList = new ArrayList<>();
|
| | | contentList.add(new ClientTextStyleVO("下单时间:" + TimeUtil.formatDate(downTime), ClientTextStyleVO.COLOR_CONTENT));
|
| | |
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("退回原因", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO(weiquan, ClientTextStyleVO.COLOR_CONTENT)));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("到账金额", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("¥" +fanliMoney.setScale(2) + "(原到账金额)", ClientTextStyleVO.COLOR_CONTENT)));
|
| | | new ClientTextStyleVO("¥" +fanliMoney.setScale(2, BigDecimal.ROUND_DOWN) + "(原到账金额)", ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
|
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money.setScale(2), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("("+ weiquanMoney + ")", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("退回金额", ClientTextStyleVO.COLOR_TITLE), contentList2));
|
| | |
|
| | |
| | | new ClientTextStyleVO("团队收益", ClientTextStyleVO.COLOR_CONTENT), true));
|
| | |
|
| | | List<ClientTextStyleVO> contentList2 = new ArrayList<>();
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money.setScale(2), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("(账户余额¥ "+ balance.setScale(2)+")", ClientTextStyleVO.COLOR_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("¥" + money.setScale(2, BigDecimal.ROUND_DOWN), ClientTextStyleVO.COLOR_HIGHLIGHT_CONTENT));
|
| | | contentList2.add(new ClientTextStyleVO("(账户余额¥ "+ balance.setScale(2, BigDecimal.ROUND_DOWN)+")", ClientTextStyleVO.COLOR_CONTENT));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("到账金额", ClientTextStyleVO.COLOR_TITLE), contentList2));
|
| | | listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("备注", ClientTextStyleVO.COLOR_TITLE),
|
| | | new ClientTextStyleVO("如有疑问请联系人工客服", ClientTextStyleVO.COLOR_CONTENT)));
|
| | |
| | | detail.setExtraInfo(new Gson().toJson(listMsg));
|
| | | return detail;
|
| | | }
|
| | |
|
| | | // /**
|
| | | // * 邀请赚维权
|
| | | // * |
| | | // * @param uid
|
| | | // * @param orderId
|
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param beiZhu
|
| | | // * @return
|
| | | // */
|
| | | // public static MsgMoneyDetail createInviteWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || orderId == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.inviteWeiQuan);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // detail.setOrderType(orderType);
|
| | | //
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // /**
|
| | | // * 分享赚到账
|
| | | // * |
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param orderCount
|
| | | // * @param goodsCount
|
| | | // * @param uid
|
| | | // * @param beiZhu
|
| | | // * @return
|
| | | // */
|
| | | // public static MsgMoneyDetail createShareMsg(BigDecimal money, BigDecimal balance, int orderType, int orderCount,
|
| | | // int goodsCount, Long uid, String beiZhu) {
|
| | | // if (money == null || balance == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setGoodsCount(goodsCount);
|
| | | // detail.setOrderType(orderType);
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.share);
|
| | | // detail.setOrderCount(orderCount);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | //
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // /**
|
| | | // * 分享赚维权
|
| | | // * |
| | | // * @param uid
|
| | | // * @param orderId
|
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param beiZhu
|
| | | // * @return
|
| | | // */
|
| | | // public static MsgMoneyDetail createShareWeiQuanMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || orderId == null || money == null || uid == null)
|
| | | // return null;
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.shareWeiQuan);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // detail.setOrderType(orderType);
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // public static MsgMoneyDetail createOrderRewardMsg(Long uid, String orderId, int orderType, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || orderId == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.orderReward);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setOrderType(orderType);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // public static MsgMoneyDetail createSystemEqualizeMsg(Long uid, String reason, BigDecimal money, BigDecimal balance,
|
| | | // String beiZhu) {
|
| | | // if (money == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.systemEqualize);
|
| | | // detail.setOrderId(reason);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // return detail;
|
| | | // }
|
| | | //
|
| | | // public static MsgMoneyDetail createElmeFanliMsg(Long uid, String orderId, BigDecimal money, BigDecimal balance,
|
| | | // String beiZhu) {
|
| | | // if (money == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.fanliElme);
|
| | | // detail.setOrderId(orderId);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // return detail;
|
| | | // }
|
| | | // |
| | | // |
| | | //
|
| | |
|
| | | // |
| | | // /**
|
| | | // * 团队奖励
|
| | | // * @Title: createOrderTeamRewardMsg
|
| | | // * @Description: |
| | | // * @param uid
|
| | | // * @param date
|
| | | // * @param from
|
| | | // * @param money
|
| | | // * @param balance
|
| | | // * @param beiZhu
|
| | | // * @return |
| | | // * MsgMoneyDetail 返回类型
|
| | | // * @throws
|
| | | // */
|
| | | // public static MsgMoneyDetail createOrderTeamRewardMsg(Long uid, Date date, String from, BigDecimal money,
|
| | | // BigDecimal balance, String beiZhu) {
|
| | | // if (money == null || money == null || uid == null)
|
| | | // return null;
|
| | | //
|
| | | // MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | // detail.setBalance(balance);
|
| | | // detail.setBeiZhu(beiZhu);
|
| | | // detail.setCreateTime(new Date());
|
| | | // detail.setMoney(money);
|
| | | // detail.setMsgType(MsgTypeMoneyTypeEnum.orderTeamReward);
|
| | | // detail.setRead(false);
|
| | | // detail.setUser(new UserInfo(uid));
|
| | | // Calendar calendar = Calendar.getInstance();
|
| | | // calendar.setTime(date);
|
| | | // detail.setStateDesc(String.format("%s年%s月团队奖励到账", calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH)));
|
| | | // detail.setDesc(from);
|
| | | //
|
| | | // return detail;
|
| | | // }
|
| | | // |
| | | // |
| | | /**
|
| | | * 红包相关信息
|
| | | * @param uid
|
| | | * @param type
|
| | | * @param content
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createRedPackMsg(Long uid, MsgTypeMoneyTypeEnum type, String content, String beiZhu) {
|
| | | if (uid == null || type == null || StringUtil.isNullOrEmpty(content))
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setRead(false);
|
| | | detail.setContent(content);
|
| | | detail.setMsgType(type);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | return detail;
|
| | | }
|
| | | |
| | |
|
| | |
|
| | | private static String filterName(String oldname) {
|
| | |
| | | } else {// 其他
|
| | | if (alipayAccount.length() >= 6) {
|
| | | for (int i = 0; i < alipayAccount.length(); i++) {
|
| | | if (i < 3 || i >= alipayAccount.length() - 2)
|
| | | if (i < alipayAccount.length() - 4)
|
| | | account += alipayAccount.charAt(i);
|
| | | else
|
| | | account += "*";
|
| | | }
|
| | | } else {
|
| | | for (int i = 0; i < alipayAccount.length(); i++) {
|
| | | if (i < 1 || i >= alipayAccount.length() - 1)
|
| | | if (i < alipayAccount.length() - 1)
|
| | | account += alipayAccount.charAt(i);
|
| | | else
|
| | | account += "*";
|
| | |
| | | }
|
| | |
|
| | |
|
| | | /**
|
| | | * 红包相关信息
|
| | | * @param uid
|
| | | * @param type
|
| | | * @param content
|
| | | * @param beiZhu
|
| | | * @return
|
| | | */
|
| | | public static MsgMoneyDetail createRedPackMsg(Long uid, MsgTypeMoneyTypeEnum type, String content, String beiZhu) {
|
| | | if (uid == null || type == null || StringUtil.isNullOrEmpty(content))
|
| | | return null;
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setRead(false);
|
| | | detail.setContent(content);
|
| | | detail.setMsgType(type);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | return detail;
|
| | | }
|
| | |
|
| | |
|
| | | public static MsgMoneyDetail createSystemEqualizeMsg(Long uid, String reason, BigDecimal money, BigDecimal balance,
|
| | | String beiZhu) {
|
| | | if (money == null || money == null || uid == null)
|
| | | return null;
|
| | |
|
| | | MsgMoneyDetail detail = new MsgMoneyDetail();
|
| | | detail.setBalance(balance);
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setMoney(money);
|
| | | detail.setMsgType(MsgTypeMoneyTypeEnum.systemEqualize);
|
| | | detail.setOrderId(reason);
|
| | | detail.setRead(false);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | return detail;
|
| | | }
|
| | |
|
| | |
|
| | | }
|
| | |
| | | private BigDecimal lastMonthRecievedMoney;// 上月到账
|
| | | private BigDecimal lastMonthExtractMoney;// 上月提现
|
| | | private BigDecimal latestThreeMonthRecievedMoney;// 近三月到账
|
| | | private BigDecimal totalExtractMoney;// 累计提现
|
| | | private BigDecimal totalRecievedMoney;// 累计到账
|
| | | private BigDecimal totalFanLiMoney;// 累计自购返利
|
| | | private BigDecimal totalShareMoney;// 累计分享奖金
|
| | | private BigDecimal totalInviteMoney;// 累计邀请奖金
|
| | | private BigDecimal monthUnRecievedMoney;// 本月未到账
|
| | |
| | | public void setTotalInviteMoney(BigDecimal totalInviteMoney) {
|
| | | this.totalInviteMoney = totalInviteMoney;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalFanLiMoney() {
|
| | | return totalFanLiMoney;
|
| | | }
|
| | |
|
| | | public void setTotalFanLiMoney(BigDecimal totalFanLiMoney) {
|
| | | this.totalFanLiMoney = totalFanLiMoney;
|
| | | }
|
| | |
|
| | | public BigDecimal getTotalExtractMoney() {
|
| | | return totalExtractMoney;
|
| | | }
|
| | |
|
| | | public void setTotalExtractMoney(BigDecimal totalExtractMoney) {
|
| | | this.totalExtractMoney = totalExtractMoney;
|
| | | }
|
| | | }
|
| | |
| | | appId=2018120462438303
|
| | | private_key=MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCr3zyepJWxJxRFfzJ3LX0Sb/HLiLndOmdcufUzcHuQ2qR0vSFbQ8GUe9IMkSsjWCVFtOGO1rc8BRuZoxapP6g8TrhPpMjqkxGJ0kiRIJ5OM76Czqcd8xy4gtqHPXHybr76wlOTeHmfQkABTPsO8H/IgLkafa7Gs2fdDMswn+2zlkk6ghyU8HptyDnnjhW2CXBGZnqUHDv894eO6q8F7abaabEjzssQykC6y8IoYngziy0zYk89wr+ZfDH7j9zKNOLXWfiN1xz8+Bjdu8gybAqKZjsujP9pzUuUTgU+zuvBi/wL12HQVqQHq/7wrXNUBJt3fcwquL4JokaKD6jy2O5dAgMBAAECggEAVxP/bpEMlniqOJu9Qcx2NcUpyGk5YfCZNc2xgaJXuIhOEidQoyCtD0G8pklWhc2+9JY0QV5f77TWyvxqGs35urRXhWKDuPVSSXWU9pKEIjLtLvDskqv9vS3u8d4bwSyC7iFOnsTHOf0i2IXcHTGUTE2LevR6fImg8cntmHEuyXFh4CmhoK1j0eBL5oXyQJJ+IXjp6ihwHbhX9h5IKXct5esmcL5hC77x3nyhIEA7sT/UfQH6vMsOHj0Ie8oju56ePQi7fQfGkOVdXQWCmusrPoqinmsgRPBB6N0uvGy33nscPjc00T0wNDiTOuRR5vS0H8N5WNorUzeMH1hsyE52sQKBgQDjf30UspjBO66vmJM7mjBl+5IAJcXXQotJGbOX1yr0YsUo4QbR+2QG8xJDtR0XnXgbhHZ97sPGcDKc7Wb8hI6hkl5fjQVQ3SKcyOIYSkFUcLPNlK8KjWvCgbGesfWAWopzkpEmvy+BtCOG+iQXtzKAOa9YCPn3uvzanBtgdKKhewKBgQDBZ6nyjl+1AdW1zTE/Rjc8CXUQqHuhV6PN1+KCuPVHcf2v3BwPFjODSncpK/11q0u9LRkXmgPatmqPSC3/xtGSAqeWHxwX3ILwur7cCP9VhzmW4yDrZIDQ0/OmKPa+7B4pghlGIo/S13WJi7YhhCjldBZc9/32tvxFa1gUToJMBwKBgQCYwRDWpfklvpJT+6nY2nZm892b1cEbAeaOhgBuEx8Xi36BLV+r/RW0COCZr/HB2o08RNxfQMQZ6VpCvrFpGwS+fo55sDICkwlbpxMRZkKplSdWAeDqv/y8VONUAIAs2B6g7agjETqv56n3RtyXQ/5X1OPkw9o8OkTv8OP9BzPwIwKBgHkoFoeTdxMuPhGwpDwuIWXjyskPsrsE6uGFbylS8py6JSDos08kKksB+Bn7q8Dt+Pleagyl9+ooQiLWJbLIevqL3S4m+PNduU1Sv0OaA1Ix7vq9+B5eDHBFhqm9ma1Kvy5jiK+t8Qk03jW3JvZiEziCe4vr8tV+FhTqxPebovY7AoGBAMD2Q5nxLO1ai68zdL0iWdtT8W7ETQm8jd5RsB+fulMMulQOiowIe7L100XT/Ni+z4XFhQrhr9JHkTLu6+pMdwJtJKZENWz0nec7QhhplcxL332XtA78ZzIjaikMn/WggDeCSLJL/qQEQL5YBdDpQg1wWyW3j3hPAjx7ebhb374A |
| | | account_name=重庆快省科技有限公司 |