zbj//1.数据规模
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package com.njcn.system.mapper;
|
||||
|
||||
|
||||
import com.njcn.device.pq.pojo.param.LargeScreenParam;
|
||||
import com.njcn.device.pq.pojo.vo.DataScaleVO;
|
||||
import com.njcn.device.pq.pojo.vo.UserScaleVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @version 1.0.0
|
||||
* @author: zbj
|
||||
* @date: 2023/04/10
|
||||
*/
|
||||
public interface LargeScreenMapper {
|
||||
|
||||
List<DataScaleVO> getDataScale (LargeScreenParam largeScreenParam);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
<?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.njcn.system.mapper.LargeScreenMapper">
|
||||
|
||||
<select id="getUserScale" resultType="com.njcn.device.pq.pojo.vo.UserScaleVO">
|
||||
SELECT DATE_FORMAT(REGISTER_TIME, '%Y-%m') AS `timeId`, COUNT(*) AS `monthIncrementNum`
|
||||
FROM app_user
|
||||
<where>
|
||||
STATE = '1'
|
||||
<if test="searchBeginTime != null and searchBeginTime != ''">
|
||||
and date_format(REGISTER_TIME,'%y%m%d') >= date_format(#{searchBeginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="searchEndTime != null and searchEndTime != ''">
|
||||
and date_format(REGISTER_TIME,'%y%m%d') <= date_format(#{searchEndTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY `timeId`;
|
||||
</select>
|
||||
|
||||
<select id="getDataScale" resultType="com.njcn.device.pq.pojo.vo.DataScaleVO">
|
||||
SELECT DATE(pd.TIMEID) as "timeId", round(sum(DATASTATIS),2) as "dataStatis"
|
||||
FROM pqs_datastatis pd
|
||||
<where>
|
||||
<if test="searchBeginTime != null and searchBeginTime != ''">
|
||||
and date_format(pd.TIMEID,'%y%m%d') >= date_format(#{searchBeginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="searchEndTime != null and searchEndTime != ''">
|
||||
and date_format(pd.TIMEID,'%y%m%d') <= date_format(#{searchEndTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
GROUP BY DATE(pd.TIMEID);
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user