商品上架
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 java.util.List;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.DateUtils;
|
import com.bonus.common.core.utils.DateUtils;
|
||||||
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.bonus.canteen.core.supermarket.mapper.SupermarketProductMapper;
|
import com.bonus.canteen.core.supermarket.mapper.SupermarketProductMapper;
|
||||||
|
|
@ -51,6 +52,7 @@ public class SupermarketProductServiceImpl implements ISupermarketProductService
|
||||||
@Override
|
@Override
|
||||||
public int insertSupermarketProduct(SupermarketProduct supermarketProduct) {
|
public int insertSupermarketProduct(SupermarketProduct supermarketProduct) {
|
||||||
supermarketProduct.setCreateTime(DateUtils.getNowDate());
|
supermarketProduct.setCreateTime(DateUtils.getNowDate());
|
||||||
|
supermarketProduct.setCreateBy(SecurityUtils.getUsername());
|
||||||
try {
|
try {
|
||||||
return supermarketProductMapper.insertSupermarketProduct(supermarketProduct);
|
return supermarketProductMapper.insertSupermarketProduct(supermarketProduct);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -67,6 +69,7 @@ public class SupermarketProductServiceImpl implements ISupermarketProductService
|
||||||
@Override
|
@Override
|
||||||
public int updateSupermarketProduct(SupermarketProduct supermarketProduct) {
|
public int updateSupermarketProduct(SupermarketProduct supermarketProduct) {
|
||||||
supermarketProduct.setUpdateTime(DateUtils.getNowDate());
|
supermarketProduct.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
supermarketProduct.setUpdateBy(SecurityUtils.getUsername());
|
||||||
try {
|
try {
|
||||||
return supermarketProductMapper.updateSupermarketProduct(supermarketProduct);
|
return supermarketProductMapper.updateSupermarketProduct(supermarketProduct);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue