This commit is contained in:
parent
f89b757232
commit
690613e494
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.alloc.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.alloc.mapper.AllocCanteenEvaluateMapper;
|
import com.bonus.canteen.core.alloc.mapper.AllocCanteenEvaluateMapper;
|
||||||
|
|
@ -39,6 +40,7 @@ public class AllocCanteenEvaluateServiceImpl implements IAllocCanteenEvaluateSer
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<AllocCanteenEvaluate> selectAllocCanteenEvaluateList(AllocCanteenEvaluate allocCanteenEvaluate) {
|
public List<AllocCanteenEvaluate> selectAllocCanteenEvaluateList(AllocCanteenEvaluate allocCanteenEvaluate) {
|
||||||
|
allocCanteenEvaluate.setUserId(SecurityUtils.getUserId());
|
||||||
return allocCanteenEvaluateMapper.selectAllocCanteenEvaluateList(allocCanteenEvaluate);
|
return allocCanteenEvaluateMapper.selectAllocCanteenEvaluateList(allocCanteenEvaluate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -51,6 +53,7 @@ public class AllocCanteenEvaluateServiceImpl implements IAllocCanteenEvaluateSer
|
||||||
@Override
|
@Override
|
||||||
public int insertAllocCanteenEvaluate(AllocCanteenEvaluate allocCanteenEvaluate) {
|
public int insertAllocCanteenEvaluate(AllocCanteenEvaluate allocCanteenEvaluate) {
|
||||||
allocCanteenEvaluate.setCreateTime(DateUtils.getNowDate());
|
allocCanteenEvaluate.setCreateTime(DateUtils.getNowDate());
|
||||||
|
allocCanteenEvaluate.setUserId(SecurityUtils.getUserId());
|
||||||
try {
|
try {
|
||||||
return allocCanteenEvaluateMapper.insertAllocCanteenEvaluate(allocCanteenEvaluate);
|
return allocCanteenEvaluateMapper.insertAllocCanteenEvaluate(allocCanteenEvaluate);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -67,6 +70,7 @@ public class AllocCanteenEvaluateServiceImpl implements IAllocCanteenEvaluateSer
|
||||||
@Override
|
@Override
|
||||||
public int updateAllocCanteenEvaluate(AllocCanteenEvaluate allocCanteenEvaluate) {
|
public int updateAllocCanteenEvaluate(AllocCanteenEvaluate allocCanteenEvaluate) {
|
||||||
allocCanteenEvaluate.setUpdateTime(DateUtils.getNowDate());
|
allocCanteenEvaluate.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
allocCanteenEvaluate.setUserId(SecurityUtils.getUserId());
|
||||||
try {
|
try {
|
||||||
return allocCanteenEvaluateMapper.updateAllocCanteenEvaluate(allocCanteenEvaluate);
|
return allocCanteenEvaluateMapper.updateAllocCanteenEvaluate(allocCanteenEvaluate);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.canteen.core.user.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.user.mapper.UserAddrMapper;
|
import com.bonus.canteen.core.user.mapper.UserAddrMapper;
|
||||||
|
|
@ -39,6 +40,7 @@ public class UserAddrServiceImpl implements IUserAddrService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<UserAddr> selectUserAddrList(UserAddr userAddr) {
|
public List<UserAddr> selectUserAddrList(UserAddr userAddr) {
|
||||||
|
userAddr.setUserId(SecurityUtils.getUserId());
|
||||||
return userAddrMapper.selectUserAddrList(userAddr);
|
return userAddrMapper.selectUserAddrList(userAddr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -51,6 +53,7 @@ public class UserAddrServiceImpl implements IUserAddrService {
|
||||||
@Override
|
@Override
|
||||||
public int insertUserAddr(UserAddr userAddr) {
|
public int insertUserAddr(UserAddr userAddr) {
|
||||||
userAddr.setCreateTime(DateUtils.getNowDate());
|
userAddr.setCreateTime(DateUtils.getNowDate());
|
||||||
|
userAddr.setUserId(SecurityUtils.getUserId());
|
||||||
try {
|
try {
|
||||||
return userAddrMapper.insertUserAddr(userAddr);
|
return userAddrMapper.insertUserAddr(userAddr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
@ -67,6 +70,7 @@ public class UserAddrServiceImpl implements IUserAddrService {
|
||||||
@Override
|
@Override
|
||||||
public int updateUserAddr(UserAddr userAddr) {
|
public int updateUserAddr(UserAddr userAddr) {
|
||||||
userAddr.setUpdateTime(DateUtils.getNowDate());
|
userAddr.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
userAddr.setUserId(SecurityUtils.getUserId());
|
||||||
try {
|
try {
|
||||||
return userAddrMapper.updateUserAddr(userAddr);
|
return userAddrMapper.updateUserAddr(userAddr);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue