From e48a7cf352a72a5f9716302b5262dc52b99876bc Mon Sep 17 00:00:00 2001 From: SuiXxx <1752599835@qq.com> Date: Sun, 22 Sep 2024 11:32:13 +0800 Subject: [PATCH] =?UTF-8?q?feat():=E6=B7=BB=E5=8A=A0=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=BD=A6=E8=BE=86=E7=B1=BB=E5=9E=8B=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu/controller/CarTypeController.java | 8 ++++++++ .../com/muyu/domain/resp/CarTypeResp.java | 19 +++++++++++++++++++ .../java/com/muyu/mapper/CarTypeMapper.java | 4 ++++ .../java/com/muyu/service/CarTypeService.java | 3 +++ .../muyu/service/impl/CarTypeServiceImpl.java | 6 ++++++ .../main/resources/mapper/CarTypeMapper.xml | 15 +++++++++++++++ 6 files changed, 55 insertions(+) create mode 100644 cloud-modules/cloud-modules-car/src/main/java/com/muyu/domain/resp/CarTypeResp.java create mode 100644 cloud-modules/cloud-modules-car/src/main/resources/mapper/CarTypeMapper.xml diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/controller/CarTypeController.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/controller/CarTypeController.java index a3cbd9a..743a608 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/controller/CarTypeController.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/controller/CarTypeController.java @@ -2,12 +2,15 @@ package com.muyu.controller; import com.muyu.common.core.domain.Result; import com.muyu.domain.CarType; +import com.muyu.domain.resp.CarTypeResp; import com.muyu.service.CarTypeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + @RestController @RequestMapping("/carType") @@ -22,5 +25,10 @@ public class CarTypeController { } + @GetMapping("/selectCarTypeRespList") + public Result selectCarTypeRespList() { + return Result.success(carTypeService.selectCarTypeRespList()); + } + } diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/domain/resp/CarTypeResp.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/domain/resp/CarTypeResp.java new file mode 100644 index 0000000..cf73cec --- /dev/null +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/domain/resp/CarTypeResp.java @@ -0,0 +1,19 @@ +package com.muyu.domain.resp; + + +import com.muyu.common.core.annotation.Excel; +import com.muyu.domain.CarType; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CarTypeResp extends CarType { + /** 报文模版id */ + @Excel(name = "报文模版名称") + private String templateName; +} diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/mapper/CarTypeMapper.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/mapper/CarTypeMapper.java index 46c09df..dff34d2 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/mapper/CarTypeMapper.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/mapper/CarTypeMapper.java @@ -2,8 +2,12 @@ package com.muyu.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.domain.CarType; +import com.muyu.domain.resp.CarTypeResp; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + public interface CarTypeMapper extends BaseMapper { + List selectCarTypeRespList(); } diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/CarTypeService.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/CarTypeService.java index 718d461..a1081c7 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/CarTypeService.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/CarTypeService.java @@ -2,6 +2,7 @@ package com.muyu.service; import com.baomidou.mybatisplus.extension.service.IService; import com.muyu.domain.CarType; +import com.muyu.domain.resp.CarTypeResp; import com.muyu.mapper.CarTypeMapper; import java.util.List; @@ -10,4 +11,6 @@ import java.util.List; public interface CarTypeService extends IService { List selectCarTypeList(); + List selectCarTypeRespList(); + } diff --git a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/impl/CarTypeServiceImpl.java b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/impl/CarTypeServiceImpl.java index 3648d52..b7c48de 100644 --- a/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/impl/CarTypeServiceImpl.java +++ b/cloud-modules/cloud-modules-car/src/main/java/com/muyu/service/impl/CarTypeServiceImpl.java @@ -3,6 +3,7 @@ package com.muyu.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.muyu.domain.CarType; +import com.muyu.domain.resp.CarTypeResp; import com.muyu.mapper.CarTypeMapper; import com.muyu.service.CarTypeService; import org.springframework.beans.factory.annotation.Autowired; @@ -19,4 +20,9 @@ private CarTypeMapper carTypeMapper; QueryWrapper carTypeQueryWrapper = new QueryWrapper<>(); return carTypeMapper.selectList(carTypeQueryWrapper); } + + @Override + public List selectCarTypeRespList() { + return carTypeMapper.selectCarTypeRespList(); + } } diff --git a/cloud-modules/cloud-modules-car/src/main/resources/mapper/CarTypeMapper.xml b/cloud-modules/cloud-modules-car/src/main/resources/mapper/CarTypeMapper.xml new file mode 100644 index 0000000..f169743 --- /dev/null +++ b/cloud-modules/cloud-modules-car/src/main/resources/mapper/CarTypeMapper.xml @@ -0,0 +1,15 @@ + + + + + +