From 4eeeb59f6c514b61c78aec2acc95cff4807810e1 Mon Sep 17 00:00:00 2001 From: peng <peng.com> Date: 星期五, 05 九月 2025 10:52:49 +0800 Subject: [PATCH] 抽奖活动中奖跳转 --- framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java | 18 ++++++++++++++---- 1 files changed, 14 insertions(+), 4 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java index bcf11bf..4d9dd28 100644 --- a/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/order/order/serviceimpl/OrderServiceImpl.java @@ -71,6 +71,7 @@ import cn.lili.trigger.util.DelayQueueTools; import cn.lili.utils.COSUtil; import cn.lili.utils.CommonUtil; +import com.alibaba.fastjson.JSON; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; @@ -98,6 +99,7 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletResponse; import java.io.InputStream; +import java.math.BigDecimal; import java.net.URLEncoder; import java.util.*; import java.util.concurrent.TimeUnit; @@ -263,7 +265,7 @@ List<OrderSimpleVO> list = this.baseMapper.queryByParamsCount(queryWrapper); OrderCountVO orderCountVO = new OrderCountVO(); orderCountVO.setOrderNumCount(0); - orderCountVO.setOrderPriceCount(0.0); + orderCountVO.setOrderPriceCount(BigDecimal.ZERO); if (CollectionUtil.isEmpty(list)) { return orderCountVO; }else { @@ -273,9 +275,14 @@ continue; // 璺宠繃null鍏冪礌锛屾垨鏍规嵁涓氬姟澶勭悊 } orderCountVO.setOrderNumCount(orderCountVO.getOrderNumCount() + 1); - Double flowPrice = vo.getFlowPrice() != null ? vo.getFlowPrice() : 0.0; - orderCountVO.setOrderPriceCount(orderCountVO.getOrderPriceCount() + flowPrice);; + // 閲戦绱姞锛氱敤BigDecimal澶勭悊锛岄伩鍏嶇簿搴﹂棶棰� + BigDecimal flowPrice = vo.getFlowPrice() != null ? + BigDecimal.valueOf(vo.getFlowPrice()) : BigDecimal.ZERO; + + // 鐢˙igDecimal鐨刟dd鏂规硶绱姞 + BigDecimal totalPrice = orderCountVO.getOrderPriceCount().add(flowPrice); + orderCountVO.setOrderPriceCount(totalPrice); } } @@ -666,9 +673,12 @@ public Order delivery(String orderSn, String logisticsNo, String logisticsId) { Order order = OperationalJudgment.judgment(this.getBySn(orderSn)); //濡傛灉璁㈠崟鏈彂璐э紝骞朵笖璁㈠崟鐘舵�佸�肩瓑浜庡緟鍙戣揣 + log.info("鑾峰彇鍒扮殑璁㈠崟淇℃伅涓簕}", JSON.toJSONString(order)); if (order.getDeliverStatus().equals(DeliverStatusEnum.UNDELIVERED.name()) && order.getOrderStatus().equals(OrderStatusEnum.UNDELIVERED.name())) { //鑾峰彇瀵瑰簲鐗╂祦 Logistics logistics = logisticsService.getById(logisticsId); + log.info("鑾峰彇鍒扮殑鐗╂祦淇℃伅id涓簕}", logisticsId); + log.info("鑾峰彇鍒扮殑鐗╂祦淇℃伅涓簕}", JSON.toJSONString(logistics)); if (logistics == null) { throw new ServiceException(ResultCode.ORDER_LOGISTICS_ERROR); } @@ -1457,7 +1467,7 @@ // 鍒涘缓琛ㄥご Row header = sheet.createRow(0); String[] headers = {"涓昏鍗曠紪鍙�", "瀛愯鍗曠紪鍙�", "閫夎喘鍟嗗搧", "鍟嗗搧鏁伴噺", "鍟嗗搧ID", "鍟嗗搧鍗曚环", "璁㈠崟搴斾粯閲戦", - "杩愯垂", "浼樻儬鎬婚噾棰�", "骞冲彴浼樻儬", "鍟嗗浼樻儬", "鍟嗗鏀逛环", "鏀粯鏂瑰紡","鍗栧鍚嶇О", "鏀朵欢浜�", "鏀朵欢浜烘墜鏈哄彿", + "杩愯垂", "浼樻儬鎬婚噾棰�", "骞冲彴浼樻儬", "鍟嗗浼樻儬", "鍟嗗鏀逛环", "鏀粯鏂瑰紡","涔板鍚嶇О", "鏀朵欢浜�", "鏀朵欢浜烘墜鏈哄彿", "鐪�", "甯�", "鍖�", "琛楅亾", "璇︾粏鍦板潃", "涔板鐣欒█", "璁㈠崟鎻愪氦鏃堕棿", "鏀粯瀹屾垚鏃堕棿", "鏉ユ簮", "璁㈠崟鐘舵��", "璁㈠崟绫诲瀷", "鍞悗鐘舵��", "鍙栨秷鍘熷洜", "鍙戣揣鏃堕棿", "瀹屾垚鏃堕棿", "搴楅摵"}; -- Gitblit v1.8.0