From 85768439b02e298a59173f02c326bbc4035272bc Mon Sep 17 00:00:00 2001 From: sxu <602087911@qq.com> Date: Thu, 5 Jun 2025 15:13:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E4=B8=8A=E6=9E=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SupermarketProductServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java index ce92ecd..4929c60 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/service/impl/SupermarketProductServiceImpl.java @@ -3,6 +3,7 @@ package com.bonus.canteen.core.supermarket.service.impl; import java.util.List; import com.bonus.common.core.exception.ServiceException; import com.bonus.common.core.utils.DateUtils; +import com.bonus.common.security.utils.SecurityUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bonus.canteen.core.supermarket.mapper.SupermarketProductMapper; @@ -51,6 +52,7 @@ public class SupermarketProductServiceImpl implements ISupermarketProductService @Override public int insertSupermarketProduct(SupermarketProduct supermarketProduct) { supermarketProduct.setCreateTime(DateUtils.getNowDate()); + supermarketProduct.setCreateBy(SecurityUtils.getUsername()); try { return supermarketProductMapper.insertSupermarketProduct(supermarketProduct); } catch (Exception e) { @@ -67,6 +69,7 @@ public class SupermarketProductServiceImpl implements ISupermarketProductService @Override public int updateSupermarketProduct(SupermarketProduct supermarketProduct) { supermarketProduct.setUpdateTime(DateUtils.getNowDate()); + supermarketProduct.setUpdateBy(SecurityUtils.getUsername()); try { return supermarketProductMapper.updateSupermarketProduct(supermarketProduct); } catch (Exception e) {