|
|
@@ -17,17 +17,6 @@ public interface TreeNodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"select * from tree_node"})
|
|
|
- @Results(id="treeNodeMap",value = {
|
|
|
- @Result(column = "is_leaf", property = "leaf"),
|
|
|
- @Result(column = "time_to_take", property = "timeToTake"),
|
|
|
- @Result(column = "start_time", property = "startTime"),
|
|
|
- @Result(column = "end_time", property = "endTime"),
|
|
|
- @Result(column = "group_id", property = "groupId"),
|
|
|
- @Result(column = "project_id", property = "projectId"),
|
|
|
- @Result(column = "parent_id", property = "parentId"),
|
|
|
- @Result(column = "state",property = "state"),
|
|
|
- @Result(column = "type",property = "type")
|
|
|
- })
|
|
|
List<TreeNodePO> listAllTreeNodes();
|
|
|
|
|
|
/**
|
|
|
@@ -36,25 +25,14 @@ public interface TreeNodeMapper {
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"select * from tree_node where id = #{id}"})
|
|
|
- @ResultMap(value = "treeNodeMap")
|
|
|
TreeNodePO getTreeNodeById(@Param("id") int id);
|
|
|
|
|
|
- /**
|
|
|
- * 根据GroupId获取TreeNode
|
|
|
- * @param groupId
|
|
|
- * @return
|
|
|
- */
|
|
|
- @Select({"select * from tree_node where group_id = #{groupId}"})
|
|
|
- @ResultMap(value = "treeNodeMap")
|
|
|
- List<TreeNodePO> listTreeNodesByGroupId(@Param("groupId") int groupId);
|
|
|
-
|
|
|
/**
|
|
|
* 根据projectId获取TreeNode
|
|
|
* @param projectId
|
|
|
* @return
|
|
|
*/
|
|
|
@Select({"select * from tree_node where project_id = #{projectId}"})
|
|
|
- @ResultMap(value = "treeNodeMap")
|
|
|
List<TreeNodePO> listTreeNodesByProjectId(@Param("projectId") int projectId);
|
|
|
|
|
|
/**
|
|
|
@@ -62,10 +40,9 @@ public interface TreeNodeMapper {
|
|
|
* @param TreeNodePO
|
|
|
* @return treeNode的自增主键
|
|
|
*/
|
|
|
- @Insert({"insert into tree_node(title, description, type, priority, state, time_to_take, start_time, end_time, is_leaf, group_id,project_id,deep,parent_id) " +
|
|
|
- "VALUES (#{title}, #{description}, #{type}, #{priority}, #{state}, #{timeToTake}, #{startTime}, #{endTime}, #{leaf}, #{groupId},#{projectId},#{deep},#{parentId})"})
|
|
|
- @Options(useGeneratedKeys = true, keyProperty = "id")
|
|
|
- int insertTreeNode(TreeNodePO TreeNodePO);
|
|
|
+ @InsertProvider(type = GeneralInsertUpdateSqlProvider.class, method = "insert")
|
|
|
+ @Options(useGeneratedKeys = true, keyProperty = "param1.id", keyColumn = "id")
|
|
|
+ int insertTreeNode(TreeNodePO TreeNodePO, String... ignoredCols);
|
|
|
|
|
|
/**
|
|
|
* 更新TreeNode
|