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) {