Authored by wangnan

删除CmsStorehouseMapper java和xml

package com.yoho.search.dal;
import com.yoho.search.dal.model.CmsStorehouseData;
public interface CmsStorehouseDataMapper {
int insert(CmsStorehouseData record);
int insertSelective(CmsStorehouseData record);
CmsStorehouseData selectByPrimaryKey(Integer id);
int deleteByPrimaryKey(Integer id);
}
\ No newline at end of file
package com.yoho.search.dal;
import java.util.List;
import com.yoho.search.dal.model.CmsStorehouse;
import org.apache.ibatis.annotations.Param;
public interface CmsStorehouseMapper {
int deleteByPrimaryKey(Integer id);
int insert(CmsStorehouse record);
int insertSelective(CmsStorehouse record);
CmsStorehouse selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(CmsStorehouse record);
int updateByPrimaryKey(CmsStorehouse record);
List<CmsStorehouse> getPageLists(@Param(value = "offset") Integer offset, @Param(value = "pageSize") Integer pageSize);
int count();
}
\ No newline at end of file
<?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.yoho.search.dal.CmsStorehouseDataMapper">
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.CmsStorehouseData">
<result column="cs_id" property="csId" jdbcType="INTEGER" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.yoho.search.dal.model.CmsStorehouseData"
extends="BaseResultMap">
<result column="content" property="content" jdbcType="LONGVARCHAR" />
</resultMap>
<sql id="Base_Column_List">
cs_id,content
</sql>
<insert id="insert" parameterType="com.yoho.search.dal.model.CmsStorehouseData"
timeout="20000">
insert ignore into cms_storehouse_data (cs_id, content)
values (#{csId,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.yoho.search.dal.model.CmsStorehouseData"
timeout="20000">
insert into cms_storehouse_data
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="csId != null">
cs_id,
</if>
<if test="content != null">
content,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="csId != null">
#{csId,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.Integer" timeout="20000">
select
<include refid="Base_Column_List" />
from cms_storehouse_data
where cs_id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"
timeout="20000">
delete from cms_storehouse_data
where cs_id = #{id,jdbcType=INTEGER}
</delete>
</mapper>
\ No newline at end of file
<?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.yoho.search.dal.CmsStorehouseMapper">
<resultMap id="BaseResultMap" type="com.yoho.search.dal.model.CmsStorehouse">
<id column="id" property="id" jdbcType="INTEGER" />
<result column="module_id" property="moduleId" jdbcType="INTEGER" />
<result column="category_id" property="categoryId" jdbcType="INTEGER" />
<result column="caption" property="caption" jdbcType="VARCHAR" />
<result column="editor_id" property="editorId" jdbcType="INTEGER" />
<result column="tags" property="tags" jdbcType="VARCHAR" />
<result column="season_id" property="seasonId" jdbcType="TINYINT" />
<result column="order_by" property="orderBy" jdbcType="INTEGER" />
<result column="view_num" property="viewNum" jdbcType="INTEGER" />
<result column="edit_time" property="editTime" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="pic_url" property="picUrl" jdbcType="VARCHAR" />
<result column="gender" property="gender" jdbcType="CHAR" />
<result column="is_top" property="isTop" jdbcType="SMALLINT" />
<result column="web_url" property="webUrl" jdbcType="VARCHAR" />
<result column="app_url" property="appUrl" jdbcType="VARCHAR" />
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.yoho.search.dal.model.CmsStorehouse"
extends="BaseResultMap">
<result column="content" property="content" jdbcType="LONGVARCHAR" />
</resultMap>
<sql id="Base_Column_List">
id, module_id, category_id, caption, editor_id, tags,
season_id,
order_by, view_num,
edit_time, create_time, status, pic_url,
gender, is_top, web_url, app_url
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap"
parameterType="java.lang.Integer" timeout="20000">
select
<include refid="Base_Column_List" />
from cms_storehouse
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"
timeout="20000">
delete from cms_storehouse
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.yoho.search.dal.model.CmsStorehouse"
timeout="20000">
insert ignore into cms_storehouse (id, module_id, category_id,
caption, editor_id, tags,
season_id, order_by, view_num,
edit_time,
create_time, status,
pic_url, gender, is_top,
web_url, app_url)
values
(#{id,jdbcType=INTEGER}, #{moduleId,jdbcType=INTEGER},
#{categoryId,jdbcType=INTEGER},
#{caption,jdbcType=VARCHAR},
#{editorId,jdbcType=INTEGER}, #{tags,jdbcType=VARCHAR},
#{seasonId,jdbcType=TINYINT}, #{orderBy,jdbcType=INTEGER},
#{viewNum,jdbcType=INTEGER},
#{editTime,jdbcType=INTEGER},
#{createTime,jdbcType=INTEGER}, #{status,jdbcType=TINYINT},
#{picUrl,jdbcType=VARCHAR}, #{gender,jdbcType=CHAR},
#{isTop,jdbcType=SMALLINT},
#{webUrl,jdbcType=VARCHAR},
#{appUrl,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.yoho.search.dal.model.CmsStorehouse"
timeout="20000">
insert ignore into cms_storehouse
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="moduleId != null">
module_id,
</if>
<if test="categoryId != null">
category_id,
</if>
<if test="caption != null">
caption,
</if>
<if test="editorId != null">
editor_id,
</if>
<if test="tags != null">
tags,
</if>
<if test="seasonId != null">
season_id,
</if>
<if test="orderBy != null">
order_by,
</if>
<if test="viewNum != null">
view_num,
</if>
<if test="editTime != null">
edit_time,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="status != null">
status,
</if>
<if test="picUrl != null">
pic_url,
</if>
<if test="gender != null">
gender,
</if>
<if test="isTop != null">
is_top,
</if>
<if test="webUrl != null">
web_url,
</if>
<if test="appUrl != null">
app_url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="moduleId != null">
#{moduleId,jdbcType=INTEGER},
</if>
<if test="categoryId != null">
#{categoryId,jdbcType=INTEGER},
</if>
<if test="caption != null">
#{caption,jdbcType=VARCHAR},
</if>
<if test="editorId != null">
#{editorId,jdbcType=INTEGER},
</if>
<if test="tags != null">
#{tags,jdbcType=VARCHAR},
</if>
<if test="seasonId != null">
#{seasonId,jdbcType=TINYINT},
</if>
<if test="orderBy != null">
#{orderBy,jdbcType=INTEGER},
</if>
<if test="viewNum != null">
#{viewNum,jdbcType=INTEGER},
</if>
<if test="editTime != null">
#{editTime,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="picUrl != null">
#{picUrl,jdbcType=VARCHAR},
</if>
<if test="gender != null">
#{gender,jdbcType=CHAR},
</if>
<if test="isTop != null">
#{isTop,jdbcType=SMALLINT},
</if>
<if test="webUrl != null">
#{webUrl,jdbcType=VARCHAR},
</if>
<if test="appUrl != null">
#{appUrl,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.yoho.search.dal.model.CmsStorehouse"
timeout="20000">
update cms_storehouse
<set>
<if test="moduleId != null">
module_id = #{moduleId,jdbcType=INTEGER},
</if>
<if test="categoryId != null">
category_id = #{categoryId,jdbcType=INTEGER},
</if>
<if test="caption != null">
caption = #{caption,jdbcType=VARCHAR},
</if>
<if test="editorId != null">
editor_id = #{editorId,jdbcType=INTEGER},
</if>
<if test="tags != null">
tags = #{tags,jdbcType=VARCHAR},
</if>
<if test="seasonId != null">
season_id = #{seasonId,jdbcType=TINYINT},
</if>
<if test="orderBy != null">
order_by = #{orderBy,jdbcType=INTEGER},
</if>
<if test="viewNum != null">
view_num = #{viewNum,jdbcType=INTEGER},
</if>
<if test="editTime != null">
edit_time = #{editTime,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=TINYINT},
</if>
<if test="picUrl != null">
pic_url = #{picUrl,jdbcType=VARCHAR},
</if>
<if test="gender != null">
gender = #{gender,jdbcType=CHAR},
</if>
<if test="isTop != null">
is_top = #{isTop,jdbcType=SMALLINT},
</if>
<if test="webUrl != null">
web_url = #{webUrl,jdbcType=VARCHAR},
</if>
<if test="appUrl != null">
app_url = #{appUrl,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.yoho.search.dal.model.CmsStorehouse"
timeout="20000">
update cms_storehouse
set module_id =
#{moduleId,jdbcType=INTEGER},
category_id =
#{categoryId,jdbcType=INTEGER},
caption = #{caption,jdbcType=VARCHAR},
editor_id = #{editorId,jdbcType=INTEGER},
tags =
#{tags,jdbcType=VARCHAR},
season_id = #{seasonId,jdbcType=TINYINT},
order_by = #{orderBy,jdbcType=INTEGER},
view_num =
#{viewNum,jdbcType=INTEGER},
edit_time = #{editTime,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=INTEGER},
status =
#{status,jdbcType=TINYINT},
pic_url = #{picUrl,jdbcType=VARCHAR},
gender = #{gender,jdbcType=CHAR},
is_top = #{isTop,jdbcType=SMALLINT},
web_url = #{webUrl,jdbcType=VARCHAR},
app_url =
#{appUrl,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="count" resultType="java.lang.Integer" timeout="20000">
SELECT count(1) FROM cms_storehouse
</select>
<select id="getPageLists" resultMap="ResultMapWithBLOBs"
timeout="20000">
<![CDATA[SELECT
id, module_id, category_id, caption, editor_id, tags, season_id, order_by, view_num,
edit_time, create_time, STATUS, pic_url, gender, is_top, web_url, app_url, content
FROM cms_storehouse a,cms_storehouse_data b WHERE a.id=b.cs_id limit #{offset},#{pageSize}
]]>
</select>
</mapper>
\ No newline at end of file