feat(behaviour): 添加行为树系统核心功能模块
- 创建行为树主对象实体类Behaviortree,包含ID、名称、描述、创建时间、更新时间、英文名和XML内容字段 - 实现行为树控制器BehaviortreeController,提供增删改查和导出功能接口 - 开发行为树数据访问层,包括Mapper接口和MyBatis XML映射文件 - 构建行为树服务层接口及实现类,封装业务逻辑处理 - 添加节点连接、节点参数、节点模板、模板参数定义和行为树实例节点等相关实体和服务接口 - 实现节点连接管理功能,支持父子节点关系建立和执行顺序配置 - 提供完整的CRUD操作和权限控制,集成Excel导出功能
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?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.solution.system.mapper.NodeconnectionMapper">
|
||||
|
||||
<resultMap type="Nodeconnection" id="NodeconnectionResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="parentNodeId" column="parent_node_id" />
|
||||
<result property="childNodeId" column="child_node_id" />
|
||||
<result property="orderIndex" column="order_index" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNodeconnectionVo">
|
||||
select id, parent_node_id, child_node_id, order_index from nodeconnection
|
||||
</sql>
|
||||
|
||||
<select id="selectNodeconnectionList" parameterType="Nodeconnection" resultMap="NodeconnectionResult">
|
||||
<include refid="selectNodeconnectionVo"/>
|
||||
<where>
|
||||
<if test="parentNodeId != null "> and parent_node_id = #{parentNodeId}</if>
|
||||
<if test="childNodeId != null "> and child_node_id = #{childNodeId}</if>
|
||||
<if test="orderIndex != null "> and order_index = #{orderIndex}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectNodeconnectionById" parameterType="Long" resultMap="NodeconnectionResult">
|
||||
<include refid="selectNodeconnectionVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertNodeconnection" parameterType="Nodeconnection" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into nodeconnection
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="parentNodeId != null">parent_node_id,</if>
|
||||
<if test="childNodeId != null">child_node_id,</if>
|
||||
<if test="orderIndex != null">order_index,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="parentNodeId != null">#{parentNodeId},</if>
|
||||
<if test="childNodeId != null">#{childNodeId},</if>
|
||||
<if test="orderIndex != null">#{orderIndex},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateNodeconnection" parameterType="Nodeconnection">
|
||||
update nodeconnection
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="parentNodeId != null">parent_node_id = #{parentNodeId},</if>
|
||||
<if test="childNodeId != null">child_node_id = #{childNodeId},</if>
|
||||
<if test="orderIndex != null">order_index = #{orderIndex},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteNodeconnectionById" parameterType="Long">
|
||||
delete from nodeconnection where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteNodeconnectionByIds" parameterType="String">
|
||||
delete from nodeconnection where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user