From 4a094775d4ce893b194ebe1889b6c1dd05178d2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=AC=A3=E6=82=A6?= <2289014031@qq.com> Date: Wed, 25 Sep 2024 22:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E6=96=87=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CarInformationController.java | 11 +- .../car/controller/CarMessageController.java | 2 +- .../com/muyu/car/domain/resp/CarInform.java | 137 ------------------ .../java/com/muyu/car/domain/resp/CarReq.java | 73 ++++++++++ .../muyu/car/mapper/CarInformationMapper.java | 2 + .../Impl/CarInformationServiceImpl.java | 10 +- .../mapper/car/CarInformationMapper.xml | 65 +++++---- 7 files changed, 132 insertions(+), 168 deletions(-) delete mode 100644 cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarInform.java create mode 100644 cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarReq.java diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarInformationController.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarInformationController.java index 783deb0..b0ab8bb 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarInformationController.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarInformationController.java @@ -2,6 +2,7 @@ package com.muyu.car.controller; import com.github.pagehelper.PageInfo; import com.muyu.car.domain.CarInformation; +import com.muyu.car.domain.CarMessage; import com.muyu.car.domain.req.CarInformationAddReq; import com.muyu.car.domain.req.CarInformationListReq; import com.muyu.car.domain.req.CarInformationUpdReq; @@ -85,9 +86,13 @@ public class CarInformationController { */ @PostMapping("/updatecarInformation") @Operation(summary = "企业车辆修改管理") - public Result updatecarInformation(@Validated @RequestBody CarInformationUpdReq carInformationUpdReq) { - log.info(carInformationUpdReq); - return carInformationService.updatecarInformation(carInformationUpdReq); + public Result updateCarMessage(@Validated @RequestBody CarInformationUpdReq carInformationUpdReq){ + Result updatecarInformation = carInformationService.updatecarInformation(carInformationUpdReq); + log.info(updatecarInformation); + System.out.println("我在这个里:"+updatecarInformation); + + return Result.success(updatecarInformation,"修改成功"); + } diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarMessageController.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarMessageController.java index f8c6094..097ed49 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarMessageController.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/controller/CarMessageController.java @@ -63,7 +63,7 @@ public class CarMessageController { @Operation(summary = "修改报文信息") public Result updateCarMessage(@Validated @RequestBody CarMessage carMessage){ Result updateCarMessage = carMessageService.updateCarMessage(carMessage); - return Result.success(updateCarMessage); + return Result.success(updateCarMessage,"修改成功"); } diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarInform.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarInform.java deleted file mode 100644 index 2f6a431..0000000 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarInform.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.muyu.car.domain.resp; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.Date; - -@Data -@NoArgsConstructor -@AllArgsConstructor -@Builder -public class CarInform { -private Integer inoAuth; -private String inOauth; -private String unoAuth; -private String inYoh; -private String inoSauth; -private String inoAutciHh; -private Integer inocsdJuth; -private Integer inoUautUh; -private String inoaHuth; -private Integer inoauDth; -private String inRoauth; -private Integer inoafuth; -private Integer inoafDuth; -private Integer inOafuth; -private Integer inoAfuth; -private Integer inoaFuth; -private Integer ifsdjjoafuth; -private Date inoafujsdhth; -private Integer inoasdfuth; -private Integer inoaasdfuth; -private Integer inoauth; -private Integer inoasdauth; -private Integer inoaasduth; -private Integer inoavsduth; -private Integer inoyjauth; -private Integer inojtyauth; -private Integer inoaujtth; -private Integer inoajyuth; -private Integer inoaRruth; -private Integer infdwroauth; -private Integer ifrnoauth; -private Integer ifgnoauth; -private Integer ingrtoauth; -private Integer injtjoauth; -private Integer ityjnoauth; -private Integer ghndinoauth; -private Integer dtnjdindnauth; -private Integer yyytjinoadytnjyuth; -private Integer inotyjauth; -private Integer inytjoauth; -private Integer inyttyjjoauth; -private Integer inotjtauth; -private Integer injtyjoauth; -private Integer inyjoauth; -private Integer inoayjtuth; -private Integer inojtyjauth; -private Integer inoyjtauth; -private Integer inotyjuikjtyjauth; -private Integer intjoauth; -private Integer intyjoauth; -private Integer inoggdeauth; -private Integer inotrhrtauth; -private Integer inhjtmyoauth; -private Integer inoaujteth; -private Integer inoaehehuth; -private Integer inoathtjuth; -private Integer inotjytjyauth; -private Integer inyujyoauth; -private Integer inojtryjauth; -private Integer tyjtyjtyjty; -private Integer in64jytoauth; -private Integer inoaujtjth; -private Integer inoatyjuth; -private Integer intjyrtyoauth; -private Integer inoautyjftyjth; -private Integer inoatyhjjmuth; -private Integer innmtyjntoauth; -private Integer inoatyjhtjhuth; -private Integer inoatyhtuth; -private Integer inotyjtauth; -private Integer inoautyjtyth; -private Integer inoauiluith; -private Integer inoasfwdfuth; -private Integer iewfnoauth; -private Integer inofwefebauth; -private Integer inoauvdvfvth; -private Integer inoafverfveruth; -private Integer invreoauth; -private Integer igrenoauth; -private Integer inefweffgbroauth; -private Integer inoaurfeth; -private Integer inoaugegergth; -private Integer inoaergrguth; -private Integer inoafgsferguth; -private Integer inoaergerguth; -private Integer inoavdvguth; -private Integer inoergreauth; -private Integer inoregauth; -private Integer inorgauth; -private Integer irgergnoauth; -private Integer inorgegauth; -private Integer inoergeauth; -private Integer ergrf; -private Integer rg; -private Integer inoautrgfh; -private Integer inofreauth; -private Integer inogrgergauth; -private Integer inofgrsgauth; -private Integer inosdfrgauth; -private Integer inowrfrauth; -private Integer inorgrgrauth; -private Integer inrfgrgoauth; -private Integer inofggauth; -private Integer inorgrrgauth; -private Integer inorgrgauth; -private Integer inoaugdbfth; -private Integer inoardfgeruth; -private Integer inoaerferuth; -private Integer inoaergereuth; -private Integer inoergauth; -private Integer inoerfeauth; -private Integer inoaerrgeruth; -private Integer inoarfrfuth; -private Integer inoarferuth; -private Integer inoargerguth; -private Integer rgr; -private Integer drgr; -private Integer inofrgvredgauth; -private Integer rgerg; -private Integer inorgregauth; -private Integer rgreg; - -} diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarReq.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarReq.java new file mode 100644 index 0000000..2000605 --- /dev/null +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/domain/resp/CarReq.java @@ -0,0 +1,73 @@ +package com.muyu.car.domain.resp; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class CarReq { + + private String EatImagtion; + private String imgTion; + private String EatIma6ion; + private String EatImagtFformion; + private String EatTailImagtion; + private String EatImagertion; + private String EatImagtodoion; + private String EatasImagtion; + private String EatImageartion; + private String imagtionId; + private String Eagtion; + private String EatImag; + private String tImag; + private String agtizyRon; + private String EatImagcdtion; + private String agtigagtion; + private String EatImfhgdfagtion; + private String EffatImagtion; + private String EatImadfggtion; + private String EatImagfgtion; + private String EatImaggdtion; + private String EatImagdfgtion; + private String EatImfdgadfggtion; + private String EatIfdgmagtion; + private String EatIfdgfgmagtion; + private String EatImagdffggtion; + private String EatImaggfdtion; + private String EatImagtigon; + private String EatImagtbjion; + private String EatImagt_fdgion; + private String EatrgImagtion; + private String EatIdgmagtion; + private String EatImafggtion; + private String EgatImgagtion; + private String EatImggagtion; + private String EatImagfdgtion; + private String EatdfgImadfggtion; + private String EatIgdmagtion; + private String EatImagd; + private String EatdfgImagtion; + private String EatIgfgmagtion; + private String EatIsdmagtion; + private String EatfImagtion; + private String EadatImagtion; + private String EatdgImagtion; + private String EatdImagtion; + private String EatIafmagtion; + private String EatIagffmagtion; + private String EatgsImagtion; + private String EatasdImagtion; + private String EatIadmagtion; + private String EatadImagtion; + private String EatIcvmagtion; + private String EatImagtfion; + private String EatImagation; + private String EatImfagtion; + private String EatImagyution; + + +} diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/mapper/CarInformationMapper.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/mapper/CarInformationMapper.java index 0954456..1c822b0 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/mapper/CarInformationMapper.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/mapper/CarInformationMapper.java @@ -52,6 +52,8 @@ public interface CarInformationMapper { */ Integer updatecarInformation(CarInformationUpdReq carInformationUpdReq); + + /** * To 电子围栏负责人 * 查询企业车辆 carInformationID 和 carInformationLicensePlate diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/service/Impl/CarInformationServiceImpl.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/service/Impl/CarInformationServiceImpl.java index 9fda837..71e7337 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/service/Impl/CarInformationServiceImpl.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/car/service/Impl/CarInformationServiceImpl.java @@ -3,6 +3,7 @@ package com.muyu.car.service.Impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.muyu.car.domain.CarInformation; +import com.muyu.car.domain.CarMessage; import com.muyu.car.domain.req.CarInformationAddReq; import com.muyu.car.domain.req.CarInformationListReq; import com.muyu.car.domain.req.CarInformationUpdReq; @@ -50,13 +51,18 @@ public class CarInformationServiceImpl implements CarInformationService { return Result.error(402,"删除车辆失败"); } + @Override public Result updatecarInformation(CarInformationUpdReq carInformationUpdReq) { Integer updatecarInformation = carInformationMapper.updatecarInformation(carInformationUpdReq); - return Result.success(updatecarInformation,"修改车辆信息成功"); - + if(updatecarInformation > 0) + { + return Result.success(carInformationUpdReq,"修改成功"); + } + return Result.error( 402,"修改失败"); } + @Override public List selectBycarInformationIDAndLicensePlate() { return carInformationMapper.selectBycarInformationIDAndLicensePlate(); diff --git a/cloud-modules/cloud-modules-car/src/main/resources/mapper/car/CarInformationMapper.xml b/cloud-modules/cloud-modules-car/src/main/resources/mapper/car/CarInformationMapper.xml index 1325b02..38fdd7f 100644 --- a/cloud-modules/cloud-modules-car/src/main/resources/mapper/car/CarInformationMapper.xml +++ b/cloud-modules/cloud-modules-car/src/main/resources/mapper/car/CarInformationMapper.xml @@ -137,31 +137,46 @@ UPDATE `car_information` SET - `car_information_VIN` = #{carInformationVIN}, - - `car_information_license_plate` = #{carInformationLicensePlate}, - - `car_information_brand` = #{carInformationBrand}, - - `car_information_color` = #{carInformationColor}, - - `car_information_driver` = #{carInformationDriver}, - - `car_information_examine_enddata` = #{carInformationExamineEnddata}, - - `car_information_motor_manufacturer` = #{carInformationMotorManufacturer}, - - `car_information_motor_model` = #{carInformationMotorModel} , - - `car_information_battery_manufacturer` = #{carInformationBatteryManufacturer}, - - `car_information_battery_model` = #{carInformationBatteryModel}, - - `car_information_fence` = #{carInformationFence}, - - `car_information_type` = #{carInformationType} - - WHERE `car_information_id` = #{carInformationId} + + `car_information`.car_information_VIN = #{carInformationVIN}, + + + `car_information`.car_information_license_plate = #{carInformationLicensePlate}, + + + `car_information`.car_information_brand = #{carInformationBrand}, + + + `car_information`.car_information_color = #{carInformationColor}, + + + `car_information`.car_information_driver = #{carInformationDriver}, + + + `car_information`.car_information_motor_manufacturer = #{carInformationMotorManufacturer}, + + + `car_information`.car_information_motor_model = #{carInformationMotorModel} , + + + `car_information`.car_information_battery_manufacturer = #{carInformationBatteryManufacturer}, + + + `car_information`.car_information_battery_model = #{carInformationBatteryModel}, + + + `car_information`.car_information_fence = #{carInformationFence}, + + + `car_information`.car_information_type = #{carInformationType} , + + + `car_information`.car_information_focus = #{carInformationFocus}, + + + `car_information`.car_information_state = #{carInformationState} + + WHERE `car_information`.car_information_id = #{carInformationId}