完善资源监控策略内容,新增脚本执行结果查看接口。
This commit is contained in:
@@ -76,11 +76,10 @@ public class RmMonitorPolicyController extends BaseController
|
||||
public AjaxResult add(@RequestBody RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
int rows = rmMonitorPolicyService.addRmMonitorPolicy(rmMonitorPolicy);
|
||||
if(rows>0){
|
||||
return toAjax(rows);
|
||||
}else{
|
||||
if(rows == -1){
|
||||
return AjaxResult.error("资源监控策略新增失败,该资源组已绑定其他策略");
|
||||
}
|
||||
return toAjax(rows);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -103,5 +102,14 @@ public class RmMonitorPolicyController extends BaseController
|
||||
{
|
||||
return toAjax(rmMonitorPolicyService.issuePolicy(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除监控模板
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:policy:remove")
|
||||
@Log(title = "资源监控策略", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(rmMonitorPolicyService.deleteRmMonitorPolicyByIds(ids));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.ruoyi.rocketmq.controller;
|
||||
|
||||
import com.ruoyi.common.core.web.controller.BaseController;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.rocketmq.domain.RmResourceRemote;
|
||||
import com.ruoyi.rocketmq.service.IRmResourceRemoteService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 资源远程管理Controller
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/remote")
|
||||
public class RmResourceRemoteController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRmResourceRemoteService rmResourceRemoteService;
|
||||
|
||||
|
||||
/**
|
||||
* 获取资源远程管理详细信息
|
||||
*/
|
||||
@RequiresPermissions("rocketmq:remote:query")
|
||||
@PostMapping(value = "/getScriptResultBySn")
|
||||
public AjaxResult getScriptResultBySn(@RequestBody RmResourceRemote rmResourceRemote)
|
||||
{
|
||||
return success(rmResourceRemoteService.getScriptResultBySn(rmResourceRemote));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -24,8 +24,10 @@ public class RmMonitorPolicy extends BaseEntity
|
||||
private Long id;
|
||||
|
||||
/** 模板ID */
|
||||
@Excel(name = "模板ID")
|
||||
private Long templateId;
|
||||
/** 模板名称 */
|
||||
@Excel(name = "关联监控模板")
|
||||
private String templateName;
|
||||
|
||||
/** 资源组ID */
|
||||
@Excel(name = "资源组ID")
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.ruoyi.rocketmq.domain;
|
||||
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
import com.ruoyi.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 资源远程管理对象 rm_resource_remote
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@Data
|
||||
public class RmResourceRemote extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 资源ID */
|
||||
private Long id;
|
||||
|
||||
/** 硬件SN码 */
|
||||
@Excel(name = "硬件SN码")
|
||||
private String hardwareSn;
|
||||
|
||||
/** 资源类型 */
|
||||
@Excel(name = "资源类型")
|
||||
private String resourceType;
|
||||
|
||||
/** 资源名称 */
|
||||
@Excel(name = "资源名称")
|
||||
private String resourceName;
|
||||
|
||||
/** 资源描述 */
|
||||
@Excel(name = "资源描述")
|
||||
private String description;
|
||||
|
||||
/** 内网IP地址 */
|
||||
@Excel(name = "内网IP地址")
|
||||
private String internalIp;
|
||||
|
||||
/** 外网IP地址 */
|
||||
@Excel(name = "外网IP地址")
|
||||
private String externalIp;
|
||||
|
||||
/** 管理端口号 */
|
||||
@Excel(name = "管理端口号")
|
||||
private Integer managementPort;
|
||||
|
||||
/** 在线状态:0-离线,1-在线 */
|
||||
@Excel(name = "在线状态:0-离线,1-在线")
|
||||
private String onlineStatus;
|
||||
|
||||
/** 连接方式(SSH/Telnet/RDP等) */
|
||||
@Excel(name = "连接方式", readConverterExp = "S=SH/Telnet/RDP等")
|
||||
private String connectionMethod;
|
||||
/** 脚本执行结果 */
|
||||
private String commandResult;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.rocketmq.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.rocketmq.domain.RmResourceRemote;
|
||||
|
||||
/**
|
||||
* 资源远程管理Mapper接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
public interface RmResourceRemoteMapper
|
||||
{
|
||||
/**
|
||||
* 查询资源远程管理
|
||||
*
|
||||
* @param id 资源远程管理主键
|
||||
* @return 资源远程管理
|
||||
*/
|
||||
public RmResourceRemote selectRmResourceRemoteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资源远程管理列表
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 资源远程管理集合
|
||||
*/
|
||||
public List<RmResourceRemote> selectRmResourceRemoteList(RmResourceRemote rmResourceRemote);
|
||||
|
||||
/**
|
||||
* 新增资源远程管理
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmResourceRemote(RmResourceRemote rmResourceRemote);
|
||||
|
||||
/**
|
||||
* 修改资源远程管理
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmResourceRemote(RmResourceRemote rmResourceRemote);
|
||||
|
||||
/**
|
||||
* 删除资源远程管理
|
||||
*
|
||||
* @param id 资源远程管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRemoteById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除资源远程管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRemoteByIds(Long[] ids);
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
package com.ruoyi.rocketmq.service;
|
||||
|
||||
import com.ruoyi.rocketmq.domain.RmResourceRemote;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 资源远程管理Service接口
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
public interface IRmResourceRemoteService
|
||||
{
|
||||
/**
|
||||
* 查询资源远程管理
|
||||
*
|
||||
* @param id 资源远程管理主键
|
||||
* @return 资源远程管理
|
||||
*/
|
||||
public RmResourceRemote selectRmResourceRemoteById(Long id);
|
||||
|
||||
/**
|
||||
* 查询资源远程管理列表
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 资源远程管理集合
|
||||
*/
|
||||
public List<RmResourceRemote> selectRmResourceRemoteList(RmResourceRemote rmResourceRemote);
|
||||
|
||||
/**
|
||||
* 新增资源远程管理
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRmResourceRemote(RmResourceRemote rmResourceRemote);
|
||||
|
||||
/**
|
||||
* 修改资源远程管理
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRmResourceRemote(RmResourceRemote rmResourceRemote);
|
||||
|
||||
/**
|
||||
* 批量删除资源远程管理
|
||||
*
|
||||
* @param ids 需要删除的资源远程管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRemoteByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除资源远程管理信息
|
||||
*
|
||||
* @param id 资源远程管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRmResourceRemoteById(Long id);
|
||||
|
||||
Map<String,Object> getScriptResultBySn(RmResourceRemote rmResourceRemote);
|
||||
}
|
||||
@@ -78,7 +78,16 @@ public class RmMonitorPolicyServiceImpl implements IRmMonitorPolicyService
|
||||
@Override
|
||||
public List<RmMonitorPolicy> selectRmMonitorPolicyList(RmMonitorPolicy rmMonitorPolicy)
|
||||
{
|
||||
return rmMonitorPolicyMapper.selectRmMonitorPolicyList(rmMonitorPolicy);
|
||||
List<RmMonitorPolicy> list = rmMonitorPolicyMapper.selectRmMonitorPolicyList(rmMonitorPolicy);
|
||||
for (RmMonitorPolicy monitorPolicy : list) {
|
||||
// 资源组名称
|
||||
monitorPolicy.setResourceGroupName(dataProcessUtil.getResourceGroupNameById(monitorPolicy.getResourceGroupId()));
|
||||
// 模板名称
|
||||
Long templateId = monitorPolicy.getTemplateId();
|
||||
RmMonitorTemplate rmMonitorTemplate = rmMonitorTemplateMapper.selectRmMonitorTemplateById(templateId);
|
||||
monitorPolicy.setTemplateName(rmMonitorTemplate.getTemplateName());
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
package com.ruoyi.rocketmq.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.constant.SecurityConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.utils.DateUtils;
|
||||
import com.ruoyi.rocketmq.domain.RmResourceRemote;
|
||||
import com.ruoyi.rocketmq.mapper.RmResourceRemoteMapper;
|
||||
import com.ruoyi.rocketmq.service.IRmResourceRemoteService;
|
||||
import com.ruoyi.system.api.RemoteRevenueConfigService;
|
||||
import com.ruoyi.system.api.domain.RmResourceRegistrationRemote;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 资源远程管理Service业务层处理
|
||||
*
|
||||
* @author gyt
|
||||
* @date 2025-09-15
|
||||
*/
|
||||
@Service
|
||||
public class RmResourceRemoteServiceImpl implements IRmResourceRemoteService
|
||||
{
|
||||
@Autowired
|
||||
private RmResourceRemoteMapper rmResourceRemoteMapper;
|
||||
@Autowired
|
||||
private RemoteRevenueConfigService remoteRevenueConfigService;
|
||||
|
||||
/**
|
||||
* 查询资源远程管理
|
||||
*
|
||||
* @param id 资源远程管理主键
|
||||
* @return 资源远程管理
|
||||
*/
|
||||
@Override
|
||||
public RmResourceRemote selectRmResourceRemoteById(Long id)
|
||||
{
|
||||
return rmResourceRemoteMapper.selectRmResourceRemoteById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询资源远程管理列表
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 资源远程管理
|
||||
*/
|
||||
@Override
|
||||
public List<RmResourceRemote> selectRmResourceRemoteList(RmResourceRemote rmResourceRemote)
|
||||
{
|
||||
return rmResourceRemoteMapper.selectRmResourceRemoteList(rmResourceRemote);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增资源远程管理
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRmResourceRemote(RmResourceRemote rmResourceRemote)
|
||||
{
|
||||
return rmResourceRemoteMapper.insertRmResourceRemote(rmResourceRemote);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改资源远程管理
|
||||
*
|
||||
* @param rmResourceRemote 资源远程管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRmResourceRemote(RmResourceRemote rmResourceRemote)
|
||||
{
|
||||
rmResourceRemote.setUpdateTime(DateUtils.getNowDate());
|
||||
return rmResourceRemoteMapper.updateRmResourceRemote(rmResourceRemote);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除资源远程管理
|
||||
*
|
||||
* @param ids 需要删除的资源远程管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmResourceRemoteByIds(Long[] ids)
|
||||
{
|
||||
return rmResourceRemoteMapper.deleteRmResourceRemoteByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除资源远程管理信息
|
||||
*
|
||||
* @param id 资源远程管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRmResourceRemoteById(Long id)
|
||||
{
|
||||
return rmResourceRemoteMapper.deleteRmResourceRemoteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> getScriptResultBySn(RmResourceRemote rmResourceRemote) {
|
||||
// 构建返回结果
|
||||
Map<String, Object> resultMap = new HashMap<>();
|
||||
// 资源详情
|
||||
RmResourceRegistrationRemote queryParam = new RmResourceRegistrationRemote();
|
||||
queryParam.setHardwareSn(rmResourceRemote.getHardwareSn());
|
||||
R<RmResourceRegistrationRemote> registrationRemote = remoteRevenueConfigService.getListByHardwareSn(queryParam, SecurityConstants.INNER);
|
||||
RmResourceRegistrationRemote resourceMsg = registrationRemote.getData();
|
||||
resultMap.put("resourceMsg", resourceMsg);
|
||||
// 脚本执行结果构建
|
||||
List<Map<String, Object>> scriptList = new ArrayList<>();
|
||||
List<RmResourceRemote> reslutList = rmResourceRemoteMapper.selectRmResourceRemoteList(rmResourceRemote);
|
||||
for (RmResourceRemote resourceRemote : reslutList) {
|
||||
// 脚本执行返回结果
|
||||
JSONObject jsonObject = JSONObject.parseObject(resourceRemote.getDescription());
|
||||
String command = jsonObject.getString("command");
|
||||
String resOut = jsonObject.getString("resOut");
|
||||
String sucOrFail = (!"".equals(resOut) && !"脚本执行失败".equals(resOut)) ? "执行成功":"执行失败";
|
||||
StringBuilder resultSb = new StringBuilder();
|
||||
resultSb.append("【").append(resourceRemote.getResourceName()).append("】脚本执行命令:")
|
||||
.append(command).append(sucOrFail).append(",\n执行结果如下:\n").append(resOut);
|
||||
Map<String,Object> map = new HashMap<>();
|
||||
Date createTime = resourceRemote.getCreateTime();
|
||||
String createTimeStr = DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", createTime);
|
||||
map.put("createTime", createTimeStr);
|
||||
map.put("content", resultSb);
|
||||
scriptList.add(map);
|
||||
}
|
||||
resultMap.put("scriptResult", scriptList);
|
||||
return resultMap;
|
||||
}
|
||||
}
|
||||
@@ -80,6 +80,7 @@ public class DataProcessUtil {
|
||||
linuxData.put("docker", filterItemsByDataType(linuxItems, "DOCKER"));
|
||||
|
||||
result.put("linux", linuxData);
|
||||
result.put("resourceType", "linux");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,6 +102,7 @@ public class DataProcessUtil {
|
||||
switchData.put("switchFan", filterItemsByDataType(switchItems, "FAN"));
|
||||
|
||||
result.put("switch", switchData);
|
||||
result.put("resourceType", "switch");
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,112 @@
|
||||
<?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.ruoyi.rocketmq.mapper.RmResourceRemoteMapper">
|
||||
|
||||
<resultMap type="RmResourceRemote" id="RmResourceRemoteResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="hardwareSn" column="hardware_sn" />
|
||||
<result property="resourceType" column="resource_type" />
|
||||
<result property="resourceName" column="resource_name" />
|
||||
<result property="description" column="description" />
|
||||
<result property="internalIp" column="internal_ip" />
|
||||
<result property="externalIp" column="external_ip" />
|
||||
<result property="managementPort" column="management_port" />
|
||||
<result property="onlineStatus" column="online_status" />
|
||||
<result property="connectionMethod" column="connection_method" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectRmResourceRemoteVo">
|
||||
select id, hardware_sn, resource_type, resource_name, description, internal_ip, external_ip, management_port, online_status, connection_method, create_time, update_time, create_by, update_by from rm_resource_remote
|
||||
</sql>
|
||||
|
||||
<select id="selectRmResourceRemoteList" parameterType="RmResourceRemote" resultMap="RmResourceRemoteResult">
|
||||
<include refid="selectRmResourceRemoteVo"/>
|
||||
<where>
|
||||
<if test="hardwareSn != null and hardwareSn != ''"> and hardware_sn = #{hardwareSn}</if>
|
||||
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
|
||||
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
|
||||
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||
<if test="internalIp != null and internalIp != ''"> and internal_ip = #{internalIp}</if>
|
||||
<if test="externalIp != null and externalIp != ''"> and external_ip = #{externalIp}</if>
|
||||
<if test="managementPort != null "> and management_port = #{managementPort}</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''"> and online_status = #{onlineStatus}</if>
|
||||
<if test="connectionMethod != null and connectionMethod != ''"> and connection_method = #{connectionMethod}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRmResourceRemoteById" parameterType="Long" resultMap="RmResourceRemoteResult">
|
||||
<include refid="selectRmResourceRemoteVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRmResourceRemote" parameterType="RmResourceRemote" useGeneratedKeys="true" keyProperty="id">
|
||||
insert IGNORE into rm_resource_remote
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn,</if>
|
||||
<if test="resourceType != null and resourceType != ''">resource_type,</if>
|
||||
<if test="resourceName != null and resourceName != ''">resource_name,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="internalIp != null">internal_ip,</if>
|
||||
<if test="externalIp != null">external_ip,</if>
|
||||
<if test="managementPort != null">management_port,</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''">online_status,</if>
|
||||
<if test="connectionMethod != null">connection_method,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="hardwareSn != null and hardwareSn != ''">#{hardwareSn},</if>
|
||||
<if test="resourceType != null and resourceType != ''">#{resourceType},</if>
|
||||
<if test="resourceName != null and resourceName != ''">#{resourceName},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="internalIp != null">#{internalIp},</if>
|
||||
<if test="externalIp != null">#{externalIp},</if>
|
||||
<if test="managementPort != null">#{managementPort},</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''">#{onlineStatus},</if>
|
||||
<if test="connectionMethod != null">#{connectionMethod},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateRmResourceRemote" parameterType="RmResourceRemote">
|
||||
update rm_resource_remote
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="hardwareSn != null and hardwareSn != ''">hardware_sn = #{hardwareSn},</if>
|
||||
<if test="resourceType != null and resourceType != ''">resource_type = #{resourceType},</if>
|
||||
<if test="resourceName != null and resourceName != ''">resource_name = #{resourceName},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="internalIp != null">internal_ip = #{internalIp},</if>
|
||||
<if test="externalIp != null">external_ip = #{externalIp},</if>
|
||||
<if test="managementPort != null">management_port = #{managementPort},</if>
|
||||
<if test="onlineStatus != null and onlineStatus != ''">online_status = #{onlineStatus},</if>
|
||||
<if test="connectionMethod != null">connection_method = #{connectionMethod},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteRmResourceRemoteById" parameterType="Long">
|
||||
delete from rm_resource_remote where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRmResourceRemoteByIds" parameterType="String">
|
||||
delete from rm_resource_remote where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user