12 changed files with 150 additions and 2 deletions
@ -0,0 +1,22 @@ |
|||||
|
package com.epmet.constant; |
||||
|
|
||||
|
/** |
||||
|
* 描述一下 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/6/22 16:35 |
||||
|
*/ |
||||
|
public interface DataReportModuleConstant { |
||||
|
|
||||
|
/** |
||||
|
* reg:注册居民 parti:参与用户,如果值为null,默认为reg |
||||
|
*/ |
||||
|
String REG_FLAG="reg"; |
||||
|
|
||||
|
/** |
||||
|
* reg:注册居民 parti:参与用户,如果值为null,默认为reg |
||||
|
*/ |
||||
|
String PARTI_FLAG="parti"; |
||||
|
|
||||
|
String QUERY_USER_AGENCY_FAILED="查询用户所属机关信息失败"; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package com.epmet.dao.user; |
||||
|
|
||||
|
|
||||
|
import com.epmet.user.result.UserSummaryInfoResultDTO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
/** |
||||
|
* 描述一下 |
||||
|
* |
||||
|
* @author yinzuomei@elink-cn.com |
||||
|
* @date 2020/6/22 16:33 |
||||
|
*/ |
||||
|
@Mapper |
||||
|
public interface UserAnalysisDao { |
||||
|
/** |
||||
|
* @param myAgencyId |
||||
|
* @return com.epmet.user.result.UserSummaryInfoResultDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询注册用户汇总信息 |
||||
|
* @Date 2020/6/22 16:52 |
||||
|
**/ |
||||
|
UserSummaryInfoResultDTO selectRegUserSummaryInfo(String myAgencyId); |
||||
|
|
||||
|
/** |
||||
|
* @param myAgencyId |
||||
|
* @return com.epmet.user.result.UserSummaryInfoResultDTO |
||||
|
* @author yinzuomei |
||||
|
* @description 查询注册用户的汇总信息 |
||||
|
* @Date 2020/6/22 16:52 |
||||
|
**/ |
||||
|
UserSummaryInfoResultDTO selectParticipationUserSummaryInfo(String myAgencyId); |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
<?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.epmet.dao.user.UserAnalysisDao"> |
||||
|
<!-- 查询注册用户汇总信息 --> |
||||
|
<select id="selectRegUserSummaryInfo" parameterType="java.lang.String" resultType="com.epmet.user.result.UserSummaryInfoResultDTO"> |
||||
|
SELECT |
||||
|
m.id, |
||||
|
m.DATE_ID AS currentDate, |
||||
|
m.REG_TOTAL AS regTotal, |
||||
|
0 AS partiTotal, |
||||
|
m.PARTYMEMBER_TOTAL AS partymemberTotal, |
||||
|
m.PARTYMEMBER_PROPORTION AS partymemberProportion, |
||||
|
m.WARM_HEARTED_TOTAL AS warmHeartedTotal, |
||||
|
m.WARM_HEARTED_PROPORTION AS warmHeartedProportion |
||||
|
FROM |
||||
|
fact_reg_user_agency_daily m |
||||
|
WHERE |
||||
|
m.DEL_FLAG = '0' |
||||
|
AND m.AGENCY_ID =#{myAgencyId} |
||||
|
ORDER BY |
||||
|
m.DATE_ID DESC |
||||
|
LIMIT 1 |
||||
|
</select> |
||||
|
|
||||
|
<!-- 查询注册用户的汇总信息 --> |
||||
|
<select id="selectParticipationUserSummaryInfo" parameterType="java.lang.String" resultType="com.epmet.user.result.UserSummaryInfoResultDTO"> |
||||
|
SELECT |
||||
|
m.id, |
||||
|
m.DATE_ID AS currentDate, |
||||
|
m.REG_TOTAL AS regTotal, |
||||
|
0 AS partiTotal, |
||||
|
m.PARTYMEMBER_TOTAL AS partymemberTotal, |
||||
|
m.PARTYMEMBER_PROPORTION AS partymemberProportion, |
||||
|
m.WARM_HEARTED_TOTAL AS warmHeartedTotal, |
||||
|
m.WARM_HEARTED_PROPORTION AS warmHeartedProportion |
||||
|
FROM |
||||
|
fact_participation_user_agency_daily m |
||||
|
WHERE |
||||
|
m.DEL_FLAG = '0' |
||||
|
AND m.AGENCY_ID =#{myAgencyId} |
||||
|
ORDER BY |
||||
|
m.DATE_ID DESC |
||||
|
LIMIT 1 |
||||
|
</select> |
||||
|
</mapper> |
Loading…
Reference in new issue