Compare commits

..

No commits in common. "50921bdbef8cf0e95420485ba509f536049337dd" and "8fd3291345e0c163e03f9fcea3c0bee3c69163c0" have entirely different histories.

5 changed files with 0 additions and 42 deletions

View File

@ -151,13 +151,4 @@ public class DeviceController {
return success(true);
}
@GetMapping("/get-vip-device-count")
@Operation(summary = "时间范围获取会员设备数量")
public CommonResult<List<Map<String, Object>>> getVipDeviceCountByDay(@RequestParam("startDate") String startDate,
@RequestParam("endDate") String endDate,
@RequestParam(value = "orgid", defaultValue = "0") Integer orgid) {
List<Map<String, Object>> list = deviceService.getVipDeviceCountByDay(startDate, endDate, orgid);
return success(list);
}
}

View File

@ -96,9 +96,4 @@ public interface DeviceMapper extends BaseMapperX<DeviceDO> {
* 首页查询设备数量统计
* */
DeviceStatistics getDevice_Statistics(@Param("orgid") Integer orgid);
/**
* 按天统计开通会员的设备数量
*/
List<Map<String, Object>> countVipDevicesByDay(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("orgid") Integer orgid);
}

View File

@ -113,14 +113,4 @@ public interface DeviceService {
* @param vipReqVO 会员信息更新参数
*/
void updateDeviceVip(@Valid DeviceVipReqVO vipReqVO);
/**
* 根据日期范围查询会员设备数量
*
* @param startDate 开始日期
* @param endDate 结束日期
* @param orgid 机构ID
* @return 会员设备数量统计列表
*/
List<Map<String, Object>> getVipDeviceCountByDay(String startDate, String endDate, Integer orgid);
}

View File

@ -17,7 +17,6 @@ import cn.iocoder.yudao.module.system.dal.mysql.device.DeviceMapper;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import lombok.extern.slf4j.Slf4j;
@ -258,9 +257,4 @@ public class DeviceServiceImpl implements DeviceService {
}
}
@Override
public List<Map<String, Object>> getVipDeviceCountByDay(String startDate, String endDate, Integer orgid) {
return deviceMapper.countVipDevicesByDay(startDate, endDate, orgid);
}
}

View File

@ -49,16 +49,4 @@
</where>
GROUP BY SUBSTRING_INDEX(location, '/', 1)
</select>
<select id="countVipDevicesByDay" resultType="map">
SELECT DATE_FORMAT(vipstarttime, '%Y-%m-%d') AS date, COUNT(*) AS count
FROM tb_device
WHERE isvip = 1
AND vipstarttime BETWEEN #{startDate} AND #{endDate}
<if test="orgid != null and orgid != 0">
AND orgid = #{orgid}
</if>
GROUP BY DATE_FORMAT(vipstarttime, '%Y-%m-%d')
ORDER BY date
</select>
</mapper>