2025-06-11 17:46:57 +08:00

51 lines
2.0 KiB
XML

<?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="cc.iteachyou.cms.dao.ThemeMapper" >
<resultMap id="BaseResultMap" type="cc.iteachyou.cms.entity.Theme" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="theme_name" property="themeName" jdbcType="VARCHAR" />
<result column="theme_author" property="themeAuthor" jdbcType="VARCHAR" />
<result column="theme_img" property="themeImg" jdbcType="VARCHAR" />
<result column="theme_path" property="themePath" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_by" property="createBy" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_by" property="updateBy" jdbcType="VARCHAR" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, theme_name, theme_author, theme_img, theme_path, status, create_by, create_time, update_by,
update_time
</sql>
<select id="queryListByPage" parameterType="java.util.HashMap" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from system_theme
where 1 = 1
order by update_time desc
</select>
<update id="batchUpdateStatus" parameterType="java.util.Map">
update system_theme
set status = #{status,jdbcType=INTEGER}
where
id != #{id,jdbcType=VARCHAR}
</update>
<select id="queryByPathName" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from system_theme
where theme_path = #{themePath,jdbcType=VARCHAR}
</select>
<select id="getCurrentTheme" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from system_theme
where status = 1
limit 0,1
</select>
</mapper>