Commit 4d251e55 authored by 陈嘉强's avatar 陈嘉强

id调整

parent 376b843a
...@@ -50,15 +50,6 @@ ...@@ -50,15 +50,6 @@
<version>${spring-boot.mybatis}</version> <version>${spring-boot.mybatis}</version>
</dependency> </dependency>
<!-- TODO:删除-->
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
<scope>provided</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -4,10 +4,10 @@ import org.springframework.boot.SpringApplication; ...@@ -4,10 +4,10 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication @SpringBootApplication
public class TestApplication { public class CdApiApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(TestApplication.class, args); SpringApplication.run(CdApiApplication.class, args);
} }
} }
package com.logwire.bhft.domain; package com.logwire.bhft.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
@Data
public class Infomation implements Serializable { public class Infomation implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -76,4 +74,261 @@ public class Infomation implements Serializable { ...@@ -76,4 +74,261 @@ public class Infomation implements Serializable {
// 修改 // 修改
public String getParkUUID() {
return parkUUID;
}
public void setParkUUID(String parkUUID) {
this.parkUUID = parkUUID;
}
public Long getRequestTime() {
return requestTime;
}
public void setRequestTime(Long requestTime) {
this.requestTime = requestTime;
}
public String getTerminalId() {
return terminalId;
}
public void setTerminalId(String terminalId) {
this.terminalId = terminalId;
}
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getService() {
return service;
}
public void setService(String service) {
this.service = service;
}
public String getParkType() {
return parkType;
}
public void setParkType(String parkType) {
this.parkType = parkType;
}
public String getPlateNo() {
return plateNo;
}
public void setPlateNo(String plateNo) {
this.plateNo = plateNo;
}
public String getVehicleType() {
return vehicleType;
}
public void setVehicleType(String vehicleType) {
this.vehicleType = vehicleType;
}
public String getPlateParseInfo() {
return plateParseInfo;
}
public void setPlateParseInfo(String plateParseInfo) {
this.plateParseInfo = plateParseInfo;
}
public Long getEntryTime() {
return entryTime;
}
public void setEntryTime(Long entryTime) {
this.entryTime = entryTime;
}
public String getEntryId() {
return entryId;
}
public void setEntryId(String entryId) {
this.entryId = entryId;
}
public Long getExitTime() {
return exitTime;
}
public void setExitTime(Long exitTime) {
this.exitTime = exitTime;
}
public String getExitId() {
return exitId;
}
public void setExitId(String exitId) {
this.exitId = exitId;
}
public Long getTradeTime() {
return tradeTime;
}
public void setTradeTime(Long tradeTime) {
this.tradeTime = tradeTime;
}
public String getTollRateVersion() {
return tollRateVersion;
}
public void setTollRateVersion(String tollRateVersion) {
this.tollRateVersion = tollRateVersion;
}
public String getTradeType() {
return tradeType;
}
public void setTradeType(String tradeType) {
this.tradeType = tradeType;
}
public float getAccount() {
return account;
}
public void setAccount(float account) {
this.account = account;
}
public float getCash() {
return cash;
}
public void setCash(float cash) {
this.cash = cash;
}
public String getEntryPhoto() {
return entryPhoto;
}
public void setEntryPhoto(String entryPhoto) {
this.entryPhoto = entryPhoto;
}
public String getExitPhoto() {
return exitPhoto;
}
public void setExitPhoto(String exitPhoto) {
this.exitPhoto = exitPhoto;
}
public String getTollCollectorName() {
return tollCollectorName;
}
public void setTollCollectorName(String tollCollectorName) {
this.tollCollectorName = tollCollectorName;
}
public String getUseType() {
return useType;
}
public void setUseType(String useType) {
this.useType = useType;
}
public String getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
public String getSlotId() {
return slotId;
}
public void setSlotId(String slotId) {
this.slotId = slotId;
}
public Boolean getBooking() {
return booking;
}
public void setBooking(Boolean booking) {
this.booking = booking;
}
public Object getParkingDetail() {
return parkingDetail;
}
public void setParkingDetail(Object parkingDetail) {
this.parkingDetail = parkingDetail;
}
@Override
public String toString() {
return "Infomation{" +
"parkUUID='" + parkUUID + '\'' +
", requestTime=" + requestTime +
", terminalId='" + terminalId + '\'' +
", requestId='" + requestId + '\'' +
", sign='" + sign + '\'' +
", version='" + version + '\'' +
", service='" + service + '\'' +
", parkType='" + parkType + '\'' +
", plateNo='" + plateNo + '\'' +
", vehicleType='" + vehicleType + '\'' +
", plateParseInfo='" + plateParseInfo + '\'' +
", entryTime=" + entryTime +
", entryId='" + entryId + '\'' +
", exitTime=" + exitTime +
", exitId='" + exitId + '\'' +
", tradeTime=" + tradeTime +
", tollRateVersion='" + tollRateVersion + '\'' +
", tradeType='" + tradeType + '\'' +
", account=" + account +
", cash=" + cash +
", entryPhoto='" + entryPhoto + '\'' +
", exitPhoto='" + exitPhoto + '\'' +
", tollCollectorName='" + tollCollectorName + '\'' +
", useType='" + useType + '\'' +
", areaId='" + areaId + '\'' +
", slotId='" + slotId + '\'' +
", booking=" + booking +
", parkingDetail=" + parkingDetail +
'}';
}
} }
package com.logwire.bhft.domain; package com.logwire.bhft.domain;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -11,7 +10,6 @@ import java.util.Date; ...@@ -11,7 +10,6 @@ import java.util.Date;
* 停车场道闸接口信息 * 停车场道闸接口信息
* @TableName t01_interface_parking_gate * @TableName t01_interface_parking_gate
*/ */
@Data
@JsonIgnoreProperties(ignoreUnknown = true) @JsonIgnoreProperties(ignoreUnknown = true)
public class InterfaceParkingGate implements Serializable { public class InterfaceParkingGate implements Serializable {
/** /**
...@@ -171,4 +169,288 @@ public class InterfaceParkingGate implements Serializable { ...@@ -171,4 +169,288 @@ public class InterfaceParkingGate implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override
public String toString() {
return "InterfaceParkingGate{" +
"id=" + id +
", requestTime=" + requestTime +
", requestId='" + requestId + '\'' +
", exitRequestTime=" + exitRequestTime +
", exitRequestId='" + exitRequestId + '\'' +
", plateNo='" + plateNo + '\'' +
", vehicleType='" + vehicleType + '\'' +
", plateParseInfo='" + plateParseInfo + '\'' +
", entryTime=" + entryTime +
", entryId='" + entryId + '\'' +
", exitTime=" + exitTime +
", exitId='" + exitId + '\'' +
", tradeTime=" + tradeTime +
", tollRateVersion='" + tollRateVersion + '\'' +
", tradeType='" + tradeType + '\'' +
", account=" + account +
", cash=" + cash +
", tollCollectorName='" + tollCollectorName + '\'' +
", useType='" + useType + '\'' +
", areaId='" + areaId + '\'' +
", slotId='" + slotId + '\'' +
", booking=" + booking +
", parkingDetail='" + parkingDetail + '\'' +
", exitFlagNum='" + exitFlagNum + '\'' +
", domainName='" + domainName + '\'' +
", version=" + version +
", deleted=" + deleted +
", insertUser='" + insertUser + '\'' +
", insertDate=" + insertDate +
", updateUser='" + updateUser + '\'' +
", updateDate=" + updateDate +
'}';
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getRequestTime() {
return requestTime;
}
public void setRequestTime(Long requestTime) {
this.requestTime = requestTime;
}
public String getRequestId() {
return requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Long getExitRequestTime() {
return exitRequestTime;
}
public void setExitRequestTime(Long exitRequestTime) {
this.exitRequestTime = exitRequestTime;
}
public String getExitRequestId() {
return exitRequestId;
}
public void setExitRequestId(String exitRequestId) {
this.exitRequestId = exitRequestId;
}
public String getPlateNo() {
return plateNo;
}
public void setPlateNo(String plateNo) {
this.plateNo = plateNo;
}
public String getVehicleType() {
return vehicleType;
}
public void setVehicleType(String vehicleType) {
this.vehicleType = vehicleType;
}
public String getPlateParseInfo() {
return plateParseInfo;
}
public void setPlateParseInfo(String plateParseInfo) {
this.plateParseInfo = plateParseInfo;
}
public Long getEntryTime() {
return entryTime;
}
public void setEntryTime(Long entryTime) {
this.entryTime = entryTime;
}
public String getEntryId() {
return entryId;
}
public void setEntryId(String entryId) {
this.entryId = entryId;
}
public Long getExitTime() {
return exitTime;
}
public void setExitTime(Long exitTime) {
this.exitTime = exitTime;
}
public String getExitId() {
return exitId;
}
public void setExitId(String exitId) {
this.exitId = exitId;
}
public Long getTradeTime() {
return tradeTime;
}
public void setTradeTime(Long tradeTime) {
this.tradeTime = tradeTime;
}
public String getTollRateVersion() {
return tollRateVersion;
}
public void setTollRateVersion(String tollRateVersion) {
this.tollRateVersion = tollRateVersion;
}
public String getTradeType() {
return tradeType;
}
public void setTradeType(String tradeType) {
this.tradeType = tradeType;
}
public BigDecimal getAccount() {
return account;
}
public void setAccount(BigDecimal account) {
this.account = account;
}
public BigDecimal getCash() {
return cash;
}
public void setCash(BigDecimal cash) {
this.cash = cash;
}
public String getTollCollectorName() {
return tollCollectorName;
}
public void setTollCollectorName(String tollCollectorName) {
this.tollCollectorName = tollCollectorName;
}
public String getUseType() {
return useType;
}
public void setUseType(String useType) {
this.useType = useType;
}
public String getAreaId() {
return areaId;
}
public void setAreaId(String areaId) {
this.areaId = areaId;
}
public String getSlotId() {
return slotId;
}
public void setSlotId(String slotId) {
this.slotId = slotId;
}
public Boolean getBooking() {
return booking;
}
public void setBooking(Boolean booking) {
this.booking = booking;
}
public String getParkingDetail() {
return parkingDetail;
}
public void setParkingDetail(String parkingDetail) {
this.parkingDetail = parkingDetail;
}
public String getExitFlagNum() {
return exitFlagNum;
}
public void setExitFlagNum(String exitFlagNum) {
this.exitFlagNum = exitFlagNum;
}
public String getDomainName() {
return domainName;
}
public void setDomainName(String domainName) {
this.domainName = domainName;
}
public Object getVersion() {
return version;
}
public void setVersion(Object version) {
this.version = version;
}
public Boolean getDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public String getInsertUser() {
return insertUser;
}
public void setInsertUser(String insertUser) {
this.insertUser = insertUser;
}
public Date getInsertDate() {
return insertDate;
}
public void setInsertDate(Date insertDate) {
this.insertDate = insertDate;
}
public String getUpdateUser() {
return updateUser;
}
public void setUpdateUser(String updateUser) {
this.updateUser = updateUser;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
} }
\ No newline at end of file
...@@ -33,11 +33,12 @@ public class ParkingGateServiceImpl implements ParkingGateService { ...@@ -33,11 +33,12 @@ public class ParkingGateServiceImpl implements ParkingGateService {
// 判断是进站还是出站,进站新增,出站修改 // 判断是进站还是出站,进站新增,出站修改
if("".equals(parkingGate.getExitId()) || null == parkingGate.getExitId()){ if("".equals(parkingGate.getExitId()) || null == parkingGate.getExitId()){
// 进站逻辑 // 进站逻辑
parkingGate.setId(SnowFlake.nextId()); int id = (int) (Math.random()*(99999999999L-1)+1);
parkingGate.setId((long) id);
parkingGate.setVersion(0); parkingGate.setVersion(0);
parkingGate.setInsertUser("interface"); parkingGate.setInsertUser("interface");
parkingGate.setInsertDate(new Date()); parkingGate.setInsertDate(new Date());
int id = interfaceParkingGateMapper.insertAll(parkingGate); int ids = interfaceParkingGateMapper.insertAll(parkingGate);
}else { }else {
// 出站逻辑 // 出站逻辑
InterfaceParkingGate exitInfo = interfaceParkingGateMapper.selectOneByExitFlagNum(parkingGate.getExitFlagNum()); InterfaceParkingGate exitInfo = interfaceParkingGateMapper.selectOneByExitFlagNum(parkingGate.getExitFlagNum());
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<mapper namespace="com.logwire.bhft.dao.InterfaceParkingGateMapper"> <mapper namespace="com.logwire.bhft.dao.InterfaceParkingGateMapper">
<resultMap id="BaseResultMap" type="com.logwire.bhft.domain.InterfaceParkingGate"> <resultMap id="BaseResultMap" type="com.logwire.bhft.domain.InterfaceParkingGate">
<id property="id" column="id" jdbcType="OTHER"/> <id property="id" column="id" jdbcType="INTEGER"/>
<result property="requestTime" column="request_time" jdbcType="OTHER"/> <result property="requestTime" column="request_time" jdbcType="OTHER"/>
<result property="requestId" column="request_id" jdbcType="VARCHAR"/> <result property="requestId" column="request_id" jdbcType="VARCHAR"/>
<result property="exitRequestTime" column="exit_request_time" jdbcType="OTHER"/> <result property="exitRequestTime" column="exit_request_time" jdbcType="OTHER"/>
...@@ -50,26 +50,30 @@ ...@@ -50,26 +50,30 @@
insert_user,insert_date,update_user, insert_user,insert_date,update_user,
update_date,exit_request_id,exit_request_time,exit_flag_num update_date,exit_request_id,exit_request_time,exit_flag_num
</sql> </sql>
<insert id="insertAll"> <insert id="insertAll" keyColumn="id" keyProperty="id" parameterType="InterfaceParkingGate" useGeneratedKeys="true">
insert into t01_interface_parking_gate insert into t01_interface_parking_gate
(id, request_time, request_id, ( id,request_time,request_id
plate_no, vehicle_type, plate_parse_info, ,plate_no,vehicle_type,plate_parse_info
entry_time, entry_id, exit_time, ,entry_time,entry_id,exit_time
exit_id, trade_time, toll_rate_version, ,exit_id,trade_time,toll_rate_version
trade_type, account, cash, ,trade_type,account,cash
toll_collector_name, use_type, area_id, ,toll_collector_name,use_type,area_id
slot_id, booking, parking_detail, ,slot_id,booking,parking_detail
domain_name, version, deleted, ,domain_name,version,deleted
insert_user, insert_date, exit_flag_num) ,insert_user,insert_date,update_user
values (#{id}, #{requestTime}, #{requestId,jdbcType=VARCHAR}, ,update_date,exit_request_id,exit_request_time
#{plateNo,jdbcType=VARCHAR}, #{vehicleType,jdbcType=VARCHAR}, #{plateParseInfo,jdbcType=VARCHAR}, ,exit_flag_num)
#{entryTime}, #{entryId,jdbcType=VARCHAR}, #{exitTime}, values (#{id,jdbcType=BIGINT},#{requestTime,jdbcType=OTHER},#{requestId,jdbcType=VARCHAR}
#{exitId,jdbcType=VARCHAR}, #{tradeTime}, #{tollRateVersion,jdbcType=VARCHAR}, ,#{plateNo,jdbcType=VARCHAR},#{vehicleType,jdbcType=VARCHAR},#{plateParseInfo,jdbcType=VARCHAR}
#{tradeType,jdbcType=VARCHAR}, #{account,jdbcType=DECIMAL}, #{cash,jdbcType=DECIMAL}, ,#{entryTime,jdbcType=BIGINT},#{entryId,jdbcType=VARCHAR},#{exitTime,jdbcType=BIGINT}
#{tollCollectorName,jdbcType=VARCHAR}, #{useType,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR}, ,#{exitId,jdbcType=VARCHAR},#{tradeTime,jdbcType=OTHER},#{tollRateVersion,jdbcType=VARCHAR}
#{slotId,jdbcType=VARCHAR}, #{booking,jdbcType=BOOLEAN}, #{parkingDetail,jdbcType=VARCHAR}, ,#{tradeType,jdbcType=VARCHAR},#{account,jdbcType=NUMERIC},#{cash,jdbcType=NUMERIC}
#{domainName,jdbcType=VARCHAR}, #{version}, #{deleted,jdbcType=BOOLEAN}, ,#{tollCollectorName,jdbcType=VARCHAR},#{useType,jdbcType=VARCHAR},#{areaId,jdbcType=VARCHAR}
#{insertUser,jdbcType=VARCHAR}, #{insertDate,jdbcType=TIMESTAMP}, #{exitFlagNum,jdbcType=VARCHAR}) ,#{slotId,jdbcType=VARCHAR},#{booking,jdbcType=BOOLEAN},#{parkingDetail,jdbcType=VARCHAR}
,#{domainName,jdbcType=VARCHAR},#{version,jdbcType=OTHER},#{deleted,jdbcType=BOOLEAN}
,#{insertUser,jdbcType=VARCHAR},#{insertDate,jdbcType=TIMESTAMP},#{updateUser,jdbcType=VARCHAR}
,#{updateDate,jdbcType=TIMESTAMP},#{exitRequestId,jdbcType=VARCHAR},#{exitRequestTime,jdbcType=BIGINT}
,#{exitFlagNum,jdbcType=VARCHAR})
</insert> </insert>
<update id="updateExitInfo" parameterType="interfaceParkingGate"> <update id="updateExitInfo" parameterType="interfaceParkingGate">
update t01_interface_parking_gate update t01_interface_parking_gate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment