parent
51f1231506
commit
326899bd64
@ -0,0 +1,31 @@
|
|||||||
|
<?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="xyz.wbsite.module.wsys.mpr.DataMapper">
|
||||||
|
|
||||||
|
<select id="total" resultType="xyz.wbsite.module.wsys.ent.DataTotal">
|
||||||
|
SELECT
|
||||||
|
( SELECT COUNT( 1 ) + 1 FROM SYS_USER WHERE IS_DELETED = 0 AND USER_STATUS = '0' ) USER_ALL,
|
||||||
|
( SELECT COUNT( 1 ) FROM SYS_TOKENS WHERE IS_DELETED = 0 AND VALID = '1' ) USER_LINE,
|
||||||
|
( SELECT COUNT( 1 ) FROM SYS_DEPT WHERE IS_DELETED = 0 ) DEPT_ALL,
|
||||||
|
( SELECT COUNT( 1 ) FROM SYS_LOGERR WHERE IS_DELETED = 0 AND LOG_STATE = '0' ) ERROR_UN,
|
||||||
|
( SELECT COUNT( 1 ) FROM SYS_LOGERR WHERE IS_DELETED = 0 ) ERROR_ALL
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="login" resultType="xyz.wbsite.module.wsys.ent.DataCount">
|
||||||
|
SELECT * FROM
|
||||||
|
<foreach collection="list" item="item" index="index" open="(" close=")" separator="UNION ALL">
|
||||||
|
SELECT #{item.date1} "DATE",COUNT(1) "COUNT" FROM SYS_TOKENS WHERE date(LOGIN_TIME/1000,'unixepoch') = #{item.date2}
|
||||||
|
</foreach>
|
||||||
|
ORDER BY DATE
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="error" resultType="xyz.wbsite.module.wsys.ent.DataCount">
|
||||||
|
SELECT * FROM
|
||||||
|
<foreach collection="list" item="item" index="index" open="(" close=")" separator="UNION ALL">
|
||||||
|
SELECT #{item.date1} "DATE",COUNT( 1 ) "COUNT" FROM SYS_LOGERR WHERE date(CREATE_TIME) = #{item.date2}
|
||||||
|
</foreach>
|
||||||
|
ORDER BY DATE
|
||||||
|
</select>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue