记得上下班打卡 | git大法好,push需谨慎

Commit 6f8ed964 authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev' into dev

parents 0333a60f 62dfc68c
......@@ -132,12 +132,16 @@
title: '快递费',
formatter: function (value, row, index) {
var expressType = '';
var freightPrice = row.freightPrice;
if (row.expressType == 1) {
expressType = "寄付";
} else {
expressType = "到付";
}
return '快递方式:'+expressType+'<br>'+'快递费:'+row.priceExpress;
if (null == freightPrice) {
freightPrice = '';
}
return '快递方式:'+expressType+'<br>'+'已支付快递费:'+row.priceExpress+'<br>'+'预估快递费:'+freightPrice;
}
},
{
......
......@@ -395,7 +395,15 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
String msg = (String) hashMap.get("msg");
return ResponseDto.failure(msg);
} else {
// TODO: 2021/6/30 储存金额
HashMap hashMapResult = (HashMap) hashMap.get("result");
KylinOrderExpress kylinOrderExpress = new KylinOrderExpress();
BigDecimal price = dataUtils.getBigDecimal(hashMapResult.get("price"));
kylinOrderExpress.setFreightPrice(price);
kylinOrderExpress.setUpdatedAt(DateUtil.getNowTime());
kylinOrderExpressMapper.update(
kylinOrderExpress
, new UpdateWrapper<KylinOrderExpress>().in("order_express_id", orderExpressInfo.getOrderExpressId())
);
// {"result":{"deliverTime":"2021-07-01 18:00:00,2021-07-01 18:00:00","price":"23元","businessTypeDesc":"顺丰特快","businessType":"1"},"succ":"ok","msg":null}
}
}
......@@ -481,6 +489,7 @@ public class PerformancesExpressServiceImpl extends ServiceImpl<KylinOrderExpres
kylinOrderExpressRoute.setOpcode((String) routeInfo.get("opcode"));
kylinOrderExpressRoute.setCreatedAt(DateUtil.getNowTime());
kylinOrderExpressRouteMapper.insert(kylinOrderExpressRoute);
// 这里没清缓存 推送正常的话这个用不到
}
}
}
......
......@@ -16,6 +16,8 @@ import org.springframework.data.mongodb.core.query.Criteria;
import org.springframework.data.mongodb.core.query.Query;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -291,4 +293,29 @@ public class DataUtils {
redisUtil.del(KylinRedisConst.ORDER_REFUND_BY_ORDER_ID.concat(id));
}
}
/**
* Object转BigDecimal类型
*
* @param value 要转的object类型
* @return 转成的BigDecimal类型数据
*/
public BigDecimal getBigDecimal(Object value) {
BigDecimal ret = null;
if (value != null) {
if (value instanceof BigDecimal) {
ret = (BigDecimal) value;
} else if (value instanceof String) {
String str = ((String) value).replace("元","");
ret = new BigDecimal(str);
} else if (value instanceof BigInteger) {
ret = new BigDecimal((BigInteger) value);
} else if (value instanceof Number) {
ret = new BigDecimal(((Number) value).doubleValue());
} else {
throw new ClassCastException("Not possible to coerce [" + value + "] from class " + value.getClass() + " into a BigDecimal.");
}
}
return ret;
}
}
......@@ -24,5 +24,6 @@ public class PerformanceExpressPerformanceOrderListAdminDao {
String mailno;
Integer expressStatus;
Integer freightPrice;
}
......@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* <p>
......@@ -37,6 +38,7 @@ public class KylinOrderExpress implements Serializable {
private String printIcon;
private String twoDimensionCode;
private String printFlag;
private BigDecimal freightPrice;
private String return_tracking_no;
private String sourceTransferCode;
......
......@@ -13,6 +13,7 @@
AND status = #{status}
</if>
</where>
ORDER BY mid DESC
</select>
<select id="selectLastOne" resultType="com.liquidnet.service.kylin.entity.KylinOrderRefundBatches">
SELECT *
......
......@@ -48,6 +48,7 @@
AND a.status = #{status}
</if>
</where>
ORDER BY mid DESC
</select>
<select id="selectRefundingCount" resultType="java.lang.Integer">
SELECT COUNT(*)
......
......@@ -283,6 +283,7 @@
kots.express_type,
oe.mailno,
oe.freight_price,
oe.express_status
FROM kylin_order_tickets kot
INNER JOIN kylin_order_ticket_status kots ON kot.order_tickets_id = kots.order_id
......
package com.liquidnet.service.consumer.service.processor;
import com.liquidnet.service.consumer.adam.service.processor.ConsumerAdamUCenterProcessor;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
......
......@@ -811,6 +811,8 @@ CREATE TABLE `kylin_order_express`
`origincode` varchar(255) NOT NULL DEFAULT '' COMMENT '原寄地区域代码 可用于顺丰电子面单标签打印',
`destcode` varchar(255) NOT NULL DEFAULT '' COMMENT '目的地区域代码 可用于顺丰电子面单标签打印',
`freight_price` decimal(11, 2) NOT NULL DEFAULT '0.00' COMMENT '估算的运费',
`return_tracking_no` varchar(30) NOT NULL DEFAULT '' COMMENT '顺丰签回单服务运单号',
`source_transfer_code` varchar(60) NOT NULL DEFAULT '' COMMENT '原寄地中转场',
`source_city_code` varchar(60) NOT NULL DEFAULT '' COMMENT '原寄地城市代码',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment