From 24c4699005da96f45562d7057d80c103b8e428a2 Mon Sep 17 00:00:00 2001
From: WangHan <wwh_work@126,com>
Date: 星期五, 03 一月 2025 10:32:34 +0800
Subject: [PATCH] 子级分类在用删除

---
 consum-base/src/main/java/com/consum/base/service/LGoodsUserRecordServiceImpl.java |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/consum-base/src/main/java/com/consum/base/service/LGoodsUserRecordServiceImpl.java b/consum-base/src/main/java/com/consum/base/service/LGoodsUserRecordServiceImpl.java
index 6535954..db01bda 100644
--- a/consum-base/src/main/java/com/consum/base/service/LGoodsUserRecordServiceImpl.java
+++ b/consum-base/src/main/java/com/consum/base/service/LGoodsUserRecordServiceImpl.java
@@ -1,16 +1,30 @@
 package com.consum.base.service;
 
 import com.walker.jdbc.service.BaseServiceImpl;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
 
 /**
  * @ClassName LGoodsUserRecordServiceImpl
-
  * @Date 2023/11/2
  * @Description
  * @Version 1.0
  **/
 @Service
+@Transactional(rollbackFor = Exception.class)
 public class LGoodsUserRecordServiceImpl extends BaseServiceImpl {
 
+
+    /**
+     * 璁剧疆涓洪潪鏈�鏂�
+     */
+    private static String updSetNotLast = "update L_GOODS_USER_RECORD set LAST_RECORD = 0 where LAST_RECORD=1 and WH_GOODS_ID in(   ";
+
+    public int updSetNotLast(List<Long> outGoodsIds) {
+        return this.update(updSetNotLast + StringUtils.join(outGoodsIds, ",") + ")", new String[]{});
+    }
+
 }

--
Gitblit v1.9.1