26-03-14-20:46 通过平台id获取平台下所有组件
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.solution.rule.mapper;
|
||||
|
||||
import com.solution.rule.domain.PlatformComponent;
|
||||
import com.solution.rule.domain.vo.ComponentCountVO;
|
||||
import com.solution.rule.domain.vo.PlatformComponentNamesVO;
|
||||
import com.solution.rule.domain.vo.WeaponModelVO;
|
||||
@@ -32,4 +33,10 @@ public interface FireRuleMapper {
|
||||
List<PlatformComponentNamesVO> getCommPlatformComponentNames(Integer scenarioId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据平台id获取平台下所有组件
|
||||
* @param platformId
|
||||
* @return
|
||||
*/
|
||||
List<PlatformComponent> getComponents(Integer platformId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.solution.rule.service;
|
||||
|
||||
import com.solution.rule.domain.FireRuleExecuteDTO;
|
||||
import com.solution.rule.domain.PlatformComponent;
|
||||
import com.solution.rule.domain.vo.PlatformComponentNamesVO;
|
||||
import com.solution.rule.domain.vo.PlatformWeaponAggregateVO;
|
||||
|
||||
@@ -29,4 +30,11 @@ public interface FireRuleService {
|
||||
* @return
|
||||
*/
|
||||
List<PlatformComponentNamesVO> getCommPlatformComponentNames(Integer scenarioId);
|
||||
|
||||
/**
|
||||
* 根据平台id获取平台下所有组件
|
||||
* @param platformId
|
||||
* @return
|
||||
*/
|
||||
List<PlatformComponent> getComponents(Integer platformId);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.solution.common.constant.ExceptionConstants;
|
||||
import com.solution.rule.domain.FireRuleExecuteDTO;
|
||||
import com.solution.rule.domain.PlatformComponent;
|
||||
import com.solution.rule.domain.RuleParam;
|
||||
import com.solution.rule.domain.dto.WeaponModelDTO;
|
||||
import com.solution.rule.domain.vo.ComponentCountVO;
|
||||
@@ -142,6 +143,16 @@ public class FireRuleServiceImpl implements FireRuleService {
|
||||
return ruleMapper.getCommPlatformComponentNames(scenarioId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据平台id获取平台下所有组件
|
||||
* @param platformId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<PlatformComponent> getComponents(Integer platformId) {
|
||||
return ruleMapper.getComponents(platformId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有组件以及数量
|
||||
* @return
|
||||
|
||||
@@ -61,6 +61,12 @@
|
||||
WHERE pc.type = "comm"
|
||||
AND p.scenario_id = #{scenarioId}
|
||||
</select>
|
||||
<select id="getComponents" resultType="com.solution.rule.domain.PlatformComponent"
|
||||
parameterType="java.lang.Integer">
|
||||
SELECT id,name,type,description,platform_id
|
||||
FROM platform_component
|
||||
WHERE platform_id = #{platformId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user