From 1c59b84d5320fba3c450d932f24a9fdc52830420 Mon Sep 17 00:00:00 2001
From: KKSU <15274802129@163.com>
Date: Fri, 24 Nov 2023 10:55:31 +0800
Subject: [PATCH] 匹配

---
 src/main/java/cc/mrbird/febs/mall/controller/ViewNewsController.java |  123 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 122 insertions(+), 1 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/controller/ViewNewsController.java b/src/main/java/cc/mrbird/febs/mall/controller/ViewNewsController.java
index 8e36c43..e5c2e32 100644
--- a/src/main/java/cc/mrbird/febs/mall/controller/ViewNewsController.java
+++ b/src/main/java/cc/mrbird/febs/mall/controller/ViewNewsController.java
@@ -1,9 +1,16 @@
 package cc.mrbird.febs.mall.controller;
 
 import cc.mrbird.febs.common.entity.FebsConstant;
+import cc.mrbird.febs.common.enumerates.DataDictionaryEnum;
 import cc.mrbird.febs.common.utils.FebsUtil;
-import cc.mrbird.febs.mall.entity.MallNewsInfo;
+import cc.mrbird.febs.mall.dto.AdminGfaBasicSetDto;
+import cc.mrbird.febs.mall.dto.HlmScoreSetDto;
+import cc.mrbird.febs.mall.entity.*;
+import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper;
+import cc.mrbird.febs.mall.mapper.MallProductBuyMapper;
+import cc.mrbird.febs.mall.mapper.MallProductNftMapper;
 import cc.mrbird.febs.mall.service.IMallNewsInfoService;
+import cn.hutool.core.util.ObjectUtil;
 import lombok.RequiredArgsConstructor;
 import org.apache.shiro.authz.annotation.RequiresPermissions;
 import org.springframework.stereotype.Controller;
@@ -22,6 +29,94 @@
 public class ViewNewsController {
 
     private final IMallNewsInfoService mallNewsInfoService;
+    private final MallProductNftMapper mallProductNftMapper;
+    private final MallProductBuyMapper mallProductBuyMapper;
+    private final DataDictionaryCustomMapper dataDictionaryCustomMapper;
+
+    /**
+     * NFT预约产品
+     */
+    @GetMapping("productNFTList")
+    @RequiresPermissions("productNFTList:view")
+    public String productNFTList() {
+        return FebsUtil.view("modules/news/productNFTList");
+    }
+
+    /**
+     * NFT预约产品-新增
+     */
+    @GetMapping("productNFTAdd")
+    @RequiresPermissions("productNFTAdd:add")
+    public String productNFTAdd() {
+        return FebsUtil.view("modules/news/productNFTAdd");
+    }
+
+    /**
+     * NFT预约产品-详情
+     * @return
+     */
+    @GetMapping("productNFTUpdate/{id}")
+    @RequiresPermissions("productNFTUpdate:update")
+    public String productNFTUpdate(@PathVariable long id, Model model) {
+        MallProductNft mallProductNft = mallProductNftMapper.selectById(id);
+        model.addAttribute("mallProductNft", mallProductNft);
+        return FebsUtil.view("modules/news/productNFTUpdate");
+    }
+
+    /**
+     * 用户NFT预约列表
+     */
+    @GetMapping("productBuyList")
+    @RequiresPermissions("productBuyList:view")
+    public String productBuyList() {
+        return FebsUtil.view("modules/news/productBuyList");
+    }
+
+    /**
+     * 用户NFT提现列表
+     */
+    @GetMapping("productSellList")
+    @RequiresPermissions("productSellList:view")
+    public String productSellList() {
+        return FebsUtil.view("modules/news/productSellList");
+    }
+
+    /**
+     * 用户NFT提现-手动分配
+     * @return
+     */
+    @GetMapping("productSellPick/{id}")
+    @RequiresPermissions("productSellPick:update")
+    public String productSellPick(@PathVariable long id, Model model) {
+        MallProductBuy mallProductBuy = mallProductBuyMapper.selectById(id);
+        model.addAttribute("mallProductBuy", mallProductBuy);
+        return FebsUtil.view("modules/news/productSellPick");
+    }
+
+    /**
+     * 基础设置
+     * @param model
+     * @return
+     */
+    @GetMapping("gfaBasicSet")
+    @RequiresPermissions("gfaBasicSet:view")
+    public String gfaBasicSet(Model model) {
+        AdminGfaBasicSetDto gfaBasicSetDto = new AdminGfaBasicSetDto();
+        DataDictionaryCustom startTimeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.YU_YUE_START_TIME.getType(),
+                DataDictionaryEnum.YU_YUE_START_TIME.getCode());
+        if (startTimeDic != null) {
+            gfaBasicSetDto.setStartTime(startTimeDic.getValue());
+        }
+        DataDictionaryCustom endCntDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
+                DataDictionaryEnum.YU_YUE_END_TIME.getType(),
+                DataDictionaryEnum.YU_YUE_END_TIME.getCode());
+        if (startTimeDic != null) {
+            gfaBasicSetDto.setEndTime(endCntDic.getValue());
+        }
+        model.addAttribute("gfaBasicSet", gfaBasicSetDto);
+        return FebsUtil.view("modules/news/gfaBasicSet");
+    }
 
     /**
      * 新闻中心-列表
@@ -56,4 +151,30 @@
         model.addAttribute("newsInfo", data);
         return FebsUtil.view("modules/news/newsInfoUpdate");
     }
+
+    @GetMapping("newsCategory")
+    @RequiresPermissions("news:category:view")
+    public String newsCategory() {
+        return FebsUtil.view("modules/news/newsCategory");
+    }
+
+    @GetMapping("addCategory")
+    @RequiresPermissions("news:category:add")
+    public String addCategory(Long id, Model model) {
+        if (id != null) {
+            MallNewsCategory obj = mallNewsInfoService.findNewsCategoryById(id);
+            model.addAttribute("obj", obj);
+        }
+        return FebsUtil.view("modules/news/newsCategoryAdd");
+    }
+
+    @GetMapping("updateCategory/{id}")
+    @RequiresPermissions("news:category:update")
+    public String updateCategory(@PathVariable Long id, Model model) {
+        if (id != null) {
+            MallNewsCategory obj = mallNewsInfoService.findNewsCategoryById(id);
+            model.addAttribute("obj", obj);
+        }
+        return FebsUtil.view("modules/news/newsCategoryAdd");
+    }
 }

--
Gitblit v1.9.1