From 82203a196fa700adfc379b2b453b2266266c940c Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 15 一月 2026 18:14:25 +0800
Subject: [PATCH] 经销商管理
---
server/dmmall_service/src/main/java/com/doumee/dao/business/ShopMapper.java | 38 ++++++++++++++++++++++++++++++++++++++
1 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/server/dmmall_service/src/main/java/com/doumee/dao/business/ShopMapper.java b/server/dmmall_service/src/main/java/com/doumee/dao/business/ShopMapper.java
index 5c90105..f899062 100644
--- a/server/dmmall_service/src/main/java/com/doumee/dao/business/ShopMapper.java
+++ b/server/dmmall_service/src/main/java/com/doumee/dao/business/ShopMapper.java
@@ -2,6 +2,10 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.doumee.dao.business.model.Shop;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+
+import java.math.BigDecimal;
/**
* @author 姹熻箘韫�
@@ -9,4 +13,38 @@
*/
public interface ShopMapper extends BaseMapper<Shop> {
+
+ /**
+ * 娣诲姞绉垎
+ * @param shopId
+ * @param integral
+ */
+ @Select(" update shop set INTEGRAL = ifNull( INTEGRAL,0) + #{integral} , TOTAL_INTEGRAL = ifNull(TOTAL_INTEGRAL,0) + #{titleIntegral} , EDIT_DATE = now() where id = #{shopId} ")
+ void addIntegral(@Param("shopId") Integer shopId , @Param("integral") BigDecimal integral , @Param("titleIntegral")BigDecimal titleIntegral);
+
+ /**
+ * 鍑忓皯绉垎
+ * @param shopId
+ * @param integral
+ */
+ @Select(" update shop set INTEGRAL = ifNull( INTEGRAL,0) - #{integral} , EDIT_DATE = now() where id = #{shopId} ")
+ void subtractIntegral(@Param("shopId") Integer shopId , @Param("integral")BigDecimal integral);
+
+
+ /**
+ * 娣诲姞浣欓
+ * @param shopId
+ * @param amount
+ */
+ @Select(" update shop set AMOUNT = ifNull(AMOUNT,0) + #{amount} , TOTAL_AMOUNT = ifNull(TOTAL_AMOUNT,0) + #{titleAmount} , EDIT_DATE = now() where id = #{shopId} ")
+ void addAmount(@Param("shopId") Integer shopId , @Param("amount") BigDecimal amount , @Param("titleAmount")BigDecimal titleAmount);
+
+ /**
+ * 鍑忓皯浣欓
+ * @param shopId
+ * @param amount
+ */
+ @Select(" update shop set AMOUNT = ifNull( AMOUNT,0) - #{amount} , EDIT_DATE = now() where id = #{shopId} ")
+ void subtractAmount(@Param("shopId") Integer shopId , @Param("amount")BigDecimal amount);
+
}
--
Gitblit v1.9.3