提交不了
parent
cac6b971fb
commit
84cb7cdc4e
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.system.api;
|
||||
|
||||
import com.ruoyi.common.core.constant.ServiceNameConstants;
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||
import com.ruoyi.system.api.factory.RemoteConfigFallbackFactory;
|
||||
import com.ruoyi.system.api.factory.RemoteUserFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* @Description: 参数配置服务
|
||||
* @ClassName: RemoteConfigService
|
||||
* @Author : xins
|
||||
* @Date :2023-09-13 11:05
|
||||
* @Version :1.0
|
||||
*/
|
||||
@FeignClient(contextId = "remoteConfigService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteConfigFallbackFactory.class)
|
||||
public interface RemoteConfigService {
|
||||
|
||||
@GetMapping(value = "/config/configKeyStr/{configKey}")
|
||||
R<String> getConfigKeyStr(@PathVariable("configKey") String configKey);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.ruoyi.system.api.factory;
|
||||
|
||||
import com.ruoyi.common.core.domain.R;
|
||||
import com.ruoyi.system.api.RemoteConfigService;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Description: 参数配置服务降级处理
|
||||
* @ClassName: RemoteConfigFallbackFactory
|
||||
* @Author : xins
|
||||
* @Date :2023-09-13 11:10
|
||||
* @Version :1.0
|
||||
*/
|
||||
@Component
|
||||
public class RemoteConfigFallbackFactory implements FallbackFactory<RemoteConfigService> {
|
||||
@Override
|
||||
public RemoteConfigService create(Throwable throwable) {
|
||||
return new RemoteConfigService()
|
||||
{
|
||||
@Override
|
||||
public R<String> getConfigKeyStr(String configKey) {
|
||||
return R.fail("获取参数失败:" + throwable.getMessage());
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
com.ruoyi.system.api.factory.RemoteUserFallbackFactory
|
||||
com.ruoyi.system.api.factory.RemoteLogFallbackFactory
|
||||
com.ruoyi.system.api.factory.RemoteFileFallbackFactory
|
||||
com.ruoyi.system.api.factory.RemoteConfigFallbackFactory
|
||||
|
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.business.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.business.domain.HwDeviceModeFunction;
|
||||
|
||||
/**
|
||||
* 设备模型功能Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-09-05
|
||||
*/
|
||||
public interface IHwDeviceModeFunctionService
|
||||
{
|
||||
/**
|
||||
* 查询设备模型功能
|
||||
*
|
||||
* @param modeFunctionId 设备模型功能主键
|
||||
* @return 设备模型功能
|
||||
*/
|
||||
public HwDeviceModeFunction selectHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId);
|
||||
|
||||
/**
|
||||
* 查询设备模型功能列表
|
||||
*
|
||||
* @param hwDeviceModeFunction 设备模型功能
|
||||
* @return 设备模型功能集合
|
||||
*/
|
||||
public List<HwDeviceModeFunction> selectHwDeviceModeFunctionList(HwDeviceModeFunction hwDeviceModeFunction);
|
||||
|
||||
/**
|
||||
* 新增设备模型功能
|
||||
*
|
||||
* @param hwDeviceModeFunction 设备模型功能
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction);
|
||||
|
||||
/**
|
||||
* 修改设备模型功能
|
||||
*
|
||||
* @param hwDeviceModeFunction 设备模型功能
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction);
|
||||
|
||||
/**
|
||||
* 批量删除设备模型功能
|
||||
*
|
||||
* @param modeFunctionIds 需要删除的设备模型功能主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwDeviceModeFunctionByModeFunctionIds(Long[] modeFunctionIds);
|
||||
|
||||
/**
|
||||
* 删除设备模型功能信息
|
||||
*
|
||||
* @param modeFunctionId 设备模型功能主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId);
|
||||
}
|
@ -1,93 +0,0 @@
|
||||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.HwDeviceModeFunctionMapper;
|
||||
import com.ruoyi.business.domain.HwDeviceModeFunction;
|
||||
import com.ruoyi.business.service.IHwDeviceModeFunctionService;
|
||||
|
||||
/**
|
||||
* 设备模型功能Service业务层处理
|
||||
*
|
||||
* @author xins
|
||||
* @date 2023-09-05
|
||||
*/
|
||||
@Service
|
||||
public class HwDeviceModeFunctionServiceImpl implements IHwDeviceModeFunctionService
|
||||
{
|
||||
@Autowired
|
||||
private HwDeviceModeFunctionMapper hwDeviceModeFunctionMapper;
|
||||
|
||||
/**
|
||||
* 查询设备模型功能
|
||||
*
|
||||
* @param modeFunctionId 设备模型功能主键
|
||||
* @return 设备模型功能
|
||||
*/
|
||||
@Override
|
||||
public HwDeviceModeFunction selectHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId)
|
||||
{
|
||||
return hwDeviceModeFunctionMapper.selectHwDeviceModeFunctionByModeFunctionId(modeFunctionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询设备模型功能列表
|
||||
*
|
||||
* @param hwDeviceModeFunction 设备模型功能
|
||||
* @return 设备模型功能
|
||||
*/
|
||||
@Override
|
||||
public List<HwDeviceModeFunction> selectHwDeviceModeFunctionList(HwDeviceModeFunction hwDeviceModeFunction)
|
||||
{
|
||||
return hwDeviceModeFunctionMapper.selectHwDeviceModeFunctionList(hwDeviceModeFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增设备模型功能
|
||||
*
|
||||
* @param hwDeviceModeFunction 设备模型功能
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction)
|
||||
{
|
||||
return hwDeviceModeFunctionMapper.insertHwDeviceModeFunction(hwDeviceModeFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改设备模型功能
|
||||
*
|
||||
* @param hwDeviceModeFunction 设备模型功能
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHwDeviceModeFunction(HwDeviceModeFunction hwDeviceModeFunction)
|
||||
{
|
||||
return hwDeviceModeFunctionMapper.updateHwDeviceModeFunction(hwDeviceModeFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除设备模型功能
|
||||
*
|
||||
* @param modeFunctionIds 需要删除的设备模型功能主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwDeviceModeFunctionByModeFunctionIds(Long[] modeFunctionIds)
|
||||
{
|
||||
return hwDeviceModeFunctionMapper.deleteHwDeviceModeFunctionByModeFunctionIds(modeFunctionIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除设备模型功能信息
|
||||
*
|
||||
* @param modeFunctionId 设备模型功能主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHwDeviceModeFunctionByModeFunctionId(Long modeFunctionId)
|
||||
{
|
||||
return hwDeviceModeFunctionMapper.deleteHwDeviceModeFunctionByModeFunctionId(modeFunctionId);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
<?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.business.mapper.HwDeviceModeParameterMapper">
|
||||
|
||||
<resultMap type="HwDeviceModeParameter" id="HwDeviceModeParameterResult">
|
||||
<result property="modeParameterId" column="mode_parameter_id" />
|
||||
<result property="modeFunctionId" column="mode_function_id" />
|
||||
<result property="releatedParameterId" column="releated_parameter_id" />
|
||||
<result property="parameterType" column="parameter_type" />
|
||||
<result property="parameterName" column="parameter_name" />
|
||||
<result property="parameterIdentifier" column="parameter_identifier" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="dataDefinition" column="data_definition" />
|
||||
<result property="propertyUnit" column="property_unit" />
|
||||
<result property="propertyStep" column="property_step" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHwDeviceModeParameterVo">
|
||||
select mode_parameter_id, mode_function_id, releated_parameter_id, parameter_type, parameter_name, parameter_identifier, data_type, data_definition, property_unit, property_step from hw_device_mode_parameter
|
||||
</sql>
|
||||
|
||||
<select id="selectHwDeviceModeParameterList" parameterType="HwDeviceModeParameter" resultMap="HwDeviceModeParameterResult">
|
||||
<include refid="selectHwDeviceModeParameterVo"/>
|
||||
<where>
|
||||
<if test="modeFunctionId != null "> and mode_function_id = #{modeFunctionId}</if>
|
||||
<if test="releatedParameterId != null "> and releated_parameter_id = #{releatedParameterId}</if>
|
||||
<if test="parameterType != null and parameterType != ''"> and parameter_type = #{parameterType}</if>
|
||||
<if test="parameterName != null and parameterName != ''"> and parameter_name like concat('%', #{parameterName}, '%')</if>
|
||||
<if test="parameterIdentifier != null and parameterIdentifier != ''"> and parameter_identifier = #{parameterIdentifier}</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if>
|
||||
<if test="dataDefinition != null and dataDefinition != ''"> and data_definition = #{dataDefinition}</if>
|
||||
<if test="propertyUnit != null and propertyUnit != ''"> and property_unit = #{propertyUnit}</if>
|
||||
<if test="propertyStep != null "> and property_step = #{propertyStep}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHwDeviceModeParameterByModeParameterId" parameterType="Long" resultMap="HwDeviceModeParameterResult">
|
||||
<include refid="selectHwDeviceModeParameterVo"/>
|
||||
where mode_parameter_id = #{modeParameterId}
|
||||
</select>
|
||||
|
||||
<insert id="insertHwDeviceModeParameter" parameterType="HwDeviceModeParameter" useGeneratedKeys="true" keyProperty="modeParameterId">
|
||||
insert into hw_device_mode_parameter
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="modeFunctionId != null">mode_function_id,</if>
|
||||
<if test="releatedParameterId != null">releated_parameter_id,</if>
|
||||
<if test="parameterType != null and parameterType != ''">parameter_type,</if>
|
||||
<if test="parameterName != null and parameterName != ''">parameter_name,</if>
|
||||
<if test="parameterIdentifier != null and parameterIdentifier != ''">parameter_identifier,</if>
|
||||
<if test="dataType != null and dataType != ''">data_type,</if>
|
||||
<if test="dataDefinition != null">data_definition,</if>
|
||||
<if test="propertyUnit != null">property_unit,</if>
|
||||
<if test="propertyStep != null">property_step,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="modeFunctionId != null">#{modeFunctionId},</if>
|
||||
<if test="releatedParameterId != null">#{releatedParameterId},</if>
|
||||
<if test="parameterType != null and parameterType != ''">#{parameterType},</if>
|
||||
<if test="parameterName != null and parameterName != ''">#{parameterName},</if>
|
||||
<if test="parameterIdentifier != null and parameterIdentifier != ''">#{parameterIdentifier},</if>
|
||||
<if test="dataType != null and dataType != ''">#{dataType},</if>
|
||||
<if test="dataDefinition != null">#{dataDefinition},</if>
|
||||
<if test="propertyUnit != null">#{propertyUnit},</if>
|
||||
<if test="propertyStep != null">#{propertyStep},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHwDeviceModeParameter" parameterType="HwDeviceModeParameter">
|
||||
update hw_device_mode_parameter
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="modeFunctionId != null">mode_function_id = #{modeFunctionId},</if>
|
||||
<if test="releatedParameterId != null">releated_parameter_id = #{releatedParameterId},</if>
|
||||
<if test="parameterType != null and parameterType != ''">parameter_type = #{parameterType},</if>
|
||||
<if test="parameterName != null and parameterName != ''">parameter_name = #{parameterName},</if>
|
||||
<if test="parameterIdentifier != null and parameterIdentifier != ''">parameter_identifier = #{parameterIdentifier},</if>
|
||||
<if test="dataType != null and dataType != ''">data_type = #{dataType},</if>
|
||||
<if test="dataDefinition != null">data_definition = #{dataDefinition},</if>
|
||||
<if test="propertyUnit != null">property_unit = #{propertyUnit},</if>
|
||||
<if test="propertyStep != null">property_step = #{propertyStep},</if>
|
||||
</trim>
|
||||
where mode_parameter_id = #{modeParameterId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHwDeviceModeParameterByModeParameterId" parameterType="Long">
|
||||
delete from hw_device_mode_parameter where mode_parameter_id = #{modeParameterId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHwDeviceModeParameterByModeParameterIds" parameterType="String">
|
||||
delete from hw_device_mode_parameter where mode_parameter_id in
|
||||
<foreach item="modeParameterId" collection="array" open="(" separator="," close=")">
|
||||
#{modeParameterId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
<insert id="batchHwDeviceModeParameters">
|
||||
insert into hw_device_mode_parameter( mode_function_id, parameter_type, parameter_name, parameter_identifier, data_type, data_definition, property_unit, property_step) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.modeFunctionId}, #{item.parameterType}, #{item.parameterName}, #{item.parameterIdentifier}, #{item.dataType}, #{item.dataDefinition}, #{item.propertyUnit}, #{item.propertyStep})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue