fanli/src/main/java/com/yeshi/fanli/controller/admin/ExtractAdminController.java
@@ -445,22 +445,25 @@ record.setExtraInfoStr(desc.toString()); } if (warnLevel == 0) { // 查询同店铺商品,同商品订单超过一定数量的 List<Integer> typeList = new ArrayList<>(); typeList.add(HongBaoV2.TYPE_ZIGOU); long sameGoodsOrderCount = commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList, record.getExtract().getUserInfo().getId(), Integer.parseInt(configService.get("admin_min_same_goods_order_count"))); long sameShopOrderCount = commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList, record.getExtract().getUserInfo().getId(), Integer.parseInt(configService.get("admin_min_same_shop_order_count"))); if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) { warnLevel = 3; record.setExtraInfoStr( String.format("同店铺:%s 同商品:%s", sameShopOrderCount, sameGoodsOrderCount)); } } // if (warnLevel == 0) { // // 查询同店铺商品,同商品订单超过一定数量的 // List<Integer> typeList = new ArrayList<>(); // typeList.add(HongBaoV2.TYPE_ZIGOU); // long sameGoodsOrderCount = // commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList, // record.getExtract().getUserInfo().getId(), // Integer.parseInt(configService.get("admin_min_same_goods_order_count"))); // long sameShopOrderCount = // commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList, // record.getExtract().getUserInfo().getId(), // Integer.parseInt(configService.get("admin_min_same_shop_order_count"))); // if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) { // warnLevel = 3; // record.setExtraInfoStr( // String.format("同店铺:%s 同商品:%s", sameShopOrderCount, // sameGoodsOrderCount)); // } // } record.setWarnLevel(warnLevel); @@ -486,6 +489,27 @@ e.printStackTrace(); out.print(JsonUtil.loadFalseResult(e.getMessage())); } } @RequestMapping(value = "getMyAuditedDanger") public void getMyAuditedDanger(String callback, Long uid, PrintWriter out) { if (uid == null) { JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请登录")); return; } // 查询同店铺商品,同商品订单超过一定数量的 List<Integer> typeList = new ArrayList<>(); typeList.add(HongBaoV2.TYPE_ZIGOU); long sameGoodsOrderCount = commonOrderCountService.countSameGoodsOrderByUidAndHongBaoType(typeList, uid, Integer.parseInt(configService.get("admin_min_same_goods_order_count"))); long sameShopOrderCount = commonOrderCountService.countSameShopOrderByUidAndHongBaoType(typeList, uid, Integer.parseInt(configService.get("admin_min_same_shop_order_count"))); if (sameGoodsOrderCount > 0 || sameShopOrderCount > 0) { String text = (String.format("同店铺:%s 同商品:%s", sameShopOrderCount, sameGoodsOrderCount)); JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(text)); return; } JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("店铺/商品无异常")); } /** @@ -1082,9 +1106,10 @@ e.printStackTrace(); } } /** * 下载提现红包Openid * * @param callback * @param response * @param out @@ -1125,10 +1150,10 @@ e.printStackTrace(); } } /** * 上传提现红包Excel * * @param file * @param out */ @@ -1150,10 +1175,10 @@ out.print(JsonUtil.loadFalseResult("上传失败")); } } /** * 预览红包发生人 * * @param callback * @param pageIndex * @param out fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserOrderController.java
@@ -4,8 +4,6 @@ import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Map; @@ -228,13 +226,10 @@ todayMoney = new BigDecimal(0.00); } String helpUrl = configService.get("order_list_help"); JSONObject data = new JSONObject(); data.put("count", count); data.put("result_list", JsonUtil.getApiCommonGson().toJson(list)); data.put("helpUrl", helpUrl); data.put("helpUrl", configService.get("order_list_help")); if (type != null && type == 1) { data.put("todayMoney", "预估返利总额 ¥" + todayMoney.setScale(2, BigDecimal.ROUND_DOWN).toString()); @@ -248,16 +243,13 @@ data.put("totalValid", totalValid); // 有效数量 data.put("totalProces", totalProces); // 维权数量 data.put("totalInvite", totalInvite); // 失效数量 out.print(JsonUtil.loadTrueResult(data)); } catch (CommonOrderException e) { out.print(JsonUtil.loadFalseResult(e.getCode(), e.getMsg())); } catch (Exception e) { out.print(JsonUtil.loadFalseResult(1, "查询失败")); e.printStackTrace(); LogHelper.errorDetailInfo(e); } } /** fanli/src/main/java/com/yeshi/fanli/controller/client/v2/GoodsControllerV2.java
@@ -182,10 +182,9 @@ @Resource private JumpDetailV2Service jumpDetailV2Service; @Resource private JDGoodsClassService jdGoodsClassService; /** * 淘宝商品详情 @@ -266,7 +265,6 @@ taoBaoGoodsUpdateService.offlineTaoBaoGoods(id); } }); } } else { @@ -351,6 +349,15 @@ BigDecimal fanLiRate = hongBaoManageService.getFanLiRate(); BigDecimal shareRate = hongBaoManageService.getShareRate(); GoodsDetailVO goodsDetail = GoodsDetailVOFactory.convertTaoBao(goods, null, fanLiRate, shareRate); if (TaoBaoUtil.isYUShou(goods)) { if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) { if (goodsDetail.getLabels() == null) goodsDetail.setLabels(new ArrayList<>()); goodsDetail.getLabels().add(new ClientTextStyleVO(goods.getPresaleDiscountFeeText(), "#FF2B4E")); } } // 在标题添加优惠信息 // 店铺信息 TaoBaoShop shop = taoBaoShopService.getTaoBaoShop(id, goods.getSellerId()); @@ -546,11 +553,11 @@ OtherInfo otherInfo = new OtherInfo(); RewardCouponVO rewardCoupon = new RewardCouponVO(); rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web")); JSONObject params1=new JSONObject(); JSONObject params1 = new JSONObject(); params1.put("url", configService.get("special_guide_reward_coupon_link")); rewardCoupon.setParams(params1.toString()); rewardCoupon.setMaxMoney("¥" +TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add( MoneyBigDecimalUtil.mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setMaxMoney("¥" + TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate).add(MoneyBigDecimalUtil .mul(TaoBaoUtil.getGoodsHongBaoMoney(goods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setDesc("用返利奖励券最高返"); otherInfo.setRewardCoupon(rewardCoupon); goodsDetail.setOtherInfo(otherInfo); @@ -636,14 +643,15 @@ // 附加信息 OtherInfo otherInfo = new OtherInfo(); // 京东plus返利 String maxMoneyPlus = null; JDCategoryInfo categoryInfo = jdGoods.getCategoryInfo(); if (categoryInfo != null && categoryInfo.getCid3() != null && jdGoods.getCommissionInfo() != null) { Long cid3 = categoryInfo.getCid3(); JDGoodsClass threeClass = jdGoodsClassService.getThreeClassByCid(Integer.parseInt(cid3.toString())); if (threeClass != null && threeClass.getSelfComm() != null && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) { if (threeClass != null && threeClass.getSelfComm() != null && threeClass.getSelfComm().compareTo(new BigDecimal(0)) > 0) { BigDecimal commissionShare = jdGoods.getCommissionInfo().getCommissionShare(); // plus比例 小于正常比例 if (commissionShare != null && commissionShare.compareTo(threeClass.getSelfComm()) > 0) { @@ -652,20 +660,22 @@ BigDecimal fanliMoneyPlus = JDUtil.getGoodsFanLiMoneyPlus(jdGoods, fanLiRate); otherInfo.setFanliMoneyPlus("京东plus会员返¥" + fanliMoneyPlus); // 使用奖励券最高返 maxMoneyPlus = "(京东plus会员最高返¥"+ fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE))+")"; maxMoneyPlus = "(京东plus会员最高返¥" + fanliMoneyPlus.add(MoneyBigDecimalUtil.mul(fanliMoneyPlus, Constant.MAX_REWARD_RATE)) + ")"; } } } // 奖励券返利 RewardCouponVO rewardCoupon = new RewardCouponVO(); rewardCoupon.setMaxMoneyPlus(maxMoneyPlus); rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web")); JSONObject params1=new JSONObject(); JSONObject params1 = new JSONObject(); params1.put("url", configService.get("special_guide_reward_coupon_link")); rewardCoupon.setParams(params1.toString()); rewardCoupon.setMaxMoney( "¥" +JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate).add( MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setMaxMoney("¥" + JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate) .add(MoneyBigDecimalUtil.mul(JDUtil.getGoodsFanLiMoney(jdGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setDesc("用返利奖励券最高返"); otherInfo.setRewardCoupon(rewardCoupon); goodsDetail.setOtherInfo(otherInfo); @@ -809,11 +819,11 @@ OtherInfo otherInfo = new OtherInfo(); RewardCouponVO rewardCoupon = new RewardCouponVO(); rewardCoupon.setJumpDetail(jumpDetailV2Service.getByTypeCache("web")); JSONObject params1=new JSONObject(); JSONObject params1 = new JSONObject(); params1.put("url", configService.get("special_guide_reward_coupon_link")); rewardCoupon.setParams(params1.toString()); rewardCoupon.setMaxMoney("¥" +PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil.mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setMaxMoney("¥" + PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate).add(MoneyBigDecimalUtil .mul(PinDuoDuoUtil.getGoodsFanLiMoney(pddGoods, fanLiRate), Constant.MAX_REWARD_RATE))); rewardCoupon.setDesc("用返利奖励券最高返"); otherInfo.setRewardCoupon(rewardCoupon); goodsDetail.setOtherInfo(otherInfo); fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -182,9 +182,10 @@ if (analysisTaoToken(acceptData, text, out)) { return; } if (!StringUtil.isNullOrEmpty(TaoBaoUtil.parseSystemTaoToken(text))) if (!StringUtil.isNullOrEmpty(TaoBaoUtil.parseSystemTaoToken(text))) { out.print(JsonUtil.loadFalseResult("不支持推荐")); return; } JSONObject root = new JSONObject(); root.put("type", 2); JSONObject data = new JSONObject(); fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/InviteOrderSubsidyMapper.java
New file @@ -0,0 +1,18 @@ package com.yeshi.fanli.dao.mybatis.order; import org.apache.ibatis.annotations.Param; import com.yeshi.fanli.dao.BaseMapper; import com.yeshi.fanli.entity.order.InviteOrderSubsidy; public interface InviteOrderSubsidyMapper extends BaseMapper<InviteOrderSubsidy> { /** * 查询用户补贴 * @param uid * @param orderNo * @param Type * @return */ InviteOrderSubsidy getByOrderNoAndType(@Param("uid")Long uid, @Param("orderNo")String orderNo,@Param("type") Integer type); } fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/OrderSubsidyMapper.java
File was deleted fanli/src/main/java/com/yeshi/fanli/entity/order/InviteOrderSubsidy.java
File was renamed from fanli/src/main/java/com/yeshi/fanli/entity/order/OrderSubsidy.java @@ -7,14 +7,14 @@ import org.yeshi.utils.mybatis.Table; /** * 订单补贴 * 邀请订单补贴 * * @author Administrator * */ @Table("yeshi_ec_order_subsidy") public class OrderSubsidy { //未知 @Table("yeshi_ec_invite_order_subsidy") public class InviteOrderSubsidy { // 未知 public static final int STATE_UNKNOWN = 0; // 可补贴 public static final int STATE_VALID = 1; @@ -22,8 +22,15 @@ public static final int STATE_INVALID = 2; // 已补贴成功 public static final int STATE_SUBSIDIZED = 3; public InviteOrderSubsidy(Long id) { super(); this.id = id; } public InviteOrderSubsidy() { } @Column(name = "os_id") private Long id; @Column(name = "os_uid") fanli/src/main/java/com/yeshi/fanli/exception/order/InviteOrderSubsidyException.java
New file @@ -0,0 +1,16 @@ package com.yeshi.fanli.exception.order; import com.yeshi.fanli.exception.BaseException; public class InviteOrderSubsidyException extends BaseException { private static final long serialVersionUID = 1L; public InviteOrderSubsidyException(int code, String msg) { super(code, msg); } public InviteOrderSubsidyException() { super(); } } fanli/src/main/java/com/yeshi/fanli/job/order/jd/UpdateJDOrderJob.java
@@ -63,8 +63,7 @@ public void updateSoonOrder() { if (!Constant.IS_TASK) return; LogHelper.job("开始爬取京东订单"); LogHelper.job("开始爬取京东订单"); long now = System.currentTimeMillis(); JDOrderResult result = JDApiUtil.getOrderList(1, 200, new Date(now), JDApiUtil.ORDER_TYPE_CREATETIME); fanli/src/main/java/com/yeshi/fanli/mapping/order/InviteOrderSubsidyMapper.xml
File was renamed from fanli/src/main/java/com/yeshi/fanli/mapping/order/OrderSubsidyMapper.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.yeshi.fanli.dao.mybatis.order.OrderSubsidyMapper"> <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.order.OrderSubsidy"> <mapper namespace="com.yeshi.fanli.dao.mybatis.order.InviteOrderSubsidyMapper"> <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.order.InviteOrderSubsidy"> <id column="os_id" property="id" jdbcType="BIGINT"/> <result column="os_uid" property="uid" jdbcType="BIGINT"/> <result column="os_money" property="money" jdbcType="DECIMAL"/> @@ -14,11 +14,11 @@ </resultMap> <sql id="Base_Column_List">os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time</sql> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select <include refid="Base_Column_List"/>from yeshi_ec_order_subsidy where os_id = #{id,jdbcType=BIGINT} <include refid="Base_Column_List"/>from yeshi_ec_invite_order_subsidy where os_id = #{id,jdbcType=BIGINT} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_order_subsidy where os_id = #{id,jdbcType=BIGINT}</delete> <insert id="insert" parameterType="com.yeshi.fanli.entity.order.OrderSubsidy" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_order_subsidy (os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{orderNo,jdbcType=VARCHAR},#{sourceType,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.OrderSubsidy" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_order_subsidy <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_invite_order_subsidy where os_id = #{id,jdbcType=BIGINT}</delete> <insert id="insert" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_invite_order_subsidy (os_id,os_uid,os_money,os_order_no,os_source_type,os_state,os_create_time,os_update_time) values (#{id,jdbcType=BIGINT},#{uid,jdbcType=BIGINT},#{money,jdbcType=DECIMAL},#{orderNo,jdbcType=VARCHAR},#{sourceType,jdbcType=INTEGER},#{state,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})</insert> <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_invite_order_subsidy <trim prefix="(" suffix=")" suffixOverrides=","> <if test="id != null">os_id,</if> <if test="uid != null">os_uid,</if> @@ -40,8 +40,8 @@ <if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if> </trim> </insert> <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.order.OrderSubsidy">update yeshi_ec_order_subsidy set os_uid = #{uid,jdbcType=BIGINT},os_money = #{money,jdbcType=DECIMAL},os_order_no = #{orderNo,jdbcType=VARCHAR},os_source_type = #{sourceType,jdbcType=INTEGER},os_state = #{state,jdbcType=INTEGER},os_create_time = #{createTime,jdbcType=TIMESTAMP},os_update_time = #{updateTime,jdbcType=TIMESTAMP} where os_id = #{id,jdbcType=BIGINT}</update> <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.OrderSubsidy">update yeshi_ec_order_subsidy <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy">update yeshi_ec_invite_order_subsidy set os_uid = #{uid,jdbcType=BIGINT},os_money = #{money,jdbcType=DECIMAL},os_order_no = #{orderNo,jdbcType=VARCHAR},os_source_type = #{sourceType,jdbcType=INTEGER},os_state = #{state,jdbcType=INTEGER},os_create_time = #{createTime,jdbcType=TIMESTAMP},os_update_time = #{updateTime,jdbcType=TIMESTAMP} where os_id = #{id,jdbcType=BIGINT}</update> <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.order.InviteOrderSubsidy">update yeshi_ec_invite_order_subsidy <set> <if test="uid != null">os_uid=#{uid,jdbcType=BIGINT},</if> <if test="money != null">os_money=#{money,jdbcType=DECIMAL},</if> @@ -55,7 +55,7 @@ <select id="getByOrderNoAndType" resultMap="BaseResultMap"> SELECT * FROM yeshi_ec_order_subsidy SELECT * FROM yeshi_ec_invite_order_subsidy WHERE os_uid = #{uid} AND os_order_no = #{orderNo} AND os_source_type = #{type} LIMIT 1 </select> fanli/src/main/java/com/yeshi/fanli/service/impl/order/CommonOrderServiceImpl.java
@@ -36,7 +36,7 @@ import com.yeshi.fanli.entity.order.CommonOrderGoods; import com.yeshi.fanli.entity.order.CommonOrderTradeIdMap; import com.yeshi.fanli.entity.order.HongBaoOrder; import com.yeshi.fanli.entity.order.OrderSubsidy; import com.yeshi.fanli.entity.order.InviteOrderSubsidy; import com.yeshi.fanli.entity.pdd.PDDOrder; import com.yeshi.fanli.entity.system.SystemCoupon.CouponTypeEnum; import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief; @@ -52,7 +52,7 @@ import com.yeshi.fanli.service.inter.order.CommonOrderService; import com.yeshi.fanli.service.inter.order.HongBaoOrderService; import com.yeshi.fanli.service.inter.order.HongBaoV2Service; import com.yeshi.fanli.service.inter.order.OrderSubsidyService; import com.yeshi.fanli.service.inter.order.InviteOrderSubsidyService; import com.yeshi.fanli.service.inter.user.UserSystemCouponRecordService; import com.yeshi.fanli.service.inter.user.UserSystemCouponService; import com.yeshi.fanli.util.Constant; @@ -116,7 +116,7 @@ private HongBaoOrderService hongBaoOrderService; @Resource private OrderSubsidyService orderSubsidyService; private InviteOrderSubsidyService inviteOrderSubsidyService; // 奖励订单图片 @@ -175,7 +175,7 @@ @Override public List<CommonOrderVO> getOrderByUid(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type, Integer orderState, String orderNo, String startTime, String endTime, Integer dateType, Integer source) throws CommonOrderException { throws CommonOrderException, Exception{ int pageSize = Constant.PAGE_SIZE; @@ -196,8 +196,8 @@ } // 数据加工重新组织 listDataFactory(acceptData, listOrder, listGoods, uid); orderInfoFactory(acceptData, listOrder, listGoods, uid); //listDataFactory(acceptData, listOrder, listGoods, uid); return listOrder; } @@ -482,30 +482,26 @@ String hongbaoInfo = ""; // 订单标识 List<String> signList = new ArrayList<String>(); /* 订单返利类型 转换 */ Integer hongBaoType = order.getHongBaoType(); if (HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) { // 自购 if (HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) { // 自购 hongbaoInfo = "返利"; order.setOrderOrigin("1"); order.setHongBaoTypePic(CommonOrder.TYPE_FANLI); signList.add(CommonOrder.TYPE_FANLI); } else if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) { // 分享 } else if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) { // 分享 hongbaoInfo = "奖金"; order.setOrderOrigin("2"); order.setHongBaoTypePic(CommonOrder.TYPE_SHARE); signList.add(CommonOrder.TYPE_SHARE); } else if (HongBaoV2.TYPE_SHARE_YIJI == hongBaoType || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) { // 下级的分享订单: 显示邀请 } else if (HongBaoV2.TYPE_SHARE_YIJI == hongBaoType || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) { // 邀请订单 (下级的分享订单) hongbaoInfo = "奖金"; order.setOrderOrigin("3"); order.setHongBaoTypePic(CommonOrder.TYPE_INVITE); signList.add(CommonOrder.TYPE_INVITE); } else if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType) { // 邀请订单 || HongBaoV2.TYPE_ERJI == hongBaoType) { // 邀请订单 hongbaoInfo = "奖金"; order.setOrderOrigin("3"); order.setHongBaoTypePic(CommonOrder.TYPE_INVITE); @@ -513,10 +509,10 @@ // 版本区分:2-0-2 if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) { OrderSubsidy orderSubsidy = orderSubsidyService.getByOrderNoAndType(uid, order.getOrderNo(), sourceType2); InviteOrderSubsidy orderSubsidy = inviteOrderSubsidyService.getByOrderNoAndType(uid, order.getOrderNo(), sourceType2); if (orderSubsidy != null) { ClientTextStyleVO subsidyInfo = new ClientTextStyleVO(); if (orderSubsidy.getState() == OrderSubsidy.STATE_SUBSIDIZED) { if (orderSubsidy.getState() == InviteOrderSubsidy.STATE_SUBSIDIZED) { subsidyInfo.setColor("#E5005C"); subsidyInfo.setContent("已补贴¥" + orderSubsidy.getMoney()); } else { @@ -538,8 +534,6 @@ String hongBaoDate = null; String hongBaoState_Str = ""; String hongbaoInfoFontColor = "#E5005C"; /* 红包状态 转换 */ String stateContent = ""; String stateFontColor = "#E5005C"; Integer orderHongBaoState = null; @@ -548,29 +542,21 @@ orderHongBaoState = 1; stateContent = "未到账"; hongBaoState_Str = "预估"; Date preAccountTime = order.getPreAccountTime(); if (preAccountTime != null) { if (preAccountTime != null) hongBaoDate = "预计到账时间:" + formatday.format(preAccountTime); } } else if (HongBaoV2.STATE_YILINGQU == hongBaoState) { orderHongBaoState = 3; stateContent = "已到账"; Date accountTime = order.getAccountTime(); if (accountTime != null) { if (accountTime != null) hongBaoDate = "到账时间:" + formatday.format(accountTime); } } else if (HongBaoV2.STATE_BUFENSHIXIAO == hongBaoState) { stateContent = "部分失效"; orderHongBaoState = 3; Date accountTime = order.getAccountTime(); if (accountTime != null) { if (accountTime != null) hongBaoDate = "到账时间:" + formatday.format(accountTime); } } else if (HongBaoV2.STATE_SHIXIAO == hongBaoState) { orderHongBaoState = 4; stateContent = "已失效"; @@ -578,10 +564,9 @@ } order.setHongBaoState(orderHongBaoState); order.setHongBaoDate(hongBaoDate); if (!StringUtil.isNullOrEmpty(order.getStateDesc())) { if (!StringUtil.isNullOrEmpty(order.getStateDesc())) stateContent = stateContent + "-" + order.getStateDesc(); } Map<String, String> stateMap = new HashMap<String, String>(); stateMap.put("content", stateContent); @@ -589,7 +574,6 @@ order.setAccountState(stateMap); hongbaoInfo = hongBaoState_Str + hongbaoInfo; Map<String, String> hongBaoMap = new HashMap<String, String>(); hongBaoMap.put("content", hongbaoInfo + " ¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN).toString()); hongBaoMap.put("fontColor", hongbaoInfoFontColor); @@ -837,6 +821,359 @@ } } /** * 订单信息加工 * @param acceptData * @param listOrder * @param listGoods * @param uid */ public void orderInfoFactory(AcceptData acceptData, List<CommonOrderVO> listOrder, List<CommonOrderVO> listGoods, Long uid) throws Exception{ List<String> listTB = new ArrayList<String>(); List<String> listJD = new ArrayList<String>(); List<String> listPDD = new ArrayList<String>(); for (CommonOrderVO commonOrderVO : listOrder) { Integer sourceType = commonOrderVO.getSourceType(); if (sourceType == null) { continue; } else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) { listTB.add(commonOrderVO.getOrderNo()); } else if (sourceType == Constant.SOURCE_TYPE_JD) { listJD.add(commonOrderVO.getOrderNo()); } else if (sourceType == Constant.SOURCE_TYPE_PDD) { listPDD.add(commonOrderVO.getOrderNo()); } } List<UserSystemCouponRecord> listRecordTB = null; if (listTB.size() > 0) { listRecordTB = userSystemCouponRecordService.getRecordByOrderNoList(Constant.SOURCE_TYPE_TAOBAO, listTB); } List<UserSystemCouponRecord> listRecordJD = null; if (listJD.size() > 0) { listRecordJD = userSystemCouponRecordService.getRecordByOrderNoList(Constant.SOURCE_TYPE_JD, listJD); } List<UserSystemCouponRecord> listRecordPDD = null; if (listPDD.size() > 0) { listRecordPDD = userSystemCouponRecordService.getRecordByOrderNoList(Constant.SOURCE_TYPE_PDD, listPDD); } SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd HH:mm"); SimpleDateFormat formatday = new SimpleDateFormat("yyyy.MM.dd"); // 2019.8.1开始返回维权信息 Date august = TimeUtil.parse("2019-08-01"); // 是否存在奖励券 boolean hasRewardCoupon = userSystemCouponService.getIncludeNotExchange(uid); boolean exchangeCoupon = userSystemCouponService.getIncludeExchange(uid); for (CommonOrderVO order: listOrder) { String orderNo = order.getOrderNo(); Integer sourceType = order.getSourceType(); // 商品信息组合 for (CommonOrderVO commonOrder: listGoods) { CommonOrderGoods goods = commonOrder.getCommonOrderGoods(); if (goods == null) { continue; } if (sourceType.equals(commonOrder.getSourceType()) && orderNo.equals(commonOrder.getOrderNo())) { CommonOrderGoodsVO commonGoodsVO = new CommonOrderGoodsVO(); PropertyUtils.copyProperties(commonGoodsVO, goods); commonGoodsVO.setGoodsType(sourceType); // 淘宝商品图片处理 String picture = commonGoodsVO.getPicture(); if (sourceType == Constant.SOURCE_TYPE_TAOBAO && !StringUtil.isNullOrEmpty(picture) && !picture.contains("320x320")) { commonGoodsVO.setPicture(TbImgUtil.getTBSize320Img(picture)); } // 购买数量 commonGoodsVO.setActualCount(commonOrder.getTotalCount() + "件"); // 实付款 BigDecimal totalSettlement = commonOrder.getTotalSettlement(); if (totalSettlement == null || totalSettlement.compareTo(new BigDecimal(0)) <= 0) { totalSettlement = commonOrder.getTotalPayment(); } commonGoodsVO.setActualPay("付款金额:¥" + totalSettlement); Integer hongBaoType = order.getHongBaoType(); // 邀请订单信息保护 if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) { Map<String, String> titleMap = new HashMap<String, String>(); titleMap.put("content", "为保障用户隐私,商品信息已隐藏!"); titleMap.put("fontColor", "#888888"); titleMap.put("bottomColor", "#E9E9E9"); commonGoodsVO.setTitle(null); commonGoodsVO.setGoodsTitle(titleMap); } // 订单类型为空时 已商品类为准 Integer orderType = order.getOrderType(); if (orderType == null) { String shopType = commonGoodsVO.getShopType(); if (CommonOrderGoodsVO.TYPE_TAOBAO.equalsIgnoreCase(shopType)) { order.setOrderType(1); } else if (CommonOrderGoodsVO.TYPE_TMALL.equalsIgnoreCase(shopType)) { order.setOrderType(2); } } order.getListOrderGoods().add(commonGoodsVO); } } Date thirdCreateTime = order.getThirdCreateTime(); if (thirdCreateTime != null) { order.setDownTime("下单时间:" + format.format(thirdCreateTime)); order.setObtainTime(thirdCreateTime.getTime()); } Date settleTime = order.getSettleTime(); if (settleTime != null) { order.setReceiveTime("收货时间:" + format.format(settleTime)); } // 订单类型 if (sourceType == Constant.SOURCE_TYPE_TAOBAO) { Integer orderType = order.getOrderType(); if (orderType == null) order.setOrderType(1); } else if (sourceType == Constant.SOURCE_TYPE_JD) { order.setOrderType(3); } else if (sourceType == Constant.SOURCE_TYPE_PDD) { order.setOrderType(4); } /* 订单状态 转换处理 */ String orderStateContent = ""; Map<String, String> orderStateMap = new HashMap<String, String>(); // 订单状态 Integer orderState = order.getState(); // 红包状态 Integer hongBaoState = order.getHongBaoState(); Integer stateWholeOrder = order.getStateWholeOrder(); if (CommonOrder.STATE_WHOLE_ORDER_BUFENYOUXIAO == stateWholeOrder) { // 整个订单部分失效:判断真实状态 订单、红包 CommonOrderVO buFenOrder = commonOrderMapper.getBuFenOrderState(uid, order.getOrderNo()); if (buFenOrder != null) { // 有效的订单状态 orderState = buFenOrder.getState(); // 有效的红包状态 hongBaoState = buFenOrder.getHongBaoState(); } } BigDecimal hongBao = order.getHongBao(); if (hongBao == null) { hongBao = new BigDecimal(0); } if (CommonOrder.STATE_FK == orderState) { orderStateContent = "已付款"; } else if (CommonOrder.STATE_JS == orderState) { orderStateContent = "已收货"; } else if (CommonOrder.STATE_SX == orderState) { orderStateContent = "未付款/已退款"; } else if (CommonOrder.STATE_WQ == orderState) { orderStateContent = "已维权"; if (sourceType != null && sourceType == Constant.SOURCE_TYPE_TAOBAO) { /* 订单维权 判断是否全部维权 */ List<TaoBaoWeiQuanOrder> listWQ = taoBaoWeiQuanOrderMapper .selectListByOrderIdAndState(order.getOrderNo(), "维权成功"); boolean isPart = false;// 默认失效 BigDecimal weiQuanMoney = getWeiQuanMoney(listWQ, sourceType, uid); if (!VersionUtil.greaterThan_1_6_0(acceptData.getPlatform(), acceptData.getVersion())) { if (isPart) { hongBaoState = HongBaoV2.STATE_BUFENSHIXIAO; // 部分失效 } else { hongBaoState = HongBaoV2.STATE_SHIXIAO; // 全部失效 } } else { // 2019.8.1 返回维权信息 if (settleTime != null && august != null && settleTime.getTime() > august.getTime()) { orderStateContent = "维权成功"; WeiQuanInfo weiQuanInfo = new WeiQuanInfo(); weiQuanInfo.setOldHongBao("¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN).toString()); weiQuanInfo.setWqHongBao("维权:-¥" + weiQuanMoney.setScale(2, BigDecimal.ROUND_DOWN).toString()); hongBao = MoneyBigDecimalUtil.sub(hongBao, weiQuanMoney); order.setWeiQuanInfo(weiQuanInfo); } } } } orderStateMap.put("content", orderStateContent); orderStateMap.put("fontColor", "#666666"); order.setOrderState(orderStateMap); String hongbaoInfo = ""; // 订单标识 List<String> signList = new ArrayList<String>(); /* 订单返利类型 转换 */ Integer hongBaoType = order.getHongBaoType(); if (HongBaoV2.TYPE_ZIGOU == hongBaoType || 2 == hongBaoType) { // 自购 hongbaoInfo = "返利"; order.setOrderOrigin("1"); order.setHongBaoTypePic(CommonOrder.TYPE_FANLI); signList.add(CommonOrder.TYPE_FANLI); } else if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType) { // 分享 hongbaoInfo = "奖金"; order.setOrderOrigin("2"); order.setHongBaoTypePic(CommonOrder.TYPE_SHARE); signList.add(CommonOrder.TYPE_SHARE); } else if (HongBaoV2.TYPE_SHARE_YIJI == hongBaoType || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) { // 下级的分享订单: 显示邀请 hongbaoInfo = "奖金"; order.setOrderOrigin("3"); order.setHongBaoTypePic(CommonOrder.TYPE_INVITE); signList.add(CommonOrder.TYPE_INVITE); } else if (HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType) { // 邀请订单 hongbaoInfo = "奖金"; order.setOrderOrigin("3"); order.setHongBaoTypePic(CommonOrder.TYPE_INVITE); signList.add(CommonOrder.TYPE_INVITE); // 版本区分:2-0-2 if (VersionUtil.greaterThan_2_0_2(acceptData.getPlatform(), acceptData.getVersion())) { InviteOrderSubsidy orderSubsidy = inviteOrderSubsidyService.getByOrderNoAndType(uid, order.getOrderNo(), sourceType); if (orderSubsidy != null) { ClientTextStyleVO subsidyInfo = new ClientTextStyleVO(); if (orderSubsidy.getState() == InviteOrderSubsidy.STATE_SUBSIDIZED) { subsidyInfo.setColor("#E5005C"); subsidyInfo.setContent("已补贴¥" + orderSubsidy.getMoney()); } else { subsidyInfo.setColor("#888888"); subsidyInfo.setContent("补贴¥" + orderSubsidy.getMoney()); // 解释信息(问号) List<String> subsidyList = new ArrayList<String>(); subsidyList.add("额外补贴能否获得由系统算法自动判断,人为无法干涉;"); subsidyList.add("额外补贴到账时间以及金额请以实际到账为准;"); subsidyList.add("额外补贴产生后将会在消息-资金消息中提醒你。"); order.setSubsidyList(subsidyList); } order.setSubsidy(subsidyInfo); } } } String hongBaoDate = null; String hongBaoState_Str = ""; String hongbaoInfoFontColor = "#E5005C"; /* 红包状态 转换 */ String stateContent = ""; String stateFontColor = "#E5005C"; Integer orderHongBaoState = null; if (HongBaoV2.STATE_KELINGQU == hongBaoState || HongBaoV2.STATE_BUKELINGQU == hongBaoState) { orderHongBaoState = 1; stateContent = "未到账"; hongBaoState_Str = "预估"; Date preAccountTime = order.getPreAccountTime(); if (preAccountTime != null) { hongBaoDate = "预计到账时间:" + formatday.format(preAccountTime); } } else if (HongBaoV2.STATE_YILINGQU == hongBaoState) { orderHongBaoState = 3; stateContent = "已到账"; Date accountTime = order.getAccountTime(); if (accountTime != null) { hongBaoDate = "到账时间:" + formatday.format(accountTime); } } else if (HongBaoV2.STATE_BUFENSHIXIAO == hongBaoState) { stateContent = "部分失效"; orderHongBaoState = 3; Date accountTime = order.getAccountTime(); if (accountTime != null) { hongBaoDate = "到账时间:" + formatday.format(accountTime); } } else if (HongBaoV2.STATE_SHIXIAO == hongBaoState) { orderHongBaoState = 4; stateContent = "已失效"; hongbaoInfoFontColor = "#888888"; } order.setHongBaoState(orderHongBaoState); order.setHongBaoDate(hongBaoDate); if (!StringUtil.isNullOrEmpty(order.getStateDesc())) { stateContent = stateContent + "-" + order.getStateDesc(); } Map<String, String> stateMap = new HashMap<String, String>(); stateMap.put("content", stateContent); stateMap.put("fontColor", stateFontColor); order.setAccountState(stateMap); hongbaoInfo = hongBaoState_Str + hongbaoInfo; Map<String, String> hongBaoMap = new HashMap<String, String>(); hongBaoMap.put("content", hongbaoInfo + " ¥" + hongBao.setScale(2, BigDecimal.ROUND_DOWN).toString()); hongBaoMap.put("fontColor", hongbaoInfoFontColor); order.setHongBaoInfo(hongBaoMap); // 非自购的订单 不显示返利、免单详情 if (HongBaoV2.TYPE_ZIGOU != hongBaoType) { order.setSignList(signList); } else { // 奖励订单、免单 使用记录 if (sourceType == null) { setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, null, signList, acceptData); } else if (sourceType == Constant.SOURCE_TYPE_TAOBAO) { setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordTB, signList, acceptData); } else if (sourceType == Constant.SOURCE_TYPE_JD) { setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordJD, signList, acceptData); } else if (sourceType == Constant.SOURCE_TYPE_PDD) { setSystemCouponRecord(order, hasRewardCoupon, exchangeCoupon, hongBaoState, hongBaoType, listRecordPDD, signList, acceptData); } } // 分享、邀请 隐藏订单号 if (HongBaoV2.TYPE_SHARE_GOODS == hongBaoType || HongBaoV2.TYPE_YAOQING == hongBaoType || HongBaoV2.TYPE_YIJI == hongBaoType || HongBaoV2.TYPE_ERJI == hongBaoType || HongBaoV2.TYPE_SHARE_YIJI == hongBaoType || HongBaoV2.TYPE_SHARE_ERJI == hongBaoType) { order.setOrderNo(UserUtil.filterOrderId(order.getOrderNo())); } } } @Override public List<CommonOrder> listBySourceTypeAndOrderId(int sourceType, String orderId) { return commonOrderMapper.listBySourceTypeAndOrderNo(sourceType, orderId); fanli/src/main/java/com/yeshi/fanli/service/impl/order/InviteOrderSubsidyServiceImpl.java
New file @@ -0,0 +1,49 @@ package com.yeshi.fanli.service.impl.order; import java.util.Date; import javax.annotation.Resource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.yeshi.fanli.dao.mybatis.order.InviteOrderSubsidyMapper; import com.yeshi.fanli.entity.order.InviteOrderSubsidy; import com.yeshi.fanli.exception.order.InviteOrderSubsidyException; import com.yeshi.fanli.service.inter.order.InviteOrderSubsidyService; import com.yeshi.fanli.util.StringUtil; @Service public class InviteOrderSubsidyServiceImpl implements InviteOrderSubsidyService { @Resource private InviteOrderSubsidyMapper inviteOrderSubsidyMapper; @Override public InviteOrderSubsidy getByOrderNoAndType(Long uid, String orderNo, Integer type) { return inviteOrderSubsidyMapper.getByOrderNoAndType(uid, orderNo, type); } @Transactional @Override public void addOrderSubsidy(InviteOrderSubsidy orderSubsidy) throws InviteOrderSubsidyException { if (orderSubsidy.getMoney() == null || StringUtil.isNullOrEmpty(orderSubsidy.getOrderNo()) || orderSubsidy.getSourceType() == null || orderSubsidy.getUid() == null) throw new InviteOrderSubsidyException(1, "数据不完整"); InviteOrderSubsidy old = getByOrderNoAndType(orderSubsidy.getUid(), orderSubsidy.getOrderNo(), orderSubsidy.getSourceType()); if (old != null) {// 修改 // 修改状态 InviteOrderSubsidy update = new InviteOrderSubsidy(old.getId()); update.setMoney(orderSubsidy.getMoney()); update.setState(orderSubsidy.getState()); update.setUpdateTime(new Date()); inviteOrderSubsidyMapper.updateByPrimaryKeySelective(update); } else {// 添加 if (orderSubsidy.getCreateTime() == null) orderSubsidy.setCreateTime(new Date()); inviteOrderSubsidyMapper.insertSelective(orderSubsidy); } } } fanli/src/main/java/com/yeshi/fanli/service/impl/order/OrderSubsidyServiceImpl.java
File was deleted fanli/src/main/java/com/yeshi/fanli/service/inter/order/CommonOrderService.java
@@ -79,7 +79,7 @@ */ public List<CommonOrderVO> getOrderByUid(AcceptData acceptData, Integer page, Long uid, Integer state, Integer type, Integer orderState, String orderNo, String startTime, String endTime, Integer dateType, Integer source) throws CommonOrderException; throws CommonOrderException,Exception; /** * 统计订单-根据红包类型 自购 邀请 分享 fanli/src/main/java/com/yeshi/fanli/service/inter/order/InviteOrderSubsidyService.java
New file @@ -0,0 +1,26 @@ package com.yeshi.fanli.service.inter.order; import com.yeshi.fanli.entity.order.InviteOrderSubsidy; import com.yeshi.fanli.exception.order.InviteOrderSubsidyException; public interface InviteOrderSubsidyService { /** * 查询补贴 * * @param uid * @param orderNo * @param type * @return */ public InviteOrderSubsidy getByOrderNoAndType(Long uid, String orderNo, Integer type); /** * 添加订单补贴 * * @param orderSubsidy * @throws OrderSubsidyException */ public void addOrderSubsidy(InviteOrderSubsidy orderSubsidy) throws InviteOrderSubsidyException; } fanli/src/main/java/com/yeshi/fanli/service/inter/order/OrderSubsidyService.java
File was deleted fanli/src/main/java/com/yeshi/fanli/util/factory/goods/GoodsDetailVOFactory.java
@@ -391,26 +391,11 @@ BigDecimal fanLiRate, BigDecimal shareRate) { if (goodsInfo != null && goods != null) { // 资金信息 MoneyInfoVO moneyInfoVO = new MoneyInfoVO(); moneyInfoVO.setMoneyType(1); // 默认显示:返 ¥6.6 moneyInfoVO.setFanliMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, fanLiRate)); moneyInfoVO.setShareMoney(TaoBaoUtil.getGoodsHongBaoInfo(goods, shareRate)); goodsInfo.setMoneyInfo(moneyInfoVO); // 设置券后价为定金价格 if (goods.getCouponAmount().compareTo(BigDecimal.valueOf(0)) > 0) { goodsInfo.setCouponPrice(new BigDecimal(goods.getPresaleDeposit())); } goodsInfo.setZkPrice(new BigDecimal(goods.getPresaleDeposit())); // 添加标签 if (goodsInfo.getLabels() == null) goodsInfo.setLabels(new ArrayList<>()); goodsInfo.getLabels().add(new ClientTextStyleVO("预售", "#FF2B4E")); // 在标题添加优惠信息 if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) { goodsInfo.setTitle(String.format("【%s】", goods.getPresaleDiscountFeeText()) + goodsInfo.getTitle()); } } return goodsInfo; } fanli/src/main/java/com/yeshi/fanli/util/taobao/TaoBaoUtil.java
@@ -789,14 +789,11 @@ private static TaoBaoGoodsBriefExtra loadYuShouInfo(TaoBaoGoodsBriefExtra extra, TaoBaoGoodsBrief goods) { if (goods != null && extra != null) { if (isYUShou(goods)) {// 预售商品 extra.setZkPrice(new BigDecimal(goods.getPresaleDeposit())); // extra.setZkPrice(new BigDecimal(goods.getPresaleDeposit())); // 预售 if (extra.getLabels() == null) extra.setLabels(new ArrayList<>()); extra.getLabels().add(new ClientTextStyleVO("预售", "#FF2B4E")); if (!StringUtil.isNullOrEmpty(goods.getPresaleDiscountFeeText())) {// 在标题添加优惠信息 extra.setTitle(String.format("【%s】", goods.getPresaleDiscountFeeText()) + extra.getTitle()); } } } return extra; @@ -1436,22 +1433,6 @@ */ public static BigDecimal getGoodsHongBaoMoney(TaoBaoGoodsBrief goodsBrief, BigDecimal rate) { BigDecimal money = null; // 预售商品 if (isYUShou(goodsBrief)) { if (goodsBrief.getYsylCommissionRate() != null) money = MoneyBigDecimalUtil.mul( MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul(new BigDecimal(goodsBrief.getPresaleDeposit()), goodsBrief.getYsylCommissionRate()), new BigDecimal("0.0001")), MoneyBigDecimalUtil.div(rate, new BigDecimal(100))); else money = MoneyBigDecimalUtil.mul(MoneyBigDecimalUtil.mul( MoneyBigDecimalUtil.mul(goodsBrief.getZkPrice(), goodsBrief.getTkRate()), new BigDecimal("0.01")), MoneyBigDecimalUtil.div(rate, new BigDecimal(100))); return money; } if (StringUtil.isNullOrEmpty(goodsBrief.getCouponInfo()) || goodsBrief.getCouponInfo().trim().equalsIgnoreCase("无")) { money = MoneyBigDecimalUtil.mul( @@ -2120,6 +2101,7 @@ /** * 提取自有格式的淘口令 * * @param str * @return */