Commit 6b29c90d by 崔彦峰

svn to git

0 parents
Showing 118 changed files with 4820 additions and 0 deletions
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>framework-rpc-api</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-oss-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>rpc-dj-oss-api</name>
<properties>
<deploy.scanPackage>cn.com.glsx.dj.oss.remote</deploy.scanPackage>
</properties>
<build>
<plugins>
<plugin>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>rpc-api-deploy-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-oss-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
package cn.com.glsx.dj.oss.enums;
/**
* @author wangxw
* @version 1.0.0
* @ClassName FrmsDeviceTypeEnum.java
* @description: 设备类型枚举
* 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
* @createTime 2020年12月09日 10:11:00
*/
public enum FrmsDeviceTypeEnum {
UN_KNOWN(-1, "未知设备"),
OBD(1, "OBD"),
DDBOX(2, "云导航"),
DOG(3, "电子狗"),
TBOX(5, "TBOX(2G)"),
CARCHARGE(6, "记录仪"),
BBOX(7, "BBOX"),
GPS(8, "GPS"),
WIFI(9, "车载WiFi"),
BACKMIRROR(12134, "后视镜"),
AISILF(12501, "小精灵");
private Integer deviceType;
private String description;
FrmsDeviceTypeEnum(Integer deviceType, String description) {
this.deviceType = deviceType;
this.description = description;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public static FrmsDeviceTypeEnum findByCode(Integer deviceType) {
FrmsDeviceTypeEnum[] objs = FrmsDeviceTypeEnum.values();
for (FrmsDeviceTypeEnum obj : objs) {
if (deviceType.equals(obj.getDeviceType())) {
return obj;
}
}
return FrmsDeviceTypeEnum.UN_KNOWN;
}
}
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Table;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_car_collision")
public class CarCollision extends BaseModel{
private static final long serialVersionUID = 6528614429277015904L;
/**
* 设备号
*/
private String sn;
/**
* 车架号
*/
@Column(name = "stand_no")
private String standNo;
/**
* 碰撞时间
*/
@Column(name = "collision_time")
private Date collisionTime;
/**
* 事故类型 1:碰撞 2:拖车 3:搭电 4:换胎 5:其他 6:sos救援 7:客户自提
*/
@Column(name = "collision_type")
private Integer collisionType;
/**
* 碰撞地点
*/
private String address;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 离店距离
*/
private Double distance;
/**
* 碰撞速度
*/
private Integer speed;
/**
* 门店名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 门店ID
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取车架号
*
* @return stand_no - 车架号
*/
public String getStandNo() {
return standNo;
}
/**
* 设置车架号
*
* @param standNo 车架号
*/
public void setStandNo(String standNo) {
this.standNo = standNo == null ? null : standNo.trim();
}
/**
* 获取碰撞时间
*
* @return collision_time - 碰撞时间
*/
public Date getCollisionTime() {
return collisionTime;
}
/**
* 设置碰撞时间
*
* @param collisionTime 碰撞时间
*/
public void setCollisionTime(Date collisionTime) {
this.collisionTime = collisionTime;
}
/**
* 获取事故类型 1:碰撞 2:拖车 3:搭电 4:换胎 5:其他 6:sos救援 7:客户自提
*
* @return collision_type - 事故类型 1:碰撞 2:拖车 3:搭电 4:换胎 5:其他 6:sos救援 7:客户自提
*/
public Integer getCollisionType() {
return collisionType;
}
/**
* 设置事故类型 1:碰撞 2:拖车 3:搭电 4:换胎 5:其他 6:sos救援 7:客户自提
*
* @param collisionType 事故类型 1:碰撞 2:拖车 3:搭电 4:换胎 5:其他 6:sos救援 7:客户自提
*/
public void setCollisionType(Integer collisionType) {
this.collisionType = collisionType;
}
/**
* 获取碰撞地点
*
* @return address - 碰撞地点
*/
public String getAddress() {
return address;
}
/**
* 设置碰撞地点
*
* @param address 碰撞地点
*/
public void setAddress(String address) {
this.address = address == null ? null : address.trim();
}
/**
* 获取经度
*
* @return longitude - 经度
*/
public String getLongitude() {
return longitude;
}
/**
* 设置经度
*
* @param longitude 经度
*/
public void setLongitude(String longitude) {
this.longitude = longitude == null ? null : longitude.trim();
}
/**
* 获取纬度
*
* @return latitude - 纬度
*/
public String getLatitude() {
return latitude;
}
/**
* 设置纬度
*
* @param latitude 纬度
*/
public void setLatitude(String latitude) {
this.latitude = latitude == null ? null : latitude.trim();
}
/**
* 获取离店距离
*
* @return distance - 离店距离
*/
public Double getDistance() {
return distance;
}
/**
* 设置离店距离
*
* @param distance 离店距离
*/
public void setDistance(Double distance) {
this.distance = distance;
}
/**
* 获取碰撞速度
*
* @return speed - 碰撞速度
*/
public Integer getSpeed() {
return speed;
}
/**
* 设置碰撞速度
*
* @param speed 碰撞速度
*/
public void setSpeed(Integer speed) {
this.speed = speed;
}
/**
* 获取门店名称
*
* @return merchant_name - 门店名称
*/
public String getMerchantName() {
return merchantName;
}
/**
* 设置门店名称
*
* @param merchantName 门店名称
*/
public void setMerchantName(String merchantName) {
this.merchantName = merchantName == null ? null : merchantName.trim();
}
/**
* 获取门店ID
*
* @return merchant_id - 门店ID
*/
public Integer getMerchantId() {
return merchantId;
}
/**
* 设置门店ID
*
* @param merchantId 门店ID
*/
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
@Override
public String toString() {
return "CarCollision [sn=" + sn + ", standNo=" + standNo
+ ", collisionTime=" + collisionTime + ", collisionType="
+ collisionType + ", address=" + address + ", longitude="
+ longitude + ", latitude=" + latitude + ", distance="
+ distance + ", speed=" + speed + ", merchantName="
+ merchantName + ", merchantId=" + merchantId + ", toString()="
+ super.toString() + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Table;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_car_loss_warning")
public class CarLossWarning extends BaseModel{
private static final long serialVersionUID = 6080373780714308760L;
/**
* 设备号
*/
private String sn;
/**
* 车架号
*/
@Column(name = "stand_no")
private String standNo;
/**
* 进入围栏时间
*/
@Column(name = "enter_time")
private Date enterTime;
/**
* 出围栏时间
*/
@Column(name = "out_time")
private Date outTime;
/**
* 触发时间
*/
@Column(name = "trigger_time")
private Date triggerTime;
/**
* 报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*/
@Column(name = "alarm_type")
private Integer alarmType;
/**
* 状态(0:旧数据 1:新数据)
*/
@Column(name = "is_new")
private Integer isNew;
/**
* 流失次数追加
*/
@Column(name = "number_of_shops")
private Integer numberOfShops;
/**
* 当前里程
*/
@Column(name = "current_mileage")
private Float currentMileage;
/**
* 门店ID
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 门店名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 近一年流失次数
*/
@Column(name = "last_year_loss")
private Integer lastYearLoss;
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取车架号
*
* @return stand_no - 车架号
*/
public String getStandNo() {
return standNo;
}
/**
* 设置车架号
*
* @param standNo 车架号
*/
public void setStandNo(String standNo) {
this.standNo = standNo == null ? null : standNo.trim();
}
/**
* 获取进入围栏时间
*
* @return enter_time - 进入围栏时间
*/
public Date getEnterTime() {
return enterTime;
}
/**
* 设置进入围栏时间
*
* @param enterTime 进入围栏时间
*/
public void setEnterTime(Date enterTime) {
this.enterTime = enterTime;
}
/**
* 获取出围栏时间
*
* @return out_time - 出围栏时间
*/
public Date getOutTime() {
return outTime;
}
/**
* 设置出围栏时间
*
* @param outTime 出围栏时间
*/
public void setOutTime(Date outTime) {
this.outTime = outTime;
}
/**
* 获取触发时间
*
* @return trigger_time - 触发时间
*/
public Date getTriggerTime() {
return triggerTime;
}
/**
* 设置触发时间
*
* @param triggerTime 触发时间
*/
public void setTriggerTime(Date triggerTime) {
this.triggerTime = triggerTime;
}
/**
* 获取报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*
* @return alarm_type - 报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*/
public Integer getAlarmType() {
return alarmType;
}
/**
* 设置报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*
* @param alarmType 报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*/
public void setAlarmType(Integer alarmType) {
this.alarmType = alarmType;
}
/**
* 获取状态(0:旧数据 1:新数据)
*
* @return is_new - 状态(0:旧数据 1:新数据)
*/
public Integer getIsNew() {
return isNew;
}
/**
* 设置状态(0:旧数据 1:新数据)
*
* @param isNew 状态(0:旧数据 1:新数据)
*/
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
/**
* 获取流失次数追加
*
* @return number_of_shops - 流失次数追加
*/
public Integer getNumberOfShops() {
return numberOfShops;
}
/**
* 设置流失次数追加
*
* @param numberOfShops 流失次数追加
*/
public void setNumberOfShops(Integer numberOfShops) {
this.numberOfShops = numberOfShops;
}
/**
* 获取当前里程
*
* @return current_mileage - 当前里程
*/
public Float getCurrentMileage() {
return currentMileage;
}
/**
* 设置当前里程
*
* @param currentMileage 当前里程
*/
public void setCurrentMileage(Float currentMileage) {
this.currentMileage = currentMileage;
}
/**
* 获取门店ID
*
* @return merchant_id - 门店ID
*/
public Integer getMerchantId() {
return merchantId;
}
/**
* 设置门店ID
*
* @param merchantId 门店ID
*/
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
/**
* 获取门店名称
*
* @return merchant_name - 门店名称
*/
public String getMerchantName() {
return merchantName;
}
/**
* 设置门店名称
*
* @param merchantName 门店名称
*/
public void setMerchantName(String merchantName) {
this.merchantName = merchantName == null ? null : merchantName.trim();
}
/**
* 获取近一年流失次数
*
* @return last_year_loss - 近一年流失次数
*/
public Integer getLastYearLoss() {
return lastYearLoss;
}
/**
* 设置近一年流失次数
*
* @param lastYearLoss 近一年流失次数
*/
public void setLastYearLoss(Integer lastYearLoss) {
this.lastYearLoss = lastYearLoss;
}
@Override
public String toString() {
return "CarLossWarning [sn=" + sn + ", standNo=" + standNo
+ ", enterTime=" + enterTime + ", outTime=" + outTime
+ ", triggerTime=" + triggerTime + ", alarmType=" + alarmType
+ ", isNew=" + isNew + ", numberOfShops=" + numberOfShops
+ ", currentMileage=" + currentMileage + ", merchantId="
+ merchantId + ", merchantName=" + merchantName
+ ", lastYearLoss=" + lastYearLoss + ", toString()="
+ super.toString() + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Table;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_car_maintain")
public class CarMaintain extends BaseModel{
private static final long serialVersionUID = -6847709157485697711L;
/**
* 设备号
*/
private String sn;
/**
* 车架号
*/
@Column(name = "stand_no")
private String standNo;
/**
* 总里程
*/
@Column(name = "total_mileage")
private Double totalMileage;
/**
* 上次保养时间
*/
@Column(name = "in_time")
private Date inTime;
/**
* 上次保养时里程
*/
@Column(name = "prev_mileage")
private Double prevMileage;
/**
* 首次上报时间
*/
@Column(name = "first_time")
private Date firstTime;
/**
* 保养提醒类型(1:首保 2:定保)
*/
@Column(name = "remind_type")
private Integer remindType;
/**
* 保养提醒规则(1:里程规则提醒 2:时间规则提醒)
*/
@Column(name = "remind_rule")
private Integer remindRule;
/**
* 距离上次保养里程差值(单位:公里)
*/
@Column(name = "diff_mileage")
private Float diffMileage;
/**
* 距离上次保养时间差值(单位:天)
*/
@Column(name = "diff_time")
private Integer diffTime;
/**
* 状态(0:旧数据 1:新数据)
*/
@Column(name = "is_new")
private Integer isNew;
/**
* 保养次数追加
*/
@Column(name = "number_of_shops")
private Integer numberOfShops;
/**
* 到店次数
*/
private Integer numbers;
/**
* 常驻地距离
*/
private Double distance;
/**
* 数据产生时间
*/
private Date svrtime;
/**
* 门店ID
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 门店名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取车架号
*
* @return stand_no - 车架号
*/
public String getStandNo() {
return standNo;
}
/**
* 设置车架号
*
* @param standNo 车架号
*/
public void setStandNo(String standNo) {
this.standNo = standNo == null ? null : standNo.trim();
}
/**
* 获取总里程
*
* @return total_mileage - 总里程
*/
public Double getTotalMileage() {
return totalMileage;
}
/**
* 设置总里程
*
* @param totalMileage 总里程
*/
public void setTotalMileage(Double totalMileage) {
this.totalMileage = totalMileage;
}
/**
* 获取上次保养时间
*
* @return in_time - 上次保养时间
*/
public Date getInTime() {
return inTime;
}
/**
* 设置上次保养时间
*
* @param inTime 上次保养时间
*/
public void setInTime(Date inTime) {
this.inTime = inTime;
}
/**
* 获取上次保养时里程
*
* @return prev_mileage - 上次保养时里程
*/
public Double getPrevMileage() {
return prevMileage;
}
/**
* 设置上次保养时里程
*
* @param prevMileage 上次保养时里程
*/
public void setPrevMileage(Double prevMileage) {
this.prevMileage = prevMileage;
}
/**
* 获取首次上报时间
*
* @return first_time - 首次上报时间
*/
public Date getFirstTime() {
return firstTime;
}
/**
* 设置首次上报时间
*
* @param firstTime 首次上报时间
*/
public void setFirstTime(Date firstTime) {
this.firstTime = firstTime;
}
/**
* 获取保养提醒类型(1:首保 2:定保)
*
* @return remind_type - 保养提醒类型(1:首保 2:定保)
*/
public Integer getRemindType() {
return remindType;
}
/**
* 设置保养提醒类型(1:首保 2:定保)
*
* @param remindType 保养提醒类型(1:首保 2:定保)
*/
public void setRemindType(Integer remindType) {
this.remindType = remindType;
}
/**
* 获取保养提醒规则(1:里程规则提醒 2:时间规则提醒)
*
* @return remind_rule - 保养提醒规则(1:里程规则提醒 2:时间规则提醒)
*/
public Integer getRemindRule() {
return remindRule;
}
/**
* 设置保养提醒规则(1:里程规则提醒 2:时间规则提醒)
*
* @param remindRule 保养提醒规则(1:里程规则提醒 2:时间规则提醒)
*/
public void setRemindRule(Integer remindRule) {
this.remindRule = remindRule;
}
/**
* 获取距离上次保养里程差值(单位:公里)
*
* @return diff_mileage - 距离上次保养里程差值(单位:公里)
*/
public Float getDiffMileage() {
return diffMileage;
}
/**
* 设置距离上次保养里程差值(单位:公里)
*
* @param diffMileage 距离上次保养里程差值(单位:公里)
*/
public void setDiffMileage(Float diffMileage) {
this.diffMileage = diffMileage;
}
/**
* 获取距离上次保养时间差值(单位:天)
*
* @return diff_time - 距离上次保养时间差值(单位:天)
*/
public Integer getDiffTime() {
return diffTime;
}
/**
* 设置距离上次保养时间差值(单位:天)
*
* @param diffTime 距离上次保养时间差值(单位:天)
*/
public void setDiffTime(Integer diffTime) {
this.diffTime = diffTime;
}
/**
* 获取状态(0:旧数据 1:新数据)
*
* @return is_new - 状态(0:旧数据 1:新数据)
*/
public Integer getIsNew() {
return isNew;
}
/**
* 设置状态(0:旧数据 1:新数据)
*
* @param isNew 状态(0:旧数据 1:新数据)
*/
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
/**
* 获取保养次数追加
*
* @return number_of_shops - 保养次数追加
*/
public Integer getNumberOfShops() {
return numberOfShops;
}
/**
* 设置保养次数追加
*
* @param numberOfShops 保养次数追加
*/
public void setNumberOfShops(Integer numberOfShops) {
this.numberOfShops = numberOfShops;
}
/**
* 获取到店次数
*
* @return numbers - 到店次数
*/
public Integer getNumbers() {
return numbers;
}
/**
* 设置到店次数
*
* @param numbers 到店次数
*/
public void setNumbers(Integer numbers) {
this.numbers = numbers;
}
/**
* 获取常驻地距离
*
* @return distance - 常驻地距离
*/
public Double getDistance() {
return distance;
}
/**
* 设置常驻地距离
*
* @param distance 常驻地距离
*/
public void setDistance(Double distance) {
this.distance = distance;
}
/**
* 获取数据产生时间
*
* @return svrtime - 数据产生时间
*/
public Date getSvrtime() {
return svrtime;
}
/**
* 设置数据产生时间
*
* @param svrtime 数据产生时间
*/
public void setSvrtime(Date svrtime) {
this.svrtime = svrtime;
}
/**
* 获取门店ID
*
* @return merchant_id - 门店ID
*/
public Integer getMerchantId() {
return merchantId;
}
/**
* 设置门店ID
*
* @param merchantId 门店ID
*/
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
/**
* 获取门店名称
*
* @return merchant_name - 门店名称
*/
public String getMerchantName() {
return merchantName;
}
/**
* 设置门店名称
*
* @param merchantName 门店名称
*/
public void setMerchantName(String merchantName) {
this.merchantName = merchantName == null ? null : merchantName.trim();
}
@Override
public String toString() {
return "CarMaintain [sn=" + sn + ", standNo=" + standNo
+ ", totalMileage=" + totalMileage + ", inTime=" + inTime
+ ", prevMileage=" + prevMileage + ", firstTime=" + firstTime
+ ", remindType=" + remindType + ", remindRule=" + remindRule
+ ", diffMileage=" + diffMileage + ", diffTime=" + diffTime
+ ", isNew=" + isNew + ", numberOfShops=" + numberOfShops
+ ", numbers=" + numbers + ", distance=" + distance
+ ", svrtime=" + svrtime + ", merchantId=" + merchantId
+ ", merchantName=" + merchantName + ", toString()="
+ super.toString() + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Table;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_car_shop_warning")
public class CarShopWarning extends BaseModel{
private static final long serialVersionUID = -8792725134565035026L;
/**
* 设备号
*/
private String sn;
/**
* 车架号
*/
@Column(name = "stand_no")
private String standNo;
/**
* 门店ID
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 门店名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 进入围栏时间
*/
@Column(name = "enter_time")
private Date enterTime;
/**
* 出围栏时间
*/
@Column(name = "out_time")
private Date outTime;
/**
* 触发时间
*/
@Column(name = "trigger_time")
private Date triggerTime;
/**
* 报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*/
@Column(name = "alarm_type")
private Integer alarmType;
/**
* 状态(0:旧数据 1:新数据)
*/
@Column(name = "is_new")
private Integer isNew;
/**
* 距离上次到店行驶距离
*/
@Column(name = "last_time_distance")
private Float lastTimeDistance;
/**
* 距离上次到店时间间隔
*/
@Column(name = "last_time_day")
private Integer lastTimeDay;
/**
* 绑定设备时间
*/
@Column(name = "binding_time")
private Date bindingTime;
/**
* 绑定时长(单位:天)
*/
@Column(name = "binding_days")
private Integer bindingDays;
/**
* 到店次数追加
*/
@Column(name = "number_of_shops")
private Integer numberOfShops;
/**
* 当前里程
*/
@Column(name = "current_mileage")
private Double currentMileage;
/**
* 进一年回店次数
*/
@Column(name = "last_year_shops")
private Integer lastYearShops;
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取车架号
*
* @return stand_no - 车架号
*/
public String getStandNo() {
return standNo;
}
/**
* 设置车架号
*
* @param standNo 车架号
*/
public void setStandNo(String standNo) {
this.standNo = standNo == null ? null : standNo.trim();
}
/**
* 获取门店ID
*
* @return merchant_id - 门店ID
*/
public Integer getMerchantId() {
return merchantId;
}
/**
* 设置门店ID
*
* @param merchantId 门店ID
*/
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
/**
* 获取门店名称
*
* @return merchant_name - 门店名称
*/
public String getMerchantName() {
return merchantName;
}
/**
* 设置门店名称
*
* @param merchantName 门店名称
*/
public void setMerchantName(String merchantName) {
this.merchantName = merchantName == null ? null : merchantName.trim();
}
/**
* 获取进入围栏时间
*
* @return enter_time - 进入围栏时间
*/
public Date getEnterTime() {
return enterTime;
}
/**
* 设置进入围栏时间
*
* @param enterTime 进入围栏时间
*/
public void setEnterTime(Date enterTime) {
this.enterTime = enterTime;
}
/**
* 获取出围栏时间
*
* @return out_time - 出围栏时间
*/
public Date getOutTime() {
return outTime;
}
/**
* 设置出围栏时间
*
* @param outTime 出围栏时间
*/
public void setOutTime(Date outTime) {
this.outTime = outTime;
}
/**
* 获取触发时间
*
* @return trigger_time - 触发时间
*/
public Date getTriggerTime() {
return triggerTime;
}
/**
* 设置触发时间
*
* @param triggerTime 触发时间
*/
public void setTriggerTime(Date triggerTime) {
this.triggerTime = triggerTime;
}
/**
* 获取报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*
* @return alarm_type - 报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*/
public Integer getAlarmType() {
return alarmType;
}
/**
* 设置报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*
* @param alarmType 报警类型 1.gh流失预警,3.gh到店提醒,4.gl到店提醒 5.其它
*/
public void setAlarmType(Integer alarmType) {
this.alarmType = alarmType;
}
/**
* 获取状态(0:旧数据 1:新数据)
*
* @return is_new - 状态(0:旧数据 1:新数据)
*/
public Integer getIsNew() {
return isNew;
}
/**
* 设置状态(0:旧数据 1:新数据)
*
* @param isNew 状态(0:旧数据 1:新数据)
*/
public void setIsNew(Integer isNew) {
this.isNew = isNew;
}
/**
* 获取距离上次到店行驶距离
*
* @return last_time_distance - 距离上次到店行驶距离
*/
public Float getLastTimeDistance() {
return lastTimeDistance;
}
/**
* 设置距离上次到店行驶距离
*
* @param lastTimeDistance 距离上次到店行驶距离
*/
public void setLastTimeDistance(Float lastTimeDistance) {
this.lastTimeDistance = lastTimeDistance;
}
/**
* 获取距离上次到店时间间隔
*
* @return last_time_day - 距离上次到店时间间隔
*/
public Integer getLastTimeDay() {
return lastTimeDay;
}
/**
* 设置距离上次到店时间间隔
*
* @param lastTimeDay 距离上次到店时间间隔
*/
public void setLastTimeDay(Integer lastTimeDay) {
this.lastTimeDay = lastTimeDay;
}
/**
* 获取绑定设备时间
*
* @return binding_time - 绑定设备时间
*/
public Date getBindingTime() {
return bindingTime;
}
/**
* 设置绑定设备时间
*
* @param bindingTime 绑定设备时间
*/
public void setBindingTime(Date bindingTime) {
this.bindingTime = bindingTime;
}
/**
* 获取绑定时长(单位:天)
*
* @return binding_days - 绑定时长(单位:天)
*/
public Integer getBindingDays() {
return bindingDays;
}
/**
* 设置绑定时长(单位:天)
*
* @param bindingDays 绑定时长(单位:天)
*/
public void setBindingDays(Integer bindingDays) {
this.bindingDays = bindingDays;
}
/**
* 获取到店次数追加
*
* @return number_of_shops - 到店次数追加
*/
public Integer getNumberOfShops() {
return numberOfShops;
}
/**
* 设置到店次数追加
*
* @param numberOfShops 到店次数追加
*/
public void setNumberOfShops(Integer numberOfShops) {
this.numberOfShops = numberOfShops;
}
/**
* 获取当前里程
*
* @return current_mileage - 当前里程
*/
public Double getCurrentMileage() {
return currentMileage;
}
/**
* 设置当前里程
*
* @param currentMileage 当前里程
*/
public void setCurrentMileage(Double currentMileage) {
this.currentMileage = currentMileage;
}
/**
* 获取进一年回店次数
*
* @return last_year_shops - 进一年回店次数
*/
public Integer getLastYearShops() {
return lastYearShops;
}
/**
* 设置进一年回店次数
*
* @param lastYearShops 进一年回店次数
*/
public void setLastYearShops(Integer lastYearShops) {
this.lastYearShops = lastYearShops;
}
@Override
public String toString() {
return "CarShopWarning [sn=" + sn + ", standNo=" + standNo
+ ", merchantId=" + merchantId + ", merchantName="
+ merchantName + ", enterTime=" + enterTime + ", outTime="
+ outTime + ", triggerTime=" + triggerTime + ", alarmType="
+ alarmType + ", isNew=" + isNew + ", lastTimeDistance="
+ lastTimeDistance + ", lastTimeDay=" + lastTimeDay
+ ", bindingTime=" + bindingTime + ", bindingDays="
+ bindingDays + ", numberOfShops=" + numberOfShops
+ ", currentMileage=" + currentMileage + ", lastYearShops="
+ lastYearShops + ", toString()=" + super.toString() + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "delivery_active_detail")
public class DeliveryActiveDetail implements Serializable{
private static final long serialVersionUID = -3976689597382918047L;
/**
* 自增ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 设备类型
*/
@Column(name = "device_type")
private Integer deviceType;
/**
* 设备号
*/
@Column(name = "device_sn")
private String deviceSn;
/**
* 卡号
*/
@Column(name = "sim_no")
private String simNo;
/**
* 商户
*/
@Column(name = "settle_merchant")
private String settleMerchant;
/**
* 发货时间
*/
@Column(name = "device_delivery_time")
private String deviceDeliveryTime;
/**
* 套餐名称
*/
@Column(name = "package_name")
private String packageName;
/**
* 套餐期限
*/
@Column(name = "package_period")
private Integer packagePeriod;
/**
* 获取自增ID
*
* @return id - 自增ID
*/
public Integer getId() {
return id;
}
/**
* 设置自增ID
*
* @param id 自增ID
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取设备类型
*
* @return device_type - 设备类型
*/
public Integer getDeviceType() {
return deviceType;
}
/**
* 设置设备类型
*
* @param deviceType 设备类型
*/
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
/**
* 获取设备号
*
* @return device_sn - 设备号
*/
public String getDeviceSn() {
return deviceSn;
}
/**
* 设置设备号
*
* @param deviceSn 设备号
*/
public void setDeviceSn(String deviceSn) {
this.deviceSn = deviceSn == null ? null : deviceSn.trim();
}
/**
* 获取卡号
*
* @return sim_no - 卡号
*/
public String getSimNo() {
return simNo;
}
/**
* 设置卡号
*
* @param simNo 卡号
*/
public void setSimNo(String simNo) {
this.simNo = simNo == null ? null : simNo.trim();
}
/**
* 获取商户
*
* @return settle_merchant - 商户
*/
public String getSettleMerchant() {
return settleMerchant;
}
/**
* 设置商户
*
* @param settleMerchant 商户
*/
public void setSettleMerchant(String settleMerchant) {
this.settleMerchant = settleMerchant == null ? null : settleMerchant.trim();
}
/**
* 获取发货时间
*
* @return device_delivery_time - 发货时间
*/
public String getDeviceDeliveryTime() {
return deviceDeliveryTime;
}
/**
* 设置发货时间
*
* @param deviceDeliveryTime 发货时间
*/
public void setDeviceDeliveryTime(String deviceDeliveryTime) {
this.deviceDeliveryTime = deviceDeliveryTime == null ? null : deviceDeliveryTime.trim();
}
/**
* 获取套餐名称
*
* @return package_name - 套餐名称
*/
public String getPackageName() {
return packageName;
}
/**
* 设置套餐名称
*
* @param packageName 套餐名称
*/
public void setPackageName(String packageName) {
this.packageName = packageName == null ? null : packageName.trim();
}
/**
* 获取套餐期限
*
* @return package_period - 套餐期限
*/
public Integer getPackagePeriod() {
return packagePeriod;
}
/**
* 设置套餐期限
*
* @param packagePeriod 套餐期限
*/
public void setPackagePeriod(Integer packagePeriod) {
this.packagePeriod = packagePeriod;
}
@Override
public String toString() {
return "DeliveryActiveDetail [id=" + id + ", deviceType=" + deviceType
+ ", deviceSn=" + deviceSn + ", simNo=" + simNo
+ ", settleMerchant=" + settleMerchant
+ ", deviceDeliveryTime=" + deviceDeliveryTime
+ ", packageName=" + packageName + ", packagePeriod="
+ packagePeriod + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.*;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_device_info")
public class DeviceInfo extends BaseModel{
private static final long serialVersionUID = -4179485099634107852L;
/**
* 设备sn
*/
@Column(name = "device_sn")
private String deviceSn;
/**
* sim卡号
*/
@Column(name = "sim_no")
private String simNo;
/**
* 激活时间
*/
@Column(name = "active_time")
private Date activeTime;
/**
* 激活时间
*/
@Column(name = "device_active_time")
private Date deviceActiveTime;
/**
* 序列号
*/
@Column(name = "seq_no")
private String seqNo;
/**
* 期限
*/
private Integer period;
/**
* 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
@Column(name = "device_type")
private Integer deviceType;
/**
* 生效日期
*/
@Column(name = "effect_date")
private Date effectDate;
/**
* 到期时间
*/
@Column(name = "end_date")
private Date endDate;
/**
* 设备状态(1:绑定 2:激活)
*/
@Column(name = "device_status")
private String deviceStatus;
/**
* 商户号
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 商户
*/
private String merchant;
/**
* 结算客户
*/
@Column(name = "settle_merchant")
private String settleMerchant;
/**
* 获取设备sn
*
* @return device_sn - 设备sn
*/
public String getDeviceSn() {
return deviceSn;
}
/**
* 设置设备sn
*
* @param deviceSn 设备sn
*/
public void setDeviceSn(String deviceSn) {
this.deviceSn = deviceSn == null ? null : deviceSn.trim();
}
/**
* 获取sim卡号
*
* @return sim_no - sim卡号
*/
public String getSimNo() {
return simNo;
}
/**
* 设置sim卡号
*
* @param simNo sim卡号
*/
public void setSimNo(String simNo) {
this.simNo = simNo == null ? null : simNo.trim();
}
/**
* 获取激活时间
*
* @return active_time - 激活时间
*/
public Date getActiveTime() {
return activeTime;
}
/**
* 设置激活时间
*
* @param activeTime 激活时间
*/
public void setActiveTime(Date activeTime) {
this.activeTime = activeTime;
}
/**
* 获取序列号
*
* @return seq_no - 序列号
*/
public String getSeqNo() {
return seqNo;
}
/**
* 设置序列号
*
* @param seqNo 序列号
*/
public void setSeqNo(String seqNo) {
this.seqNo = seqNo == null ? null : seqNo.trim();
}
/**
* 获取期限
*
* @return period - 期限
*/
public Integer getPeriod() {
return period;
}
/**
* 设置期限
*
* @param period 期限
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* 获取设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*
* @return device_type - 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
public Integer getDeviceType() {
return deviceType;
}
/**
* 设置设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*
* @param deviceType 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
/**
* 获取生效日期
*
* @return effect_date - 生效日期
*/
public Date getEffectDate() {
return effectDate;
}
/**
* 设置生效日期
*
* @param effectDate 生效日期
*/
public void setEffectDate(Date effectDate) {
this.effectDate = effectDate;
}
/**
* 获取到期时间
*
* @return end_date - 到期时间
*/
public Date getEndDate() {
return endDate;
}
/**
* 设置到期时间
*
* @param endDate 到期时间
*/
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
/**
* 获取设备状态(1:绑定 2:激活)
*
* @return device_status - 设备状态(1:绑定 2:激活)
*/
public String getDeviceStatus() {
return deviceStatus;
}
/**
* 设置设备状态(1:绑定 2:激活)
*
* @param deviceStatus 设备状态(1:绑定 2:激活)
*/
public void setDeviceStatus(String deviceStatus) {
this.deviceStatus = deviceStatus == null ? null : deviceStatus.trim();
}
/**
* 获取商户
*
* @return merchant - 商户
*/
public String getMerchant() {
return merchant;
}
/**
* 设置商户
*
* @param merchant 商户
*/
public void setMerchant(String merchant) {
this.merchant = merchant == null ? null : merchant.trim();
}
public Integer getMerchantId() {
return merchantId;
}
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
public String getSettleMerchant() {
return settleMerchant;
}
public void setSettleMerchant(String settleMerchant) {
this.settleMerchant = settleMerchant;
}
public Date getDeviceActiveTime() {
return deviceActiveTime;
}
public void setDeviceActiveTime(Date deviceActiveTime) {
this.deviceActiveTime = deviceActiveTime;
}
@Override
public String toString() {
return "DeviceInfo [deviceSn=" + deviceSn + ", simNo=" + simNo
+ ", activeTime=" + activeTime + ", deviceActiveTime="
+ deviceActiveTime + ", seqNo=" + seqNo + ", period=" + period
+ ", deviceType=" + deviceType + ", effectDate=" + effectDate
+ ", endDate=" + endDate + ", deviceStatus=" + deviceStatus
+ ", merchantId=" + merchantId + ", merchant=" + merchant
+ ", settleMerchant=" + settleMerchant + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.*;
@Table(name = "device_mapping")
public class DeviceMapping {
/**
* 自增ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 类型
*/
private Integer type;
/**
* hbase设备类型
*/
@Column(name = "devType")
private Integer devtype;
/**
* 审计设备号
*/
@Column(name = "fakeSn")
private String fakesn;
/**
* 真实设备号
*/
@Column(name = "realSn")
private String realsn;
/**
* 激活时间
*/
@Column(name = "activeTime")
private Date activetime;
/**
* 商户ID
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 商户名称
*/
@Column(name = "merchant_name")
private String merchantName;
/**
* 获取自增ID
*
* @return id - 自增ID
*/
public Integer getId() {
return id;
}
/**
* 设置自增ID
*
* @param id 自增ID
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取类型
*
* @return type - 类型
*/
public Integer getType() {
return type;
}
/**
* 设置类型
*
* @param type 类型
*/
public void setType(Integer type) {
this.type = type;
}
/**
* 获取hbase设备类型
*
* @return devType - hbase设备类型
*/
public Integer getDevtype() {
return devtype;
}
/**
* 设置hbase设备类型
*
* @param devtype hbase设备类型
*/
public void setDevtype(Integer devtype) {
this.devtype = devtype;
}
/**
* 获取审计设备号
*
* @return fakeSn - 审计设备号
*/
public String getFakesn() {
return fakesn;
}
/**
* 设置审计设备号
*
* @param fakesn 审计设备号
*/
public void setFakesn(String fakesn) {
this.fakesn = fakesn == null ? null : fakesn.trim();
}
/**
* 获取真实设备号
*
* @return realSn - 真实设备号
*/
public String getRealsn() {
return realsn;
}
/**
* 设置真实设备号
*
* @param realsn 真实设备号
*/
public void setRealsn(String realsn) {
this.realsn = realsn == null ? null : realsn.trim();
}
/**
* 获取激活时间
*
* @return activeTime - 激活时间
*/
public Date getActivetime() {
return activetime;
}
/**
* 设置激活时间
*
* @param activetime 激活时间
*/
public void setActivetime(Date activetime) {
this.activetime = activetime;
}
/**
* 获取商户ID
*
* @return merchant_id - 商户ID
*/
public Integer getMerchantId() {
return merchantId;
}
/**
* 设置商户ID
*
* @param merchantId 商户ID
*/
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
/**
* 获取商户名称
*
* @return merchant_name - 商户名称
*/
public String getMerchantName() {
return merchantName;
}
/**
* 设置商户名称
*
* @param merchantName 商户名称
*/
public void setMerchantName(String merchantName) {
this.merchantName = merchantName == null ? null : merchantName.trim();
}
@Override
public String toString() {
return "DeviceMapping [id=" + id + ", type=" + type + ", devtype="
+ devtype + ", fakesn=" + fakesn + ", realsn=" + realsn
+ ", activetime=" + activetime + ", merchantId=" + merchantId
+ ", merchantName=" + merchantName + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Table(name = "external_device_info")
public class ExternalDeviceInfo implements Serializable{
private static final long serialVersionUID = 770510954207860485L;
/**
* 主键
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
/**
* 设备sn
*/
@Column(name = "device_sn")
private String deviceSn;
/**
* 激活时间
*/
@Column(name = "active_time")
private Date activeTime;
/**
* 设备激活时间
*/
@Column(name = "device_active_time")
private Date deviceActiveTime;
/**
* 序列号
*/
@Column(name = "seq_no")
private String seqNo;
/**
* 期限
*/
private Integer period;
/**
* 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
@Column(name = "device_type")
private Integer deviceType;
/**
* 生效日期
*/
@Column(name = "effect_date")
private Date effectDate;
/**
* 到期时间
*/
@Column(name = "end_date")
private Date endDate;
/**
* 设备状态(1:绑定 2:激活)
*/
@Column(name = "device_status")
private String deviceStatus;
/**
* 商户号
*/
@Column(name = "merchant_id")
private Integer merchantId;
/**
* 商户
*/
private String merchant;
/**
* 结算客户
*/
@Column(name = "settle_merchant")
private String settleMerchant;
/**
* 操作人
*/
@Column(name = "created_by")
private String createdBy;
/**
* 创建时间
*/
@Column(name = "created_date")
private Date createdDate;
/**
* 更新人
*/
@Column(name = "updated_by")
private String updatedBy;
/**
* 修改时间
*/
@Column(name = "updated_date")
private Date updatedDate;
/**
* 获取主键
*
* @return id - 主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*
* @param id 主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取设备sn
*
* @return device_sn - 设备sn
*/
public String getDeviceSn() {
return deviceSn;
}
/**
* 设置设备sn
*
* @param deviceSn 设备sn
*/
public void setDeviceSn(String deviceSn) {
this.deviceSn = deviceSn == null ? null : deviceSn.trim();
}
/**
* 获取激活时间
*
* @return active_time - 激活时间
*/
public Date getActiveTime() {
return activeTime;
}
/**
* 设置激活时间
*
* @param activeTime 激活时间
*/
public void setActiveTime(Date activeTime) {
this.activeTime = activeTime;
}
/**
* 获取设备激活时间
*
* @return device_active_time - 设备激活时间
*/
public Date getDeviceActiveTime() {
return deviceActiveTime;
}
/**
* 设置设备激活时间
*
* @param deviceActiveTime 设备激活时间
*/
public void setDeviceActiveTime(Date deviceActiveTime) {
this.deviceActiveTime = deviceActiveTime;
}
/**
* 获取序列号
*
* @return seq_no - 序列号
*/
public String getSeqNo() {
return seqNo;
}
/**
* 设置序列号
*
* @param seqNo 序列号
*/
public void setSeqNo(String seqNo) {
this.seqNo = seqNo == null ? null : seqNo.trim();
}
/**
* 获取期限
*
* @return period - 期限
*/
public Integer getPeriod() {
return period;
}
/**
* 设置期限
*
* @param period 期限
*/
public void setPeriod(Integer period) {
this.period = period;
}
/**
* 获取设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*
* @return device_type - 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
public Integer getDeviceType() {
return deviceType;
}
/**
* 设置设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*
* @param deviceType 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
/**
* 获取生效日期
*
* @return effect_date - 生效日期
*/
public Date getEffectDate() {
return effectDate;
}
/**
* 设置生效日期
*
* @param effectDate 生效日期
*/
public void setEffectDate(Date effectDate) {
this.effectDate = effectDate;
}
/**
* 获取到期时间
*
* @return end_date - 到期时间
*/
public Date getEndDate() {
return endDate;
}
/**
* 设置到期时间
*
* @param endDate 到期时间
*/
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
/**
* 获取设备状态(1:绑定 2:激活)
*
* @return device_status - 设备状态(1:绑定 2:激活)
*/
public String getDeviceStatus() {
return deviceStatus;
}
/**
* 设置设备状态(1:绑定 2:激活)
*
* @param deviceStatus 设备状态(1:绑定 2:激活)
*/
public void setDeviceStatus(String deviceStatus) {
this.deviceStatus = deviceStatus == null ? null : deviceStatus.trim();
}
/**
* 获取商户号
*
* @return merchant_id - 商户号
*/
public Integer getMerchantId() {
return merchantId;
}
/**
* 设置商户号
*
* @param merchantId 商户号
*/
public void setMerchantId(Integer merchantId) {
this.merchantId = merchantId;
}
/**
* 获取商户
*
* @return merchant - 商户
*/
public String getMerchant() {
return merchant;
}
/**
* 设置商户
*
* @param merchant 商户
*/
public void setMerchant(String merchant) {
this.merchant = merchant == null ? null : merchant.trim();
}
/**
* 获取结算客户
*
* @return settle_merchant - 结算客户
*/
public String getSettleMerchant() {
return settleMerchant;
}
/**
* 设置结算客户
*
* @param settleMerchant 结算客户
*/
public void setSettleMerchant(String settleMerchant) {
this.settleMerchant = settleMerchant == null ? null : settleMerchant.trim();
}
/**
* 获取操作人
*
* @return created_by - 操作人
*/
public String getCreatedBy() {
return createdBy;
}
/**
* 设置操作人
*
* @param createdBy 操作人
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy == null ? null : createdBy.trim();
}
/**
* 获取创建时间
*
* @return created_date - 创建时间
*/
public Date getCreatedDate() {
return createdDate;
}
/**
* 设置创建时间
*
* @param createdDate 创建时间
*/
public void setCreatedDate(Date createdDate) {
this.createdDate = createdDate;
}
/**
* 获取更新人
*
* @return updated_by - 更新人
*/
public String getUpdatedBy() {
return updatedBy;
}
/**
* 设置更新人
*
* @param updatedBy 更新人
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy == null ? null : updatedBy.trim();
}
/**
* 获取修改时间
*
* @return updated_date - 修改时间
*/
public Date getUpdatedDate() {
return updatedDate;
}
/**
* 设置修改时间
*
* @param updatedDate 修改时间
*/
public void setUpdatedDate(Date updatedDate) {
this.updatedDate = updatedDate;
}
@Override
public String toString() {
return "ExternalDeviceInfo [id=" + id + ", deviceSn=" + deviceSn
+ ", activeTime=" + activeTime + ", deviceActiveTime="
+ deviceActiveTime + ", seqNo=" + seqNo + ", period=" + period
+ ", deviceType=" + deviceType + ", effectDate=" + effectDate
+ ", endDate=" + endDate + ", deviceStatus=" + deviceStatus
+ ", merchantId=" + merchantId + ", merchant=" + merchant
+ ", settleMerchant=" + settleMerchant + ", createdBy="
+ createdBy + ", createdDate=" + createdDate + ", updatedBy="
+ updatedBy + ", updatedDate=" + updatedDate + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
@Table(name = "fmrs_device_info")
public class FrmsDeviceInfo implements Serializable {
private static final long serialVersionUID = -4179485099634107852L;
/**
* 主键
*/
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 设备sn
*/
@Column(name = "sn")
private String sn;
/**
* imsi
*/
@Column(name = "imsi")
private String imsi;
/**
* sim卡号
*/
@Column(name = "sim_no")
private String simNo;
/**
* iccid
*/
@Column(name = "iccid")
private String iccid;
/**
* 设备类型(-1:未知设备;1:OBD;2:云导航;3:电子狗;5:TBOX(2G);6:记录仪;7:BBOX;8:GPS;9:车载WiFi;12134:后视镜)
*/
@Column(name = "device_type")
private Integer deviceType;
/**
* 设备类型 - 名称
*/
@Column(name = "device_name")
private String deviceName;
/**
* 状态,1:激活 2:绑定
*/
@Column(name = "status")
private Integer status;
/**
* 激活时间
*/
@Column(name = "active_time")
private Date activeTime;
/**
* 服务期限,月
*/
@Column(name = "period")
private Integer period;
/**
* 服务开始时间
*/
@Column(name = "pk_begin_time")
private Date pkBeginTime;
/**
* 服务结束时间
*/
@Column(name = "pk_end_time")
private Date pkEndTime;
/**
* 创建时间
*/
@Column(name = "create_time")
private Date createTime;
/**
* 更新时间
*/
@Column(name = "update_time")
private Date updateTime;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getSn() {
return sn;
}
public void setSn(String sn) {
this.sn = sn;
}
public String getImsi() {
return imsi;
}
public void setImsi(String imsi) {
this.imsi = imsi;
}
public String getSimNo() {
return simNo;
}
public void setSimNo(String simNo) {
this.simNo = simNo;
}
public String getIccid() {
return iccid;
}
public void setIccid(String iccid) {
this.iccid = iccid;
}
public Integer getDeviceType() {
return deviceType;
}
public void setDeviceType(Integer deviceType) {
this.deviceType = deviceType;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getActiveTime() {
return activeTime;
}
public void setActiveTime(Date activeTime) {
this.activeTime = activeTime;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Date getPkBeginTime() {
return pkBeginTime;
}
public void setPkBeginTime(Date pkBeginTime) {
this.pkBeginTime = pkBeginTime;
}
public Date getPkEndTime() {
return pkEndTime;
}
public void setPkEndTime(Date pkEndTime) {
this.pkEndTime = pkEndTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
@Override
public String toString() {
return "FrmsDeviceInfo{" +
"id=" + id +
", sn='" + sn + '\'' +
", imsi='" + imsi + '\'' +
", simNo='" + simNo + '\'' +
", iccid='" + iccid + '\'' +
", deviceType=" + deviceType +
", deviceName='" + deviceName + '\'' +
", status=" + status +
", activeTime=" + activeTime +
", period=" + period +
", pkBeginTime=" + pkBeginTime +
", pkEndTime=" + pkEndTime +
", createTime=" + createTime +
", updateTime=" + updateTime +
"} " + super.toString();
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.*;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_insure_device")
public class InsureDeviceReadOnly extends BaseModel{
private static final long serialVersionUID = -7406057140148865011L;
/**
* imsi
*/
private String imsi;
/**
* 设备号
*/
private String sn;
/**
* 设备型号(GT7001等)
*/
@Column(name = "device_name")
private String deviceName;
/**
* 见字典项,产品类型(有源无源)
*/
@Column(name = "product_type")
private String productType;
/**
* 设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*/
@Column(name = "device_type")
private String deviceType;
/**
* 激活日期
*/
@Column(name = "active_date")
private Date activeDate;
/**
* 车辆id(dj_insure_vehicle.id)
*/
@Column(name = "vehicle_id")
private Long vehicleId;
/**
* iccid
*/
private String iccid;
@Column(name = "sim_phone")
private String simPhone;
/**
* 验证码
*/
@Column(name = "check_code")
private String checkCode;
/**
* 0-未激活,1-已激活
*/
@Column(name = "is_active")
private Integer isActive;
@Column(name = "model_id")
private Integer modelId;
/**
* 设备验证状态:0-验证成功;1-正在查询;2-验证失败
*/
@Column(name = "validate_status")
private Integer validateStatus;
/**
* 主设备 0, 从设备 1
*/
@Column(name = "is_sub")
private Integer isSub;
/**
* 合作厂商,如先锋-XF
*/
private String partner;
/**
* 设备验证次数
*/
@Column(name = "validate_nums")
private Integer validateNums;
/**
* 获取imsi
*
* @return imsi - imsi
*/
public String getImsi() {
return imsi;
}
/**
* 设置imsi
*
* @param imsi imsi
*/
public void setImsi(String imsi) {
this.imsi = imsi == null ? null : imsi.trim();
}
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取设备型号(GT7001等)
*
* @return device_name - 设备型号(GT7001等)
*/
public String getDeviceName() {
return deviceName;
}
/**
* 设置设备型号(GT7001等)
*
* @param deviceName 设备型号(GT7001等)
*/
public void setDeviceName(String deviceName) {
this.deviceName = deviceName == null ? null : deviceName.trim();
}
/**
* 获取见字典项,产品类型(有源无源)
*
* @return product_type - 见字典项,产品类型(有源无源)
*/
public String getProductType() {
return productType;
}
/**
* 设置见字典项,产品类型(有源无源)
*
* @param productType 见字典项,产品类型(有源无源)
*/
public void setProductType(String productType) {
this.productType = productType == null ? null : productType.trim();
}
/**
* 获取设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*
* @return device_type - 设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*/
public String getDeviceType() {
return deviceType;
}
/**
* 设置设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*
* @param deviceType 设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*/
public void setDeviceType(String deviceType) {
this.deviceType = deviceType == null ? null : deviceType.trim();
}
/**
* 获取激活日期
*
* @return active_date - 激活日期
*/
public Date getActiveDate() {
return activeDate;
}
/**
* 设置激活日期
*
* @param activeDate 激活日期
*/
public void setActiveDate(Date activeDate) {
this.activeDate = activeDate;
}
/**
* 获取车辆id(dj_insure_vehicle.id)
*
* @return vehicle_id - 车辆id(dj_insure_vehicle.id)
*/
public Long getVehicleId() {
return vehicleId;
}
/**
* 设置车辆id(dj_insure_vehicle.id)
*
* @param vehicleId 车辆id(dj_insure_vehicle.id)
*/
public void setVehicleId(Long vehicleId) {
this.vehicleId = vehicleId;
}
/**
* 获取iccid
*
* @return iccid - iccid
*/
public String getIccid() {
return iccid;
}
/**
* 设置iccid
*
* @param iccid iccid
*/
public void setIccid(String iccid) {
this.iccid = iccid == null ? null : iccid.trim();
}
/**
* @return sim_phone
*/
public String getSimPhone() {
return simPhone;
}
/**
* @param simPhone
*/
public void setSimPhone(String simPhone) {
this.simPhone = simPhone == null ? null : simPhone.trim();
}
/**
* 获取验证码
*
* @return check_code - 验证码
*/
public String getCheckCode() {
return checkCode;
}
/**
* 设置验证码
*
* @param checkCode 验证码
*/
public void setCheckCode(String checkCode) {
this.checkCode = checkCode == null ? null : checkCode.trim();
}
/**
* 获取0-未激活,1-已激活
*
* @return is_active - 0-未激活,1-已激活
*/
public Integer getIsActive() {
return isActive;
}
/**
* 设置0-未激活,1-已激活
*
* @param isActive 0-未激活,1-已激活
*/
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
/**
* @return model_id
*/
public Integer getModelId() {
return modelId;
}
/**
* @param modelId
*/
public void setModelId(Integer modelId) {
this.modelId = modelId;
}
/**
* 获取设备验证状态:0-验证成功;1-正在查询;2-验证失败
*
* @return validate_status - 设备验证状态:0-验证成功;1-正在查询;2-验证失败
*/
public Integer getValidateStatus() {
return validateStatus;
}
/**
* 设置设备验证状态:0-验证成功;1-正在查询;2-验证失败
*
* @param validateStatus 设备验证状态:0-验证成功;1-正在查询;2-验证失败
*/
public void setValidateStatus(Integer validateStatus) {
this.validateStatus = validateStatus;
}
/**
* 获取主设备 0, 从设备 1
*
* @return is_sub - 主设备 0, 从设备 1
*/
public Integer getIsSub() {
return isSub;
}
/**
* 设置主设备 0, 从设备 1
*
* @param isSub 主设备 0, 从设备 1
*/
public void setIsSub(Integer isSub) {
this.isSub = isSub;
}
/**
* 获取合作厂商,如先锋-XF
*
* @return partner - 合作厂商,如先锋-XF
*/
public String getPartner() {
return partner;
}
/**
* 设置合作厂商,如先锋-XF
*
* @param partner 合作厂商,如先锋-XF
*/
public void setPartner(String partner) {
this.partner = partner == null ? null : partner.trim();
}
/**
* 获取设备验证次数
*
* @return validate_nums - 设备验证次数
*/
public Integer getValidateNums() {
return validateNums;
}
/**
* 设置设备验证次数
*
* @param validateNums 设备验证次数
*/
public void setValidateNums(Integer validateNums) {
this.validateNums = validateNums;
}
@Override
public String toString() {
return "InsureDeviceReadOnly [imsi=" + imsi + ", sn=" + sn
+ ", deviceName=" + deviceName + ", productType=" + productType
+ ", deviceType=" + deviceType + ", activeDate=" + activeDate
+ ", vehicleId=" + vehicleId + ", iccid=" + iccid
+ ", simPhone=" + simPhone + ", checkCode=" + checkCode
+ ", isActive=" + isActive + ", modelId=" + modelId
+ ", validateStatus=" + validateStatus + ", isSub=" + isSub
+ ", partner=" + partner + ", validateNums=" + validateNums
+ ", toString()=" + super.toString() + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.model;
import java.util.Date;
import javax.persistence.*;
import cn.com.glsx.framework.core.beans.BaseModel;
@Table(name = "dj_insure_device")
public class InsureDeviceReadWrite extends BaseModel{
private static final long serialVersionUID = -8838066094528929292L;
/**
* imsi
*/
private String imsi;
/**
* 设备号
*/
private String sn;
/**
* 设备型号(GT7001等)
*/
@Column(name = "device_name")
private String deviceName;
/**
* 见字典项,产品类型(有源无源)
*/
@Column(name = "product_type")
private String productType;
/**
* 设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*/
@Column(name = "device_type")
private String deviceType;
/**
* 激活日期
*/
@Column(name = "active_date")
private Date activeDate;
/**
* 车辆id(dj_insure_vehicle.id)
*/
@Column(name = "vehicle_id")
private Long vehicleId;
/**
* iccid
*/
private String iccid;
@Column(name = "sim_phone")
private String simPhone;
/**
* 验证码
*/
@Column(name = "check_code")
private String checkCode;
/**
* 0-未激活,1-已激活
*/
@Column(name = "is_active")
private Integer isActive;
@Column(name = "model_id")
private Integer modelId;
/**
* 设备验证状态:0-验证成功;1-正在查询;2-验证失败
*/
@Column(name = "validate_status")
private Integer validateStatus;
/**
* 主设备 0, 从设备 1
*/
@Column(name = "is_sub")
private Integer isSub;
/**
* 合作厂商,如先锋-XF
*/
private String partner;
/**
* 设备验证次数
*/
@Column(name = "validate_nums")
private Integer validateNums;
/**
* 获取imsi
*
* @return imsi - imsi
*/
public String getImsi() {
return imsi;
}
/**
* 设置imsi
*
* @param imsi imsi
*/
public void setImsi(String imsi) {
this.imsi = imsi == null ? null : imsi.trim();
}
/**
* 获取设备号
*
* @return sn - 设备号
*/
public String getSn() {
return sn;
}
/**
* 设置设备号
*
* @param sn 设备号
*/
public void setSn(String sn) {
this.sn = sn == null ? null : sn.trim();
}
/**
* 获取设备型号(GT7001等)
*
* @return device_name - 设备型号(GT7001等)
*/
public String getDeviceName() {
return deviceName;
}
/**
* 设置设备型号(GT7001等)
*
* @param deviceName 设备型号(GT7001等)
*/
public void setDeviceName(String deviceName) {
this.deviceName = deviceName == null ? null : deviceName.trim();
}
/**
* 获取见字典项,产品类型(有源无源)
*
* @return product_type - 见字典项,产品类型(有源无源)
*/
public String getProductType() {
return productType;
}
/**
* 设置见字典项,产品类型(有源无源)
*
* @param productType 见字典项,产品类型(有源无源)
*/
public void setProductType(String productType) {
this.productType = productType == null ? null : productType.trim();
}
/**
* 获取设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*
* @return device_type - 设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*/
public String getDeviceType() {
return deviceType;
}
/**
* 设置设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*
* @param deviceType 设备类型(1:'OBD',2:'云导航',3:'电子狗',5:'TBOX(2G)',6:'记录仪',7:'BBOX',8:'GPS',9:'车载wifi',12134:'后视镜')
*/
public void setDeviceType(String deviceType) {
this.deviceType = deviceType == null ? null : deviceType.trim();
}
/**
* 获取激活日期
*
* @return active_date - 激活日期
*/
public Date getActiveDate() {
return activeDate;
}
/**
* 设置激活日期
*
* @param activeDate 激活日期
*/
public void setActiveDate(Date activeDate) {
this.activeDate = activeDate;
}
/**
* 获取车辆id(dj_insure_vehicle.id)
*
* @return vehicle_id - 车辆id(dj_insure_vehicle.id)
*/
public Long getVehicleId() {
return vehicleId;
}
/**
* 设置车辆id(dj_insure_vehicle.id)
*
* @param vehicleId 车辆id(dj_insure_vehicle.id)
*/
public void setVehicleId(Long vehicleId) {
this.vehicleId = vehicleId;
}
/**
* 获取iccid
*
* @return iccid - iccid
*/
public String getIccid() {
return iccid;
}
/**
* 设置iccid
*
* @param iccid iccid
*/
public void setIccid(String iccid) {
this.iccid = iccid == null ? null : iccid.trim();
}
/**
* @return sim_phone
*/
public String getSimPhone() {
return simPhone;
}
/**
* @param simPhone
*/
public void setSimPhone(String simPhone) {
this.simPhone = simPhone == null ? null : simPhone.trim();
}
/**
* 获取验证码
*
* @return check_code - 验证码
*/
public String getCheckCode() {
return checkCode;
}
/**
* 设置验证码
*
* @param checkCode 验证码
*/
public void setCheckCode(String checkCode) {
this.checkCode = checkCode == null ? null : checkCode.trim();
}
/**
* 获取0-未激活,1-已激活
*
* @return is_active - 0-未激活,1-已激活
*/
public Integer getIsActive() {
return isActive;
}
/**
* 设置0-未激活,1-已激活
*
* @param isActive 0-未激活,1-已激活
*/
public void setIsActive(Integer isActive) {
this.isActive = isActive;
}
/**
* @return model_id
*/
public Integer getModelId() {
return modelId;
}
/**
* @param modelId
*/
public void setModelId(Integer modelId) {
this.modelId = modelId;
}
/**
* 获取设备验证状态:0-验证成功;1-正在查询;2-验证失败
*
* @return validate_status - 设备验证状态:0-验证成功;1-正在查询;2-验证失败
*/
public Integer getValidateStatus() {
return validateStatus;
}
/**
* 设置设备验证状态:0-验证成功;1-正在查询;2-验证失败
*
* @param validateStatus 设备验证状态:0-验证成功;1-正在查询;2-验证失败
*/
public void setValidateStatus(Integer validateStatus) {
this.validateStatus = validateStatus;
}
/**
* 获取主设备 0, 从设备 1
*
* @return is_sub - 主设备 0, 从设备 1
*/
public Integer getIsSub() {
return isSub;
}
/**
* 设置主设备 0, 从设备 1
*
* @param isSub 主设备 0, 从设备 1
*/
public void setIsSub(Integer isSub) {
this.isSub = isSub;
}
/**
* 获取合作厂商,如先锋-XF
*
* @return partner - 合作厂商,如先锋-XF
*/
public String getPartner() {
return partner;
}
/**
* 设置合作厂商,如先锋-XF
*
* @param partner 合作厂商,如先锋-XF
*/
public void setPartner(String partner) {
this.partner = partner == null ? null : partner.trim();
}
/**
* 获取设备验证次数
*
* @return validate_nums - 设备验证次数
*/
public Integer getValidateNums() {
return validateNums;
}
/**
* 设置设备验证次数
*
* @param validateNums 设备验证次数
*/
public void setValidateNums(Integer validateNums) {
this.validateNums = validateNums;
}
@Override
public String toString() {
return "InsureDeviceReadWrite [imsi=" + imsi + ", sn=" + sn
+ ", deviceName=" + deviceName + ", productType=" + productType
+ ", deviceType=" + deviceType + ", activeDate=" + activeDate
+ ", vehicleId=" + vehicleId + ", iccid=" + iccid
+ ", simPhone=" + simPhone + ", checkCode=" + checkCode
+ ", isActive=" + isActive + ", modelId=" + modelId
+ ", validateStatus=" + validateStatus + ", isSub=" + isSub
+ ", partner=" + partner + ", validateNums=" + validateNums
+ ", toString()=" + super.toString() + "]";
}
}
\ No newline at end of file
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.CarCollision;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: CarCollisionRemote.java
* @Description:
* @author Alvin
* @date 2018年7月21日 下午2:59:22
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public interface CarCollisionRemote {
RpcResponse<CarCollision> insert(CarCollision carCollision);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.CarLossWarning;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: CarLossWarningRemote.java
* @Description:
* @author Alvin
* @date 2020年11月21日 下午6:10:45
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public interface CarLossWarningRemote {
RpcResponse<CarLossWarning> insert(CarLossWarning carLossWarning);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.CarMaintain;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: CarMaintainRemote.java
* @Description:
* @author Alvin
* @date 2018年7月21日 下午2:59:31
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public interface CarMaintainRemote {
RpcResponse<CarMaintain> insert(CarMaintain carMaintain);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.CarShopWarning;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: CarShopWarningRemote.java
* @Description:
* @author Alvin
* @date 2020年11月21日 下午6:11:19
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public interface CarShopWarningRemote {
RpcResponse<CarShopWarning> insert(CarShopWarning carShopWarning);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.DeliveryActiveDetail;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: DeliveryActiveDetailRemote.java
* @Description:
* @author Alvin
* @date 2021年1月12日 下午3:09:59
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public interface DeliveryActiveDetailRemote {
RpcResponse<DeliveryActiveDetail> getBySn(String sn);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.DeviceInfo;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: DeviceInfoRemote.java
* @Description:
* @author Alvin
* @date 2018年7月21日 下午2:59:13
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public interface DeviceInfoRemote {
RpcResponse<DeviceInfo> insert(DeviceInfo deviceInfo);
RpcResponse<Boolean> update(DeviceInfo deviceInfo);
RpcResponse<DeviceInfo> getBySn(String sn);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.ExternalDeviceInfo;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: ExternalDeviceInfoRemote.java
* @Description:
* @author Alvin
* @date 2021年1月12日 下午1:55:44
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public interface ExternalDeviceInfoRemote {
RpcResponse<ExternalDeviceInfo> add(ExternalDeviceInfo externalDeviceInfo);
RpcResponse<ExternalDeviceInfo> getBySn(String sn);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.DeviceInfo;
import cn.com.glsx.dj.oss.model.FrmsDeviceInfo;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: DeviceInfoRemote.java
* @Description:
* @author Alvin
* @date 2018年7月21日 下午2:59:13
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public interface FrmsDeviceInfoRemote {
/**
* 插入
* @param deviceInfo
* @return
*/
RpcResponse<FrmsDeviceInfo> insert(FrmsDeviceInfo deviceInfo);
/**
* 更新
* @param deviceInfo
* @return
*/
RpcResponse<Boolean> update(FrmsDeviceInfo deviceInfo);
/**
* 插入更新操作
* @param deviceInfo
* @return
*/
RpcResponse<FrmsDeviceInfo> insertAndUpdate(FrmsDeviceInfo deviceInfo);
/**
* 删除数据
* @param sn
* @return
*/
RpcResponse<Boolean> delete(String sn);
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.MerchantInfo;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
/**
* @Title: MerchantInfoRemote.java
* @Description:
* @author Alvin
* @date 2021年1月12日 下午4:48:58
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public interface MerchantInfoRemote {
RpcResponse<MerchantInfo> getByMerchantId(Integer merchantId);
}
# framework-archetype-rpc-api
RPC-API项目骨架
一、项目结构说明:
└─src
├─main
├─java
├─cn.com.glsx.dj.oss.dto 数据传输模型层
├─cn.com.glsx.dj.oss.enums 枚举定义
├─cn.com.glsx.dj.oss.model 数据模型层
└─cn.com.glsx.dj.oss.remote RPC暴露服务层
└─resources 资源文件目录
└─rpc
└─dubbo.xml dubbo接口配置
└─pom.xml pom文件
二、使用说明:
1、API改动后,请及时deploy到Maven仓库
三、注意事项:
1、rpc-api-deploy-maven-plugin api上报插件需配置当前api的jar包的引用。
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>framework-rpc</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-oss</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>rpc-dj-oss</name>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>cn.com.glsx.dj</groupId>
<artifactId>rpc-dj-oss-api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package cn.com.glsx.dj.oss;
import org.oreframework.boot.main.AbsOreBootStarter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
/**
* @Title: Main.java
* @Description:
* @author alvin
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
*/
@SpringBootApplication
@ServletComponentScan
public class Main extends AbsOreBootStarter {
@Override
public void run(String[] args)
{
SpringApplication.run(Main.class, args);
}
public static void main(String[] args)
{
Main main = new Main();
main.run(args);
}
}
package cn.com.glsx.dj.oss.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
/**
* @Title BeanConfig
* @Description
* @author zhangyan
* @date 2019/05/30
*
*/
@Configuration
public class BeanConfig {
@Primary
@Bean
public ThreadPoolTaskExecutor taskExecutor(){
ThreadPoolTaskExecutor taskExecutor = new ThreadPoolTaskExecutor();
taskExecutor.setCorePoolSize(100);
taskExecutor.setMaxPoolSize(200);
taskExecutor.setQueueCapacity(10002);
taskExecutor.setKeepAliveSeconds(300);
return taskExecutor;
}
}
package cn.com.glsx.dj.oss.config;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @Title: DubboConfig.java
* @Description: Dubbo服务注册配置
* @author alvin
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Configuration
public class DubboConfig {
@Autowired
private ReferenceBuilderFactory factory;
/**
* 注册远程服务(示例)
* RpcRemote为需要调用的远程服务
* @return
*/
/*@Bean
public RpcRemote rpcApiMethodRemote(){
return factory.builder(RpcRemote.class).check(false).timeout(30000).build();
}*/
}
package cn.com.glsx.dj.oss.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
/**
* @Title: SystemProperty.java
* @Description:
* @author alvin
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Configuration
@ConfigurationProperties("system")
public class SystemProperty {
// 对应配置项:system.name
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarCollision;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface CarCollisionMapper extends OreMapper<CarCollision> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarCollisionReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface CarCollisionReadWriteMapper extends OreMapper<CarCollisionReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarLossReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface CarLossReadWriteMapper extends OreMapper<CarLossReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarLossWarning;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface CarLossWarningMapper extends OreMapper<CarLossWarning> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarMaintain;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface CarMaintainMapper extends OreMapper<CarMaintain> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarMaintainReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface CarMaintainReadWriteMapper extends OreMapper<CarMaintainReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarShopWarning;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface CarShopWarningMapper extends OreMapper<CarShopWarning> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.CarShopWarningReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface CarShopWarningReadWriteMapper extends OreMapper<CarShopWarningReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.DeliveryActiveDetail;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface DeliveryActiveDetailMapper extends OreMapper<DeliveryActiveDetail> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.DeviceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface DeviceInfoMapper extends OreMapper<DeviceInfo> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.DeviceMapping;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface DeviceMappingMapper extends OreMapper<DeviceMapping> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.ExternalDeviceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface ExternalDeviceInfoMapper extends OreMapper<ExternalDeviceInfo> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.FrmsDeviceInfo;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface FrmsDeviceInfoMapper extends OreMapper<FrmsDeviceInfo> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.SecondaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
import cn.com.glsx.dj.oss.model.InsureDeviceReadOnly;
@Mapper
@SecondaryMapper
public interface InsureDeviceReadOnlyMapper extends OreMapper<InsureDeviceReadOnly> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.InsureDeviceReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface InsureDeviceReadWriteMapper extends OreMapper<InsureDeviceReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.InsureOrderReadOnly;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.SecondaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@SecondaryMapper
public interface InsureOrderReadOnlyMapper extends OreMapper<InsureOrderReadOnly> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.InsureOrderReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface InsureOrderReadWriteMapper extends OreMapper<InsureOrderReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.InsureVehicleReadOnly;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.SecondaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@SecondaryMapper
public interface InsureVehicleReadOnlyMapper extends OreMapper<InsureVehicleReadOnly> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.InsureVehicleReadWrite;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.boot.annotation.PrimaryMapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
@PrimaryMapper
public interface InsureVehicleReadWriteMapper extends OreMapper<InsureVehicleReadWrite> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.mapper;
import cn.com.glsx.dj.oss.model.MerchantInfo;
import org.apache.ibatis.annotations.Mapper;
import org.oreframework.datasource.mybatis.mapper.OreMapper;
@Mapper
public interface MerchantInfoMapper extends OreMapper<MerchantInfo> {
}
\ No newline at end of file
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import cn.com.glsx.dj.oss.model.CarCollision;
import cn.com.glsx.dj.oss.model.CarCollisionReadWrite;
import cn.com.glsx.dj.oss.model.DeviceMapping;
import cn.com.glsx.dj.oss.service.CarCollisionService;
import cn.com.glsx.dj.oss.service.DeviceMappingService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: CarCollisionRemoteImpl.java
* @Description:
* @author Alvin
* @date 2018年11月21日 下午3:01:41
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@DubboService
public class CarCollisionRemoteImpl implements CarCollisionRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private CarCollisionService carCollisionService;
@Autowired
private DeviceMappingService deviceMappingService;
@Autowired
private Environment env;
@Override
public RpcResponse<CarCollision> insert(CarCollision carCollision) {
try{
DeviceMapping deviceMapping = deviceMappingService.getByRealSn(carCollision.getSn());
if(deviceMapping == null){
return RpcResponse.success(null);
}
carCollision.setSn(deviceMapping.getFakesn());
carCollision.setMerchantId(deviceMapping.getMerchantId());
carCollision.setMerchantName(deviceMapping.getMerchantName());
carCollision = carCollisionService.insert(carCollision);
Boolean realTimeSync = env.getProperty("real.time.sync", Boolean.class, false);
if(realTimeSync){
CarCollisionReadWrite carCollisionReadWrite = carCollisionService.copy(carCollision);
logger.info("copy car collision result:{}", carCollisionReadWrite);
}
return RpcResponse.success(carCollision);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import cn.com.glsx.dj.oss.model.CarLossReadWrite;
import cn.com.glsx.dj.oss.model.CarLossWarning;
import cn.com.glsx.dj.oss.model.DeviceMapping;
import cn.com.glsx.dj.oss.service.CarLossWarningService;
import cn.com.glsx.dj.oss.service.DeviceMappingService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: CarLossWarningRemoteImpl.java
* @Description:
* @author Alvin
* @date 2020年11月21日 下午6:11:54
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@DubboService
public class CarLossWarningRemoteImpl implements CarLossWarningRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private CarLossWarningService carLossWarningService;
@Autowired
private DeviceMappingService deviceMappingService;
@Autowired
private Environment env;
@Override
public RpcResponse<CarLossWarning> insert(CarLossWarning carLossWarning) {
try{
DeviceMapping deviceMapping = deviceMappingService.getByRealSn(carLossWarning.getSn());
if(deviceMapping == null){
return RpcResponse.success(null);
}
carLossWarning.setSn(deviceMapping.getFakesn());
carLossWarning.setMerchantId(deviceMapping.getMerchantId());
carLossWarning.setMerchantName(deviceMapping.getMerchantName());
carLossWarning = carLossWarningService.insert(carLossWarning);
Boolean realTimeSync = env.getProperty("real.time.sync", Boolean.class, false);
if(realTimeSync){
CarLossReadWrite carLossReadWrite = carLossWarningService.copy(carLossWarning);
logger.info("copy car loss warning result:{}", carLossReadWrite);
}
return RpcResponse.success(carLossWarning);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import cn.com.glsx.dj.oss.model.CarMaintain;
import cn.com.glsx.dj.oss.model.CarMaintainReadWrite;
import cn.com.glsx.dj.oss.model.DeviceMapping;
import cn.com.glsx.dj.oss.service.CarMaintainService;
import cn.com.glsx.dj.oss.service.DeviceMappingService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: CarMaintainRemoteImpl.java
* @Description:
* @author Alvin
* @date 2018年11月21日 下午3:01:59
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@DubboService
public class CarMaintainRemoteImpl implements CarMaintainRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private CarMaintainService carMaintainService;
@Autowired
private DeviceMappingService deviceMappingService;
@Autowired
private Environment env;
@Override
public RpcResponse<CarMaintain> insert(CarMaintain carMaintain) {
try{
DeviceMapping deviceMapping = deviceMappingService.getByRealSn(carMaintain.getSn());
if(deviceMapping == null){
return RpcResponse.success(null);
}
carMaintain.setSn(deviceMapping.getFakesn());
carMaintain.setMerchantId(deviceMapping.getMerchantId());
carMaintain.setMerchantName(deviceMapping.getMerchantName());
carMaintain = carMaintainService.insert(carMaintain);
Boolean realTimeSync = env.getProperty("real.time.sync", Boolean.class, false);
if(realTimeSync){
CarMaintainReadWrite carMaintainReadWrite = carMaintainService.copy(carMaintain);
logger.info("copy car maintain result:{}", carMaintainReadWrite);
}
return RpcResponse.success(carMaintain);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import cn.com.glsx.dj.oss.model.CarShopWarning;
import cn.com.glsx.dj.oss.model.CarShopWarningReadWrite;
import cn.com.glsx.dj.oss.model.DeviceMapping;
import cn.com.glsx.dj.oss.service.CarShopWarningService;
import cn.com.glsx.dj.oss.service.DeviceMappingService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: CarShopWarningRemoteImpl.java
* @Description:
* @author Alvin
* @date 2020年11月21日 下午6:11:43
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@DubboService
public class CarShopWarningRemoteImpl implements CarShopWarningRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private CarShopWarningService carShopWarningService;
@Autowired
private DeviceMappingService deviceMappingService;
@Autowired
private Environment env;
@Override
public RpcResponse<CarShopWarning> insert(CarShopWarning carShopWarning) {
try{
DeviceMapping deviceMapping = deviceMappingService.getByRealSn(carShopWarning.getSn());
if(deviceMapping == null){
return RpcResponse.success(null);
}
carShopWarning.setSn(deviceMapping.getFakesn());
carShopWarning.setMerchantId(deviceMapping.getMerchantId());
carShopWarning.setMerchantName(deviceMapping.getMerchantName());
carShopWarning = carShopWarningService.insert(carShopWarning);
Boolean realTimeSync = env.getProperty("real.time.sync", Boolean.class, false);
if(realTimeSync){
CarShopWarningReadWrite carShopWarningReadWrite = carShopWarningService.copy(carShopWarning);
logger.info("copy car shop warning result:{}", carShopWarningReadWrite);
}
return RpcResponse.success(carShopWarning);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.oss.model.DeliveryActiveDetail;
import cn.com.glsx.dj.oss.service.DeliveryActiveDetailService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: DeliveryActiveDetailRemoteImpl.java
* @Description:
* @author Alvin
* @date 2021年1月12日 下午3:10:34
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@DubboService
public class DeliveryActiveDetailRemoteImpl implements DeliveryActiveDetailRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private DeliveryActiveDetailService deliveryActiveDetailService;
@Override
public RpcResponse<DeliveryActiveDetail> getBySn(String sn) {
try{
return RpcResponse.success(deliveryActiveDetailService.getBySn(sn));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
import cn.com.glsx.dj.oss.model.DeviceInfo;
import cn.com.glsx.dj.oss.service.DeviceInfoService;
import cn.com.glsx.dj.oss.service.InsureOrderService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: DeviceInfoRemoteImpl.java
* @Description:
* @author Alvin
* @date 2018年11月21日 下午3:02:15
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@DubboService
public class DeviceInfoRemoteImpl implements DeviceInfoRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private DeviceInfoService deviceInfoService;
@Autowired
private InsureOrderService insureOrderService;
@Autowired
private Environment env;
@Override
public RpcResponse<DeviceInfo> insert(DeviceInfo deviceInfo) {
try{
deviceInfo = deviceInfoService.insert(deviceInfo);
Boolean realTimeSync = env.getProperty("real.time.sync", Boolean.class, false);
if(realTimeSync){
insureOrderService.realTimeSync(deviceInfo);
}
return RpcResponse.success(deviceInfo);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> update(DeviceInfo deviceInfo) {
try{
return RpcResponse.success(deviceInfoService.update(deviceInfo));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<DeviceInfo> getBySn(String sn) {
try{
return RpcResponse.success(deviceInfoService.getBySn(sn));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.oss.model.ExternalDeviceInfo;
import cn.com.glsx.dj.oss.service.ExternalDeviceInfoService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: ExternalDeviceInfoRemoteImpl.java
* @Description:
* @author Alvin
* @date 2021年1月12日 下午1:56:04
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@DubboService
public class ExternalDeviceInfoRemoteImpl implements ExternalDeviceInfoRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private ExternalDeviceInfoService externalDeviceInfoService;
@Override
public RpcResponse<ExternalDeviceInfo> add(
ExternalDeviceInfo externalDeviceInfo) {
try{
externalDeviceInfo = externalDeviceInfoService.add(externalDeviceInfo);
return RpcResponse.success(externalDeviceInfo);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<ExternalDeviceInfo> getBySn(String sn) {
try{
ExternalDeviceInfo externalDeviceInfo = externalDeviceInfoService.getBySn(sn);
return RpcResponse.success(externalDeviceInfo);
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import cn.com.glsx.dj.oss.model.FrmsDeviceInfo;
import cn.com.glsx.dj.oss.service.FrmsDeviceInfoService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author wangxw
* @version 1.0.0
* @ClassName FrmsDeviceInfoRemoteImpl.java
* @description: ${description}
* @createTime 2020年12月09日 14:07:00
*/
@DubboService(version = "1.0.0", timeout = 5000)
public class FrmsDeviceInfoRemoteImpl implements FrmsDeviceInfoRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private FrmsDeviceInfoService frmsDeviceInfoService;
@Override
public RpcResponse<FrmsDeviceInfo> insert(FrmsDeviceInfo deviceInfo) {
try{
return RpcResponse.success(frmsDeviceInfoService.insert(deviceInfo));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> update(FrmsDeviceInfo deviceInfo) {
try{
return RpcResponse.success(frmsDeviceInfoService.update(deviceInfo));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<FrmsDeviceInfo> insertAndUpdate(FrmsDeviceInfo deviceInfo) {
try{
return RpcResponse.success(frmsDeviceInfoService.insertAndUpdate(deviceInfo));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
@Override
public RpcResponse<Boolean> delete(String sn) {
try{
return RpcResponse.success(frmsDeviceInfoService.delete(sn));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
package cn.com.glsx.dj.oss.remote;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.glsx.dj.oss.model.MerchantInfo;
import cn.com.glsx.dj.oss.service.MerchantInfoService;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
/**
* @Title: MerchantInfoRemoteImpl.java
* @Description:
* @author Alvin
* @date 2021年1月12日 下午4:49:23
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@DubboService
public class MerchantInfoRemoteImpl implements MerchantInfoRemote {
private Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private MerchantInfoService merchantInfoService;
@Override
public RpcResponse<MerchantInfo> getByMerchantId(Integer merchantId) {
try{
return RpcResponse.success(merchantInfoService.getByMerchantId(merchantId));
}catch(RpcServiceException e){
logger.error(e.getMessage(), e);
return RpcResponse.error(e);
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!