feat: add cdr info code
This commit is contained in:
@@ -82,6 +82,16 @@
|
||||
<artifactId>wfc-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 单元测试 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.wfc.user.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户话单表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/uCdr")
|
||||
public class UCdrController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.wfc.user.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_话单明细表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/uCdrDetail")
|
||||
public class UCdrDetailController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.wfc.user.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_AP设备表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/uClient")
|
||||
public class UClientController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package org.wfc.user.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户设备表 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/user/uDevice")
|
||||
public class UDeviceController {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package org.wfc.user.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.wfc.common.mybatis.domain.BaseData;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户话单表
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("u_cdr")
|
||||
@Schema(name = "UCdr", description = "用户平台_用户话单表")
|
||||
public class UCdr extends BaseData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "User ID link to u_user")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "Client ID")
|
||||
private Long clientId;
|
||||
|
||||
@Schema(description = "Device ID")
|
||||
private Long deviceId;
|
||||
|
||||
@Schema(description = "Wireless SSID name ")
|
||||
private String ssid;
|
||||
|
||||
@Schema(description = "tx rate ")
|
||||
private Integer rxRate;
|
||||
|
||||
@Schema(description = "tx rate")
|
||||
private Integer txRate;
|
||||
|
||||
@Schema(description = "Number of downstream packets. ")
|
||||
private Long downPacket;
|
||||
|
||||
@Schema(description = "Number of upstream packets. ")
|
||||
private Long upPacket;
|
||||
|
||||
@Schema(description = "Downstream traffic (Byte)")
|
||||
private Long trafficDown;
|
||||
|
||||
@Schema(description = "Upstream traffic (Byte)")
|
||||
private Long trafficUp;
|
||||
|
||||
@Schema(description = "Rate limit profile ID. ")
|
||||
private String rateLimitProfileId;
|
||||
|
||||
@Schema(description = "Up time (unit: s).")
|
||||
private Long upTime;
|
||||
|
||||
@Schema(description = "Last found time, timestamp (ms). ")
|
||||
private Long lastSeenTime;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.wfc.user.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import org.wfc.common.mybatis.domain.BaseData;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_话单明细表
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("u_cdr_detail")
|
||||
@Schema(name = "UCdrDetail", description = "用户平台_话单明细表")
|
||||
public class UCdrDetail extends BaseData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "CDR ID")
|
||||
private Long cdrId;
|
||||
|
||||
@Schema(description = "Downstream traffic (Byte)")
|
||||
private Long trafficDown;
|
||||
|
||||
@Schema(description = "Upstream traffic (Byte)")
|
||||
private Long trafficUp;
|
||||
|
||||
@Schema(description = "Start time")
|
||||
private Date startTime;
|
||||
|
||||
@Schema(description = "End time")
|
||||
private Date endTime;
|
||||
|
||||
@Schema(description = "Duration(s)")
|
||||
private Long duration;
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package org.wfc.user.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.wfc.common.mybatis.domain.BaseData;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户设备表
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("u_client")
|
||||
@Schema(name = "UClient", description = "用户平台_用户设备表")
|
||||
public class UClient extends BaseData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "User ID link to u_user")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "Client Name")
|
||||
private String clientName;
|
||||
|
||||
@Schema(description = "Client device type")
|
||||
private String clientDeviceType;
|
||||
|
||||
@Schema(description = "Client mac address")
|
||||
private String clientMac;
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package org.wfc.user.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import org.wfc.common.mybatis.domain.BaseData;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_AP设备表
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@TableName("u_device")
|
||||
@Schema(name = "UDevice", description = "用户平台_AP设备表")
|
||||
public class UDevice extends BaseData {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Schema(description = "User ID link to u_user")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "Device Name")
|
||||
private String deviceName;
|
||||
|
||||
@Schema(description = "Device ip")
|
||||
private String deviceIp;
|
||||
|
||||
@Schema(description = "Device mac")
|
||||
private String deviceMac;
|
||||
|
||||
@Schema(description = "Device model")
|
||||
private String deviceModel;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.mapper;
|
||||
|
||||
import org.wfc.user.domain.UCdrDetail;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_话单明细表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface UCdrDetailMapper extends BaseMapper<UCdrDetail> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.mapper;
|
||||
|
||||
import org.wfc.user.domain.UCdr;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户话单表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface UCdrMapper extends BaseMapper<UCdr> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.mapper;
|
||||
|
||||
import org.wfc.user.domain.UClient;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户设备表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface UClientMapper extends BaseMapper<UClient> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.mapper;
|
||||
|
||||
import org.wfc.user.domain.UDevice;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_AP设备表 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface UDeviceMapper extends BaseMapper<UDevice> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.service;
|
||||
|
||||
import org.wfc.user.domain.UCdrDetail;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_话单明细表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface IUCdrDetailService extends IService<UCdrDetail> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.service;
|
||||
|
||||
import org.wfc.user.domain.UCdr;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户话单表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface IUCdrService extends IService<UCdr> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.service;
|
||||
|
||||
import org.wfc.user.domain.UClient;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户设备表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface IUClientService extends IService<UClient> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.wfc.user.service;
|
||||
|
||||
import org.wfc.user.domain.UDevice;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_AP设备表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
public interface IUDeviceService extends IService<UDevice> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.wfc.user.service.impl;
|
||||
|
||||
import org.wfc.user.domain.UCdrDetail;
|
||||
import org.wfc.user.mapper.UCdrDetailMapper;
|
||||
import org.wfc.user.service.IUCdrDetailService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_话单明细表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Service
|
||||
public class UCdrDetailServiceImpl extends ServiceImpl<UCdrDetailMapper, UCdrDetail> implements IUCdrDetailService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.wfc.user.service.impl;
|
||||
|
||||
import org.wfc.user.domain.UCdr;
|
||||
import org.wfc.user.mapper.UCdrMapper;
|
||||
import org.wfc.user.service.IUCdrService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户话单表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Service
|
||||
public class UCdrServiceImpl extends ServiceImpl<UCdrMapper, UCdr> implements IUCdrService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.wfc.user.service.impl;
|
||||
|
||||
import org.wfc.user.domain.UClient;
|
||||
import org.wfc.user.mapper.UClientMapper;
|
||||
import org.wfc.user.service.IUClientService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_用户设备表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Service
|
||||
public class UClientServiceImpl extends ServiceImpl<UClientMapper, UClient> implements IUClientService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package org.wfc.user.service.impl;
|
||||
|
||||
import org.wfc.user.domain.UDevice;
|
||||
import org.wfc.user.mapper.UDeviceMapper;
|
||||
import org.wfc.user.service.IUDeviceService;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户平台_AP设备表 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author cyc
|
||||
* @since 2024-12-09
|
||||
*/
|
||||
@Service
|
||||
public class UDeviceServiceImpl extends ServiceImpl<UDeviceMapper, UDevice> implements IUDeviceService {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.wfc.user.mapper.UCdrDetailMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.wfc.user.mapper.UCdrMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.wfc.user.mapper.UClientMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?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.wfc.user.mapper.UDeviceMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.wfc.user;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.wfc.user.service.IUClientService;
|
||||
|
||||
/**
|
||||
* @description: 设备单元测试
|
||||
* @author: cyc
|
||||
* @since: 2024-12-09
|
||||
*/
|
||||
@SpringBootTest
|
||||
public class UClientTest {
|
||||
|
||||
@Autowired
|
||||
private IUClientService clientService;
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user