dao层修改 单元测试

This commit is contained in:
禾几海
2020-05-24 22:54:51 +08:00
parent 0136435a41
commit 4f63f7b3d5
9 changed files with 262 additions and 44 deletions

View File

@@ -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">

View File

@@ -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">