【 1、会员投递次数排行榜:增加列表页、筛选条件、会员详情、标记、屏蔽按钮(按钮需补充)
2、设备:设备注册信息(有个字段需要翻译下) 3、设备:设备投递次数排行榜】 以上的相关接口
This commit is contained in:
parent
68f06b8857
commit
e124553ea6
|
@ -0,0 +1,163 @@
|
||||||
|
package org.jeecg.modules.zh.deviceinfo.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
|
import org.jeecg.common.api.vo.Result;
|
||||||
|
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||||
|
import org.jeecg.common.system.base.controller.JeecgController;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.entity.DeviceInfo;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.service.IDeviceInfo2Service;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.Arrays;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 设备信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Api(tags="设备信息")
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/deviceinfo/deviceInfo")
|
||||||
|
@Slf4j
|
||||||
|
public class DeviceInfoController extends JeecgController<DeviceInfo, IDeviceInfo2Service> {
|
||||||
|
@Autowired
|
||||||
|
private IDeviceInfo2Service deviceInfoService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页列表查询
|
||||||
|
*
|
||||||
|
* @param deviceInfo
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @param req
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "设备信息-分页列表查询")
|
||||||
|
@ApiOperation(value="设备信息-分页列表查询", notes="设备信息-分页列表查询")
|
||||||
|
@GetMapping(value = "/list")
|
||||||
|
public Result<IPage<DeviceInfo>> queryPageList(DeviceInfo deviceInfo,
|
||||||
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||||
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||||
|
HttpServletRequest req) {
|
||||||
|
QueryWrapper<DeviceInfo> queryWrapper = QueryGenerator.initQueryWrapper(deviceInfo, req.getParameterMap());
|
||||||
|
Page<DeviceInfo> page = new Page<DeviceInfo>(pageNo, pageSize);
|
||||||
|
// IPage<DeviceInfo> pageList = deviceInfoService.page(page, queryWrapper);
|
||||||
|
IPage<DeviceInfo> pageList = deviceInfoService.queryDeviceInfoWithRelatedTables(page, deviceInfo, req.getParameterMap());
|
||||||
|
return Result.OK(pageList);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加
|
||||||
|
*
|
||||||
|
* @param deviceInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "设备信息-添加")
|
||||||
|
@ApiOperation(value="设备信息-添加", notes="设备信息-添加")
|
||||||
|
@RequiresPermissions("deviceinfo:bl_device_info:add")
|
||||||
|
@PostMapping(value = "/add")
|
||||||
|
public Result<String> add(@RequestBody DeviceInfo deviceInfo) {
|
||||||
|
deviceInfoService.save(deviceInfo);
|
||||||
|
return Result.OK("添加成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
*
|
||||||
|
* @param deviceInfo
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "设备信息-编辑")
|
||||||
|
@ApiOperation(value="设备信息-编辑", notes="设备信息-编辑")
|
||||||
|
@RequiresPermissions("deviceinfo:bl_device_info:edit")
|
||||||
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||||
|
public Result<String> edit(@RequestBody DeviceInfo deviceInfo) {
|
||||||
|
deviceInfoService.updateById(deviceInfo);
|
||||||
|
return Result.OK("编辑成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id删除
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "设备信息-通过id删除")
|
||||||
|
@ApiOperation(value="设备信息-通过id删除", notes="设备信息-通过id删除")
|
||||||
|
@RequiresPermissions("deviceinfo:bl_device_info:delete")
|
||||||
|
@DeleteMapping(value = "/delete")
|
||||||
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||||
|
deviceInfoService.removeById(id);
|
||||||
|
return Result.OK("删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除
|
||||||
|
*
|
||||||
|
* @param ids
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@AutoLog(value = "设备信息-批量删除")
|
||||||
|
@ApiOperation(value="设备信息-批量删除", notes="设备信息-批量删除")
|
||||||
|
@RequiresPermissions("deviceinfo:bl_device_info:deleteBatch")
|
||||||
|
@DeleteMapping(value = "/deleteBatch")
|
||||||
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||||
|
this.deviceInfoService.removeByIds(Arrays.asList(ids.split(",")));
|
||||||
|
return Result.OK("批量删除成功!");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id查询
|
||||||
|
*
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
//@AutoLog(value = "设备信息-通过id查询")
|
||||||
|
@ApiOperation(value="设备信息-通过id查询", notes="设备信息-通过id查询")
|
||||||
|
@GetMapping(value = "/queryById")
|
||||||
|
public Result<DeviceInfo> queryById(@RequestParam(name="id",required=true) String id) {
|
||||||
|
DeviceInfo deviceInfo = deviceInfoService.getById(id);
|
||||||
|
if(deviceInfo==null) {
|
||||||
|
return Result.error("未找到对应数据");
|
||||||
|
}
|
||||||
|
return Result.OK(deviceInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出excel
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param deviceInfo
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("deviceinfo:bl_device_info:exportXls")
|
||||||
|
@RequestMapping(value = "/exportXls")
|
||||||
|
public ModelAndView exportXls(HttpServletRequest request, DeviceInfo deviceInfo) {
|
||||||
|
return super.exportXls(request, deviceInfo, DeviceInfo.class, "设备信息");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过excel导入数据
|
||||||
|
*
|
||||||
|
* @param request
|
||||||
|
* @param response
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("deviceinfo:bl_device_info:importExcel")
|
||||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||||
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||||
|
return super.importExcel(request, response, DeviceInfo.class);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,94 @@
|
||||||
|
package org.jeecg.modules.zh.deviceinfo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 设备信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@TableName("bl_device_info")
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@ApiModel(value="bl_device_info对象", description="设备信息")
|
||||||
|
public class DeviceInfo implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**主键*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
@ApiModelProperty(value = "主键")
|
||||||
|
private Integer id;
|
||||||
|
/**设备ID*/
|
||||||
|
@Excel(name = "设备ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备ID")
|
||||||
|
private String deviceId;
|
||||||
|
/**设备编码*/
|
||||||
|
@Excel(name = "设备编码", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备编码")
|
||||||
|
private String imei;
|
||||||
|
/**ICCID*/
|
||||||
|
@Excel(name = "ICCID", width = 15)
|
||||||
|
@ApiModelProperty(value = "ICCID")
|
||||||
|
private String iccid;
|
||||||
|
/**是否在线*/
|
||||||
|
@Excel(name = "是否在线", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否在线")
|
||||||
|
private String isOnline;
|
||||||
|
/**设备点位*/
|
||||||
|
@Excel(name = "设备点位", width = 15)
|
||||||
|
@ApiModelProperty(value = "设备点位")
|
||||||
|
private String content;
|
||||||
|
/**经纬度*/
|
||||||
|
@Excel(name = "经纬度", width = 15)
|
||||||
|
@ApiModelProperty(value = "经纬度")
|
||||||
|
private String lnglat;
|
||||||
|
/**桶数量*/
|
||||||
|
@Excel(name = "桶数量", width = 15)
|
||||||
|
@ApiModelProperty(value = "桶数量")
|
||||||
|
private String boxNum;
|
||||||
|
/**满溢桶数量*/
|
||||||
|
@Excel(name = "满溢桶数量", width = 15)
|
||||||
|
@ApiModelProperty(value = "满溢桶数量")
|
||||||
|
private String overflowBoxNum;
|
||||||
|
/**是否在仓库中*/
|
||||||
|
@Excel(name = "是否在仓库中", width = 15)
|
||||||
|
@ApiModelProperty(value = "是否在仓库中")
|
||||||
|
private String inWarehouse;
|
||||||
|
/**区域ID*/
|
||||||
|
@Excel(name = "区域ID", width = 15)
|
||||||
|
@ApiModelProperty(value = "区域ID")
|
||||||
|
private String housingestateId;
|
||||||
|
/**厂家更新时间*/
|
||||||
|
@Excel(name = "厂家更新时间", width = 15)
|
||||||
|
@ApiModelProperty(value = "厂家更新时间")
|
||||||
|
private String updatedAt;
|
||||||
|
/**创建时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
/**更新时间*/
|
||||||
|
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@ApiModelProperty(value = "更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String housingestateName;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package org.jeecg.modules.zh.deviceinfo.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.entity.DeviceInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 设备信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface DeviceInfo2Mapper extends BaseMapper<DeviceInfo> {
|
||||||
|
|
||||||
|
IPage<DeviceInfo> selectDeviceInfoWithRelatedTables(Page<DeviceInfo> page, @Param(Constants.WRAPPER) QueryWrapper<DeviceInfo> queryWrapper);
|
||||||
|
}
|
|
@ -0,0 +1,15 @@
|
||||||
|
<?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.deviceinfo.mapper.DeviceInfo2Mapper">
|
||||||
|
|
||||||
|
<select id="selectDeviceInfoWithRelatedTables" resultType="org.jeecg.modules.zh.deviceinfo.entity.DeviceInfo">
|
||||||
|
SELECT
|
||||||
|
di.*,
|
||||||
|
hi.name as housingestateName
|
||||||
|
FROM
|
||||||
|
bl_device_info di
|
||||||
|
LEFT JOIN bl_housingestate_info hi ON di.housingestate_id = hi.housingestate_id
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,20 @@
|
||||||
|
package org.jeecg.modules.zh.deviceinfo.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.entity.DeviceInfo;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 设备信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
public interface IDeviceInfo2Service extends IService<DeviceInfo> {
|
||||||
|
|
||||||
|
IPage<DeviceInfo> queryDeviceInfoWithRelatedTables(Page<DeviceInfo> page, DeviceInfo deviceInfo, Map<String, String[]> parameterMap);
|
||||||
|
}
|
|
@ -0,0 +1,39 @@
|
||||||
|
package org.jeecg.modules.zh.deviceinfo.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
import org.jeecg.common.system.query.QueryGenerator;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.entity.DeviceInfo;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.mapper.DeviceInfo2Mapper;
|
||||||
|
import org.jeecg.modules.zh.deviceinfo.service.IDeviceInfo2Service;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description: 设备信息
|
||||||
|
* @Author: jeecg-boot
|
||||||
|
* @Date: 2025-07-02
|
||||||
|
* @Version: V1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class DeviceInfo2ServiceImpl extends ServiceImpl<DeviceInfo2Mapper, DeviceInfo> implements IDeviceInfo2Service {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<DeviceInfo> queryDeviceInfoWithRelatedTables(Page<DeviceInfo> page, DeviceInfo deviceInfo, Map<String, String[]> parameterMap) {
|
||||||
|
// 构建基础查询条件
|
||||||
|
QueryWrapper<DeviceInfo> queryWrapper = QueryGenerator.initQueryWrapper(deviceInfo, parameterMap);
|
||||||
|
String[] housingestateNames = parameterMap.get("housingestateName");
|
||||||
|
if(housingestateNames!=null){
|
||||||
|
String housingestateName = housingestateNames[0];
|
||||||
|
if(StringUtils.isNotBlank(housingestateName)){
|
||||||
|
queryWrapper.like("hi.name",housingestateName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 执行拼表查询
|
||||||
|
return baseMapper.selectDeviceInfoWithRelatedTables(page, queryWrapper);
|
||||||
|
}
|
||||||
|
}
|
|
@ -57,4 +57,31 @@ public class HyController {
|
||||||
return Result.ok(list);
|
return Result.ok(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/queryAllHyTdcsList", method = RequestMethod.GET)
|
||||||
|
public Result queryAllHyTdcsList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryAllHyTdcsList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/queryHyjlList", method = RequestMethod.GET)
|
||||||
|
public Result queryHyjlList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryHyjlList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备投递次数排行榜
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/querySheBeiTdcsList", method = RequestMethod.GET)
|
||||||
|
public Result querySheBeiTdcsList(Hy hy) {
|
||||||
|
List<Hy> list = service.querySheBeiTdcsList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@RequestMapping(value = "/queryAllSheBeiTdcsList", method = RequestMethod.GET)
|
||||||
|
public Result queryAllSheBeiTdcsList(Hy hy) {
|
||||||
|
List<Hy> list = service.queryAllSheBeiTdcsList(hy);
|
||||||
|
return Result.ok(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ public class Hy implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
private String phone;
|
private String phone;
|
||||||
|
private String imei;
|
||||||
private String shortHour;
|
private String shortHour;
|
||||||
private String shortDay;
|
private String shortDay;
|
||||||
private Integer cn;
|
private Integer cn;
|
||||||
|
@ -18,4 +19,17 @@ public class Hy implements Serializable {
|
||||||
private String housingestateName;
|
private String housingestateName;
|
||||||
private String beginTime;
|
private String beginTime;
|
||||||
private String endTime;
|
private String endTime;
|
||||||
|
|
||||||
|
private Integer countMin;//最小投递数量
|
||||||
|
private Integer countMax;//最大投递数量
|
||||||
|
private String money;//金额
|
||||||
|
private String weight;//重量
|
||||||
|
private String addTime;//投递时间
|
||||||
|
private String invalid;//订单是否有效
|
||||||
|
private String startWeight;//订单开始重量
|
||||||
|
private String endWeight;//订单结束重量
|
||||||
|
private String updatedAt;//厂家更新时间
|
||||||
|
private String deductMoney;//扣除金额
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,4 +14,9 @@ public interface HyMapper extends BaseMapper<Hy>{
|
||||||
List<Hy> queryHyRegisterList(Hy hy);
|
List<Hy> queryHyRegisterList(Hy hy);
|
||||||
List<Hy> queryHyXzList(Hy hy);
|
List<Hy> queryHyXzList(Hy hy);
|
||||||
List<Hy> queryHyTdcsList(Hy hy);
|
List<Hy> queryHyTdcsList(Hy hy);
|
||||||
|
List<Hy> queryAllHyTdcsList(Hy hy);
|
||||||
|
List<Hy> queryHyjlList(Hy hy);
|
||||||
|
|
||||||
|
List<Hy> querySheBeiTdcsList(Hy hy);
|
||||||
|
List<Hy> queryAllSheBeiTdcsList(Hy hy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,4 +52,78 @@
|
||||||
limit 10
|
limit 10
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
<select id="queryAllHyTdcsList" 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
|
||||||
|
group by phone
|
||||||
|
<if test="countMin!=null or countMax!=null">
|
||||||
|
having
|
||||||
|
<if test="countMin!=null">
|
||||||
|
count(*) >= #{countMin}
|
||||||
|
</if>
|
||||||
|
<if test="countMin!=null and countMax!=null"> and </if>
|
||||||
|
<if test="countMax!=null">
|
||||||
|
count(*) <= #{countMax}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
order by cn desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryHyjlList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||||
|
select
|
||||||
|
phone,
|
||||||
|
money,
|
||||||
|
weight,
|
||||||
|
add_time as addTime,
|
||||||
|
invalid,
|
||||||
|
start_weight as startWeight,
|
||||||
|
end_weight as endWeight,
|
||||||
|
updated_at as updatedAt,
|
||||||
|
deduct_money as deductMoney
|
||||||
|
from bl_order_info
|
||||||
|
where phone = #{phone}
|
||||||
|
order by add_time desc
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
<select id="querySheBeiTdcsList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||||
|
select
|
||||||
|
imei,
|
||||||
|
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 imei
|
||||||
|
order by cn desc
|
||||||
|
limit 10
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="queryAllSheBeiTdcsList" parameterType="org.jeecg.modules.zh.view.hy.entity.Hy" resultType="org.jeecg.modules.zh.view.hy.entity.Hy">
|
||||||
|
select
|
||||||
|
imei,
|
||||||
|
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 imei
|
||||||
|
<if test="countMin!=null or countMax!=null">
|
||||||
|
having
|
||||||
|
<if test="countMin!=null">
|
||||||
|
count(*) >= #{countMin}
|
||||||
|
</if>
|
||||||
|
<if test="countMin!=null and countMax!=null"> and </if>
|
||||||
|
<if test="countMax!=null">
|
||||||
|
count(*) <= #{countMax}
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
order by cn desc
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|
|
@ -14,5 +14,9 @@ public interface IHyService extends IService<Hy> {
|
||||||
List<Hy> queryHyRegisterList(Hy hy);
|
List<Hy> queryHyRegisterList(Hy hy);
|
||||||
List<Hy> queryHyXzList(Hy hy);
|
List<Hy> queryHyXzList(Hy hy);
|
||||||
List<Hy> queryHyTdcsList(Hy hy);
|
List<Hy> queryHyTdcsList(Hy hy);
|
||||||
|
List<Hy> queryAllHyTdcsList(Hy hy);
|
||||||
|
List<Hy> queryHyjlList(Hy hy);
|
||||||
|
|
||||||
|
List<Hy> querySheBeiTdcsList(Hy hy);
|
||||||
|
List<Hy> queryAllSheBeiTdcsList(Hy hy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,4 +48,35 @@ public class HyServiceImpl extends ServiceImpl<HyMapper, Hy> implements IHyServi
|
||||||
return baseMapper.queryHyTdcsList(hy);
|
return baseMapper.queryHyTdcsList(hy);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有会员递次数排行榜
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryAllHyTdcsList(Hy hy) {
|
||||||
|
return baseMapper.queryAllHyTdcsList(hy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询会员投递历史信息
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryHyjlList(Hy hy) {
|
||||||
|
return baseMapper.queryHyjlList(hy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设备投递次数排行榜
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Hy> querySheBeiTdcsList(Hy hy) {
|
||||||
|
return baseMapper.querySheBeiTdcsList(hy);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询所有设备递次数排行榜
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Hy> queryAllSheBeiTdcsList(Hy hy) {
|
||||||
|
return baseMapper.queryAllSheBeiTdcsList(hy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue