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