From 177e5d562eb317843f6e7ddf89bfbf7aadc7e99b Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Wed, 28 Aug 2024 11:19:29 +0800
Subject: [PATCH] 新增功能操作按钮,和更新了数据库数据

---
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java
index 2130fbe..d4ffe38 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallProductServiceImpl.java
@@ -154,7 +154,7 @@
         mallProductBuy.setMateState(ProductEnum.PRODUCT_BUY_MATE_STATE_FAIL.getValue());
         mallProductBuy.setNftTotal(mallProductNft.getPriceNft());
         mallProductBuy.setNftAva(mallProductNft.getPriceNft());
-        mallProductBuy.setCycle(mallProductBuy.getCycle());
+        mallProductBuy.setCycle(mallProductNft.getCycle());
         mallProductBuy.setProfit(mallProductNft.getProfit());
 //        mallProductBuy.setNftAva(BigDecimal.ZERO);
         mallProductBuyMapper.insert(mallProductBuy);
@@ -188,6 +188,13 @@
          * 计算手续费、减少用户的fcm余额
          * 增加流水
          */
+
+        DataDictionaryCustom coinChangeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.COIN_CHANGE.getType(),
+                DataDictionaryEnum.COIN_CHANGE.getCode());
+        if(!"1".equals(coinChangeDic.getValue())){
+            throw new FebsException("暂未开放");
+        }
 
         Boolean aBoolean = operationPermissionMemberFrozen(memberId);
         if(aBoolean){
@@ -677,6 +684,9 @@
         List<ApiOrderRecordListVo> objects = new ArrayList<>();
         apiOrderListDto.setMemberId(memberId);
         DateTime nowTime = DateUtil.parseTime(DateUtil.formatTime(DateUtil.date()));
+        if(memberId == 2374L){
+            log.info("当前系统时间1"+nowTime);
+        }
         DataDictionaryCustom startTimeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                 DataDictionaryEnum.YU_YUE_START_TIME.getType(),
                 DataDictionaryEnum.YU_YUE_START_TIME.getCode()
@@ -688,6 +698,9 @@
         );
         DateTime endTime = DateUtil.parseTime(endTimeDic.getValue());
         if(nowTime.compareTo(startTime) >= 0 && nowTime.compareTo(endTime) <= 0){
+            if(memberId == 2374L){
+                log.info("当前系统时间2"+nowTime);
+            }
             IPage<ApiOrderRecordListVo> pageBuy = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
             IPage<ApiOrderRecordListVo> apiOrderListVoIPageBuy = mallProductBuyRecordMapper.selectListInPage(pageBuy, apiOrderListDto);
             if(CollUtil.isNotEmpty(apiOrderListVoIPageBuy.getRecords())){
@@ -707,6 +720,9 @@
         IPage<ApiOrderRecordListVo> pageSell = new Page<>(apiOrderListDto.getPageNum(), apiOrderListDto.getPageSize());
         IPage<ApiOrderRecordListVo> apiOrderListVoIPageSell = mallProductSellRecordMapper.selectListInPage(pageSell, apiOrderListDto);
         if(CollUtil.isNotEmpty(apiOrderListVoIPageSell.getRecords())){
+            if(memberId == 2374L){
+                log.info("当前系统时间3"+nowTime);
+            }
             for(ApiOrderRecordListVo apiOrderListVo : apiOrderListVoIPageSell.getRecords()){
                 objects.add(apiOrderListVo);
             }

--
Gitblit v1.9.1