商品上架

This commit is contained in:
sxu 2025-06-05 15:13:59 +08:00
parent 11b71392f6
commit 85768439b0
1 changed files with 3 additions and 0 deletions

View File

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