From ec73339e08669dc5a0d4ff93e6640f51473c08cd Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期六, 11 一月 2025 18:03:50 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java |   22 +++++++++++++++++-----
 1 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
index f158f0f..1a8fb82 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/SeckillActivityInfoController.java
@@ -72,9 +72,9 @@
      */
     @GetMapping("/detail/{id}")
     @ApiOperation(value = "秒杀活动详情", tags = {"小程序-商城-首页"})
-    public R<SeckillActivityDetailVO> detail(@PathVariable("id") Integer id)
+    public R<SeckillActivityDetailVO> detail(@PathVariable("id") Integer id, String latitude, String longitude)
     {
-        return R.ok(seckillActivityInfoService.detail(id));
+        return R.ok(seckillActivityInfoService.detail(id, latitude, longitude));
     }
     
     
@@ -97,6 +97,18 @@
 
 
     /**
+     * 获取商品秒杀活动
+     * @param id
+     * @return
+     */
+    @PostMapping("/getSeckillActivityInfoById")
+    public R<SeckillActivityInfo> getSeckillActivityInfoById(@RequestParam("id") Integer id){
+        SeckillActivityInfo one = seckillActivityInfoService.getById(id);
+        return R.ok(one);
+    }
+
+
+    /**
      * 秒杀活动列表
      */
     @GetMapping("/manageList")
@@ -111,11 +123,11 @@
             LocalDateTime now = LocalDateTime.now();
             LocalDateTime endTime = record.getEndTime();
             if (endTime.isBefore(now)){
-                record.setStatus(2); //已结束
+                record.setStatus(3); //已结束
             }else if (startTime.isBefore(now)){
-                record.setStatus(1); // 已开始
+                record.setStatus(2); // 已开始
             }else {
-                record.setStatus(0); // 未开始
+                record.setStatus(1); // 未开始
             }
         }
         return R.ok(IPage);

--
Gitblit v1.7.1