This commit is contained in:
sxu 2025-04-14 17:12:00 +08:00
parent f89b757232
commit 690613e494
2 changed files with 8 additions and 0 deletions

View File

@ -3,6 +3,7 @@ package com.bonus.canteen.core.alloc.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.alloc.mapper.AllocCanteenEvaluateMapper;
@ -39,6 +40,7 @@ public class AllocCanteenEvaluateServiceImpl implements IAllocCanteenEvaluateSer
*/
@Override
public List<AllocCanteenEvaluate> selectAllocCanteenEvaluateList(AllocCanteenEvaluate allocCanteenEvaluate) {
allocCanteenEvaluate.setUserId(SecurityUtils.getUserId());
return allocCanteenEvaluateMapper.selectAllocCanteenEvaluateList(allocCanteenEvaluate);
}
@ -51,6 +53,7 @@ public class AllocCanteenEvaluateServiceImpl implements IAllocCanteenEvaluateSer
@Override
public int insertAllocCanteenEvaluate(AllocCanteenEvaluate allocCanteenEvaluate) {
allocCanteenEvaluate.setCreateTime(DateUtils.getNowDate());
allocCanteenEvaluate.setUserId(SecurityUtils.getUserId());
try {
return allocCanteenEvaluateMapper.insertAllocCanteenEvaluate(allocCanteenEvaluate);
} catch (Exception e) {
@ -67,6 +70,7 @@ public class AllocCanteenEvaluateServiceImpl implements IAllocCanteenEvaluateSer
@Override
public int updateAllocCanteenEvaluate(AllocCanteenEvaluate allocCanteenEvaluate) {
allocCanteenEvaluate.setUpdateTime(DateUtils.getNowDate());
allocCanteenEvaluate.setUserId(SecurityUtils.getUserId());
try {
return allocCanteenEvaluateMapper.updateAllocCanteenEvaluate(allocCanteenEvaluate);
} catch (Exception e) {

View File

@ -3,6 +3,7 @@ package com.bonus.canteen.core.user.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.user.mapper.UserAddrMapper;
@ -39,6 +40,7 @@ public class UserAddrServiceImpl implements IUserAddrService {
*/
@Override
public List<UserAddr> selectUserAddrList(UserAddr userAddr) {
userAddr.setUserId(SecurityUtils.getUserId());
return userAddrMapper.selectUserAddrList(userAddr);
}
@ -51,6 +53,7 @@ public class UserAddrServiceImpl implements IUserAddrService {
@Override
public int insertUserAddr(UserAddr userAddr) {
userAddr.setCreateTime(DateUtils.getNowDate());
userAddr.setUserId(SecurityUtils.getUserId());
try {
return userAddrMapper.insertUserAddr(userAddr);
} catch (Exception e) {
@ -67,6 +70,7 @@ public class UserAddrServiceImpl implements IUserAddrService {
@Override
public int updateUserAddr(UserAddr userAddr) {
userAddr.setUpdateTime(DateUtils.getNowDate());
userAddr.setUserId(SecurityUtils.getUserId());
try {
return userAddrMapper.updateUserAddr(userAddr);
} catch (Exception e) {