From a73e58d1ab0f9927753bcca22aa2d802cb5aae6e Mon Sep 17 00:00:00 2001 From: pengren Date: Mon, 22 Apr 2024 14:34:27 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E5=8F=B7=EF=BC=9AZSSAC-585=20?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0=EF=BC=9AH5=E5=AE=89=E8=A3=85=E5=8C=85?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf-admin/src/main/resources/application.yml | 2 +- .../DeploymentModuleListController.java | 122 +++++++ .../domain/DeploymentModuleList.java | 241 +++++++++++++ .../domain/rqs/ModuleListByCoreRequest.java | 16 + .../mapper/DeploymentModuleListMapper.java | 61 ++++ .../service/IDeploymentModuleListService.java | 61 ++++ .../impl/DeploymentModuleListServiceImpl.java | 96 +++++ .../deployment/DeploymentModuleListMapper.xml | 129 +++++++ sf-ui/src/api/deployment/module.js | 44 +++ sf-ui/src/views/deployment/module/index.vue | 341 ++++++++++++++++++ 10 files changed, 1112 insertions(+), 1 deletion(-) create mode 100644 sf-system/src/main/java/com/sf/system/deployment/controller/DeploymentModuleListController.java create mode 100644 sf-system/src/main/java/com/sf/system/deployment/domain/DeploymentModuleList.java create mode 100755 sf-system/src/main/java/com/sf/system/deployment/domain/rqs/ModuleListByCoreRequest.java create mode 100644 sf-system/src/main/java/com/sf/system/deployment/mapper/DeploymentModuleListMapper.java create mode 100644 sf-system/src/main/java/com/sf/system/deployment/service/IDeploymentModuleListService.java create mode 100644 sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentModuleListServiceImpl.java create mode 100644 sf-system/src/main/resources/mapper/system/deployment/DeploymentModuleListMapper.xml create mode 100644 sf-ui/src/api/deployment/module.js create mode 100644 sf-ui/src/views/deployment/module/index.vue diff --git a/sf-admin/src/main/resources/application.yml b/sf-admin/src/main/resources/application.yml index 843f1c4..c7483a6 100644 --- a/sf-admin/src/main/resources/application.yml +++ b/sf-admin/src/main/resources/application.yml @@ -132,7 +132,7 @@ xss: file: ceph: #endpoint: http://127.0.0.1:9000 - endpoint: http://minio.zsmarter.com:8000 + endpoint: http://file.sac.zsmarter.com # 50M defaultMaxSize: 52428800 access: diff --git a/sf-system/src/main/java/com/sf/system/deployment/controller/DeploymentModuleListController.java b/sf-system/src/main/java/com/sf/system/deployment/controller/DeploymentModuleListController.java new file mode 100644 index 0000000..ac95292 --- /dev/null +++ b/sf-system/src/main/java/com/sf/system/deployment/controller/DeploymentModuleListController.java @@ -0,0 +1,122 @@ +package com.sf.system.deployment.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.sf.common.utils.StringUtils; +import com.sf.system.deployment.domain.rqs.ModuleListByCoreRequest; +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.sf.common.annotation.Log; +import com.sf.common.core.controller.BaseController; +import com.sf.common.core.domain.AjaxResult; +import com.sf.common.enums.BusinessType; +import com.sf.system.deployment.domain.DeploymentModuleList; +import com.sf.system.deployment.service.IDeploymentModuleListService; +import com.sf.common.utils.poi.ExcelUtil; +import com.sf.common.core.page.TableDataInfo; + +/** + * H5模块包Controller + * + * @author ztzh + * @date 2024-04-22 + */ +@RestController +@RequestMapping("/deployment/module") +public class DeploymentModuleListController extends BaseController +{ + @Autowired + private IDeploymentModuleListService deploymentModuleListService; + + /** + * 查询H5模块包列表 + */ + @PreAuthorize("@ss.hasPermi('deployment:module:list')") + @GetMapping("/list") + public TableDataInfo list(DeploymentModuleList deploymentModuleList) + { + startPage(); + List list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList); + return getDataTable(list); + } + /** + * 查询H5模块包列表 + */ + @GetMapping("/qurey/list") + public AjaxResult queryByCore(ModuleListByCoreRequest request) + { + if(StringUtils.isEmpty(request.getAppCore())){ + return error("appCore不能为空"); + } + DeploymentModuleList deploymentModuleList = new DeploymentModuleList(); + deploymentModuleList.setAppCore(request.getAppCore()); + deploymentModuleList.setSysType(request.getSysType()); + List list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList); + return success(list); + } + + /** + * 导出H5模块包列表 + */ + @PreAuthorize("@ss.hasPermi('deployment:module:export')") + @Log(title = "H5模块包", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, DeploymentModuleList deploymentModuleList) + { + List list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList); + ExcelUtil util = new ExcelUtil(DeploymentModuleList.class); + util.exportExcel(response, list, "H5模块包数据"); + } + + /** + * 获取H5模块包详细信息 + */ + @PreAuthorize("@ss.hasPermi('deployment:module:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(deploymentModuleListService.selectDeploymentModuleListById(id)); + } + + /** + * 新增H5模块包 + */ + @PreAuthorize("@ss.hasPermi('deployment:module:add')") + @Log(title = "H5模块包", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody DeploymentModuleList deploymentModuleList) + { + return toAjax(deploymentModuleListService.insertDeploymentModuleList(deploymentModuleList)); + } + + /** + * 修改H5模块包 + */ + @PreAuthorize("@ss.hasPermi('deployment:module:edit')") + @Log(title = "H5模块包", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody DeploymentModuleList deploymentModuleList) + { + return toAjax(deploymentModuleListService.updateDeploymentModuleList(deploymentModuleList)); + } + + /** + * 删除H5模块包 + */ + @PreAuthorize("@ss.hasPermi('deployment:module:remove')") + @Log(title = "H5模块包", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(deploymentModuleListService.deleteDeploymentModuleListByIds(ids)); + } +} diff --git a/sf-system/src/main/java/com/sf/system/deployment/domain/DeploymentModuleList.java b/sf-system/src/main/java/com/sf/system/deployment/domain/DeploymentModuleList.java new file mode 100644 index 0000000..fa4f3ef --- /dev/null +++ b/sf-system/src/main/java/com/sf/system/deployment/domain/DeploymentModuleList.java @@ -0,0 +1,241 @@ +package com.sf.system.deployment.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.sf.common.annotation.Excel; +import com.sf.common.core.domain.BaseEntity; + +/** + * H5模块包对象 DEPLOYMENT_MODULE_LIST + * + * @author ztzh + * @date 2024-04-22 + */ +public class DeploymentModuleList extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 应用id */ + private Long appId; + + /** 应用core */ + private String appCore; + + /** 上传类型 */ + private String uploadingType; + + /** 模块包名称名称 */ + @Excel(name = "模块包名称名称") + private String moduleName; + + /** 版本号 */ + @Excel(name = "版本号") + private String version; + + /** 安装包 */ + @Excel(name = "安装包") + private String moduleUrl; + + /** 安装包大小 */ + @Excel(name = "安装包大小") + private String moduleSize; + + /** 系统类型 */ + @Excel(name = "系统类型") + private String sysType; + + /** 模块类型 */ + @Excel(name = "模块类型") + private String moduleType; + + /** 上传状态 */ + @Excel(name = "上传状态") + private String uploadingStatus; + + /** 日志id */ + private Long uploadingLogId; + + /** 排序 */ + private Long orderNum; + + /** 逻辑删除,0:未删除,1:删除 */ + private Long isDelete; + + /** 创建人 */ + private String created; + + /** 更新人 */ + private String modified; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setAppId(Long appId) + { + this.appId = appId; + } + + public Long getAppId() + { + return appId; + } + public void setAppCore(String appCore) + { + this.appCore = appCore; + } + + public String getAppCore() + { + return appCore; + } + public void setUploadingType(String uploadingType) + { + this.uploadingType = uploadingType; + } + + public String getUploadingType() + { + return uploadingType; + } + public void setModuleName(String moduleName) + { + this.moduleName = moduleName; + } + + public String getModuleName() + { + return moduleName; + } + public void setVersion(String version) + { + this.version = version; + } + + public String getVersion() + { + return version; + } + public void setModuleUrl(String moduleUrl) + { + this.moduleUrl = moduleUrl; + } + + public String getModuleUrl() + { + return moduleUrl; + } + public void setModuleSize(String moduleSize) + { + this.moduleSize = moduleSize; + } + + public String getModuleSize() + { + return moduleSize; + } + public void setSysType(String sysType) + { + this.sysType = sysType; + } + + public String getSysType() + { + return sysType; + } + public void setModuleType(String moduleType) + { + this.moduleType = moduleType; + } + + public String getModuleType() + { + return moduleType; + } + public void setUploadingStatus(String uploadingStatus) + { + this.uploadingStatus = uploadingStatus; + } + + public String getUploadingStatus() + { + return uploadingStatus; + } + public void setUploadingLogId(Long uploadingLogId) + { + this.uploadingLogId = uploadingLogId; + } + + public Long getUploadingLogId() + { + return uploadingLogId; + } + public void setOrderNum(Long orderNum) + { + this.orderNum = orderNum; + } + + public Long getOrderNum() + { + return orderNum; + } + public void setIsDelete(Long isDelete) + { + this.isDelete = isDelete; + } + + public Long getIsDelete() + { + return isDelete; + } + public void setCreated(String created) + { + this.created = created; + } + + public String getCreated() + { + return created; + } + public void setModified(String modified) + { + this.modified = modified; + } + + public String getModified() + { + return modified; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("appId", getAppId()) + .append("appCore", getAppCore()) + .append("uploadingType", getUploadingType()) + .append("moduleName", getModuleName()) + .append("version", getVersion()) + .append("moduleUrl", getModuleUrl()) + .append("moduleSize", getModuleSize()) + .append("sysType", getSysType()) + .append("moduleType", getModuleType()) + .append("uploadingStatus", getUploadingStatus()) + .append("uploadingLogId", getUploadingLogId()) + .append("orderNum", getOrderNum()) + .append("isDelete", getIsDelete()) + .append("created", getCreated()) + .append("modified", getModified()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/sf-system/src/main/java/com/sf/system/deployment/domain/rqs/ModuleListByCoreRequest.java b/sf-system/src/main/java/com/sf/system/deployment/domain/rqs/ModuleListByCoreRequest.java new file mode 100755 index 0000000..998f1f2 --- /dev/null +++ b/sf-system/src/main/java/com/sf/system/deployment/domain/rqs/ModuleListByCoreRequest.java @@ -0,0 +1,16 @@ +package com.sf.system.deployment.domain.rqs; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; + + +@Data +public class ModuleListByCoreRequest { + + @NotBlank + private String appCore; + + @NotBlank + private String sysType; +} diff --git a/sf-system/src/main/java/com/sf/system/deployment/mapper/DeploymentModuleListMapper.java b/sf-system/src/main/java/com/sf/system/deployment/mapper/DeploymentModuleListMapper.java new file mode 100644 index 0000000..614b741 --- /dev/null +++ b/sf-system/src/main/java/com/sf/system/deployment/mapper/DeploymentModuleListMapper.java @@ -0,0 +1,61 @@ +package com.sf.system.deployment.mapper; + +import java.util.List; +import com.sf.system.deployment.domain.DeploymentModuleList; + +/** + * H5模块包Mapper接口 + * + * @author ztzh + * @date 2024-04-22 + */ +public interface DeploymentModuleListMapper +{ + /** + * 查询H5模块包 + * + * @param id H5模块包主键 + * @return H5模块包 + */ + public DeploymentModuleList selectDeploymentModuleListById(Long id); + + /** + * 查询H5模块包列表 + * + * @param deploymentModuleList H5模块包 + * @return H5模块包集合 + */ + public List selectDeploymentModuleListList(DeploymentModuleList deploymentModuleList); + + /** + * 新增H5模块包 + * + * @param deploymentModuleList H5模块包 + * @return 结果 + */ + public int insertDeploymentModuleList(DeploymentModuleList deploymentModuleList); + + /** + * 修改H5模块包 + * + * @param deploymentModuleList H5模块包 + * @return 结果 + */ + public int updateDeploymentModuleList(DeploymentModuleList deploymentModuleList); + + /** + * 删除H5模块包 + * + * @param id H5模块包主键 + * @return 结果 + */ + public int deleteDeploymentModuleListById(Long id); + + /** + * 批量删除H5模块包 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteDeploymentModuleListByIds(Long[] ids); +} diff --git a/sf-system/src/main/java/com/sf/system/deployment/service/IDeploymentModuleListService.java b/sf-system/src/main/java/com/sf/system/deployment/service/IDeploymentModuleListService.java new file mode 100644 index 0000000..3e503b1 --- /dev/null +++ b/sf-system/src/main/java/com/sf/system/deployment/service/IDeploymentModuleListService.java @@ -0,0 +1,61 @@ +package com.sf.system.deployment.service; + +import java.util.List; +import com.sf.system.deployment.domain.DeploymentModuleList; + +/** + * H5模块包Service接口 + * + * @author ztzh + * @date 2024-04-22 + */ +public interface IDeploymentModuleListService +{ + /** + * 查询H5模块包 + * + * @param id H5模块包主键 + * @return H5模块包 + */ + public DeploymentModuleList selectDeploymentModuleListById(Long id); + + /** + * 查询H5模块包列表 + * + * @param deploymentModuleList H5模块包 + * @return H5模块包集合 + */ + public List selectDeploymentModuleListList(DeploymentModuleList deploymentModuleList); + + /** + * 新增H5模块包 + * + * @param deploymentModuleList H5模块包 + * @return 结果 + */ + public int insertDeploymentModuleList(DeploymentModuleList deploymentModuleList); + + /** + * 修改H5模块包 + * + * @param deploymentModuleList H5模块包 + * @return 结果 + */ + public int updateDeploymentModuleList(DeploymentModuleList deploymentModuleList); + + /** + * 批量删除H5模块包 + * + * @param ids 需要删除的H5模块包主键集合 + * @return 结果 + */ + public int deleteDeploymentModuleListByIds(Long[] ids); + + /** + * 删除H5模块包信息 + * + * @param id H5模块包主键 + * @return 结果 + */ + public int deleteDeploymentModuleListById(Long id); +} diff --git a/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentModuleListServiceImpl.java b/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentModuleListServiceImpl.java new file mode 100644 index 0000000..12de1f6 --- /dev/null +++ b/sf-system/src/main/java/com/sf/system/deployment/service/impl/DeploymentModuleListServiceImpl.java @@ -0,0 +1,96 @@ +package com.sf.system.deployment.service.impl; + +import java.util.List; +import com.sf.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.sf.system.deployment.mapper.DeploymentModuleListMapper; +import com.sf.system.deployment.domain.DeploymentModuleList; +import com.sf.system.deployment.service.IDeploymentModuleListService; + +/** + * H5模块包Service业务层处理 + * + * @author ztzh + * @date 2024-04-22 + */ +@Service +public class DeploymentModuleListServiceImpl implements IDeploymentModuleListService +{ + @Autowired + private DeploymentModuleListMapper deploymentModuleListMapper; + + /** + * 查询H5模块包 + * + * @param id H5模块包主键 + * @return H5模块包 + */ + @Override + public DeploymentModuleList selectDeploymentModuleListById(Long id) + { + return deploymentModuleListMapper.selectDeploymentModuleListById(id); + } + + /** + * 查询H5模块包列表 + * + * @param deploymentModuleList H5模块包 + * @return H5模块包 + */ + @Override + public List selectDeploymentModuleListList(DeploymentModuleList deploymentModuleList) + { + return deploymentModuleListMapper.selectDeploymentModuleListList(deploymentModuleList); + } + + /** + * 新增H5模块包 + * + * @param deploymentModuleList H5模块包 + * @return 结果 + */ + @Override + public int insertDeploymentModuleList(DeploymentModuleList deploymentModuleList) + { + deploymentModuleList.setCreateTime(DateUtils.getNowDate()); + return deploymentModuleListMapper.insertDeploymentModuleList(deploymentModuleList); + } + + /** + * 修改H5模块包 + * + * @param deploymentModuleList H5模块包 + * @return 结果 + */ + @Override + public int updateDeploymentModuleList(DeploymentModuleList deploymentModuleList) + { + deploymentModuleList.setUpdateTime(DateUtils.getNowDate()); + return deploymentModuleListMapper.updateDeploymentModuleList(deploymentModuleList); + } + + /** + * 批量删除H5模块包 + * + * @param ids 需要删除的H5模块包主键 + * @return 结果 + */ + @Override + public int deleteDeploymentModuleListByIds(Long[] ids) + { + return deploymentModuleListMapper.deleteDeploymentModuleListByIds(ids); + } + + /** + * 删除H5模块包信息 + * + * @param id H5模块包主键 + * @return 结果 + */ + @Override + public int deleteDeploymentModuleListById(Long id) + { + return deploymentModuleListMapper.deleteDeploymentModuleListById(id); + } +} diff --git a/sf-system/src/main/resources/mapper/system/deployment/DeploymentModuleListMapper.xml b/sf-system/src/main/resources/mapper/system/deployment/DeploymentModuleListMapper.xml new file mode 100644 index 0000000..c5c777c --- /dev/null +++ b/sf-system/src/main/resources/mapper/system/deployment/DeploymentModuleListMapper.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + select id, app_id, app_core, uploading_type, module_name, version, module_url, module_size, sys_type, module_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from DEPLOYMENT_MODULE_LIST + + + + + + + + insert into DEPLOYMENT_MODULE_LIST + + app_id, + app_core, + uploading_type, + module_name, + version, + module_url, + module_size, + sys_type, + module_type, + uploading_status, + uploading_log_id, + order_num, + is_delete, + created, + modified, + create_time, + update_time, + + + #{appId}, + #{appCore}, + #{uploadingType}, + #{moduleName}, + #{version}, + #{moduleUrl}, + #{moduleSize}, + #{sysType}, + #{moduleType}, + #{uploadingStatus}, + #{uploadingLogId}, + #{orderNum}, + #{isDelete}, + #{created}, + #{modified}, + #{createTime}, + #{updateTime}, + + + + + update DEPLOYMENT_MODULE_LIST + + app_id = #{appId}, + app_core = #{appCore}, + uploading_type = #{uploadingType}, + module_name = #{moduleName}, + version = #{version}, + module_url = #{moduleUrl}, + module_size = #{moduleSize}, + sys_type = #{sysType}, + module_type = #{moduleType}, + uploading_status = #{uploadingStatus}, + uploading_log_id = #{uploadingLogId}, + order_num = #{orderNum}, + is_delete = #{isDelete}, + created = #{created}, + modified = #{modified}, + create_time = #{createTime}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete + from DEPLOYMENT_MODULE_LIST + where id = #{id} + + + + delete from DEPLOYMENT_MODULE_LIST where id in + + #{id} + + + \ No newline at end of file diff --git a/sf-ui/src/api/deployment/module.js b/sf-ui/src/api/deployment/module.js new file mode 100644 index 0000000..d28af8e --- /dev/null +++ b/sf-ui/src/api/deployment/module.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询H5模块包列表 +export function listModule(query) { + return request({ + url: '/deployment/module/list', + method: 'get', + params: query + }) +} + +// 查询H5模块包详细 +export function getModule(id) { + return request({ + url: '/deployment/module/' + id, + method: 'get' + }) +} + +// 新增H5模块包 +export function addModule(data) { + return request({ + url: '/deployment/module', + method: 'post', + data: data + }) +} + +// 修改H5模块包 +export function updateModule(data) { + return request({ + url: '/deployment/module', + method: 'put', + data: data + }) +} + +// 删除H5模块包 +export function delModule(id) { + return request({ + url: '/deployment/module/' + id, + method: 'delete' + }) +} diff --git a/sf-ui/src/views/deployment/module/index.vue b/sf-ui/src/views/deployment/module/index.vue new file mode 100644 index 0000000..b5969d1 --- /dev/null +++ b/sf-ui/src/views/deployment/module/index.vue @@ -0,0 +1,341 @@ + + +