首页悬浮图mapperbug修改,增加商品详情中的比例展示
| | |
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.entity.order.CommonOrder;
|
| | | import com.yeshi.fanli.entity.order.HongBaoOrder;
|
| | | import com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanDrawBack;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | | import com.yeshi.fanli.exception.order.CommonOrderException;
|
| | |
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderProcessService;
|
| | | import com.yeshi.fanli.service.inter.order.OrderService;
|
| | | import com.yeshi.fanli.service.inter.order.UserOrderWeiQuanRecordService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.tb.TaoBaoWeiQuanOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserSystemCouponRecordService;
|
| | |
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | @Resource
|
| | | private UserOrderWeiQuanRecordService userOrderWeiQuanRecordService;
|
| | |
|
| | | /**
|
| | | * 统计历史订单-淘宝订单
|
| | |
| | | {
|
| | | order.setWeiQuanState(weiQuanOrder.getState());
|
| | | order.setState(CommonOrder.STATE_WQ);
|
| | | TaoBaoWeiQuanDrawBack drawBack = taoBaoWeiQuanDrawBackService.selectByOrderItemIdAndUid(weiQuanOrder.getOrderItemId(),
|
| | | Long.parseLong(order.getUserId()));
|
| | | TaoBaoWeiQuanDrawBack drawBack = taoBaoWeiQuanDrawBackService.selectByOrderItemIdAndUid(
|
| | | weiQuanOrder.getOrderItemId(), Long.parseLong(order.getUserId()));
|
| | | if (drawBack != null) {// 已经退款
|
| | |
|
| | | // 计算退款资金
|
| | |
| | | }
|
| | |
|
| | | } else {// 尚未退款
|
| | | UserOrderWeiQuanRecord record = userOrderWeiQuanRecordService.selectByOrderInfoAndUid(
|
| | | Long.parseLong(order.getUserId()), weiQuanOrder.getOrderItemId(),
|
| | | Constant.SOURCE_TYPE_TAOBAO);
|
| | | if (record != null)
|
| | | order.setWeiQuanBackMoney("-" + record.getMoney());
|
| | | else {
|
| | | order.setWeiQuanBackMoney("-" + order.getHongBao());
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | JSONArray line_list = new JSONArray();
|
| | |
|
| | | for (String channel : channelList) {
|
| | | List<ChartTDO> list = hongBaoV2CountService.count24HOderByChannel(channel, dateType, year,
|
| | | startTime, endTime);
|
| | | List<ChartTDO> list = hongBaoV2CountService.count24HOderByChannel(channel, dateType, year, startTime,
|
| | | endTime);
|
| | |
|
| | | if ("all".equalsIgnoreCase(channel)) {
|
| | | channel = "总计";
|
| | |
| | | try {
|
| | | JSONArray line_list = new JSONArray();
|
| | | for (Integer type : channelList) {
|
| | | List<ChartTDO> list = hongBaoV2CountService.countHongBaoType(dateType, type, year, startTime,
|
| | | endTime);
|
| | | List<ChartTDO> list = hongBaoV2CountService.countHongBaoType(dateType, type, year, startTime, endTime);
|
| | | JSONObject innerList = new JSONObject();
|
| | | if (type == 1) {
|
| | | innerList.put("name", "返利订单");
|
| | |
| | |
|
| | | JSONArray line_list = new JSONArray();
|
| | |
|
| | | List<ChartTDO> list = commonOrderCountService.getTrackAccuracyRate(dateType, year, startTime,
|
| | | endTime, sourceType);
|
| | | List<ChartTDO> list = commonOrderCountService.getTrackAccuracyRate(dateType, year, startTime, endTime,
|
| | | sourceType);
|
| | |
|
| | | JSONObject innerList = new JSONObject();
|
| | | innerList.put("name", "总计");
|
| | |
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail.UserMoneyDetailTypeEnum;
|
| | | import com.yeshi.fanli.exception.user.UserInfoExtraException;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.count.HongBaoV2CountService;
|
| | | import com.yeshi.fanli.service.inter.money.UserMoneyDetailService;
|
| | | import com.yeshi.fanli.service.inter.money.extract.ExtractService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.MoneyBigDecimalUtil;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | |
| | |
|
| | | @Resource
|
| | | private ConfigService configService;
|
| | |
|
| | | @Resource
|
| | | private HongBaoV2CountService hongBaoV2CountService;
|
| | |
|
| | | /**
|
| | | * 新版资金详情(1.4.9)
|
| | |
| | | maxDate = new Date(
|
| | | TimeUtil.convertToTimeTemp(TimeUtil.getGernalTime(ca.getTimeInMillis(), "yyyy-MM"), "yyyy-MM"));
|
| | |
|
| | | // 本月未到账
|
| | | vo.setMonthUnRecievedMoney(hongBaoV2Service.getUnRecievedMoneyWithPreGetTime(uid, minDate, maxDate));
|
| | | // 本月未到账,以app端我的页面上月收益为准
|
| | |
|
| | | BigDecimal selfMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, 4, 1);
|
| | | BigDecimal shareMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, 4, 2);
|
| | | BigDecimal inviteMoney = hongBaoV2CountService.getRewardMoneyToCount(uid, 4, 3);
|
| | |
|
| | | |
| | | BigDecimal monthUnRecievedMoney = selfMoney.setScale(2, BigDecimal.ROUND_DOWN)
|
| | | .add(shareMoney.setScale(2, BigDecimal.ROUND_DOWN)).add(inviteMoney.setScale(2, BigDecimal.ROUND_DOWN));
|
| | | vo.setMonthUnRecievedMoney(monthUnRecievedMoney);
|
| | |
|
| | | // 全部未到账
|
| | | minDate = new Date(0);
|
| | |
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo().setShareMoney(
|
| | | "¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
|
| | |
|
| | | if (TaoBaoUtil.isYUShou(goods)) {
|
| | | if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {
|
| | |
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo()
|
| | | .setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | // 使用奖励券最高返
|
| | | if (VersionUtil.greaterThan_2_0_5(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | maxMoneyPlus = "(京东plus返¥"
|
| | | + JDUtil.getGoodsFanLiMoneyPlus(jdGoods,
|
| | | hongBaoManageService.getVIPFanLiRate())
|
| | | + ")";
|
| | | + JDUtil.getGoodsFanLiMoneyPlus(jdGoods, hongBaoManageService.getVIPFanLiRate()) + ")";
|
| | | } else
|
| | | maxMoneyPlus = "(京东plus最高返¥"
|
| | | + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))
|
| | |
| | | goodsDetail.getMoneyInfo().setFanliMoney(goodsDetail.getMoneyInfo().getMaxMoney());
|
| | | goodsDetail.getMoneyInfo().setShareMoney(
|
| | | "¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, hongBaoManageService.getVIPShareRate()));
|
| | | goodsDetail.getMoneyInfo().setRateInfo(goodsDetail.getMoneyInfo().getMaxRateInfo());
|
| | | }
|
| | | goodsDetail.getMoneyInfo().setRateInfoHelpUrl(configService.get("goods_detail_fanli_rate_help_url"));
|
| | |
|
| | | // 附加信息
|
| | | OtherInfo otherInfo = new OtherInfo();
|
| | |
| | | </delete>
|
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD"
|
| | | useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_float_ad
|
| | | (fa_id,fa_name,fa_picture,fa_show_mode,fa_jumpid,fa_params,fa_jump_need_login,fa_start_time,fa_end_time,fa_position,fa_order,fa_type,fa_state,fa_create_time,fa_update_time,fa_id,fa_play_sound,fa_type_enum)
|
| | | (fa_id,fa_name,fa_picture,fa_show_mode,fa_jumpid,fa_params,fa_jump_need_login,fa_start_time,fa_end_time,fa_position,fa_order,fa_type,fa_state,fa_create_time,fa_update_time,fa_play_sound,fa_type_enum)
|
| | | values
|
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{showMode,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{position,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{id,jdbcType=BIGINT},#{playSound,jdbcType=BOOLEAN},#{typeEnum,jdbcType=VARCHAR})
|
| | | (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{showMode,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{position,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{type,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP},#{playSound,jdbcType=BOOLEAN},#{typeEnum,jdbcType=VARCHAR})
|
| | | </insert>
|
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.FloatAD"
|
| | | useGeneratedKeys="true" keyProperty="id">
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public UserOrderWeiQuanRecord selectByOrderInfoAndUid(Long uid, String tradeId, int sourceType) {
|
| | | UserOrderWeiQuanRecord record = userOrderWeiQuanRecordMapper.selectByOrderInfoAndUid(uid, tradeId, sourceType);
|
| | |
|
| | | return record;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.inter.order;
|
| | |
|
| | | import com.yeshi.fanli.entity.order.UserOrderWeiQuanRecord;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoWeiQuanOrder;
|
| | |
|
| | | public interface UserOrderWeiQuanRecordService {
|
| | |
| | | */
|
| | | public void addTaoBaoWeiQuan(TaoBaoWeiQuanOrder order);
|
| | |
|
| | | /**
|
| | | * |
| | | * @Title: listByOrderInfoAndUid @Description: 根据订单信息与用户ID查询维权 @param
|
| | | * uid @param orderId @param sourceType @return List<UserOrderWeiQuanRecord>
|
| | | * 返回类型 @throws
|
| | | */
|
| | |
|
| | | public UserOrderWeiQuanRecord selectByOrderInfoAndUid(Long uid, String tradeId, int sourceType);
|
| | |
|
| | | }
|
| | |
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.jd.JDUtil;
|
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoApiUtil;
|
| | | import com.yeshi.fanli.util.pinduoduo.PinDuoDuoUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoCouponUtil;
|
| | | import com.yeshi.fanli.util.taobao.TaoBaoUtil;
|
| | |
| | | // 资金信息
|
| | | MoneyInfoVO moneyInfoVO = new MoneyInfoVO();
|
| | | moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
|
| | |
|
| | | BigDecimal commission = TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getFanLiRate());
|
| | |
|
| | | moneyInfoVO.setFanliMoney("¥" + commission);
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | | else
|
| | | moneyInfoVO.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate()));
|
| | | else {// 只有有VIP后的版本才会显示返利比
|
| | |
|
| | | BigDecimal price = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | BigDecimal rate = MoneyBigDecimalUtil.div(commission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setRateInfo("返利比 " + rate + "%");
|
| | |
|
| | | BigDecimal maxCommission = TaoBaoUtil.getGoodsHongBaoMoney(goods, params.getVipFanLiRate());
|
| | | BigDecimal maxRate = MoneyBigDecimalUtil.div(maxCommission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setMaxRateInfo("返利比 " + maxRate + "%");
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | | }
|
| | | moneyInfoVO.setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, params.getShareRate()));
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | |
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | | else
|
| | | moneyInfoVO.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate()));
|
| | | else {
|
| | | BigDecimal price = JDUtil.getQuanPrice(goods);
|
| | | BigDecimal rate = MoneyBigDecimalUtil.div(commission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setRateInfo("返利比 " + rate + "%");
|
| | |
|
| | | BigDecimal maxCommission = JDUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate());
|
| | | BigDecimal maxRate = MoneyBigDecimalUtil.div(maxCommission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setMaxRateInfo("返利比 " + maxRate + "%");
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | | }
|
| | | moneyInfoVO.setShareMoney("¥" + JDUtil.getGoodsFanLiMoney(goods, params.getShareRate()));
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | |
| | | moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6
|
| | | BigDecimal commission = PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getFanLiRate());
|
| | | moneyInfoVO.setFanliMoney("¥" + commission);
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | | else
|
| | | moneyInfoVO.setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate()));
|
| | | moneyInfoVO.setShareMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getShareRate()));
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | | Boolean hasCoupon = goods.getHasCoupon();
|
| | | if (hasCoupon != null && hasCoupon) {
|
| | |
| | | goodsInfo.setCouponInfo(coupon);
|
| | | }
|
| | |
|
| | | if (params.getMaxRewardRate() != null)
|
| | | moneyInfoVO
|
| | | .setMaxMoney("¥" + commission.add(MoneyBigDecimalUtil.mul(commission, params.getMaxRewardRate())));
|
| | | else {
|
| | | BigDecimal price = goodsInfo.getCouponPrice() != null ? goodsInfo.getCouponPrice() : goodsInfo.getZkPrice();
|
| | | BigDecimal rate = MoneyBigDecimalUtil.div(commission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setRateInfo("返利比 " + rate + "%");
|
| | |
|
| | | BigDecimal maxCommission = PinDuoDuoUtil.getGoodsFanLiMoney(goods, params.getVipFanLiRate());
|
| | | BigDecimal maxRate = MoneyBigDecimalUtil.div(maxCommission.multiply(new BigDecimal(100)), price);
|
| | | moneyInfoVO.setMaxRateInfo("返利比 " + maxRate + "%");
|
| | |
|
| | | moneyInfoVO.setMaxMoney("¥" + maxCommission);
|
| | | }
|
| | | goodsInfo.setMoneyInfo(moneyInfoVO);
|
| | |
|
| | | // 店铺信息
|
| | | String mallName = goods.getMallName();
|
| | | if (!StringUtil.isMobile(mallName)) {
|
| | |
| | | private String shareMoney;// 分享奖金
|
| | | @Expose
|
| | | private String maxMoney;// 最高返回
|
| | | @Expose
|
| | | private String rateInfo;//比例信息
|
| | | @Expose
|
| | | private String rateInfoHelpUrl;//比例帮助链接
|
| | | |
| | | private String maxRateInfo;//最大比例信息
|
| | | |
| | |
|
| | | public String getMaxRateInfo() {
|
| | | return maxRateInfo;
|
| | | }
|
| | |
|
| | | public void setMaxRateInfo(String maxRateInfo) {
|
| | | this.maxRateInfo = maxRateInfo;
|
| | | }
|
| | |
|
| | | public String getRateInfo() {
|
| | | return rateInfo;
|
| | | }
|
| | |
|
| | | public void setRateInfo(String rateInfo) {
|
| | | this.rateInfo = rateInfo;
|
| | | }
|
| | |
|
| | | public String getRateInfoHelpUrl() {
|
| | | return rateInfoHelpUrl;
|
| | | }
|
| | |
|
| | | public void setRateInfoHelpUrl(String rateInfoHelpUrl) {
|
| | | this.rateInfoHelpUrl = rateInfoHelpUrl;
|
| | | }
|
| | |
|
| | | public String getFanliMoney() {
|
| | | return fanliMoney;
|