修复一键部署提示“包对应应用信息不存在”问题
https://gitee.com/elunez/eladmin-mp/issues/I7GSJY
This commit is contained in:
parent
16da56f39b
commit
e89544b39d
@ -16,13 +16,10 @@
|
||||
package me.zhengjie.modules.mnt.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import me.zhengjie.modules.mnt.domain.Deploy;
|
||||
import me.zhengjie.modules.mnt.domain.vo.DeployQueryCriteria;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@ -40,4 +37,5 @@ public interface DeployMapper extends BaseMapper<Deploy> {
|
||||
|
||||
Set<Long> getIdByAppIds(@Param("appIds") Set<Long> appIds);
|
||||
|
||||
Deploy getDeployById(@Param("deployId") Long deployId);
|
||||
}
|
||||
|
@ -115,8 +115,7 @@ public class DeployServiceImpl extends ServiceImpl<DeployMapper, Deploy> impleme
|
||||
* @param id ID
|
||||
*/
|
||||
private void deployApp(String fileSavePath, Long id) {
|
||||
|
||||
Deploy deploy = getById(id);
|
||||
Deploy deploy = deployMapper.getDeployById(id);
|
||||
if (deploy == null) {
|
||||
sendMsg("部署信息不存在", MsgType.ERROR);
|
||||
throw new BadRequestException("部署信息不存在");
|
||||
|
@ -16,8 +16,6 @@
|
||||
package me.zhengjie.modules.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import me.zhengjie.modules.system.domain.Dict;
|
||||
import me.zhengjie.modules.system.domain.vo.DictQueryCriteria;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
@ -16,8 +16,6 @@
|
||||
package me.zhengjie.modules.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import me.zhengjie.modules.system.domain.Role;
|
||||
import me.zhengjie.modules.system.domain.vo.RoleQueryCriteria;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
@ -16,14 +16,11 @@
|
||||
package me.zhengjie.modules.system.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import me.zhengjie.modules.system.domain.User;
|
||||
import me.zhengjie.modules.system.domain.vo.UserQueryCriteria;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
@ -33,7 +33,7 @@
|
||||
</sql>
|
||||
|
||||
<sql id="Server_Column_List">
|
||||
s_deploy.server_id as s_server_id,s_deploy.name as s_name,s_deploy.ip as s_ip,s_deploy.port as s_port,s_deploy.account as s_account,s_deploy.password as s_password
|
||||
server.server_id as s_server_id,server.name as s_name,server.ip as s_ip,server.port as s_port,server.account as s_account,server.password as s_password
|
||||
</sql>
|
||||
|
||||
<sql id="Where_sql">
|
||||
@ -60,7 +60,7 @@
|
||||
</if>
|
||||
) t
|
||||
left join mnt_deploy_server mds on t.d_deploy_id = mds.deploy_id
|
||||
left join mnt_server s_deploy on s_deploy.server_id = mds.server_id
|
||||
left join mnt_server server on server.server_id = mds.server_id
|
||||
order by t.d_deploy_id desc
|
||||
</select>
|
||||
|
||||
@ -79,4 +79,15 @@
|
||||
#{appId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="getDeployById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>,
|
||||
<include refid="Server_Column_List"/>
|
||||
from mnt_deploy deploy
|
||||
left join mnt_app app on deploy.app_id = app.app_id
|
||||
left join mnt_deploy_server mds on deploy.deploy_id = mds.deploy_id
|
||||
left join mnt_server server on server.server_id = mds.server_id
|
||||
where deploy.deploy_id = #{deployId}
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user