From 3cd3a6c93fc393772be1fcb1fb291dedae39e581 Mon Sep 17 00:00:00 2001
From: phpcjl <phpcjl@gmail.com>
Date: 星期二, 17 十二月 2024 17:03:45 +0800
Subject: [PATCH] 1

---
 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java                  |    6 ++++++
 ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml        |   19 +++++++++++++++++++
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java |   26 +++++++++++++++++++++++++-
 3 files changed, 50 insertions(+), 1 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java
index e05c57d..45e60a1 100644
--- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java
+++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/Goods.java
@@ -139,6 +139,12 @@
     @ApiModelProperty(value = "地区价格")
     private List<GoodsArea> goodsAreaList;
 
+    @TableField(exist = false)
+    private String categoryName;
+
+    @TableField(exist = false)
+    private Integer showStatus;
+
     public String getIdStr() {
         return String.valueOf(id);
     }
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
index e6d1b79..4bdf64d 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopWithdrawController.java
@@ -6,17 +6,21 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.utils.StringUtils;
+import com.ruoyi.common.security.service.TokenService;
 import com.ruoyi.other.api.domain.ShopWithdraw;
 import com.ruoyi.other.service.ShopService;
 import com.ruoyi.other.service.ShopWithdrawService;
+import com.ruoyi.system.api.model.LoginUser;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
 import javax.annotation.Resource;
+import java.time.LocalDateTime;
 
 /**
  * <p>
@@ -35,11 +39,13 @@
     private ShopWithdrawService shopWithdrawService;
     @Resource
     private ShopService shopService;
+    @Resource
+    private TokenService tokenService;
 
     /**
      * 提现申请列表
      */
-    @RequestMapping("/list")
+    @GetMapping("/list")
     @ApiOperation("提现申请列表")
     public R<IPage<ShopWithdraw>> list(@ApiParam("页码") @RequestParam Integer pageNum,
                          @ApiParam("每一页数据大小") Integer pageSize,
@@ -51,6 +57,24 @@
         return R.ok(page);
     }
 
+    /**
+     * 审核
+     */
+    @RequestMapping("/audit")
+    @ApiOperation("审核")
+    public R<Void> audit(ShopWithdraw shopWithdraw) {
+        LoginUser loginUser = tokenService.getLoginUser();
+        ShopWithdraw shopWithdraw1 = shopWithdrawService.getById(shopWithdraw.getId());
+        shopWithdraw1.setAuditStatus(shopWithdraw.getAuditStatus());
+        shopWithdraw1.setAuditUserId(loginUser.getUserid());
+        shopWithdraw1.setAuditTime(LocalDateTime.now());
+        shopWithdraw1.setAuditMsg(shopWithdraw.getAuditMsg());
+        shopWithdrawService.updateById(shopWithdraw1);
+        return R.ok();
+    }
+
+
+
 
 }
 
diff --git a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
index e30473d..38d3ed8 100644
--- a/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
+++ b/ruoyi-service/ruoyi-other/src/main/resources/mapper/other/SeckillActivityInfoMapper.xml
@@ -75,6 +75,25 @@
         <if test="goods.goodsCategoryId != null">
             AND tg.goods_category_id = #{goods.goodsCategoryId}
         </if>
+        <if test="goods.categoryName != null and goods.categoryName != ''">
+            AND tgc.name = #{goods.categoryName}
+        </if>
+        <if test="goods.showStatus != null">
+            AND tsai.is_shelves = #{goods.showStatus}
+        </if>
+
+        <if test="goods.status != null and goods.status =1">
+            AND tsai.start_time <![CDATA[>]]> NOW()
+        </if>
+
+        <if test="goods.status != null and goods.status =2">
+            AND tsai.start_time <![CDATA[<=]]> NOW() AND tsai.end_time <![CDATA[>]]> NOW()
+        </if>
+
+        <if test="goods.status != null and goods.status =3">
+            AND tsai.end_time <![CDATA[<]]> NOW()
+        </if>
+
         <if test="goods.vipId != null">
             AND find_in_set(#{goods.vipId},tgs.vip) > 0
         </if>

--
Gitblit v1.7.1