编号:ZSSAC-585 描述:安装包页面修改
This commit is contained in:
parent
83f3b02382
commit
bd3a791ab0
@ -22,6 +22,10 @@
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-common</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.smarterFramework</groupId>
|
||||
<artifactId>sf-file</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
@ -3,10 +3,12 @@ package com.sf.system.deployment.controller;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.system.deployment.service.IDeploymentServicePublishService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.unit.DataUnit;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
@ -102,4 +104,30 @@ public class DeploymentServicePublishController extends BaseController
|
||||
{
|
||||
return toAjax(deploymentServicePublishService.deleteDeploymentServicePublishByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布功能
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:publish')")
|
||||
@GetMapping(value = "/publish/{id}")
|
||||
public AjaxResult publish(@PathVariable("id") Long id) throws Exception {
|
||||
DeploymentServicePublish deploymentServicePublish = deploymentServicePublishService.selectDeploymentServicePublishById(id);
|
||||
// deploymentServicePublish.setUpdateBy(getUsername());
|
||||
deploymentServicePublish.setUpdateTime(DateUtils.getNowDate());
|
||||
return success(deploymentServicePublishService.publish(deploymentServicePublish));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发布列表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('deployment:publish:sold:out')")
|
||||
@GetMapping(value = "/sold/out/{id}")
|
||||
public AjaxResult soldOut(@PathVariable("id") Long id)
|
||||
{
|
||||
DeploymentServicePublish deploymentServicePublish = deploymentServicePublishService.selectDeploymentServicePublishById(id);
|
||||
// deploymentServicePublish.setUpdateBy(getUsername());
|
||||
deploymentServicePublish.setUpdateTime(DateUtils.getNowDate());
|
||||
return success(deploymentServicePublishService.soldOut(deploymentServicePublish));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,25 +1,19 @@
|
||||
package com.sf.deploy.controller;
|
||||
package com.sf.system.deployment.controller;
|
||||
|
||||
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.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.deploy.domain.SysApkInfo;
|
||||
import com.sf.deploy.service.ISysApkInfoService;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.common.core.page.TableDataInfo;
|
||||
import com.sf.common.enums.BusinessType;
|
||||
import com.sf.common.utils.poi.ExcelUtil;
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.system.deployment.service.ISysApkInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安装包管理(新)Controller
|
@ -34,7 +34,7 @@ public class DeploymentServicePublish extends BaseEntity
|
||||
|
||||
/** 安装包编号 */
|
||||
@Excel(name = "安装包编号")
|
||||
private String apkId;
|
||||
private Long apkId;
|
||||
|
||||
/** app store地址 */
|
||||
@Excel(name = "app store地址")
|
||||
@ -99,6 +99,30 @@ public class DeploymentServicePublish extends BaseEntity
|
||||
/** 更新人 */
|
||||
private String modified;
|
||||
|
||||
/** 系统编码 */
|
||||
private String appCode;
|
||||
|
||||
|
||||
/** 二维码 */
|
||||
private String quickMark;
|
||||
|
||||
|
||||
public String getQuickMark() {
|
||||
return quickMark;
|
||||
}
|
||||
|
||||
public void setQuickMark(String quickMark) {
|
||||
this.quickMark = quickMark;
|
||||
}
|
||||
|
||||
public String getAppCode() {
|
||||
return appCode;
|
||||
}
|
||||
|
||||
public void setAppCode(String appCode) {
|
||||
this.appCode = appCode;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
@ -135,12 +159,12 @@ public class DeploymentServicePublish extends BaseEntity
|
||||
{
|
||||
return systemType;
|
||||
}
|
||||
public void setApkId(String apkId)
|
||||
public void setApkId(Long apkId)
|
||||
{
|
||||
this.apkId = apkId;
|
||||
}
|
||||
|
||||
public String getApkId()
|
||||
public Long getApkId()
|
||||
{
|
||||
return apkId;
|
||||
}
|
||||
@ -315,7 +339,8 @@ public class DeploymentServicePublish extends BaseEntity
|
||||
.append("created", getCreated())
|
||||
.append("modified", getModified())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("appCode", getAppCode())
|
||||
.append("quickMark", getQuickMark())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
package com.sf.deploy.domain;
|
||||
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;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 安装包管理(新)对象 SYS_APK_INFO
|
@ -1,7 +1,9 @@
|
||||
package com.sf.deploy.mapper;
|
||||
package com.sf.system.deployment.mapper;
|
||||
|
||||
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.deploy.domain.SysApkInfo;
|
||||
|
||||
/**
|
||||
* 安装包管理(新)Mapper接口
|
@ -2,6 +2,7 @@ package com.sf.system.deployment.service;
|
||||
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -59,4 +60,8 @@ public interface IDeploymentServicePublishService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDeploymentServicePublishById(Long id);
|
||||
|
||||
public int publish(DeploymentServicePublish deploymentServicePublish) throws Exception;
|
||||
|
||||
public int soldOut(DeploymentServicePublish deploymentServicePublish);
|
||||
}
|
||||
|
@ -1,7 +1,9 @@
|
||||
package com.sf.deploy.service;
|
||||
package com.sf.system.deployment.service;
|
||||
|
||||
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.deploy.domain.SysApkInfo;
|
||||
|
||||
/**
|
||||
* 安装包管理(新)Service接口
|
@ -1,12 +1,21 @@
|
||||
package com.sf.system.deployment.service.impl;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.common.utils.file.QRCodeUtils;
|
||||
import com.sf.file.domain.SysOss;
|
||||
import com.sf.file.service.ISysOssService;
|
||||
import com.sf.system.deployment.domain.DeploymentServicePublish;
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.system.deployment.mapper.DeploymentServicePublishMapper;
|
||||
import com.sf.system.deployment.service.IDeploymentServicePublishService;
|
||||
import com.sf.system.deployment.service.ISysApkInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 发布列表Service业务层处理
|
||||
@ -17,6 +26,10 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class DeploymentServicePublishServiceImpl implements IDeploymentServicePublishService
|
||||
{
|
||||
@Resource
|
||||
private ISysApkInfoService iSysApkInfoService;
|
||||
@Resource
|
||||
private ISysOssService iSysOssService;
|
||||
@Autowired
|
||||
private DeploymentServicePublishMapper deploymentServicePublishMapper;
|
||||
|
||||
@ -93,4 +106,26 @@ public class DeploymentServicePublishServiceImpl implements IDeploymentServicePu
|
||||
{
|
||||
return deploymentServicePublishMapper.deleteDeploymentServicePublishById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int publish(DeploymentServicePublish deploymentServicePublish) throws Exception {
|
||||
if(1 == deploymentServicePublish.getStatus()){
|
||||
return 0;//不允许重复发布
|
||||
}
|
||||
deploymentServicePublish.setUpdateTime(DateUtils.getNowDate());
|
||||
SysApkInfo sysApkInfo = iSysApkInfoService.selectSysApkInfoById(deploymentServicePublish.getApkId());
|
||||
SysOss oss = iSysOssService.upload(QRCodeUtils.generateQRCode(sysApkInfo.getSysApk()));
|
||||
deploymentServicePublish.setStatus(1L);
|
||||
deploymentServicePublish.setQuickMark(oss.getUrl());
|
||||
return deploymentServicePublishMapper.updateDeploymentServicePublish(deploymentServicePublish);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int soldOut(DeploymentServicePublish deploymentServicePublish) {
|
||||
if(2 == deploymentServicePublish.getStatus()){
|
||||
return 0;//不允许重复下架
|
||||
}
|
||||
deploymentServicePublish.setStatus(3L);
|
||||
return deploymentServicePublishMapper.updateDeploymentServicePublish(deploymentServicePublish);
|
||||
}
|
||||
}
|
||||
|
@ -1,12 +1,13 @@
|
||||
package com.sf.deploy.service.impl;
|
||||
package com.sf.system.deployment.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.sf.common.utils.DateUtils;
|
||||
import com.sf.system.deployment.domain.SysApkInfo;
|
||||
import com.sf.system.deployment.mapper.SysApkInfoMapper;
|
||||
import com.sf.system.deployment.service.ISysApkInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.sf.deploy.mapper.SysApkInfoMapper;
|
||||
import com.sf.deploy.domain.SysApkInfo;
|
||||
import com.sf.deploy.service.ISysApkInfoService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 安装包管理(新)Service业务层处理
|
||||
@ -15,7 +16,7 @@ import com.sf.deploy.service.ISysApkInfoService;
|
||||
* @date 2024-04-11
|
||||
*/
|
||||
@Service
|
||||
public class SysApkInfoServiceImpl implements ISysApkInfoService
|
||||
public class SysApkInfoServiceImpl implements ISysApkInfoService
|
||||
{
|
||||
@Autowired
|
||||
private SysApkInfoMapper sysApkInfoMapper;
|
@ -8,6 +8,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="id" column="id" />
|
||||
<result property="applyId" column="apply_id" />
|
||||
<result property="appName" column="app_name" />
|
||||
<result property="appCode" column="app_code" />
|
||||
<result property="quickMark" column="quick_mark" />
|
||||
<result property="systemType" column="system_type" />
|
||||
<result property="apkId" column="apk_id" />
|
||||
<result property="appStoreAddress" column="app_store_address" />
|
||||
@ -32,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDeploymentServicePublishVo">
|
||||
select id, apply_id, app_name, system_type, apk_id, app_store_address, version, version_desc, publish_environment, publish_strategy, result_notify, public_version, force_update, download_verification, update_object, validity_start_time, validity_end_time, remark, status, is_delete, created, modified, create_time, update_time from DEPLOYMENT_SERVICE_PUBLISH
|
||||
select id, apply_id, app_name, app_code, quick_mark, system_type, apk_id, app_store_address, version, version_desc, publish_environment, publish_strategy, result_notify, public_version, force_update, download_verification, update_object, validity_start_time, validity_end_time, remark, status, is_delete, created, modified, create_time, update_time from DEPLOYMENT_SERVICE_PUBLISH
|
||||
</sql>
|
||||
|
||||
<select id="selectDeploymentServicePublishList" parameterType="DeploymentServicePublish" resultMap="DeploymentServicePublishResult">
|
||||
@ -109,6 +111,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="applyId != null">apply_id = #{applyId},</if>
|
||||
<if test="appName != null and appName != ''">app_name = #{appName},</if>
|
||||
<if test="appCode != null and appCode != ''">app_code = #{appCode},</if>
|
||||
<if test="quickMark != null and quickMark != ''">quick_mark = #{quickMark},</if>
|
||||
<if test="systemType != null and systemType != ''">system_type = #{systemType},</if>
|
||||
<if test="apkId != null and apkId != ''">apk_id = #{apkId},</if>
|
||||
<if test="appStoreAddress != null">app_store_address = #{appStoreAddress},</if>
|
||||
|
@ -1,116 +1,116 @@
|
||||
<?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.deploy.mapper.SysApkInfoMapper">
|
||||
|
||||
<resultMap type="SysApkInfo" id="SysApkInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="appCode" column="app_code" />
|
||||
<result property="uploadingType" column="uploading_type" />
|
||||
<result property="sysApkName" column="sys_apk_name" />
|
||||
<result property="version" column="version" />
|
||||
<result property="sysApk" column="sys_apk" />
|
||||
<result property="sysApkSize" column="sys_apk_size" />
|
||||
<result property="sysType" column="sys_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="selectSysApkInfoVo">
|
||||
select id, app_id,app_code, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO
|
||||
</sql>
|
||||
|
||||
<select id="selectSysApkInfoList" parameterType="SysApkInfo" resultMap="SysApkInfoResult">
|
||||
<include refid="selectSysApkInfoVo"/>
|
||||
<where>
|
||||
<if test="appCode != null and appCode != ''"> and app_code = #{appCode}</if>
|
||||
<if test="uploadingType != null and uploadingType != ''"> and uploading_type = #{uploadingType}</if>
|
||||
<if test="sysApkName != null and sysApkName != ''"> and sys_apk_name like concat('%', #{sysApkName}, '%')</if>
|
||||
<if test="version != null and version != ''"> and version = #{version}</if>
|
||||
<if test="sysType != null and sysType != ''"> and sys_type = #{sysType}</if>
|
||||
<if test="uploadingStatus != null "> and uploading_status = #{uploadingStatus}</if>
|
||||
<if test="created != null and created != ''"> and created = #{created}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysApkInfoById" parameterType="Long" resultMap="SysApkInfoResult">
|
||||
<include refid="selectSysApkInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysApkInfo" parameterType="SysApkInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into SYS_APK_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uploadingType != null and uploadingType != ''">uploading_type,</if>
|
||||
<if test="sysApkName != null and sysApkName != ''">sys_apk_name,</if>
|
||||
<if test="version != null and version != ''">version,</if>
|
||||
<if test="sysApk != null">sys_apk,</if>
|
||||
<if test="sysApkSize != null">sys_apk_size,</if>
|
||||
<if test="sysType != null and sysType != ''">sys_type,</if>
|
||||
<if test="uploadingStatus != null">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="uploadingType != null and uploadingType != ''">#{uploadingType},</if>
|
||||
<if test="sysApkName != null and sysApkName != ''">#{sysApkName},</if>
|
||||
<if test="version != null and version != ''">#{version},</if>
|
||||
<if test="sysApk != null">#{sysApk},</if>
|
||||
<if test="sysApkSize != null">#{sysApkSize},</if>
|
||||
<if test="sysType != null and sysType != ''">#{sysType},</if>
|
||||
<if test="uploadingStatus != null">#{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="updateSysApkInfo" parameterType="SysApkInfo">
|
||||
update SYS_APK_INFO
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="uploadingType != null and uploadingType != ''">uploading_type = #{uploadingType},</if>
|
||||
<if test="sysApkName != null and sysApkName != ''">sys_apk_name = #{sysApkName},</if>
|
||||
<if test="version != null and version != ''">version = #{version},</if>
|
||||
<if test="sysApk != null">sys_apk = #{sysApk},</if>
|
||||
<if test="sysApkSize != null">sys_apk_size = #{sysApkSize},</if>
|
||||
<if test="sysType != null and sysType != ''">sys_type = #{sysType},</if>
|
||||
<if test="uploadingStatus != null">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="deleteSysApkInfoById" parameterType="Long">
|
||||
delete from SYS_APK_INFO where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysApkInfoByIds" parameterType="String">
|
||||
delete from SYS_APK_INFO where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
<?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.SysApkInfoMapper">
|
||||
|
||||
<resultMap type="SysApkInfo" id="SysApkInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="appId" column="app_id" />
|
||||
<result property="appCode" column="app_code" />
|
||||
<result property="uploadingType" column="uploading_type" />
|
||||
<result property="sysApkName" column="sys_apk_name" />
|
||||
<result property="version" column="version" />
|
||||
<result property="sysApk" column="sys_apk" />
|
||||
<result property="sysApkSize" column="sys_apk_size" />
|
||||
<result property="sysType" column="sys_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="selectSysApkInfoVo">
|
||||
select id, app_id,app_code, uploading_type, sys_apk_name, version, sys_apk, sys_apk_size, sys_type, uploading_status, uploading_log_id, order_num, is_delete, created, modified, create_time, update_time from SYS_APK_INFO
|
||||
</sql>
|
||||
|
||||
<select id="selectSysApkInfoList" parameterType="SysApkInfo" resultMap="SysApkInfoResult">
|
||||
<include refid="selectSysApkInfoVo"/>
|
||||
<where>
|
||||
<if test="appCode != null and appCode != ''"> and app_code = #{appCode}</if>
|
||||
<if test="uploadingType != null and uploadingType != ''"> and uploading_type = #{uploadingType}</if>
|
||||
<if test="sysApkName != null and sysApkName != ''"> and sys_apk_name like concat('%', #{sysApkName}, '%')</if>
|
||||
<if test="version != null and version != ''"> and version = #{version}</if>
|
||||
<if test="sysType != null and sysType != ''"> and sys_type = #{sysType}</if>
|
||||
<if test="uploadingStatus != null "> and uploading_status = #{uploadingStatus}</if>
|
||||
<if test="created != null and created != ''"> and created = #{created}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysApkInfoById" parameterType="Long" resultMap="SysApkInfoResult">
|
||||
<include refid="selectSysApkInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysApkInfo" parameterType="SysApkInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into SYS_APK_INFO
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="uploadingType != null and uploadingType != ''">uploading_type,</if>
|
||||
<if test="sysApkName != null and sysApkName != ''">sys_apk_name,</if>
|
||||
<if test="version != null and version != ''">version,</if>
|
||||
<if test="sysApk != null">sys_apk,</if>
|
||||
<if test="sysApkSize != null">sys_apk_size,</if>
|
||||
<if test="sysType != null and sysType != ''">sys_type,</if>
|
||||
<if test="uploadingStatus != null">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="uploadingType != null and uploadingType != ''">#{uploadingType},</if>
|
||||
<if test="sysApkName != null and sysApkName != ''">#{sysApkName},</if>
|
||||
<if test="version != null and version != ''">#{version},</if>
|
||||
<if test="sysApk != null">#{sysApk},</if>
|
||||
<if test="sysApkSize != null">#{sysApkSize},</if>
|
||||
<if test="sysType != null and sysType != ''">#{sysType},</if>
|
||||
<if test="uploadingStatus != null">#{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="updateSysApkInfo" parameterType="SysApkInfo">
|
||||
update SYS_APK_INFO
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="uploadingType != null and uploadingType != ''">uploading_type = #{uploadingType},</if>
|
||||
<if test="sysApkName != null and sysApkName != ''">sys_apk_name = #{sysApkName},</if>
|
||||
<if test="version != null and version != ''">version = #{version},</if>
|
||||
<if test="sysApk != null">sys_apk = #{sysApk},</if>
|
||||
<if test="sysApkSize != null">sys_apk_size = #{sysApkSize},</if>
|
||||
<if test="sysType != null and sysType != ''">sys_type = #{sysType},</if>
|
||||
<if test="uploadingStatus != null">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="deleteSysApkInfoById" parameterType="Long">
|
||||
delete from SYS_APK_INFO where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysApkInfoByIds" parameterType="String">
|
||||
delete from SYS_APK_INFO where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -42,3 +42,17 @@ export function delPublish(id) {
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 发布
|
||||
export function publish(id) {
|
||||
return request({
|
||||
url: '/deployment/publish/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
// 下架
|
||||
export function delPublish(id) {
|
||||
return request({
|
||||
url: '/deployment/sold/out/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user