新增simcard相关的数据结构
This commit is contained in:
parent
1920906272
commit
43a1d36f18
@ -65,5 +65,8 @@ public class GnssDevice {
|
|||||||
|
|
||||||
// 日志记录控制
|
// 日志记录控制
|
||||||
private Short loggingmode;
|
private Short loggingmode;
|
||||||
|
|
||||||
private String remark;
|
private String remark;
|
||||||
|
private String iccid;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
51
sec-api/src/main/java/com/imdroid/secapi/dto/SimCard.java
Normal file
51
sec-api/src/main/java/com/imdroid/secapi/dto/SimCard.java
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
package com.imdroid.secapi.dto;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@TableName(value = "simcards")
|
||||||
|
public class SimCard {
|
||||||
|
public static final int STATUS_UNKNOWN = -1; // 未知
|
||||||
|
public static final int STATUS_WAIT_ACTIVE = 1; // 待激活
|
||||||
|
public static final int STATUS_ACTIVATED = 2; // 已激活
|
||||||
|
public static final int STATUS_SUSPENDED = 3; // 停机
|
||||||
|
public static final int STATUS_CANCELLED = 4; // 注销
|
||||||
|
public static final int STATUS_IN_STOCK = 5; // 库存
|
||||||
|
public static final int STATUS_TESTABLE = 6; // 可测试
|
||||||
|
public static final int STATUS_INVALID = 7; // 失效
|
||||||
|
public static final int STATUS_NOT_EXIST = 99; // 号码不存在
|
||||||
|
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
@ExcelProperty("ID")
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@ExcelProperty("更新时间")
|
||||||
|
private Date updatetime;
|
||||||
|
|
||||||
|
@ExcelProperty("ICCID")
|
||||||
|
private String iccid;
|
||||||
|
|
||||||
|
@ExcelProperty("物联卡号码")
|
||||||
|
private String msisdn;
|
||||||
|
|
||||||
|
@ExcelProperty("设备ID")
|
||||||
|
private String deviceid;
|
||||||
|
|
||||||
|
@ExcelProperty("状态")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
@ExcelProperty("剩余流量(MB)")
|
||||||
|
private BigDecimal remaining;
|
||||||
|
|
||||||
|
@ExcelProperty("总流量(MB)")
|
||||||
|
private BigDecimal total;
|
||||||
|
|
||||||
|
@ExcelProperty("已用流量(MB)")
|
||||||
|
private BigDecimal used;
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.imdroid.secapi.dto;
|
||||||
|
|
||||||
|
import com.github.yulichang.base.MPJBaseMapper;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
|
|
||||||
|
public interface SimCardsMapper extends MPJBaseMapper<SimCard>{
|
||||||
|
@Select({"select * from simcards where deviceid = #{deviceId} limit 1"})
|
||||||
|
SimCard queryByDeviceId(String deviceId);
|
||||||
|
|
||||||
|
@Select("select * from simcards where iccid = #{iccid} limit 1")
|
||||||
|
SimCard queryByIccid(String iccid);
|
||||||
|
|
||||||
|
@Update("UPDATE simcards SET " +
|
||||||
|
"updatetime = #{updatetime}, " +
|
||||||
|
"msisdn = #{msisdn}, " +
|
||||||
|
"status = #{status}, " +
|
||||||
|
"remaining = #{remaining}, " +
|
||||||
|
"total = #{total}, " +
|
||||||
|
"used = #{used} " +
|
||||||
|
"WHERE deviceid = #{deviceid}")
|
||||||
|
int updateSimCardInfo(SimCard simCard);
|
||||||
|
|
||||||
|
@Update("UPDATE simcards SET " +
|
||||||
|
"updatetime = #{updatetime}, " +
|
||||||
|
"remaining = #{remaining}, " +
|
||||||
|
"total = #{total}, " +
|
||||||
|
"used = #{used} " +
|
||||||
|
"WHERE deviceid = #{deviceid}")
|
||||||
|
int updateFlowInfo(SimCard simCard);
|
||||||
|
|
||||||
|
@Update("UPDATE simcards SET " +
|
||||||
|
"updatetime = #{updatetime}, " +
|
||||||
|
"status = #{status} " +
|
||||||
|
"WHERE deviceid = #{deviceid}")
|
||||||
|
int updateStatus(SimCard simCard);
|
||||||
|
}
|
||||||
|
|
||||||
@ -1,10 +1,12 @@
|
|||||||
package com.imdroid.sideslope.sal;
|
package com.imdroid.sideslope.sal;
|
||||||
|
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import com.imdroid.secapi.dto.GnssDevice;
|
import com.imdroid.secapi.dto.GnssDevice;
|
||||||
import com.imdroid.sideslope.bd.Gga;
|
import com.imdroid.sideslope.bd.Gga;
|
||||||
import com.imdroid.sideslope.bd.UBXUtil;
|
import com.imdroid.sideslope.bd.UBXUtil;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -66,6 +68,11 @@ public class Device {
|
|||||||
Double iPosn;
|
Double iPosn;
|
||||||
Double iPosd;
|
Double iPosd;
|
||||||
|
|
||||||
|
String iccid;
|
||||||
|
private BigDecimal remaining;
|
||||||
|
private BigDecimal total;
|
||||||
|
private BigDecimal used;
|
||||||
|
|
||||||
LocalDateTime lastRxTime;
|
LocalDateTime lastRxTime;
|
||||||
LocalDateTime lastD3f2Time;
|
LocalDateTime lastD3f2Time;
|
||||||
short noFixedAndFloatResult=0;
|
short noFixedAndFloatResult=0;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user