KKSU
2023-12-14 2ea179b58ce7b3b624f4dad02cd0f4375ce3c939
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java
@@ -17,6 +17,7 @@
import cc.mrbird.febs.rabbit.producter.AgentProducer;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.crypto.SecureUtil;
@@ -30,6 +31,7 @@
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Slf4j
@@ -497,6 +499,15 @@
                mallMember.getId(),
                FlowTypeNewEnum.NFT.getValue(),
                MoneyFlowTypeNewEnum.PAY.getDescrition());
        DataDictionaryCustom insureMinuteDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                DataDictionaryEnum.INSURE_END_MINUTE.getType(),
                DataDictionaryEnum.INSURE_END_MINUTE.getCode()
        );
        Integer insureMinute = Integer.parseInt(ObjectUtil.isEmpty(insureMinuteDic) ? "60" : insureMinuteDic.getValue());
        Date endTime = DateUtil.offsetMinute(payTime, insureMinute);
        long remainTime = DateUtil.between(payTime, endTime, DateUnit.SECOND, false);
        agentProducer.sendFcmPayBuyTimeTTLMsg(mallProductSellRecord.getId(), remainTime * 1000L);
        return new FebsResponse().success();
    }
@@ -644,13 +655,12 @@
                    objects.add(apiOrderListVo);
                }
            }
            IPage<ApiOrderRecordListVo> pageSell = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
            IPage<ApiOrderRecordListVo> apiOrderListVoIPageSell = mallProductSellRecordMapper.selectListInPage(pageSell, apiOrderListDto);
            if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){
                for(ApiOrderRecordListVo apiOrderListVo : apiOrderListVoIPageSell.getRecords()){
                    objects.add(apiOrderListVo);
                }
        }
        IPage<ApiOrderRecordListVo> pageSell = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
        IPage<ApiOrderRecordListVo> apiOrderListVoIPageSell = mallProductSellRecordMapper.selectListInPage(pageSell, apiOrderListDto);
        if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){
            for(ApiOrderRecordListVo apiOrderListVo : apiOrderListVoIPageSell.getRecords()){
                objects.add(apiOrderListVo);
            }
        }