1.统计 界面和服务端的配置总量修改
This commit is contained in:
@@ -72,7 +72,15 @@ public class StatisticSysUserWarnNumber {
|
|||||||
entity.setId(Integer.parseInt(map1.get("id").toString()));
|
entity.setId(Integer.parseInt(map1.get("id").toString()));
|
||||||
entity.setTableName(map1.get("tableName").toString());
|
entity.setTableName(map1.get("tableName").toString());
|
||||||
//根据serviceID和表名查询界面各个业务的配置数量
|
//根据serviceID和表名查询界面各个业务的配置数量
|
||||||
Integer cfgCount = sysUserWarnService.getCfgCount(entity);
|
Integer cfgCount=0;
|
||||||
|
if(map1.get("id").toString().equals("400")){//ASN IP(特殊的业务,需单独查询)
|
||||||
|
cfgCount = sysUserWarnService.getASNIPTotal();
|
||||||
|
}else if(map1.get("id").toString().equals("1028")){// APP IP
|
||||||
|
|
||||||
|
cfgCount = sysUserWarnService.getAPPIPTotal();
|
||||||
|
}else{
|
||||||
|
cfgCount = sysUserWarnService.getCfgCount(entity);
|
||||||
|
}
|
||||||
//查询服务端的各个业务的配置数量
|
//查询服务端的各个业务的配置数量
|
||||||
List<String> list = effective.get(map1.get("id"));
|
List<String> list = effective.get(map1.get("id"));
|
||||||
SysUserWarn sysUserWarn=new SysUserWarn();
|
SysUserWarn sysUserWarn=new SysUserWarn();
|
||||||
@@ -93,7 +101,7 @@ public class StatisticSysUserWarnNumber {
|
|||||||
}
|
}
|
||||||
//判断表中是否有数据
|
//判断表中是否有数据
|
||||||
Integer total = sysUserWarnService.getAllInfoCount();
|
Integer total = sysUserWarnService.getAllInfoCount();
|
||||||
if(total !=null && total>0){//说明有数据 先删除 后添加
|
if(total != null && total > 0){//说明有数据 先删除 后添加
|
||||||
sysUserWarnService.deleteAllData();
|
sysUserWarnService.deleteAllData();
|
||||||
sysUserWarnService.insert(listTotal);
|
sysUserWarnService.insert(listTotal);
|
||||||
}else{// 没有 直接 添加
|
}else{// 没有 直接 添加
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class SysUserWarnController extends BaseController{
|
|||||||
return findServiceSum;
|
return findServiceSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
/* public static void main(String[] args) {
|
||||||
|
|
||||||
List<Map<String, Object>> serviceList = ServiceConfigTemplateUtil.getServiceList();
|
List<Map<String, Object>> serviceList = ServiceConfigTemplateUtil.getServiceList();
|
||||||
System.out.println(serviceList);
|
System.out.println(serviceList);
|
||||||
@@ -57,5 +57,5 @@ public class SysUserWarnController extends BaseController{
|
|||||||
System.out.println(map.get("id"));
|
System.out.println(map.get("id"));
|
||||||
System.out.println(map.get("tableName"));
|
System.out.println(map.get("tableName"));
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,4 +19,8 @@ public interface SysUserWarnDao extends CrudDao<SysUserWarn>{
|
|||||||
public int insert(List<SysUserWarn> list);
|
public int insert(List<SysUserWarn> list);
|
||||||
//删除所有的数据
|
//删除所有的数据
|
||||||
public int deleteAllData();
|
public int deleteAllData();
|
||||||
|
//查询ASN IP 页面配置总量
|
||||||
|
public Integer getASNIPTotal();
|
||||||
|
//查询APP IP 页面配置总量
|
||||||
|
public Integer getAPPIPTotal();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,12 +51,14 @@
|
|||||||
|
|
||||||
<select id="getCfgCount" parameterType="com.nis.domain.SysUserWarn" resultType="java.lang.Integer">
|
<select id="getCfgCount" parameterType="com.nis.domain.SysUserWarn" resultType="java.lang.Integer">
|
||||||
|
|
||||||
select count(cfg_id) cfgTotal from ${tableName}
|
SELECT COUNT(a.compile_id) cfgTotal from (
|
||||||
|
select compile_id from ${tableName}
|
||||||
|
|
||||||
<where>
|
<where>
|
||||||
service_id = #{id}
|
service_id = #{id}
|
||||||
and is_valid=1
|
and is_valid=1
|
||||||
</where>
|
</where>
|
||||||
|
GROUP BY compile_id)a
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -87,5 +89,22 @@
|
|||||||
|
|
||||||
delete from sys_user_warn
|
delete from sys_user_warn
|
||||||
</delete>
|
</delete>
|
||||||
|
<!-- 查询ASN IP 页面配置总量 -->
|
||||||
|
<select id="getASNIPTotal" resultType="java.lang.Integer">
|
||||||
|
select count(compile_id) cfgTotal from asn_group_info
|
||||||
|
|
||||||
|
where is_valid=1
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<!-- 查询APP IP 页面配置总量 -->
|
||||||
|
<select id="getAPPIPTotal" resultType="java.lang.Integer">
|
||||||
|
|
||||||
|
select count(compile_id) cfgTotal from config_group_info
|
||||||
|
|
||||||
|
where is_issued=1
|
||||||
|
and group_type=1
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -39,7 +39,7 @@ public class SysUserWarnService extends BaseService{
|
|||||||
page.setList(allList);
|
page.setList(allList);
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
//根据serviceID和表名查询业务配置的数量
|
//查询总的记录数
|
||||||
public Integer getAllInfoCount(){
|
public Integer getAllInfoCount(){
|
||||||
|
|
||||||
return sysUserWarnDao.getAllInfoCount();
|
return sysUserWarnDao.getAllInfoCount();
|
||||||
@@ -69,4 +69,15 @@ public class SysUserWarnService extends BaseService{
|
|||||||
return allSum;
|
return allSum;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//查询ASN IP 页面配置总量
|
||||||
|
public Integer getASNIPTotal(){
|
||||||
|
|
||||||
|
return sysUserWarnDao.getASNIPTotal();
|
||||||
|
}
|
||||||
|
//查询APP IP 页面配置总量
|
||||||
|
public Integer getAPPIPTotal(){
|
||||||
|
|
||||||
|
return sysUserWarnDao.getAPPIPTotal();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user