商品上架
This commit is contained in:
parent
11b71392f6
commit
85768439b0
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue