Authored by Lixiaodi

Merge branch 'test6.9.7' of http://git.yoho.cn/ufo/ufo-platform into test6.9.7

package com.yoho.order.model;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import java.io.Serializable;
import java.math.BigDecimal;
... ... @@ -7,6 +11,7 @@ import java.math.BigDecimal;
* @author caoyan
* @date 2018/9/12
*/
@ToString
public class BuyerOrderGoods implements Serializable {
... ... @@ -27,6 +32,13 @@ public class BuyerOrderGoods implements Serializable {
private BigDecimal couponCutAmount;//优惠金额
private BigDecimal activityCutAmount;//活动优惠金额
@Getter
@Setter
private BigDecimal tariffAmount;
@Getter@Setter
private BigDecimal cutTariffAmount;
public Integer getId() {
return id;
... ... @@ -91,17 +103,4 @@ public class BuyerOrderGoods implements Serializable {
public void setActivityCutAmount(BigDecimal activityCutAmount) {
this.activityCutAmount = activityCutAmount;
}
@Override
public String toString() {
return "BuyerOrderGoods{" +
"id=" + id +
", uid='" + uid + '\'' +
", orderCode='" + orderCode + '\'' +
", skup='" + skup + '\'' +
", goodsPrice=" + goodsPrice +
", goodsAmount=" + goodsAmount +
", couponCutAmount=" + couponCutAmount +
'}';
}
}
... ...
... ... @@ -10,10 +10,12 @@
<result column="goods_amount" property="goodsAmount" jdbcType="DECIMAL" />
<result column="coupon_cut_amount" property="couponCutAmount" jdbcType="DECIMAL" />
<result column="activity_cut_amount" property="activityCutAmount" jdbcType="DECIMAL" />
<result column="tariff_amount" jdbcType="DECIMAL" property="tariffAmount" />
<result column="cut_tariff_amount" jdbcType="DECIMAL" property="cutTariffAmount" />
</resultMap>
<sql id="Base_Column_List">
id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount,activity_cut_amount
id, uid, order_code, skup, goods_price, goods_amount, coupon_cut_amount,activity_cut_amount, tariff_amount, cut_tariff_amount
</sql>
<select id="selectById" resultMap="BaseResultMap">
... ...
package com.yoho.ufo.order.service.impl;
import com.yoho.order.model.BuyerOrderGoods;
import org.springframework.stereotype.Service;
/**
* Created by li.ma on 2019/6/28.
*/
@Service
public class BuyerOrderGoodsService {
/**
* 香港仓订单的税率金额
* @param goods
* @return
*/
public double getTariffAmount(BuyerOrderGoods goods) {
double result = 0.00;
if (null == goods.getTariffAmount()) {
return result;
}
if (null == goods.getCutTariffAmount()) {
return goods.getTariffAmount().doubleValue();
}
return goods.getTariffAmount().subtract(goods.getCutTariffAmount()).doubleValue();
}
}
... ...
... ... @@ -219,6 +219,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon
@Autowired
private OrderCouponMapper orderCouponMapper;
@Autowired
private BuyerOrderGoodsService buyerOrderGoodsService;
private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address";
private static final String SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS = "back_delivery_address";
... ... @@ -1725,8 +1728,8 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon
BuyerOrderResp result = new BuyerOrderResp();
result.setReceiveTitle("卖家信息");
result.setPlatformWaybillTitle("寄回信息");
result.setReceiveName(metaValue.getString("consignee"));
result.setReceiveMobile(metaValue.getString("mobile"));
result.setReceiveName(null == metaValue.getString("consignee") ? "-" : metaValue.getString("consignee"));
result.setReceiveMobile(null == metaValue.getString("mobile") ? "-" : metaValue.getString("mobile"));
result.setReceiveAddress(metaValue.getString("area") + metaValue.getString("address"));
if(StringUtils.isEmpty(req.getOrderCode())) {
... ... @@ -1817,6 +1820,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon
resp.setSellerName(getUserNameByUid(buyerOrder.getSellerUid()));
resp.setSellerMobile(getMobileByUid(buyerOrder.getSellerUid()));
resp.setActivityCutAmount(goods.getActivityCutAmount() == null ? "-" : String.format("%.2f", goods.getActivityCutAmount().doubleValue()));
resp.setTariffAmount(buyerOrderGoodsService.getTariffAmount(goods));
SellerOrderMeta sellerMeta = sellerOrderMetaMapper.selectBySkupAndKey(skup, SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS);
if(sellerMeta!=null){
JSONObject sellerMetaValue = JSONObject.parseObject(sellerMeta.getMetaValue());
... ... @@ -3138,7 +3142,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService, ApplicationCon
}
private void updateDeptNo(Long orderCode, String wayBillCode, String phoneUid) {
LOGGER.error("method. updateDeptNo begin orderCode is {} , wayBillCode is {}, phoneUid is {}", orderCode, wayBillCode, phoneUid);
LOGGER.info("method. updateDeptNo begin orderCode is {} , wayBillCode is {}, phoneUid is {}", orderCode, wayBillCode, phoneUid);
PhoneUidDepot phoneUidDepot = phoneUidDepotMapper.selectByphoneUid(phoneUid);
... ...
... ... @@ -102,6 +102,7 @@
<th>颜色</th>
<th>尺码</th>
<th>销售价</th>
<th>税费</th>
<th>活动优惠</th>
<th>优惠券</th>
<th>购买数量</th>
... ... @@ -118,6 +119,7 @@
<td><span id="colorName"></span></td>
<td><span id="sizeName"></span></td>
<td><span id="goodsPrice"></span></td>
<td><span id="tariffAmount"></span></td>
<td><span id="activityCutAmount"></span></td>
<td><span id="couponCutAmount"></span></td>
<td><span id="productNum"></span></td>
... ... @@ -518,6 +520,7 @@ function getOrderInfo(orderCode){
$("#colorName").html(result.data.colorName);
$("#sizeName").html(result.data.sizeName);
$("#goodsPrice").html(result.data.goodsPrice);
$("#tariffAmount").html(result.data.tariffAmount);
if (result.data.couponCodeList) {
var codeListStr = '';
... ...