From 7ebb929692583f3d9553a6cdcb0e8fb1d5d771d0 Mon Sep 17 00:00:00 2001 From: Angel <1050374295@qq.com> Date: Thu, 25 Jan 2024 12:26:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=AF=E5=8F=A3=E8=B4=9F=E8=B4=A3=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../MetaPortContactPersonInfoController.java | 39 +++++++++++++++++++ .../domain/MetaPortContactPersonInfo.java | 30 ++++++++++++++ .../MetaPortContactPersonInfoMapper.java | 9 +++++ .../MetaPortContactPersonInfoService.java | 7 ++++ .../MetaPortContactPersonInfoServiceImpl.java | 11 ++++++ 5 files changed, 96 insertions(+) create mode 100644 gather-app/src/main/java/com/ruoyi/database/controller/MetaPortContactPersonInfoController.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/domain/MetaPortContactPersonInfo.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortContactPersonInfoMapper.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/MetaPortContactPersonInfoService.java create mode 100644 gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortContactPersonInfoServiceImpl.java diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/MetaPortContactPersonInfoController.java b/gather-app/src/main/java/com/ruoyi/database/controller/MetaPortContactPersonInfoController.java new file mode 100644 index 0000000..e7e351b --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/MetaPortContactPersonInfoController.java @@ -0,0 +1,39 @@ +package com.ruoyi.database.controller; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.database.domain.MetaPortContactPersonInfo; +import com.ruoyi.database.domain.MetaPortInfo; +import com.ruoyi.database.service.MetaPortContactPersonInfoService; +import com.ruoyi.database.service.MetaPortInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Api(tags = "智能设备信息表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/contact/person") +public class MetaPortContactPersonInfoController { + private final MetaPortContactPersonInfoService metaPortContactPersonInfoService; + private final MetaPortInfoService metaPortInfoService; + + @GetMapping + @ApiOperation("查询负责人") + public AjaxResult list(@RequestParam String portAddress) { + // 查询 metaPortContactPersonInfo 库中的数据 + QueryWrapper contactPersonInfoQueryWrapper = new QueryWrapper<>(); + contactPersonInfoQueryWrapper.eq("port_address", portAddress); + List contactPersonInfoList = metaPortContactPersonInfoService.list(contactPersonInfoQueryWrapper); + // 返回结果给前端 + return AjaxResult.success(contactPersonInfoList); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/MetaPortContactPersonInfo.java b/gather-app/src/main/java/com/ruoyi/database/domain/MetaPortContactPersonInfo.java new file mode 100644 index 0000000..6978fa9 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/MetaPortContactPersonInfo.java @@ -0,0 +1,30 @@ +package com.ruoyi.database.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.common.annotation.Excel; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "meta_port_contact_person_info") +@ApiModel(value = "MetaPortContactPersonInfo", description = "港口负责人信息表") +public class MetaPortContactPersonInfo { + @ApiModelProperty("单位名称") + @Excel(name = "单位名称") + private String unitName; + + @ApiModelProperty("手机号码") + @Excel(name = "手机号码") + private String telephone; + + @ApiModelProperty("负责人") + @Excel(name = "负责人") + private String contactPerson; + + @ApiModelProperty("港口地址") + @Excel(name = "港口地址") + private String portAddress; +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortContactPersonInfoMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortContactPersonInfoMapper.java new file mode 100644 index 0000000..4956de6 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/MetaPortContactPersonInfoMapper.java @@ -0,0 +1,9 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.MetaPortContactPersonInfo; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface MetaPortContactPersonInfoMapper extends BaseMapper { +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/MetaPortContactPersonInfoService.java b/gather-app/src/main/java/com/ruoyi/database/service/MetaPortContactPersonInfoService.java new file mode 100644 index 0000000..96efcb2 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/MetaPortContactPersonInfoService.java @@ -0,0 +1,7 @@ +package com.ruoyi.database.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.MetaPortContactPersonInfo; + +public interface MetaPortContactPersonInfoService extends IService { +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortContactPersonInfoServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortContactPersonInfoServiceImpl.java new file mode 100644 index 0000000..7f95f1a --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/MetaPortContactPersonInfoServiceImpl.java @@ -0,0 +1,11 @@ +package com.ruoyi.database.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.database.domain.MetaPortContactPersonInfo; +import com.ruoyi.database.mapper.MetaPortContactPersonInfoMapper; +import com.ruoyi.database.service.MetaPortContactPersonInfoService; + +import javax.xml.ws.Service; + +public class MetaPortContactPersonInfoServiceImpl extends ServiceImpl implements MetaPortContactPersonInfoService { +}