xucaiqin 23 stundas atpakaļ
vecāks
revīzija
2330f7e654

+ 2 - 2
sckw-modules/sckw-message/src/main/resources/mapper/KwmMessageMapper.xml

@@ -3,7 +3,7 @@
 <mapper namespace="com.sckw.message.dao.KwmMessageMapper">
 
   <select id="findPage" resultType="com.sckw.message.model.dto.MessageListDTO" >
-      select mu.id,
+      select m.id,
              mu.ent_id      entId,
              mu.user_id     userId,
              mu.status,
@@ -12,7 +12,7 @@
              mu.create_time createTime,
              mu.update_by   updateBy,
              mu.update_time updateTime,
-             m.id     as    msgId,
+             mu.msg_id     as    msgId,
              m.category,
              m.type,
              m.title,

+ 7 - 6
sckw-modules/sckw-order/src/main/java/com/sckw/order/dubbo/TradeOrderInfoServiceImpl.java

@@ -3,6 +3,7 @@ package com.sckw.order.dubbo;
 import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import com.alibaba.fastjson2.JSON;
+import com.alibaba.fastjson2.JSONObject;
 import com.google.common.collect.Lists;
 import com.sckw.core.exception.BusinessException;
 import com.sckw.core.model.constant.NumberConstant;
@@ -26,7 +27,6 @@ import com.sckw.order.model.vo.res.AddressInfoDtoDetailRes;
 import com.sckw.order.repository.*;
 import com.sckw.order.serivce.*;
 import com.sckw.product.api.dubbo.GoodsInfoService;
-import com.sckw.product.api.model.GoodsDetail;
 import com.sckw.product.api.model.GoodsDetails;
 import com.sckw.redis.constant.RedisConstant;
 import com.sckw.redis.utils.RedissonUtils;
@@ -691,6 +691,7 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
 
     private List<BigDecimal> getData(List<String> times, List<TradeSaleVo> data) {
         Map<String, BigDecimal> map = data.stream().collect(Collectors.toMap(TradeSaleVo::getTimePeriod, vo -> vo.getAmount() == null ? BigDecimal.ZERO : vo.getAmount(), (a, b) -> a));
+        log.info("map times {} {}", JSONObject.toJSONString(times), JSONObject.toJSONString(map));
         return times.stream().map(d -> {
             BigDecimal bigDecimal = map.get(d);
             if (Objects.isNull(bigDecimal)) {
@@ -710,17 +711,17 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
         if (CollUtil.isEmpty(tradeSaleVos)) {
             tradeSaleVos = new ArrayList<>();
         }
-        Map<Long, GoodsDetail> goodsMap = new HashMap<>();
+        Map<Long, GoodsDetails> goodsMap = new HashMap<>();
         List<Long> collect = tradeSaleVos.stream().map(TradeSaleVo::getGoodsId).distinct().toList();
         for (Long aLong : collect) {
-            GoodsDetail detailById = goodsInfoService.getDetailById(aLong);
+            GoodsDetails detailById = goodsInfoService.getDetail(aLong);
             if (Objects.nonNull(detailById)) {
                 goodsMap.put(aLong, detailById);
             }
         }
 
         Map<Long, List<TradeSaleVo>> collect1 = tradeSaleVos.stream().collect(Collectors.groupingBy(TradeSaleVo::getGoodsId));
-
+        log.info("data {}", JSONObject.toJSONString(collect1));
         List<TimeSaleDataDto> data = new ArrayList<>();
         List<String> strings1 = DateUtil.generateHourRanges(countPara.getStartTime(), countPara.getEndTime());
         TimeSaleDto timeSaleDto = new TimeSaleDto();
@@ -732,12 +733,12 @@ public class TradeOrderInfoServiceImpl implements TradeOrderInfoService {
             Long key = map.getKey();
             List<TradeSaleVo> value = map.getValue();
 
-            GoodsDetail goodsDetail = goodsMap.get(key);
+            GoodsDetails goodsDetail = goodsMap.get(key);
             if (Objects.isNull(goodsDetail)) {
                 timeSaleDataDto.setName("-");
                 timeSaleDataDto.setData(sizeOf(strings1.size()));
             } else {
-                timeSaleDataDto.setName(goodsDetail.getName() + goodsDetail.getSpec());
+                timeSaleDataDto.setName(goodsDetail.getName() + goodsDetail.getSpecLabel());
                 if (CollUtil.isEmpty(value)) {
                     timeSaleDataDto.setData(sizeOf(strings1.size()));
                 } else {

+ 1 - 1
sckw-modules/sckw-order/src/main/resources/mapper/KwoTradeOrderMapper.xml

@@ -832,7 +832,7 @@
                        LPAD(MOD(HOUR(kto.create_time) + 1, 24), 2, '0'),
                        ':00'
                    ) AS time_period,
-               sum(kto.amount)
+               sum(kto.amount) as amount
         from kwo_trade_order kto
                  inner JOIN kwo_trade_order_unit d ON kto.id = d.t_order_id AND d.unit_type = '2' AND d.del_flag = 0
                  inner JOIN kwo_trade_order_unit c ON kto.id = c.t_order_id AND c.unit_type = '1' AND c.del_flag = 0

+ 1 - 1
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -1662,6 +1662,6 @@ public class KwpGoodsService {
                 .setStatusLabel(CollectionUtils.isNotEmpty(goodsStatusMap) ? goodsStatusMap.get(String.valueOf(detail.getStatus())) : null)
                 .setSpecLabel(CollectionUtils.isNotEmpty(goodsSpecMap) ? goodsSpecMap.get(String.valueOf(detail.getSpec())) : null);
 
-        return null;
+        return detail;
     }
 }