编号:ZSSAC-585 描述:H5安装包页面生成
This commit is contained in:
parent
b0f7b4a627
commit
a73e58d1ab
@ -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:
|
||||
|
@ -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<DeploymentModuleList> 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<DeploymentModuleList> 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<DeploymentModuleList> list = deploymentModuleListService.selectDeploymentModuleListList(deploymentModuleList);
|
||||
ExcelUtil<DeploymentModuleList> util = new ExcelUtil<DeploymentModuleList>(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));
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<DeploymentModuleList> 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);
|
||||
}
|
@ -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<DeploymentModuleList> 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);
|
||||
}
|
@ -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<DeploymentModuleList> 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);
|
||||
}
|
||||
}
|
@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.sf.system.deployment.mapper.DeploymentModuleListMapper">
|
||||
|
||||
<resultMap type="DeploymentModuleList" id="DeploymentModuleListResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="appId" column="app_id"/>
|
||||
<result property="appCore" column="app_core"/>
|
||||
<result property="uploadingType" column="uploading_type"/>
|
||||
<result property="moduleName" column="module_name"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="moduleUrl" column="module_url"/>
|
||||
<result property="moduleSize" column="module_size"/>
|
||||
<result property="sysType" column="sys_type"/>
|
||||
<result property="moduleType" column="module_type"/>
|
||||
<result property="uploadingStatus" column="uploading_status"/>
|
||||
<result property="uploadingLogId" column="uploading_log_id"/>
|
||||
<result property="orderNum" column="order_num"/>
|
||||
<result property="isDelete" column="is_delete"/>
|
||||
<result property="created" column="created"/>
|
||||
<result property="modified" column="modified"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeploymentModuleListVo">
|
||||
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
|
||||
</sql>
|
||||
|
||||
<select id="selectDeploymentModuleListList" parameterType="DeploymentModuleList"
|
||||
resultMap="DeploymentModuleListResult">
|
||||
<include refid="selectDeploymentModuleListVo"/>
|
||||
<where>
|
||||
<if test="appCore != null and appCore != ''">and app_core = #{appCore}</if>
|
||||
<if test="sysType != null and sysType != ''">and sys_type= #{sysType}</if>
|
||||
<if test="moduleName != null and moduleName != ''">and module_name like concat('%', #{moduleName}, '%')</if>
|
||||
<if test="version != null and version != ''">and version = #{version}</if>
|
||||
<if test="uploadingStatus != null and uploadingStatus != ''">and uploading_status = #{uploadingStatus}</if>
|
||||
<if test="createTime != null ">and create_time = #{createTime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDeploymentModuleListById" parameterType="Long" resultMap="DeploymentModuleListResult">
|
||||
<include refid="selectDeploymentModuleListVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertDeploymentModuleList" parameterType="DeploymentModuleList" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into DEPLOYMENT_MODULE_LIST
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="appId != null">app_id,</if>
|
||||
<if test="appCore != null">app_core,</if>
|
||||
<if test="uploadingType != null">uploading_type,</if>
|
||||
<if test="moduleName != null and moduleName != ''">module_name,</if>
|
||||
<if test="version != null and version != ''">version,</if>
|
||||
<if test="moduleUrl != null">module_url,</if>
|
||||
<if test="moduleSize != null">module_size,</if>
|
||||
<if test="sysType != null and sysType != ''">sys_type,</if>
|
||||
<if test="moduleType != null and moduleType != ''">module_type,</if>
|
||||
<if test="uploadingStatus != null and uploadingStatus != ''">uploading_status,</if>
|
||||
<if test="uploadingLogId != null">uploading_log_id,</if>
|
||||
<if test="orderNum != null">order_num,</if>
|
||||
<if test="isDelete != null">is_delete,</if>
|
||||
<if test="created != null">created,</if>
|
||||
<if test="modified != null">modified,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="appId != null">#{appId},</if>
|
||||
<if test="appCore != null">#{appCore},</if>
|
||||
<if test="uploadingType != null">#{uploadingType},</if>
|
||||
<if test="moduleName != null and moduleName != ''">#{moduleName},</if>
|
||||
<if test="version != null and version != ''">#{version},</if>
|
||||
<if test="moduleUrl != null">#{moduleUrl},</if>
|
||||
<if test="moduleSize != null">#{moduleSize},</if>
|
||||
<if test="sysType != null and sysType != ''">#{sysType},</if>
|
||||
<if test="moduleType != null and moduleType != ''">#{moduleType},</if>
|
||||
<if test="uploadingStatus != null and uploadingStatus != ''">#{uploadingStatus},</if>
|
||||
<if test="uploadingLogId != null">#{uploadingLogId},</if>
|
||||
<if test="orderNum != null">#{orderNum},</if>
|
||||
<if test="isDelete != null">#{isDelete},</if>
|
||||
<if test="created != null">#{created},</if>
|
||||
<if test="modified != null">#{modified},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDeploymentModuleList" parameterType="DeploymentModuleList">
|
||||
update DEPLOYMENT_MODULE_LIST
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="appId != null">app_id = #{appId},</if>
|
||||
<if test="appCore != null">app_core = #{appCore},</if>
|
||||
<if test="uploadingType != null">uploading_type = #{uploadingType},</if>
|
||||
<if test="moduleName != null and moduleName != ''">module_name = #{moduleName},</if>
|
||||
<if test="version != null and version != ''">version = #{version},</if>
|
||||
<if test="moduleUrl != null">module_url = #{moduleUrl},</if>
|
||||
<if test="moduleSize != null">module_size = #{moduleSize},</if>
|
||||
<if test="sysType != null and sysType != ''">sys_type = #{sysType},</if>
|
||||
<if test="moduleType != null and moduleType != ''">module_type = #{moduleType},</if>
|
||||
<if test="uploadingStatus != null and uploadingStatus != ''">uploading_status = #{uploadingStatus},</if>
|
||||
<if test="uploadingLogId != null">uploading_log_id = #{uploadingLogId},</if>
|
||||
<if test="orderNum != null">order_num = #{orderNum},</if>
|
||||
<if test="isDelete != null">is_delete = #{isDelete},</if>
|
||||
<if test="created != null">created = #{created},</if>
|
||||
<if test="modified != null">modified = #{modified},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDeploymentModuleListById" parameterType="Long">
|
||||
delete
|
||||
from DEPLOYMENT_MODULE_LIST
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeploymentModuleListByIds" parameterType="String">
|
||||
delete from DEPLOYMENT_MODULE_LIST where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
44
sf-ui/src/api/deployment/module.js
Normal file
44
sf-ui/src/api/deployment/module.js
Normal file
@ -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'
|
||||
})
|
||||
}
|
341
sf-ui/src/views/deployment/module/index.vue
Normal file
341
sf-ui/src/views/deployment/module/index.vue
Normal file
@ -0,0 +1,341 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="模块包名称名称" prop="moduleName">
|
||||
<el-input
|
||||
v-model="queryParams.moduleName"
|
||||
placeholder="请输入模块包名称名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input
|
||||
v-model="queryParams.version"
|
||||
placeholder="请输入版本号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间" prop="createTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.createTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择创建时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['deployment:module:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['deployment:module:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['deployment:module:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['deployment:module:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="moduleList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="主键" align="center" prop="id" />
|
||||
<el-table-column label="模块包名称名称" align="center" prop="moduleName" />
|
||||
<el-table-column label="版本号" align="center" prop="version" />
|
||||
<el-table-column label="安装包" align="center" prop="moduleUrl" />
|
||||
<el-table-column label="安装包大小" align="center" prop="moduleSize" />
|
||||
<el-table-column label="系统类型" align="center" prop="sysType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_apk_type" :value="scope.row.sysType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="模块类型" align="center" prop="moduleType">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.module_type" :value="scope.row.moduleType"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上传状态" align="center" prop="uploadingStatus" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['deployment:module:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['deployment:module:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改H5模块包对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="模块包名称名称" prop="moduleName">
|
||||
<el-input v-model="form.moduleName" placeholder="请输入模块包名称名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="版本号" prop="version">
|
||||
<el-input v-model="form.version" placeholder="请输入版本号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="安装包" prop="moduleUrl">
|
||||
<el-input v-model="form.moduleUrl" placeholder="请输入安装包" />
|
||||
</el-form-item>
|
||||
<el-form-item label="安装包大小" prop="moduleSize">
|
||||
<el-input v-model="form.moduleSize" placeholder="请输入安装包大小" />
|
||||
</el-form-item>
|
||||
<el-form-item label="系统类型" prop="sysType">
|
||||
<el-select v-model="form.sysType" placeholder="请选择系统类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.sys_apk_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="模块类型" prop="moduleType">
|
||||
<el-select v-model="form.moduleType" placeholder="请选择模块类型">
|
||||
<el-option
|
||||
v-for="dict in dict.type.module_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listModule, getModule, delModule, addModule, updateModule } from "@/api/deployment/module";
|
||||
|
||||
export default {
|
||||
name: "Module",
|
||||
dicts: ['module_type', 'sys_apk_type'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// H5模块包表格数据
|
||||
moduleList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
moduleName: null,
|
||||
version: null,
|
||||
uploadingStatus: null,
|
||||
createTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
moduleName: [
|
||||
{ required: true, message: "模块包名称名称不能为空", trigger: "blur" }
|
||||
],
|
||||
version: [
|
||||
{ required: true, message: "版本号不能为空", trigger: "blur" }
|
||||
],
|
||||
sysType: [
|
||||
{ required: true, message: "系统类型不能为空", trigger: "change" }
|
||||
],
|
||||
moduleType: [
|
||||
{ required: true, message: "模块类型不能为空", trigger: "change" }
|
||||
],
|
||||
uploadingStatus: [
|
||||
{ required: true, message: "上传状态不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询H5模块包列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listModule(this.queryParams).then(response => {
|
||||
this.moduleList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
appId: null,
|
||||
appCore: null,
|
||||
uploadingType: null,
|
||||
moduleName: null,
|
||||
version: null,
|
||||
moduleUrl: null,
|
||||
moduleSize: null,
|
||||
sysType: null,
|
||||
moduleType: null,
|
||||
uploadingStatus: null,
|
||||
uploadingLogId: null,
|
||||
orderNum: null,
|
||||
isDelete: null,
|
||||
created: null,
|
||||
modified: null,
|
||||
createTime: null,
|
||||
updateTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加H5模块包";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getModule(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改H5模块包";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
let data = Object.assign({},this.form)
|
||||
delete data.explain
|
||||
updateModule(data).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addModule(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除H5模块包编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delModule(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('deployment/module/export', {
|
||||
...this.queryParams
|
||||
}, `module_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user