From 1f3812d7870b070f1ba077ca67fe8e36ed349d83 Mon Sep 17 00:00:00 2001 From: zhoumingxiu Date: Tue, 2 Jan 2024 17:18:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=8E=E7=BA=BF=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=8E=A5=E5=8F=A3=E9=9B=86=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../TiewireInterfaceInfoController.java | 104 +++++ .../tiewire/domain/TiewireInterfaceInfo.java | 196 +++++++++ .../mapper/TiewireInterfaceInfoMapper.java | 61 +++ .../service/ITiewireInterfaceInfoService.java | 61 +++ .../impl/TiewireInterfaceInfoServiceImpl.java | 98 +++++ .../tiewire/TiewireInterfaceInfoMapper.xml | 132 ++++++ god-ui/src/api/tiewire/interface.js | 44 ++ god-ui/src/views/tiewire/interface/index.vue | 414 ++++++++++++++++++ 8 files changed, 1110 insertions(+) create mode 100644 God-Vue-master/god-admin/src/main/java/com/god/web/controller/tiewire/TiewireInterfaceInfoController.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/tiewire/domain/TiewireInterfaceInfo.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/tiewire/mapper/TiewireInterfaceInfoMapper.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/tiewire/service/ITiewireInterfaceInfoService.java create mode 100644 God-Vue-master/god-system/src/main/java/com/god/tiewire/service/impl/TiewireInterfaceInfoServiceImpl.java create mode 100644 God-Vue-master/god-system/src/main/resources/mapper/tiewire/TiewireInterfaceInfoMapper.xml create mode 100644 god-ui/src/api/tiewire/interface.js create mode 100644 god-ui/src/views/tiewire/interface/index.vue diff --git a/God-Vue-master/god-admin/src/main/java/com/god/web/controller/tiewire/TiewireInterfaceInfoController.java b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/tiewire/TiewireInterfaceInfoController.java new file mode 100644 index 00000000..e8d3f28e --- /dev/null +++ b/God-Vue-master/god-admin/src/main/java/com/god/web/controller/tiewire/TiewireInterfaceInfoController.java @@ -0,0 +1,104 @@ +package com.god.web.controller.tiewire; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.god.common.annotation.Log; +import com.god.common.core.controller.BaseController; +import com.god.common.core.domain.AjaxResult; +import com.god.common.enums.BusinessType; +import com.god.tiewire.domain.TiewireInterfaceInfo; +import com.god.tiewire.service.ITiewireInterfaceInfoService; +import com.god.common.utils.poi.ExcelUtil; +import com.god.common.core.page.TableDataInfo; + +/** + * 接口集成Controller + * + * @author god + * @date 2024-01-02 + */ +@RestController +@RequestMapping("/tiewire/interface") +public class TiewireInterfaceInfoController extends BaseController +{ + @Autowired + private ITiewireInterfaceInfoService tiewireInterfaceInfoService; + + /** + * 查询接口集成列表 + */ + @PreAuthorize("@ss.hasPermi('tiewire:interface:list')") + @GetMapping("/list") + public TableDataInfo list(TiewireInterfaceInfo tiewireInterfaceInfo) + { + startPage(); + List list = tiewireInterfaceInfoService.selectTiewireInterfaceInfoList(tiewireInterfaceInfo); + return getDataTable(list); + } + + /** + * 导出接口集成列表 + */ + @PreAuthorize("@ss.hasPermi('tiewire:interface:export')") + @Log(title = "接口集成", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, TiewireInterfaceInfo tiewireInterfaceInfo) + { + List list = tiewireInterfaceInfoService.selectTiewireInterfaceInfoList(tiewireInterfaceInfo); + ExcelUtil util = new ExcelUtil(TiewireInterfaceInfo.class); + util.exportExcel(response, list, "接口集成数据"); + } + + /** + * 获取接口集成详细信息 + */ + @PreAuthorize("@ss.hasPermi('tiewire:interface:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") String id) + { + return success(tiewireInterfaceInfoService.selectTiewireInterfaceInfoById(id)); + } + + /** + * 新增接口集成 + */ + @PreAuthorize("@ss.hasPermi('tiewire:interface:add')") + @Log(title = "接口集成", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody TiewireInterfaceInfo tiewireInterfaceInfo) + { + return toAjax(tiewireInterfaceInfoService.insertTiewireInterfaceInfo(tiewireInterfaceInfo)); + } + + /** + * 修改接口集成 + */ + @PreAuthorize("@ss.hasPermi('tiewire:interface:edit')") + @Log(title = "接口集成", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody TiewireInterfaceInfo tiewireInterfaceInfo) + { + return toAjax(tiewireInterfaceInfoService.updateTiewireInterfaceInfo(tiewireInterfaceInfo)); + } + + /** + * 删除接口集成 + */ + @PreAuthorize("@ss.hasPermi('tiewire:interface:remove')") + @Log(title = "接口集成", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable String[] ids) + { + return toAjax(tiewireInterfaceInfoService.deleteTiewireInterfaceInfoByIds(ids)); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/tiewire/domain/TiewireInterfaceInfo.java b/God-Vue-master/god-system/src/main/java/com/god/tiewire/domain/TiewireInterfaceInfo.java new file mode 100644 index 00000000..5c12f3dd --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/tiewire/domain/TiewireInterfaceInfo.java @@ -0,0 +1,196 @@ +package com.god.tiewire.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.god.common.annotation.Excel; +import com.god.common.core.domain.BaseEntity; + +/** + * 接口集成对象 tiewire_interface_info + * + * @author god + * @date 2024-01-02 + */ +public class TiewireInterfaceInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键id */ + private String id; + + /** 接口id */ + @Excel(name = "接口id") + private String interfaceCode; + + /** 接口名称 */ + @Excel(name = "接口名称") + private String interfaceName; + + /** 协议类型 */ + @Excel(name = "协议类型") + private String protocolType; + + /** 设备品牌 */ + @Excel(name = "设备品牌") + private String deviceBrand; + + /** 轧辊类型 */ + @Excel(name = "轧辊类型") + private String productType; + + /** 接口类型 */ + @Excel(name = "接口类型") + private String interfaceType; + + /** 是否启用 */ + @Excel(name = "是否启用") + private String callType; + + /** 接口地址 */ + @Excel(name = "接口地址") + private String address; + + /** 跳转地址 */ + @Excel(name = "跳转地址") + private String token; + + /** 参数值 */ + @Excel(name = "参数值") + private String paramValue; + + /** 数据类型 */ + @Excel(name = "数据类型") + private String dataType; + + public void setId(String id) + { + this.id = id; + } + + public String getId() + { + return id; + } + public void setInterfaceCode(String interfaceCode) + { + this.interfaceCode = interfaceCode; + } + + public String getInterfaceCode() + { + return interfaceCode; + } + public void setInterfaceName(String interfaceName) + { + this.interfaceName = interfaceName; + } + + public String getInterfaceName() + { + return interfaceName; + } + public void setProtocolType(String protocolType) + { + this.protocolType = protocolType; + } + + public String getProtocolType() + { + return protocolType; + } + public void setDeviceBrand(String deviceBrand) + { + this.deviceBrand = deviceBrand; + } + + public String getDeviceBrand() + { + return deviceBrand; + } + public void setProductType(String productType) + { + this.productType = productType; + } + + public String getProductType() + { + return productType; + } + public void setInterfaceType(String interfaceType) + { + this.interfaceType = interfaceType; + } + + public String getInterfaceType() + { + return interfaceType; + } + public void setCallType(String callType) + { + this.callType = callType; + } + + public String getCallType() + { + return callType; + } + public void setAddress(String address) + { + this.address = address; + } + + public String getAddress() + { + return address; + } + public void setToken(String token) + { + this.token = token; + } + + public String getToken() + { + return token; + } + public void setParamValue(String paramValue) + { + this.paramValue = paramValue; + } + + public String getParamValue() + { + return paramValue; + } + public void setDataType(String dataType) + { + this.dataType = dataType; + } + + public String getDataType() + { + return dataType; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("interfaceCode", getInterfaceCode()) + .append("interfaceName", getInterfaceName()) + .append("protocolType", getProtocolType()) + .append("deviceBrand", getDeviceBrand()) + .append("productType", getProductType()) + .append("interfaceType", getInterfaceType()) + .append("callType", getCallType()) + .append("address", getAddress()) + .append("token", getToken()) + .append("paramValue", getParamValue()) + .append("remark", getRemark()) + .append("dataType", getDataType()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/tiewire/mapper/TiewireInterfaceInfoMapper.java b/God-Vue-master/god-system/src/main/java/com/god/tiewire/mapper/TiewireInterfaceInfoMapper.java new file mode 100644 index 00000000..4f3842f0 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/tiewire/mapper/TiewireInterfaceInfoMapper.java @@ -0,0 +1,61 @@ +package com.god.tiewire.mapper; + +import java.util.List; +import com.god.tiewire.domain.TiewireInterfaceInfo; + +/** + * 接口集成Mapper接口 + * + * @author god + * @date 2024-01-02 + */ +public interface TiewireInterfaceInfoMapper +{ + /** + * 查询接口集成 + * + * @param id 接口集成主键 + * @return 接口集成 + */ + public TiewireInterfaceInfo selectTiewireInterfaceInfoById(String id); + + /** + * 查询接口集成列表 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 接口集成集合 + */ + public List selectTiewireInterfaceInfoList(TiewireInterfaceInfo tiewireInterfaceInfo); + + /** + * 新增接口集成 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 结果 + */ + public int insertTiewireInterfaceInfo(TiewireInterfaceInfo tiewireInterfaceInfo); + + /** + * 修改接口集成 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 结果 + */ + public int updateTiewireInterfaceInfo(TiewireInterfaceInfo tiewireInterfaceInfo); + + /** + * 删除接口集成 + * + * @param id 接口集成主键 + * @return 结果 + */ + public int deleteTiewireInterfaceInfoById(String id); + + /** + * 批量删除接口集成 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteTiewireInterfaceInfoByIds(String[] ids); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/tiewire/service/ITiewireInterfaceInfoService.java b/God-Vue-master/god-system/src/main/java/com/god/tiewire/service/ITiewireInterfaceInfoService.java new file mode 100644 index 00000000..1f2b48cf --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/tiewire/service/ITiewireInterfaceInfoService.java @@ -0,0 +1,61 @@ +package com.god.tiewire.service; + +import java.util.List; +import com.god.tiewire.domain.TiewireInterfaceInfo; + +/** + * 接口集成Service接口 + * + * @author god + * @date 2024-01-02 + */ +public interface ITiewireInterfaceInfoService +{ + /** + * 查询接口集成 + * + * @param id 接口集成主键 + * @return 接口集成 + */ + public TiewireInterfaceInfo selectTiewireInterfaceInfoById(String id); + + /** + * 查询接口集成列表 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 接口集成集合 + */ + public List selectTiewireInterfaceInfoList(TiewireInterfaceInfo tiewireInterfaceInfo); + + /** + * 新增接口集成 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 结果 + */ + public int insertTiewireInterfaceInfo(TiewireInterfaceInfo tiewireInterfaceInfo); + + /** + * 修改接口集成 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 结果 + */ + public int updateTiewireInterfaceInfo(TiewireInterfaceInfo tiewireInterfaceInfo); + + /** + * 批量删除接口集成 + * + * @param ids 需要删除的接口集成主键集合 + * @return 结果 + */ + public int deleteTiewireInterfaceInfoByIds(String[] ids); + + /** + * 删除接口集成信息 + * + * @param id 接口集成主键 + * @return 结果 + */ + public int deleteTiewireInterfaceInfoById(String id); +} diff --git a/God-Vue-master/god-system/src/main/java/com/god/tiewire/service/impl/TiewireInterfaceInfoServiceImpl.java b/God-Vue-master/god-system/src/main/java/com/god/tiewire/service/impl/TiewireInterfaceInfoServiceImpl.java new file mode 100644 index 00000000..91d34d00 --- /dev/null +++ b/God-Vue-master/god-system/src/main/java/com/god/tiewire/service/impl/TiewireInterfaceInfoServiceImpl.java @@ -0,0 +1,98 @@ +package com.god.tiewire.service.impl; + +import java.util.List; +import com.god.common.utils.DateUtils; +import com.god.common.utils.uuid.IdUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.god.tiewire.mapper.TiewireInterfaceInfoMapper; +import com.god.tiewire.domain.TiewireInterfaceInfo; +import com.god.tiewire.service.ITiewireInterfaceInfoService; + +/** + * 接口集成Service业务层处理 + * + * @author god + * @date 2024-01-02 + */ +@Service +public class TiewireInterfaceInfoServiceImpl implements ITiewireInterfaceInfoService +{ + @Autowired + private TiewireInterfaceInfoMapper tiewireInterfaceInfoMapper; + + /** + * 查询接口集成 + * + * @param id 接口集成主键 + * @return 接口集成 + */ + @Override + public TiewireInterfaceInfo selectTiewireInterfaceInfoById(String id) + { + return tiewireInterfaceInfoMapper.selectTiewireInterfaceInfoById(id); + } + + /** + * 查询接口集成列表 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 接口集成 + */ + @Override + public List selectTiewireInterfaceInfoList(TiewireInterfaceInfo tiewireInterfaceInfo) + { + return tiewireInterfaceInfoMapper.selectTiewireInterfaceInfoList(tiewireInterfaceInfo); + } + + /** + * 新增接口集成 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 结果 + */ + @Override + public int insertTiewireInterfaceInfo(TiewireInterfaceInfo tiewireInterfaceInfo) + { + tiewireInterfaceInfo.setId(IdUtils.fastUUID()); + tiewireInterfaceInfo.setCreateTime(DateUtils.getNowDate()); + return tiewireInterfaceInfoMapper.insertTiewireInterfaceInfo(tiewireInterfaceInfo); + } + + /** + * 修改接口集成 + * + * @param tiewireInterfaceInfo 接口集成 + * @return 结果 + */ + @Override + public int updateTiewireInterfaceInfo(TiewireInterfaceInfo tiewireInterfaceInfo) + { + tiewireInterfaceInfo.setUpdateTime(DateUtils.getNowDate()); + return tiewireInterfaceInfoMapper.updateTiewireInterfaceInfo(tiewireInterfaceInfo); + } + + /** + * 批量删除接口集成 + * + * @param ids 需要删除的接口集成主键 + * @return 结果 + */ + @Override + public int deleteTiewireInterfaceInfoByIds(String[] ids) + { + return tiewireInterfaceInfoMapper.deleteTiewireInterfaceInfoByIds(ids); + } + + /** + * 删除接口集成信息 + * + * @param id 接口集成主键 + * @return 结果 + */ + @Override + public int deleteTiewireInterfaceInfoById(String id) + { + return tiewireInterfaceInfoMapper.deleteTiewireInterfaceInfoById(id); + } +} diff --git a/God-Vue-master/god-system/src/main/resources/mapper/tiewire/TiewireInterfaceInfoMapper.xml b/God-Vue-master/god-system/src/main/resources/mapper/tiewire/TiewireInterfaceInfoMapper.xml new file mode 100644 index 00000000..12e2b6f5 --- /dev/null +++ b/God-Vue-master/god-system/src/main/resources/mapper/tiewire/TiewireInterfaceInfoMapper.xml @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + select id, interface_code, interface_name, protocol_type, device_brand, product_type, interface_type, call_type, address, token, param_value, remark, data_type, create_by, create_time, update_by, update_time from tiewire_interface_info + + + + + + + + insert into tiewire_interface_info + + id, + interface_code, + interface_name, + protocol_type, + device_brand, + product_type, + interface_type, + call_type, + address, + token, + param_value, + remark, + data_type, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{interfaceCode}, + #{interfaceName}, + #{protocolType}, + #{deviceBrand}, + #{productType}, + #{interfaceType}, + #{callType}, + #{address}, + #{token}, + #{paramValue}, + #{remark}, + #{dataType}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update tiewire_interface_info + + interface_code = #{interfaceCode}, + interface_name = #{interfaceName}, + protocol_type = #{protocolType}, + device_brand = #{deviceBrand}, + product_type = #{productType}, + interface_type = #{interfaceType}, + call_type = #{callType}, + address = #{address}, + token = #{token}, + param_value = #{paramValue}, + remark = #{remark}, + data_type = #{dataType}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from tiewire_interface_info where id = #{id} + + + + delete from tiewire_interface_info where id in + + #{id} + + + \ No newline at end of file diff --git a/god-ui/src/api/tiewire/interface.js b/god-ui/src/api/tiewire/interface.js new file mode 100644 index 00000000..04960e68 --- /dev/null +++ b/god-ui/src/api/tiewire/interface.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询接口集成列表 +export function listInterface(query) { + return request({ + url: '/tiewire/interface/list', + method: 'get', + params: query + }) +} + +// 查询接口集成详细 +export function getInterface(id) { + return request({ + url: '/tiewire/interface/' + id, + method: 'get' + }) +} + +// 新增接口集成 +export function addInterface(data) { + return request({ + url: '/tiewire/interface', + method: 'post', + data: data + }) +} + +// 修改接口集成 +export function updateInterface(data) { + return request({ + url: '/tiewire/interface', + method: 'put', + data: data + }) +} + +// 删除接口集成 +export function delInterface(id) { + return request({ + url: '/tiewire/interface/' + id, + method: 'delete' + }) +} diff --git a/god-ui/src/views/tiewire/interface/index.vue b/god-ui/src/views/tiewire/interface/index.vue new file mode 100644 index 00000000..1bea94fe --- /dev/null +++ b/god-ui/src/views/tiewire/interface/index.vue @@ -0,0 +1,414 @@ + + +