dao层修改 单元测试
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?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="cn.celess.blog.mapper.CategoryMapper">
|
||||
<resultMap id="categoryResultMap" type="cn.celess.blog.entity.TagCategory">
|
||||
<resultMap id="categoryResultMap" type="cn.celess.blog.entity.Category">
|
||||
<id column="t_id" property="id"/>
|
||||
<result column="t_name" property="name"/>
|
||||
<result column="is_category" property="category"/>
|
||||
@@ -56,7 +56,8 @@
|
||||
<select id="getNameById" resultType="java.lang.String">
|
||||
select t_name
|
||||
from tag_category
|
||||
where is_category = true;
|
||||
where is_category = true
|
||||
and t_id = #{id};
|
||||
</select>
|
||||
|
||||
<select id="getIdByName" resultType="java.lang.Long">
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
<resultMap id="tagResultMap" type="cn.celess.blog.entity.Tag"
|
||||
extends="cn.celess.blog.mapper.CategoryMapper.categoryResultMap">
|
||||
|
||||
</resultMap>
|
||||
|
||||
<insert id="insert" useGeneratedKeys="true" keyProperty="id">
|
||||
|
||||
Reference in New Issue
Block a user