parent
6b68847920
commit
7ebb929692
@ -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<MetaPortContactPersonInfo> contactPersonInfoQueryWrapper = new QueryWrapper<>();
|
||||
contactPersonInfoQueryWrapper.eq("port_address", portAddress);
|
||||
List<MetaPortContactPersonInfo> contactPersonInfoList = metaPortContactPersonInfoService.list(contactPersonInfoQueryWrapper);
|
||||
// 返回结果给前端
|
||||
return AjaxResult.success(contactPersonInfoList);
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<MetaPortContactPersonInfo> {
|
||||
}
|
@ -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<MetaPortContactPersonInfo> {
|
||||
}
|
@ -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<MetaPortContactPersonInfoMapper, MetaPortContactPersonInfo> implements MetaPortContactPersonInfoService {
|
||||
}
|
Loading…
Reference in new issue