增加地址池管理查看所有IP、策略管理用户类型检索.
This commit is contained in:
@@ -18,6 +18,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
|
||||
|
||||
import com.nis.domain.Page;
|
||||
import com.nis.domain.basics.IpReuseIpCfg;
|
||||
import com.nis.domain.configuration.BaseIpCfg;
|
||||
import com.nis.domain.configuration.IpAddrPoolCfg;
|
||||
import com.nis.exceptions.MaatConvertException;
|
||||
@@ -175,5 +176,12 @@ public class IpAddrPoolController extends BaseController{
|
||||
resultMap=ConfigServiceUtil.getCGIInfo(url, cmd, params);
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping(value = {"/getAllIpInfo"})
|
||||
public List<IpReuseIpCfg> getAllIpInfo(Integer addrPoolId,HttpServletRequest request,HttpServletResponse response){
|
||||
List<IpReuseIpCfg> ipList = ipReuseIpCfgService.getPolicyIpInfo(addrPoolId);
|
||||
return ipList;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,4 +14,5 @@ public interface IpReuseIpCfgDao extends CrudDao<IpReuseIpCfg> {
|
||||
List<IpReuseIpCfg> findPage(IpReuseIpCfg userIpCfg);
|
||||
IpReuseIpCfg getUserIpCfg(Long cfgId);
|
||||
IpReuseIpCfg getIpByIp(String destIpAddress);
|
||||
List<IpReuseIpCfg> getPolicyIpInfo(@Param("addrPoolId")Integer addrPoolId);
|
||||
}
|
||||
|
||||
@@ -182,6 +182,15 @@
|
||||
where r.is_valid !=-1 and r.cfg_id=#{cfgId}
|
||||
</select>
|
||||
|
||||
<select id="getPolicyIpInfo" resultMap="reuserIpCfgMap">
|
||||
SELECT
|
||||
<include refid="columns"></include>
|
||||
FROM
|
||||
ip_reuse_ip_cfg r
|
||||
WHERE
|
||||
r.is_valid !=-1 AND r.user_region1 = #{addrPoolId}
|
||||
</select>
|
||||
|
||||
<insert id="insert" parameterType="com.nis.domain.basics.IpReuseIpCfg" >
|
||||
insert into ip_reuse_ip_cfg (
|
||||
CFG_DESC,
|
||||
|
||||
@@ -81,6 +81,9 @@
|
||||
<if test="srcIpAddress != null and srcIpAddress != ''">
|
||||
AND r.src_ip_address=#{srcIpAddress,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userType != null and userType != ''">
|
||||
AND r.user_type=#{userType,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="userName != null and userName != ''">
|
||||
AND r.user_name LIKE concat(concat('%',#{userName,jdbcType=VARCHAR}),'%')
|
||||
</if>
|
||||
|
||||
@@ -102,4 +102,13 @@ public class IpReuseIpCfgService extends BaseService{
|
||||
ipReuseIpCfgDao.update(entity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 策略管理:获取所有IP信息
|
||||
* @param addrPoolId
|
||||
* @return
|
||||
*/
|
||||
public List<IpReuseIpCfg> getPolicyIpInfo(Integer addrPoolId) {
|
||||
return ipReuseIpCfgDao.getPolicyIpInfo(addrPoolId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user