From ca0b314a0f6fd1809c3db0c1e2a84ca64b3028a7 Mon Sep 17 00:00:00 2001 From: zhang xu <2125563902@qq.com> Date: Tue, 21 May 2024 22:11:34 +0800 Subject: [PATCH] text:(iotDB) --- .../java/com/muyu/etl/domain/req/Areq.java | 146 ++++++++++++++++++ .../controller/AssetAccreditController.java | 112 ++++++++++++++ .../engine/engine/action/ActionDiscard.java | 10 ++ 3 files changed, 268 insertions(+) create mode 100644 muyu-modules/muyu-etl/muyu-etl-common/src/main/java/com/muyu/etl/domain/req/Areq.java create mode 100644 muyu-modules/muyu-etl/muyu-etl-service/src/main/java/com/muyu/etl/controller/AssetAccreditController.java create mode 100644 muyu-modules/muyu-rule-engine/muyu-rule-engine-common/src/main/java/com/muyu/rule/engine/engine/action/ActionDiscard.java diff --git a/muyu-modules/muyu-etl/muyu-etl-common/src/main/java/com/muyu/etl/domain/req/Areq.java b/muyu-modules/muyu-etl/muyu-etl-common/src/main/java/com/muyu/etl/domain/req/Areq.java new file mode 100644 index 0000000..9fcd301 --- /dev/null +++ b/muyu-modules/muyu-etl/muyu-etl-common/src/main/java/com/muyu/etl/domain/req/Areq.java @@ -0,0 +1,146 @@ +package com.muyu.etl.domain.req; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @ClassDescription: + * @JdkVersion: 17 + * @Author: zhangxu + * @Created: 2024/5/16 11:21 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class Areq { + + private static final long serialVersionUID = 1L; + + private Long id; + + private String dataSourceName; + + private String linkAddress; + + private String post; + + private String sql; + + private String databaseName; + private String username; + + private String password; + + private String pwd; + + private String tableName; + + private String connectionParam; + + private String initNum; + + private String maxNum; + + private String count; + + private String maxWaitTime; + + private String maxWaitSize; + + private String type; + + private String systemName; + + private String jdbcDriver; + + private String modeName; + + public String getJdbcDriver() { + return jdbcDriver; + } + public void setJdbcDriver(String jdbcDriver) { + this.jdbcDriver = jdbcDriver; + } + + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } + public String getSystemName() { + return systemName; + } + public void setSystemName(String systemName){ + this.systemName = systemName; + } + public String getModeName() { + return modeName; + } + + public void setModeName(String modeName) { + this.modeName = modeName; + } + public String getDataSourceName() { + return dataSourceName; + } + public void setDataSourceName(String dataSourceName) { + this.dataSourceName = dataSourceName; + } + public String getLinkAddress() { + return linkAddress; + } + public void setLinkAddress(String linkAddress) { + this.linkAddress = linkAddress; + } + public String getPost() { + return post; + } + public void setPost(String post) { + this.post = post; + } + public String getSql() { + return sql; + } + public void setSql(String sql) { + this.sql = sql; + + } + + public String getDatabaseName() { + return databaseName; + } + public void setDatabaseName(String databaseName) { + this.databaseName = databaseName; + } + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public String getPassword() { + return password; + } + public void setPassword(String password) { + this.password = password; + } + public String getPwd() { + return pwd; + } + public void setPwd(String pwd) { + this.pwd = pwd; + } + public String getTableName() { + return tableName; + } + public void setTableName(String tableName) { + this.tableName = tableName; + } + public String getConnectionParam() { + return connectionParam; + } + + +} diff --git a/muyu-modules/muyu-etl/muyu-etl-service/src/main/java/com/muyu/etl/controller/AssetAccreditController.java b/muyu-modules/muyu-etl/muyu-etl-service/src/main/java/com/muyu/etl/controller/AssetAccreditController.java new file mode 100644 index 0000000..1131516 --- /dev/null +++ b/muyu-modules/muyu-etl/muyu-etl-service/src/main/java/com/muyu/etl/controller/AssetAccreditController.java @@ -0,0 +1,112 @@ +package com.muyu.etl.controller; + +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.web.page.TableDataInfo; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.etl.domain.AssetAccredit; +import com.muyu.etl.domain.req.AssetAccreditReq; +import com.muyu.etl.service.IAssetAccreditService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +/** + * 【请填写功能名称】Controller + * + * @author ruoyi + * @date 2024-04-25 + */ +@RestController +@RequestMapping("/assetAccredit") +public class AssetAccreditController extends BaseController +{ + @Autowired + private IAssetAccreditService assetAccreditService; + + /** + * 查询【请填写功能名称】列表 + */ + @GetMapping("/list") + public Result> list(AssetAccredit assetAccredit) + { + startPage(); + List list = assetAccreditService.selectAssetAccreditList(assetAccredit); + return getDataTable(list); + } + + /** + * 导出【请填写功能名称】列表 + */ + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AssetAccredit assetAccredit) + { + List list = assetAccreditService.selectAssetAccreditList(assetAccredit); + ExcelUtil util = new ExcelUtil(AssetAccredit.class); + util.exportExcel(response, list, "【请填写功能名称】数据"); + } + + /** + * 获取【请填写功能名称】详细信息 + */ + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(assetAccreditService.selectAssetAccreditById(id)); + } + + + /** + * 根据表id获取授权信息 + */ + @GetMapping(value = "/GetAssetAccreditByDataAssetId") + public Result getAssetAccreditByDataAssetId(@RequestParam("id") Long id) + { + return assetAccreditService.getAssetAccreditByDataAssetId(id); + } + + /** + * 新增【请填写功能名称】 + */ + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody AssetAccreditReq assetAccreditReq) + { + return assetAccreditService.insertAssetAccredit(assetAccreditReq); + } + + /** + * 授权删除 + */ + @Log(title = "授权删除", businessType = BusinessType.INSERT) + @PostMapping("/DeleteAssetAccreditByAssetIds") + public Result deleteSourceAccreditBySourceIds(@RequestBody AssetAccreditReq assetAccreditReq) + { + return assetAccreditService.deleteAssetAccreditByAssetIds(assetAccreditReq); + } + + /** + * 修改【请填写功能名称】 + */ + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody AssetAccredit assetAccredit) + { + return toAjax(assetAccreditService.updateAssetAccredit(assetAccredit)); + } + + /** + * 删除【请填写功能名称】 + */ + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(assetAccreditService.deleteAssetAccreditByIds(ids)); + } +} diff --git a/muyu-modules/muyu-rule-engine/muyu-rule-engine-common/src/main/java/com/muyu/rule/engine/engine/action/ActionDiscard.java b/muyu-modules/muyu-rule-engine/muyu-rule-engine-common/src/main/java/com/muyu/rule/engine/engine/action/ActionDiscard.java new file mode 100644 index 0000000..5bf2e49 --- /dev/null +++ b/muyu-modules/muyu-rule-engine/muyu-rule-engine-common/src/main/java/com/muyu/rule/engine/engine/action/ActionDiscard.java @@ -0,0 +1,10 @@ +package com.muyu.rule.engine.engine.action; + +/** + * @Author: DongZeLiang + * @date: 2024/5/6 + * @Description: 丢弃 + * @Version: 1.0 + */ +public class ActionDiscard extends RuntimeException{ +}