白名单后端接口
This commit is contained in:
parent
df7faa8536
commit
8636ddf7d5
@ -6,6 +6,7 @@ import com.sf.common.utils.DateUtils;
|
|||||||
import com.sf.system.deployment.domain.DeploymentWhitelistInfo;
|
import com.sf.system.deployment.domain.DeploymentWhitelistInfo;
|
||||||
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
import com.sf.system.deployment.domain.DeploymentWhitelistList;
|
||||||
import com.sf.system.deployment.mapper.DeploymentWhitelistInfoMapper;
|
import com.sf.system.deployment.mapper.DeploymentWhitelistInfoMapper;
|
||||||
|
import com.sf.system.deployment.mapper.DeploymentWhitelistListMapper;
|
||||||
import com.sf.system.deployment.service.IDeploymentWhitelistInfoService;
|
import com.sf.system.deployment.service.IDeploymentWhitelistInfoService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -25,6 +26,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
public class DeploymentWhitelistInfoServiceImpl implements IDeploymentWhitelistInfoService {
|
public class DeploymentWhitelistInfoServiceImpl implements IDeploymentWhitelistInfoService {
|
||||||
@Autowired
|
@Autowired
|
||||||
private DeploymentWhitelistInfoMapper deploymentWhitelistInfoMapper;
|
private DeploymentWhitelistInfoMapper deploymentWhitelistInfoMapper;
|
||||||
|
@Autowired
|
||||||
|
private DeploymentWhitelistListMapper deploymentWhitelistListMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询白名单列表
|
* 查询白名单列表
|
||||||
@ -45,7 +48,14 @@ public class DeploymentWhitelistInfoServiceImpl implements IDeploymentWhitelistI
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<DeploymentWhitelistInfo> selectDeploymentWhitelistInfoList(DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
public List<DeploymentWhitelistInfo> selectDeploymentWhitelistInfoList(DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
||||||
return deploymentWhitelistInfoMapper.selectDeploymentWhitelistInfoList(deploymentWhitelistInfo);
|
List<DeploymentWhitelistInfo> infos = deploymentWhitelistInfoMapper.selectDeploymentWhitelistInfoList(deploymentWhitelistInfo);
|
||||||
|
infos.forEach(deploymentWhitelistInfo1 -> {
|
||||||
|
DeploymentWhitelistList deploymentWhitelistList = new DeploymentWhitelistList();
|
||||||
|
deploymentWhitelistList.setWhitelistId(deploymentWhitelistInfo1.getId());
|
||||||
|
List<DeploymentWhitelistList> list = deploymentWhitelistListMapper.selectDeploymentWhitelistListList(deploymentWhitelistList);
|
||||||
|
deploymentWhitelistInfo1.setDeploymentWhitelistListList(list);
|
||||||
|
});
|
||||||
|
return infos;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,9 +83,6 @@ public class DeploymentWhitelistInfoServiceImpl implements IDeploymentWhitelistI
|
|||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public int updateDeploymentWhitelistInfo(DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
public int updateDeploymentWhitelistInfo(DeploymentWhitelistInfo deploymentWhitelistInfo) {
|
||||||
deploymentWhitelistInfo.setUpdateTime(DateUtils.getNowDate());
|
|
||||||
deploymentWhitelistInfoMapper.deleteDeploymentWhitelistListByWhitelistId(deploymentWhitelistInfo.getId());
|
|
||||||
insertDeploymentWhitelistList(deploymentWhitelistInfo);
|
|
||||||
return deploymentWhitelistInfoMapper.updateDeploymentWhitelistInfo(deploymentWhitelistInfo);
|
return deploymentWhitelistInfoMapper.updateDeploymentWhitelistInfo(deploymentWhitelistInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<where>
|
<where>
|
||||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
<if test="user != null "> and user = #{user}</if>
|
<if test="user != null "> and user = #{user}</if>
|
||||||
|
<if test="whitelistId != null "> and whitelist_id = #{whitelistId}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user