提交 0d460652 authored 作者: 艾庆国's avatar 艾庆国

预警人员

上级 0ba47400
...@@ -12,11 +12,14 @@ import com.clx.performance.struct.vehiclewarn.VehicleWarnUserStruct; ...@@ -12,11 +12,14 @@ import com.clx.performance.struct.vehiclewarn.VehicleWarnUserStruct;
import com.clx.performance.vo.pc.vehiclewarn.VehicleWarnUserVO; import com.clx.performance.vo.pc.vehiclewarn.VehicleWarnUserVO;
import com.msl.common.base.Optional; import com.msl.common.base.Optional;
import com.msl.common.exception.ServiceSystemException; import com.msl.common.exception.ServiceSystemException;
import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
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 org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Objects; import java.util.Objects;
@Slf4j @Slf4j
...@@ -32,6 +35,7 @@ public class VehicleWarnUserServiceImpl implements VehicleWarnUserService { ...@@ -32,6 +35,7 @@ public class VehicleWarnUserServiceImpl implements VehicleWarnUserService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@Override @Override
public void saveUser(VehicleWarnUserAddParam param) { public void saveUser(VehicleWarnUserAddParam param) {
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
Optional<VehicleWarnUser> optional = vehicleWarnUserDao.findByMobile(param.getMobile()); Optional<VehicleWarnUser> optional = vehicleWarnUserDao.findByMobile(param.getMobile());
if (optional.isPresent()){ if (optional.isPresent()){
...@@ -41,6 +45,8 @@ public class VehicleWarnUserServiceImpl implements VehicleWarnUserService { ...@@ -41,6 +45,8 @@ public class VehicleWarnUserServiceImpl implements VehicleWarnUserService {
VehicleWarnUser vehicleWarnUser = new VehicleWarnUser(); VehicleWarnUser vehicleWarnUser = new VehicleWarnUser();
vehicleWarnUser.setName(param.getName()); vehicleWarnUser.setName(param.getName());
vehicleWarnUser.setMobile(param.getMobile()); vehicleWarnUser.setMobile(param.getMobile());
vehicleWarnUser.setWarmTypeJson(JSON.toJSONString(new ArrayList<>()));
vehicleWarnUser.setCreateBy(loginUserInfo.getUserName());
vehicleWarnUserDao.saveEntity(vehicleWarnUser); vehicleWarnUserDao.saveEntity(vehicleWarnUser);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论