会员注册时间段统计
This commit is contained in:
parent
3001603bf7
commit
1ea0732393
|
@ -0,0 +1,33 @@
|
||||||
|
package org.jeecg.modules.zh.view.hy.controller;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
import org.jeecg.modules.zh.view.hy.service.IHyService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMethod;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 会员统计
|
||||||
|
* @author: jeecg-boot
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/zh/hy")
|
||||||
|
@Slf4j
|
||||||
|
public class HyController {
|
||||||
|
@Autowired
|
||||||
|
private IHyService service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员注册时间段统计
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/queryPageList", method = RequestMethod.GET)
|
||||||
|
public Result queryPageList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryHyRegisterList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package org.jeecg.modules.zh.view.hy.entity;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class Hy implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String phone;
|
||||||
|
private String shortHour;
|
||||||
|
private String shortDay;
|
||||||
|
private Integer cn;
|
||||||
|
private String type;
|
||||||
|
private String housingestateId;
|
||||||
|
private String housingestateName;
|
||||||
|
private String beginTime;
|
||||||
|
private String endTime;
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
package org.jeecg.modules.zh.view.hy.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 会员统计
|
||||||
|
* @author: jeecg-boot
|
||||||
|
*/
|
||||||
|
public interface HyMapper extends BaseMapper<Hy>{
|
||||||
|
|
||||||
|
List<Hy> queryHyRegisterList(Hy hy);
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?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="org.jeecg.modules.zh.view.hy.mapper.HyMapper">
|
||||||
|
|
||||||
|
<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
|
||||||
|
where register_date >= #{beginTime}
|
||||||
|
and register_date <= #{endTime}
|
||||||
|
<if test="housingestateId!=null and housingestateId!=''">
|
||||||
|
b.housingestate_id = #{housingestateId}
|
||||||
|
</if>
|
||||||
|
group by HOUR(b.register_date)
|
||||||
|
) b on a.short_hour = b.short_hour
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,15 @@
|
||||||
|
package org.jeecg.modules.zh.view.hy.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 会员统计
|
||||||
|
* @author: jeecg-boot
|
||||||
|
*/
|
||||||
|
public interface IHyService extends IService<Hy> {
|
||||||
|
|
||||||
|
List<Hy> queryHyRegisterList(Hy hy);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package org.jeecg.modules.zh.view.hy.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.jeecg.modules.system.entity.SysDataLog;
|
||||||
|
import org.jeecg.modules.zh.view.hy.entity.Hy;
|
||||||
|
import org.jeecg.modules.zh.view.hy.mapper.HyMapper;
|
||||||
|
import org.jeecg.modules.zh.view.hy.service.IHyService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 会员统计
|
||||||
|
* @author: jeecg-boot
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class HyServiceImpl extends ServiceImpl<HyMapper, Hy> implements IHyService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员注册时间段统计
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryHyRegisterList(Hy hy) {
|
||||||
|
return baseMapper.queryHyRegisterList(hy);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue