代码优化
parent
38485e0fda
commit
e931b2e6c0
|
@ -37,10 +37,6 @@ public class Car extends BaseEntity {
|
||||||
@TableField("car_license")
|
@TableField("car_license")
|
||||||
private String carLicense;
|
private String carLicense;
|
||||||
|
|
||||||
@ApiModelProperty("车辆状态")
|
|
||||||
@TableField("driving_id")
|
|
||||||
private Integer drivingId;
|
|
||||||
|
|
||||||
@ApiModelProperty("车辆类型")
|
@ApiModelProperty("车辆类型")
|
||||||
@TableField("type_id")
|
@TableField("type_id")
|
||||||
private Integer typeId;
|
private Integer typeId;
|
||||||
|
|
|
@ -1,15 +1,11 @@
|
||||||
package com.shiyi.internet.domain;
|
package com.shiyi.internet.domain;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import com.fate.common.core.web.domain.BaseEntity;
|
import com.fate.common.core.web.domain.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.*;
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
import lombok.experimental.SuperBuilder;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -28,7 +24,7 @@ import java.util.Date;
|
||||||
public class DrivingRecord extends BaseEntity {
|
public class DrivingRecord extends BaseEntity {
|
||||||
|
|
||||||
@ApiModelProperty("行驶记录ID")
|
@ApiModelProperty("行驶记录ID")
|
||||||
@TableId(value = "record_id",type = IdType.AUTO)
|
@TableId("record_id")
|
||||||
private Integer recordId ;
|
private Integer recordId ;
|
||||||
|
|
||||||
@ApiModelProperty(name = "车辆vin")
|
@ApiModelProperty(name = "车辆vin")
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package com.shiyi.internet.response;
|
package com.shiyi.internet.domain.response;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableField;
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
@ -8,6 +8,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
import org.springframework.cloud.openfeign.FeignClient;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -24,59 +25,60 @@ import java.util.Date;
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class ResponseCar {
|
public class ResponseCar {
|
||||||
/** 车辆ID */
|
/** 车辆ID */
|
||||||
@ApiModelProperty(name = "车辆ID",notes = "")
|
@ApiModelProperty(name = "车辆ID")
|
||||||
|
@TableField("car_id")
|
||||||
private Integer carId ;
|
private Integer carId ;
|
||||||
/** 车辆名称 */
|
/** 车辆名称 */
|
||||||
@ApiModelProperty(name = "车辆名称",notes = "")
|
@ApiModelProperty(name = "车辆名称")
|
||||||
|
@TableField("car_name")
|
||||||
private String carName ;
|
private String carName ;
|
||||||
/** 车辆牌号 */
|
/** 车辆牌号 */
|
||||||
@ApiModelProperty(name = "车辆牌号",notes = "")
|
@ApiModelProperty(name = "车辆牌号")
|
||||||
|
@TableField("car_license")
|
||||||
private String carLicense ;
|
private String carLicense ;
|
||||||
/** 状态ID */
|
|
||||||
@ApiModelProperty(name = "状态ID",notes = "")
|
|
||||||
private Integer drivingId ;
|
|
||||||
/** 车辆vin */
|
/** 车辆vin */
|
||||||
@ApiModelProperty(name = "车辆vin",notes = "")
|
@ApiModelProperty(name = "车辆vin")
|
||||||
|
@TableField("driving_vin")
|
||||||
private String drivingVin ;
|
private String drivingVin ;
|
||||||
/** 上线时间 */
|
|
||||||
@ApiModelProperty(name = "上线时间",notes = "")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private Date drivingStarttime ;
|
|
||||||
/** 下线时间 */
|
|
||||||
@ApiModelProperty(name = "下线时间",notes = "")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
|
||||||
private Date drivingEndtime ;
|
|
||||||
/** 车辆类型 */
|
/** 车辆类型 */
|
||||||
@ApiModelProperty(name = "车辆类型",notes = "")
|
@ApiModelProperty(name = "车辆类型")
|
||||||
|
@TableField("type_id")
|
||||||
private Integer typeId ;
|
private Integer typeId ;
|
||||||
/** 车辆围栏 */
|
/** 车辆围栏 */
|
||||||
@ApiModelProperty(name = "车辆围栏",notes = "")
|
@ApiModelProperty(name = "车辆围栏")
|
||||||
|
@TableField("fence_id")
|
||||||
private Integer fenceId ;
|
private Integer fenceId ;
|
||||||
/** 围栏名称 */
|
/** 围栏名称 */
|
||||||
@ApiModelProperty(name = "围栏名称",notes = "")
|
@ApiModelProperty(name = "围栏名称")
|
||||||
|
@TableField("fencing_name")
|
||||||
private String fencingName ;
|
private String fencingName ;
|
||||||
/** 围栏经纬度 */
|
/** 围栏经纬度 */
|
||||||
@ApiModelProperty(name = "围栏经纬度",notes = "")
|
@ApiModelProperty(name = "围栏经纬度")
|
||||||
|
@TableField("fencing_lat")
|
||||||
private String fencingLat ;
|
private String fencingLat ;
|
||||||
/** 激活状态 */
|
/** 激活状态 */
|
||||||
@ApiModelProperty(name = "激活状态",notes = "")
|
@ApiModelProperty(name = "激活状态(驶入/驶出)")
|
||||||
|
@TableField("fencing_status")
|
||||||
private Integer fencingStatus ;
|
private Integer fencingStatus ;
|
||||||
/** 车辆零件ID */
|
/** 车辆零件ID */
|
||||||
@ApiModelProperty(name = "车辆零件ID",notes = "")
|
@ApiModelProperty(name = "车辆零件ID")
|
||||||
|
@TableField("drive_id")
|
||||||
private Integer driveId ;
|
private Integer driveId ;
|
||||||
/** 配件型号 */
|
/** 配件型号 */
|
||||||
@ApiModelProperty(name = "配件型号",notes = "")
|
@ApiModelProperty(name = "配件型号")
|
||||||
|
@TableField("drive_name")
|
||||||
private String driveName ;
|
private String driveName ;
|
||||||
/** 配件编号 */
|
/** 配件编号 */
|
||||||
@ApiModelProperty(name = "配件编号",notes = "")
|
@ApiModelProperty(name = "配件编号")
|
||||||
|
@TableField("drive_part_number")
|
||||||
private String drivePartNumber ;
|
private String drivePartNumber ;
|
||||||
/** 生产厂商名称 */
|
/** 生产厂商名称 */
|
||||||
@ApiModelProperty(name = "生产厂商名称",notes = "")
|
@ApiModelProperty(name = "生产厂商名称")
|
||||||
|
@TableField("drive_generate_name")
|
||||||
private String driveGenerateName ;
|
private String driveGenerateName ;
|
||||||
|
|
||||||
@ApiModelProperty("电池ID")
|
@ApiModelProperty("电池ID")
|
||||||
@TableId(value = "battery_id", type = IdType.AUTO)
|
@TableField("battery_id")
|
||||||
private Integer batteryId;
|
private Integer batteryId;
|
||||||
|
|
||||||
@ApiModelProperty("电池编号")
|
@ApiModelProperty("电池编号")
|
||||||
|
@ -104,6 +106,7 @@ public class ResponseCar {
|
||||||
private Date batteryDeliveryTime;
|
private Date batteryDeliveryTime;
|
||||||
|
|
||||||
/** 车辆位置 */
|
/** 车辆位置 */
|
||||||
@ApiModelProperty(name = "车辆位置",notes = "")
|
@ApiModelProperty(name = "车辆位置")
|
||||||
|
@TableField("car_address")
|
||||||
private String carAddress ;
|
private String carAddress ;
|
||||||
}
|
}
|
|
@ -0,0 +1,43 @@
|
||||||
|
package com.shiyi.internet.domain.response;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName : RequestFencing
|
||||||
|
* @Description : 电子围栏响应实体类
|
||||||
|
* @Author : YHY
|
||||||
|
* @Date: 2023-11-18 13:17
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@AllArgsConstructor
|
||||||
|
@NoArgsConstructor
|
||||||
|
public class ResponseFencing {
|
||||||
|
@ApiModelProperty(name = "电子围栏ID")
|
||||||
|
@TableField("fencing_id")
|
||||||
|
private Integer fencingId ;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "围栏名称")
|
||||||
|
@TableField("fencing_name")
|
||||||
|
private String fencingName ;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "围栏经纬度")
|
||||||
|
@TableField("fencing_lat")
|
||||||
|
private String fencingLat ;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "激活状态")
|
||||||
|
@TableField("fencing_status")
|
||||||
|
private Integer fencingStatus ;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "操作时间")
|
||||||
|
@TableField("fencing_time")
|
||||||
|
private String fencingTime ;
|
||||||
|
|
||||||
|
@ApiModelProperty(name = "操作者")
|
||||||
|
@TableField("create_user_id")
|
||||||
|
private Integer createUserId ;
|
||||||
|
}
|
|
@ -1,36 +0,0 @@
|
||||||
package com.shiyi.internet.response;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ClassName : RequestFencing
|
|
||||||
* @Description : 电子围栏响应实体类
|
|
||||||
* @Author : YHY
|
|
||||||
* @Date: 2023-11-18 13:17
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
public class ResponseFencing {
|
|
||||||
/** 电子围栏ID */
|
|
||||||
@ApiModelProperty(name = "电子围栏ID",notes = "")
|
|
||||||
private Integer fencingId ;
|
|
||||||
/** 围栏名称 */
|
|
||||||
@ApiModelProperty(name = "围栏名称",notes = "")
|
|
||||||
private String fencingName ;
|
|
||||||
/** 围栏经纬度 */
|
|
||||||
@ApiModelProperty(name = "围栏经纬度",notes = "")
|
|
||||||
private String fencingLat ;
|
|
||||||
/** 激活状态 */
|
|
||||||
@ApiModelProperty(name = "激活状态",notes = "")
|
|
||||||
private Integer fencingStatus ;
|
|
||||||
/** 操作时间 */
|
|
||||||
@ApiModelProperty(name = "操作时间",notes = "")
|
|
||||||
private String fencingTime ;
|
|
||||||
/** 操作者 */
|
|
||||||
@ApiModelProperty(name = "操作者",notes = "")
|
|
||||||
private Integer createUserId ;
|
|
||||||
}
|
|
|
@ -26,7 +26,7 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- 继承common依赖 -->
|
<!-- 继承common依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.example</groupId>
|
<groupId>com.fate</groupId>
|
||||||
<artifactId>fance-menghang-common</artifactId>
|
<artifactId>fance-menghang-common</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- 继承common依赖 -->
|
<!-- 继承common依赖 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.example</groupId>
|
<groupId>com.fate</groupId>
|
||||||
<artifactId>fance-menghang-common</artifactId>
|
<artifactId>fance-menghang-common</artifactId>
|
||||||
<version>3.6.3</version>
|
<version>3.6.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
@ -58,6 +58,7 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
|
<version>2.7.2</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<goals>
|
<goals>
|
||||||
|
|
|
@ -39,7 +39,7 @@ public class DrivingRecordController extends BaseController {
|
||||||
* @Updator: YHY
|
* @Updator: YHY
|
||||||
* @Date 2023/11/21 14:38
|
* @Date 2023/11/21 14:38
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("record:record:list")
|
//@RequiresPermissions("record:record:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public Result<List<DrivingRecord>> list(DrivingRecord drivingRecord){
|
public Result<List<DrivingRecord>> list(DrivingRecord drivingRecord){
|
||||||
log.info("功能名称:车辆行驶记录,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
log.info("功能名称:车辆行驶记录,请求URL:【{}】,请求方法:【{}】",request.getRequestURI(),
|
||||||
|
@ -55,8 +55,8 @@ public class DrivingRecordController extends BaseController {
|
||||||
* @param response
|
* @param response
|
||||||
* @param drivingRecord
|
* @param drivingRecord
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("record:record:export")
|
//@RequiresPermissions("record:record:export")
|
||||||
@Log(title = "导出车辆行驶记录", businessType = BusinessType.EXPORT)
|
//@Log(title = "导出车辆行驶记录", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response ,DrivingRecord drivingRecord){
|
public void export(HttpServletResponse response ,DrivingRecord drivingRecord){
|
||||||
Result<List<DrivingRecord>> list = drivingRecordService.listDriving(drivingRecord); //车辆行驶车辆对象
|
Result<List<DrivingRecord>> list = drivingRecordService.listDriving(drivingRecord); //车辆行驶车辆对象
|
||||||
|
@ -87,10 +87,10 @@ public class DrivingRecordController extends BaseController {
|
||||||
* @param drivingRecord
|
* @param drivingRecord
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("record:record:add")
|
//@RequiresPermissions("record:record:insertDriving")
|
||||||
@Log(title = "车辆行驶记录", businessType = BusinessType.INSERT)
|
//@Log(title = "车辆行驶记录", businessType = BusinessType.INSERT)
|
||||||
@PostMapping()
|
@PostMapping("/insertDriving")
|
||||||
public Result add(@RequestBody DrivingRecord drivingRecord){
|
public Result insertDriving(@RequestBody DrivingRecord drivingRecord){
|
||||||
log.info("功能名称:添加车辆行驶记录,请求URL:【{}】,请求防范:【{}】,请求参数:【{}】",request.getRequestURI(),
|
log.info("功能名称:添加车辆行驶记录,请求URL:【{}】,请求防范:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
request.getMethod(),drivingRecord);
|
request.getMethod(),drivingRecord);
|
||||||
drivingRecordService.insertDriving(drivingRecord);
|
drivingRecordService.insertDriving(drivingRecord);
|
||||||
|
@ -105,10 +105,10 @@ public class DrivingRecordController extends BaseController {
|
||||||
* @param drivingRecord
|
* @param drivingRecord
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("record:record:edit")
|
//@RequiresPermissions("record:record:updateDrivingRecord")
|
||||||
@Log(title = "修改车辆行驶记录", businessType = BusinessType.UPDATE)
|
//@Log(title = "修改车辆行驶记录", businessType = BusinessType.UPDATE)
|
||||||
@PostMapping("/edit")
|
@PostMapping("/updateDrivingRecord")
|
||||||
public Result edit(@RequestBody DrivingRecord drivingRecord){
|
public Result updateDrivingRecord(@RequestBody DrivingRecord drivingRecord){
|
||||||
log.info("功能名称:修改车辆行驶记录,请求URL:【{}】,请求方法:【{}】,请求参数:【{】】",request.getRequestURI(),
|
log.info("功能名称:修改车辆行驶记录,请求URL:【{}】,请求方法:【{}】,请求参数:【{】】",request.getRequestURI(),
|
||||||
request.getMethod(),drivingRecord);
|
request.getMethod(),drivingRecord);
|
||||||
drivingRecordService.updateDrivingRecord(drivingRecord);
|
drivingRecordService.updateDrivingRecord(drivingRecord);
|
||||||
|
@ -123,10 +123,10 @@ public class DrivingRecordController extends BaseController {
|
||||||
* @param recordId
|
* @param recordId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("record:record:remove")
|
//@RequiresPermissions("record:record:deleteDrivingRecord")
|
||||||
@Log(title = "根据ID删除车辆行驶记录", businessType = BusinessType.DELETE)
|
//@Log(title = "根据ID删除车辆行驶记录", businessType = BusinessType.DELETE)
|
||||||
@PostMapping("/remove/{recordId}")
|
@PostMapping("/deleteDrivingRecord/{recordId}")
|
||||||
public Result remove(@PathVariable Integer recordId){
|
public Result deleteDrivingRecord(@PathVariable Integer recordId){
|
||||||
log.info("功能名称:根据ID删除车辆行驶记录,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
log.info("功能名称:根据ID删除车辆行驶记录,请求URL:【{}】,请求方法:【{}】,请求参数:【{}】",request.getRequestURI(),
|
||||||
request.getMethod(),recordId);
|
request.getMethod(),recordId);
|
||||||
drivingRecordService.deleteDrivingRecord(recordId);
|
drivingRecordService.deleteDrivingRecord(recordId);
|
||||||
|
|
|
@ -59,6 +59,10 @@ public class DrivingRecordServiceimpl extends ServiceImpl<DrivingRecordMapper, D
|
||||||
drivingRecordMapper.updateDrivingRecord(drivingRecord);
|
drivingRecordMapper.updateDrivingRecord(drivingRecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据ID删除车辆行驶记录
|
||||||
|
* @param recordId
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void deleteDrivingRecord(Integer recordId) {
|
public void deleteDrivingRecord(Integer recordId) {
|
||||||
drivingRecordMapper.deleteDrivingRecord(recordId);
|
drivingRecordMapper.deleteDrivingRecord(recordId);
|
||||||
|
|
|
@ -1,15 +1,24 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.shiyi.internet.mapper.DrivingRecordMapper">
|
<mapper namespace="com.shiyi.internet.mapper.DrivingRecordMapper">
|
||||||
|
<resultMap id="map" type="com.shiyi.internet.domain.DrivingRecord">
|
||||||
|
<id column="record_id" property="recordId"></id>
|
||||||
|
<result column="car_vin" property="carVin"></result>
|
||||||
|
<result column="start_time" property="startTime"></result>
|
||||||
|
<result column="end_time" property="endTime"></result>
|
||||||
|
<result column="start_key" property="startKey"></result>
|
||||||
|
<result column="end_key" property="endKey"></result>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<insert id="insertDriving">
|
<insert id="insertDriving">
|
||||||
insert into car_record (
|
insert into car_record (
|
||||||
record_id,
|
|
||||||
car_vin,
|
car_vin,
|
||||||
start_time,
|
start_time,
|
||||||
end_time,
|
end_time,
|
||||||
start_key,
|
start_key,
|
||||||
end_key) values(
|
end_key) values(
|
||||||
#{recordId},
|
|
||||||
#{carVin},
|
#{carVin},
|
||||||
#{startTime},
|
#{startTime},
|
||||||
#{endTime},
|
#{endTime},
|
||||||
|
@ -24,6 +33,8 @@
|
||||||
start_key=#{startKey},
|
start_key=#{startKey},
|
||||||
end_key=#{endKey} where record_id=#{recordId}
|
end_key=#{endKey} where record_id=#{recordId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
<delete id="deleteDrivingRecord">
|
<delete id="deleteDrivingRecord">
|
||||||
delete from car_record where record_id=#{recordId}
|
delete from car_record where record_id=#{recordId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
car_id,
|
car_id,
|
||||||
car_name,
|
car_name,
|
||||||
car_license,
|
car_license,
|
||||||
driving_id,
|
|
||||||
typ_eId,
|
typ_eId,
|
||||||
fen_ceId,
|
fen_ceId,
|
||||||
dri_veId,
|
dri_veId,
|
||||||
|
@ -15,7 +14,6 @@
|
||||||
#{carId},
|
#{carId},
|
||||||
#{carName},
|
#{carName},
|
||||||
#{carLicense},
|
#{carLicense},
|
||||||
#{drivingId},
|
|
||||||
#{typeId},
|
#{typeId},
|
||||||
#{fenceId},
|
#{fenceId},
|
||||||
#{driveId},
|
#{driveId},
|
||||||
|
@ -26,7 +24,6 @@
|
||||||
update t_car set
|
update t_car set
|
||||||
car_name=#{carName},
|
car_name=#{carName},
|
||||||
car_license=#{carLicense},
|
car_license=#{carLicense},
|
||||||
driving_id=#{drivingId},
|
|
||||||
type_id=#{typeId},
|
type_id=#{typeId},
|
||||||
fence_id=#{fenceId},
|
fence_id=#{fenceId},
|
||||||
drive_id=#{driveId},
|
drive_id=#{driveId},
|
||||||
|
@ -39,12 +36,11 @@
|
||||||
|
|
||||||
<select id="vehicleList" resultType="com.shiyi.internet.domain.response.ResponseCar">
|
<select id="vehicleList" resultType="com.shiyi.internet.domain.response.ResponseCar">
|
||||||
select * from t_car ca left join t_drive dr on ca.drive_id=dr.drive_id left join
|
select * from t_car ca left join t_drive dr on ca.drive_id=dr.drive_id left join
|
||||||
t_battery ba on ca.battery_id=ba.battery_id left join t_driving d on ca.driving_id=d.driving_id
|
t_battery ba on ca.battery_id=ba.battery_id left join t_fence fe on ca.fence_id=fe.fence_id
|
||||||
left join t_fence fe on ca.fence_id=fe.fence_id
|
|
||||||
</select>
|
</select>
|
||||||
<select id="findVehiclById" resultType="com.shiyi.internet.domain.response.ResponseCar">
|
<select id="findVehiclById" resultType="com.shiyi.internet.domain.response.ResponseCar">
|
||||||
select * from t_car ca left join t_drive dr on ca.drive_id=dr.drive_id left join
|
select * from t_car ca left join t_drive dr on ca.drive_id=dr.drive_id left join
|
||||||
t_battery ba on ca.battery_id=ba.battery_id left join t_driving d on ca.driving_id=d.driving_id
|
t_battery ba on ca.battery_id=ba.battery_id left join t_fence fe on ca.fence_id=fe.fence_id
|
||||||
left join t_fence fe on ca.fence_id=fe.fence_id where car_id=#{carId}
|
where car_id=#{carId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue