30 lines
1.2 KiB
Java
30 lines
1.2 KiB
Java
package com.yupi.springbootinit.service.impl;
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.yupi.springbootinit.mapper.ServerEmployeeHostsMapper;
|
|
import com.yupi.springbootinit.model.dto.host.ServerEmployeeHostsDTO;
|
|
import com.yupi.springbootinit.model.entity.ServerEmployeeHosts;
|
|
import com.yupi.springbootinit.service.ServerEmployeeHostsService;
|
|
import org.springframework.beans.BeanUtils;
|
|
import org.springframework.stereotype.Service;
|
|
/*
|
|
* @author: ziin
|
|
* @date: 2025/7/3 19:12
|
|
*/
|
|
|
|
@Service
|
|
public class ServerEmployeeHostsServiceImpl extends ServiceImpl<ServerEmployeeHostsMapper, ServerEmployeeHosts> implements ServerEmployeeHostsService{
|
|
|
|
|
|
@Override
|
|
public void updateEmployeeHost(ServerEmployeeHostsDTO hostInfoDTO) {
|
|
BeanUtils.copyProperties(hostInfoDTO,ServerEmployeeHosts.class);
|
|
lambdaUpdate().eq(ServerEmployeeHosts::getHostsId, hostInfoDTO.getHostsId())
|
|
.eq(ServerEmployeeHosts::getUserId, hostInfoDTO.getUserId())
|
|
.eq(ServerEmployeeHosts::getTenantId, hostInfoDTO.getTenantId())
|
|
.set(ServerEmployeeHosts::getOperationStatus, hostInfoDTO.getOperationStatus())
|
|
.update();
|
|
|
|
}
|
|
}
|