会员统计
This commit is contained in:
parent
1914643278
commit
fc7dcdd0da
|
@ -67,8 +67,11 @@ public class HyController {
|
|||
* 会员投递重量排行榜
|
||||
*/
|
||||
@RequestMapping(value = "/queryHyTdzlList", method = RequestMethod.GET)
|
||||
public Result queryHyTdzlList(Hy hy) {
|
||||
List<Hy> list = service.queryHyTdzlList(hy);
|
||||
public Result queryHyTdzlList(Hy hy,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
Page<Hy> page = new Page<Hy>(pageNo, pageSize);
|
||||
IPage<Hy> list = service.queryHyTdzlList(page,hy);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
|
@ -76,8 +79,11 @@ public class HyController {
|
|||
* 会员违规信息统计
|
||||
*/
|
||||
@RequestMapping(value = "/queryHyWgList", method = RequestMethod.GET)
|
||||
public Result queryHyWgList(Hy hy) {
|
||||
List<Hy> list = service.queryHyWgList(hy);
|
||||
public Result queryHyWgList(Hy hy,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
||||
Page<Hy> page = new Page<Hy>(pageNo, pageSize);
|
||||
IPage<Hy> list = service.queryHyWgList(page,hy);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
|
@ -93,4 +99,10 @@ public class HyController {
|
|||
return Result.ok(list);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/queryHywgList", method = RequestMethod.GET)
|
||||
public Result queryHywgList(Hy hy) {
|
||||
List<Hy> list = service.queryHywgList(hy);
|
||||
return Result.ok(list);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -17,11 +17,12 @@ public interface HyMapper extends BaseMapper<Hy>{
|
|||
List<Hy> queryHyRegisterList(Hy hy);
|
||||
List<Hy> queryHyXzList(Hy hy);
|
||||
IPage<Hy> queryHyTdcsList(Page<Hy> page, @Param("hy")Hy hy);
|
||||
List<Hy> queryHyTdzlList(Hy hy);
|
||||
List<Hy> queryHyWgList(Hy hy);
|
||||
IPage<Hy> queryHyTdzlList(Page<Hy> page, @Param("hy")Hy hy);
|
||||
IPage<Hy> queryHyWgList(Page<Hy> page, @Param("hy")Hy hy);
|
||||
|
||||
List<Hy> queryAllHyTdcsList(Hy hy);
|
||||
List<Hy> queryHyjlList(Hy hy);
|
||||
List<Hy> queryHywgList(Hy hy);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -65,37 +65,48 @@
|
|||
|
||||
<select id="queryHyTdzlList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select
|
||||
phone,
|
||||
round(sum(weight),2) as weight
|
||||
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 weight desc
|
||||
limit 10
|
||||
@row_num := @row_num + 1 AS rowNumber,
|
||||
t.*
|
||||
from (SELECT @row_num := 0) r,
|
||||
(
|
||||
select
|
||||
phone,
|
||||
round(sum(weight),2) as weight
|
||||
from bl_order_info
|
||||
where add_time >= #{hy.beginTime}
|
||||
and add_time <= #{hy.endTime}
|
||||
<if test="hy.housingestateId!=null and hy.housingestateId!=''">
|
||||
and housingestate_id = #{hy.housingestateId}
|
||||
</if>
|
||||
group by phone
|
||||
) t
|
||||
order by t.weight desc
|
||||
</select>
|
||||
|
||||
<select id="queryHyWgList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select
|
||||
shortDay,
|
||||
count(*) as cn
|
||||
from (
|
||||
@row_num := @row_num + 1 AS rowNumber,
|
||||
t.*
|
||||
from (SELECT @row_num := 0) r,
|
||||
(
|
||||
select
|
||||
distinct phone,
|
||||
DATE_FORMAT(add_time,'%Y-%m-%d') as shortDay
|
||||
from bl_order_info
|
||||
where add_time >= #{beginTime}
|
||||
and add_time <= #{endTime}
|
||||
and invalid in ('1','2')
|
||||
<if test="housingestateId!=null and housingestateId!=''">
|
||||
and housingestate_id = #{housingestateId}
|
||||
</if>
|
||||
shortDay,
|
||||
count(*) as cn
|
||||
from (
|
||||
select
|
||||
distinct phone,
|
||||
DATE_FORMAT(add_time,'%Y-%m-%d') as shortDay
|
||||
from bl_order_info
|
||||
where add_time >= #{hy.beginTime}
|
||||
and add_time <= #{hy.endTime}
|
||||
and invalid in ('1','2')
|
||||
<if test="hy.housingestateId!=null and hy.housingestateId!=''">
|
||||
and housingestate_id = #{hy.housingestateId}
|
||||
</if>
|
||||
) t
|
||||
group by shortDay
|
||||
) t
|
||||
group by shortDay
|
||||
order by shortDay
|
||||
order by t.shortDay
|
||||
</select>
|
||||
|
||||
<select id="queryAllHyTdcsList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
|
@ -156,4 +167,45 @@
|
|||
order by t.addTime desc
|
||||
</select>
|
||||
|
||||
<select id="queryHywgList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||
select
|
||||
@row_num := @row_num + 1 AS rowNumber,
|
||||
t.*
|
||||
from (SELECT @row_num := 0) r,
|
||||
(
|
||||
select
|
||||
a.phone,
|
||||
a.money,
|
||||
a.weight,
|
||||
a.add_time as addTime,
|
||||
a.invalid,
|
||||
a.start_weight as startWeight,
|
||||
a.end_weight as endWeight,
|
||||
a.updated_at as updatedAt,
|
||||
a.deduct_money as deductMoney,
|
||||
b.name as housingestateName,
|
||||
a.housingestate_id as housingestateId,
|
||||
a.imei,
|
||||
c.content,
|
||||
a.cause
|
||||
from bl_order_info a
|
||||
inner join bl_housingestate_info b on a.housingestate_id = b.housingestate_id
|
||||
inner join bl_device_info c on a.imei = c.imei
|
||||
where invalid in ('1','2')
|
||||
<if test="beginTime != null and beginTime !=''">
|
||||
and a.add_time >= #{beginTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime !=''">
|
||||
and a.add_time <= #{endTime}
|
||||
</if>
|
||||
<if test="invalid != null and invalid !=''">
|
||||
and a.invalid = #{invalid}
|
||||
</if>
|
||||
<if test="housingestateId!=null and housingestateId!=''">
|
||||
and a.housingestate_id = #{housingestateId}
|
||||
</if>
|
||||
) t
|
||||
order by t.housingestateId,t.imei,t.phone,t.addTime
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -16,10 +16,11 @@ public interface IHyService extends IService<Hy> {
|
|||
List<Hy> queryHyRegisterList(Hy hy);
|
||||
List<Hy> queryHyXzList(Hy hy);
|
||||
IPage<Hy> queryHyTdcsList(Page<Hy> page, Hy hy);
|
||||
List<Hy> queryHyTdzlList(Hy hy);
|
||||
List<Hy> queryHyWgList(Hy hy);
|
||||
IPage<Hy> queryHyTdzlList(Page<Hy> page,Hy hy);
|
||||
IPage<Hy> queryHyWgList(Page<Hy> page,Hy hy);
|
||||
|
||||
List<Hy> queryAllHyTdcsList(Hy hy);
|
||||
List<Hy> queryHyjlList(Hy hy);
|
||||
List<Hy> queryHywgList(Hy hy);
|
||||
|
||||
}
|
||||
|
|
|
@ -54,16 +54,16 @@ public class HyServiceImpl extends ServiceImpl<HyMapper, Hy> implements IHyServi
|
|||
* 会员投递重量排行榜
|
||||
*/
|
||||
@Override
|
||||
public List<Hy> queryHyTdzlList(Hy hy) {
|
||||
return baseMapper.queryHyTdzlList(hy);
|
||||
public IPage<Hy> queryHyTdzlList(Page<Hy> page, Hy hy) {
|
||||
return baseMapper.queryHyTdzlList(page,hy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 会员违规信息统计
|
||||
*/
|
||||
@Override
|
||||
public List<Hy> queryHyWgList(Hy hy) {
|
||||
return baseMapper.queryHyWgList(hy);
|
||||
public IPage<Hy> queryHyWgList(Page<Hy> page,Hy hy) {
|
||||
return baseMapper.queryHyWgList(page,hy);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -82,4 +82,12 @@ public class HyServiceImpl extends ServiceImpl<HyMapper, Hy> implements IHyServi
|
|||
return baseMapper.queryHyjlList(hy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员违规投递历史信息
|
||||
*/
|
||||
@Override
|
||||
public List<Hy> queryHywgList(Hy hy) {
|
||||
return baseMapper.queryHywgList(hy);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue