首页增加配置统计列表
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package com.nis.web.dao.configuration.statistics;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import com.nis.domain.configuration.HttpBodyCfg;
|
||||
import com.nis.web.dao.MyBatisDao;
|
||||
|
||||
|
||||
@MyBatisDao
|
||||
public interface ConfigureStatisticsDao {
|
||||
public List<Object[]> getConfigStateStatistics( ) ;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.nis.web.dao.configuration.statistics.ConfigureStatisticsDao" >
|
||||
|
||||
<select id="getConfigStateStatistics" resultType="map">
|
||||
select service_id service,
|
||||
sum(case when c.cfg_state =1 then 1 else 0 end) as approved,
|
||||
sum(case when c.cfg_state =2 then 1 else 0 end) as unapproved,
|
||||
sum(case when c.cfg_state =3 then 1 else 0 end) as cancle_approved,
|
||||
sum(case when c.cfg_state =0 then 1 else 0 end) as created,
|
||||
sum(case when c.cfg_state =-1 then 1 else 0 end) as deleted
|
||||
from cfg_num_statistics c
|
||||
group by service_id;
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user