会员统计
This commit is contained in:
parent
1ea0732393
commit
68f06b8857
|
@ -21,13 +21,40 @@ public class HyController {
|
|||
@Autowired
|
||||
private IHyService service;
|
||||
|
||||
/**
|
||||
* 获取小区
|
||||
*/
|
||||
@RequestMapping(value = "/queryHousingestateList", method = RequestMethod.GET)
|
||||
public Result queryHousingestateList() {
|
||||
List<Hy> list = service.queryHousingestateList();
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员注册时间段统计
|
||||
*/
|
||||
@RequestMapping(value = "/queryPageList", method = RequestMethod.GET)
|
||||
public Result queryPageList(Hy hy) {
|
||||
@RequestMapping(value = "/queryHyRegisterList", method = RequestMethod.GET)
|
||||
public Result queryHyRegisterList(Hy hy) {
|
||||
List<Hy> list = service.queryHyRegisterList(hy);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员统计
|
||||
*/
|
||||
@RequestMapping(value = "/queryHyXzList", method = RequestMethod.GET)
|
||||
public Result queryHyXzList(Hy hy) {
|
||||
List<Hy> list = service.queryHyXzList(hy);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员投递次数排行榜
|
||||
*/
|
||||
@RequestMapping(value = "/queryHyTdcsList", method = RequestMethod.GET)
|
||||
public Result queryHyTdcsList(Hy hy) {
|
||||
List<Hy> list = service.queryHyTdcsList(hy);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,5 +10,8 @@ import java.util.List;
|
|||
*/
|
||||
public interface HyMapper extends BaseMapper<Hy>{
|
||||
|
||||
List<Hy> queryHousingestateList();
|
||||
List<Hy> queryHyRegisterList(Hy hy);
|
||||
List<Hy> queryHyXzList(Hy hy);
|
||||
List<Hy> queryHyTdcsList(Hy hy);
|
||||
}
|
||||
|
|
|
@ -2,21 +2,54 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.zh.view.hy.mapper.HyMapper">
|
||||
|
||||
<select id="queryHousingestateList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select
|
||||
housingestate_id as housingestateId,
|
||||
name as housingestateName
|
||||
from bl_housingestate_info
|
||||
where status = '开启'
|
||||
order by name
|
||||
</select>
|
||||
|
||||
<select id="queryHyRegisterList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select a.short_hour as shortHour,
|
||||
ifnull(b.cn,0) as cn
|
||||
from bl_hour_info a
|
||||
left join
|
||||
(
|
||||
select HOUR(b.register_date) as short_hour,count(*) as cn
|
||||
from bl_user_info b
|
||||
select HOUR(register_date) as short_hour,count(*) as cn
|
||||
from bl_user_info
|
||||
where register_date >= #{beginTime}
|
||||
and register_date <= #{endTime}
|
||||
<if test="housingestateId!=null and housingestateId!=''">
|
||||
b.housingestate_id = #{housingestateId}
|
||||
and housingestate_id = #{housingestateId}
|
||||
</if>
|
||||
group by HOUR(b.register_date)
|
||||
group by HOUR(register_date)
|
||||
) b on a.short_hour = b.short_hour
|
||||
</select>
|
||||
|
||||
<select id="queryHyXzList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select DATE_FORMAT(register_date,'%Y-%m-%d') as shortDay,count(*) as cn
|
||||
from bl_user_info
|
||||
where register_date >= #{beginTime}
|
||||
and register_date <= #{endTime}
|
||||
group by DATE_FORMAT(register_date,'%Y-%m-%d')
|
||||
order by DATE_FORMAT(register_date,'%Y-%m-%d')
|
||||
</select>
|
||||
|
||||
<select id="queryHyTdcsList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select
|
||||
phone,
|
||||
count(*) as cn
|
||||
from bl_order_info
|
||||
where add_time >= #{beginTime}
|
||||
and add_time <= #{endTime}
|
||||
<if test="housingestateId!=null and housingestateId!=''">
|
||||
and housingestate_id = #{housingestateId}
|
||||
</if>
|
||||
group by phone
|
||||
order by cn desc
|
||||
limit 10
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -10,6 +10,9 @@ import java.util.List;
|
|||
*/
|
||||
public interface IHyService extends IService<Hy> {
|
||||
|
||||
List<Hy> queryHousingestateList();
|
||||
List<Hy> queryHyRegisterList(Hy hy);
|
||||
List<Hy> queryHyXzList(Hy hy);
|
||||
List<Hy> queryHyTdcsList(Hy hy);
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,14 @@ import java.util.List;
|
|||
@Service
|
||||
public class HyServiceImpl extends ServiceImpl<HyMapper, Hy> implements IHyService {
|
||||
|
||||
/**
|
||||
* 获取小区
|
||||
*/
|
||||
@Override
|
||||
public List<Hy> queryHousingestateList() {
|
||||
return baseMapper.queryHousingestateList();
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员注册时间段统计
|
||||
*/
|
||||
|
@ -24,4 +32,20 @@ public class HyServiceImpl extends ServiceImpl<HyMapper, Hy> implements IHyServi
|
|||
return baseMapper.queryHyRegisterList(hy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员统计
|
||||
*/
|
||||
@Override
|
||||
public List<Hy> queryHyXzList(Hy hy) {
|
||||
return baseMapper.queryHyXzList(hy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员投递次数排行榜
|
||||
*/
|
||||
@Override
|
||||
public List<Hy> queryHyTdcsList(Hy hy) {
|
||||
return baseMapper.queryHyTdcsList(hy);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue