增加排序mapper
This commit is contained in:
parent
6c5e24b0c2
commit
55b669ea92
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1479651239" Name="zheng" Objects="196" Symbols="43" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1479651239" Name="zheng" Objects="196" Symbols="55" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
|
||||||
<!-- do not edit this file -->
|
<!-- do not edit this file -->
|
||||||
|
|
||||||
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
|
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.zheng.cms.dao.mapper;
|
||||||
|
|
||||||
|
public interface CmsArticleVOMapper {
|
||||||
|
|
||||||
|
int up(Integer articleId);
|
||||||
|
|
||||||
|
int down(Integer articleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?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.zheng.cms.dao.mapper.CmsArticleVOMapper">
|
||||||
|
|
||||||
|
<!-- 排序上移 -->
|
||||||
|
<select id="up" resultType="int" parameterType="int">
|
||||||
|
select
|
||||||
|
u.id u_id,u.username,u.password,u.nickname,u.sex,u.ctime,u.content,
|
||||||
|
b.id b_id,b.userid,b.name
|
||||||
|
from
|
||||||
|
user u
|
||||||
|
left join
|
||||||
|
book b
|
||||||
|
on
|
||||||
|
u.id=b.userid
|
||||||
|
where
|
||||||
|
u.id=#{id,jdbcType=INTEGER}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 缓存 -->
|
||||||
|
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.zheng.cms.dao.mapper;
|
||||||
|
|
||||||
|
public interface CmsCategoryVOMapper {
|
||||||
|
|
||||||
|
int up(Integer articleId);
|
||||||
|
|
||||||
|
int down(Integer articleId);
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,9 @@
|
||||||
|
package com.zheng.cms.dao.mapper;
|
||||||
|
|
||||||
|
public interface CmsTagVOMapper {
|
||||||
|
|
||||||
|
int up(Integer articleId);
|
||||||
|
|
||||||
|
int down(Integer articleId);
|
||||||
|
|
||||||
|
}
|
|
@ -2,9 +2,6 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.zheng.cms.dao.mapper.UserVOMapper">
|
<mapper namespace="com.zheng.cms.dao.mapper.UserVOMapper">
|
||||||
|
|
||||||
<!-- 缓存 -->
|
|
||||||
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
|
||||||
|
|
||||||
<!-- 结果映射关系 -->
|
<!-- 结果映射关系 -->
|
||||||
<resultMap id="UserResultMap" type="com.zheng.cms.dao.model.UserVO">
|
<resultMap id="UserResultMap" type="com.zheng.cms.dao.model.UserVO">
|
||||||
<id column="u_id" property="id"/>
|
<id column="u_id" property="id"/>
|
||||||
|
@ -36,4 +33,7 @@
|
||||||
u.id=#{id,jdbcType=INTEGER}
|
u.id=#{id,jdbcType=INTEGER}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 缓存 -->
|
||||||
|
<cache type="org.mybatis.caches.ehcache.LoggingEhcache" />
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue