实体层,dao层基本创建

This commit is contained in:
2023-12-19 14:04:28 +08:00
parent e8a518bd6b
commit 0721107407
54 changed files with 2970 additions and 8 deletions

View File

@@ -0,0 +1,111 @@
<?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.lovenav.mapper.AdminDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Admin">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="admin_account" jdbcType="VARCHAR" property="adminAccount" />
<result column="admin_password" jdbcType="VARCHAR" property="adminPassword" />
<result column="admin_email" jdbcType="VARCHAR" property="adminEmail" />
<result column="role_id" jdbcType="INTEGER" property="roleId" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="admin_status" jdbcType="INTEGER" property="adminStatus" />
</resultMap>
<sql id="Base_Column_List">
id, admin_account, admin_password, admin_email, role_id, createtime, admin_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_admin
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_admin
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Admin" useGeneratedKeys="true">
insert into ln_admin (admin_account, admin_password, admin_email,
role_id, createtime, admin_status
)
values (#{adminAccount,jdbcType=VARCHAR}, #{adminPassword,jdbcType=VARCHAR}, #{adminEmail,jdbcType=VARCHAR},
#{roleId,jdbcType=INTEGER}, #{createtime,jdbcType=TIMESTAMP}, #{adminStatus,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Admin" useGeneratedKeys="true">
insert into ln_admin
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="adminAccount != null">
admin_account,
</if>
<if test="adminPassword != null">
admin_password,
</if>
<if test="adminEmail != null">
admin_email,
</if>
<if test="roleId != null">
role_id,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="adminStatus != null">
admin_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="adminAccount != null">
#{adminAccount,jdbcType=VARCHAR},
</if>
<if test="adminPassword != null">
#{adminPassword,jdbcType=VARCHAR},
</if>
<if test="adminEmail != null">
#{adminEmail,jdbcType=VARCHAR},
</if>
<if test="roleId != null">
#{roleId,jdbcType=INTEGER},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
<if test="adminStatus != null">
#{adminStatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Admin">
update ln_admin
<set>
<if test="adminAccount != null">
admin_account = #{adminAccount,jdbcType=VARCHAR},
</if>
<if test="adminPassword != null">
admin_password = #{adminPassword,jdbcType=VARCHAR},
</if>
<if test="adminEmail != null">
admin_email = #{adminEmail,jdbcType=VARCHAR},
</if>
<if test="roleId != null">
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
<if test="adminStatus != null">
admin_status = #{adminStatus,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Admin">
update ln_admin
set admin_account = #{adminAccount,jdbcType=VARCHAR},
admin_password = #{adminPassword,jdbcType=VARCHAR},
admin_email = #{adminEmail,jdbcType=VARCHAR},
role_id = #{roleId,jdbcType=INTEGER},
createtime = #{createtime,jdbcType=TIMESTAMP},
admin_status = #{adminStatus,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,76 @@
<?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.lovenav.mapper.AdminMetaDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.AdminMeta">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="admin_id" jdbcType="BIGINT" property="adminId" />
<result column="meta_key" jdbcType="VARCHAR" property="metaKey" />
<result column="meta_value" jdbcType="VARCHAR" property="metaValue" />
</resultMap>
<sql id="Base_Column_List">
id, admin_id, meta_key, meta_value
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_admin_meta
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ln_admin_meta
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.AdminMeta" useGeneratedKeys="true">
insert into ln_admin_meta (admin_id, meta_key, meta_value
)
values (#{adminId,jdbcType=BIGINT}, #{metaKey,jdbcType=VARCHAR}, #{metaValue,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.AdminMeta" useGeneratedKeys="true">
insert into ln_admin_meta
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="adminId != null">
admin_id,
</if>
<if test="metaKey != null">
meta_key,
</if>
<if test="metaValue != null">
meta_value,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="adminId != null">
#{adminId,jdbcType=BIGINT},
</if>
<if test="metaKey != null">
#{metaKey,jdbcType=VARCHAR},
</if>
<if test="metaValue != null">
#{metaValue,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.AdminMeta">
update ln_admin_meta
<set>
<if test="adminId != null">
admin_id = #{adminId,jdbcType=BIGINT},
</if>
<if test="metaKey != null">
meta_key = #{metaKey,jdbcType=VARCHAR},
</if>
<if test="metaValue != null">
meta_value = #{metaValue,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.AdminMeta">
update ln_admin_meta
set admin_id = #{adminId,jdbcType=BIGINT},
meta_key = #{metaKey,jdbcType=VARCHAR},
meta_value = #{metaValue,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,144 @@
<?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.lovenav.mapper.AttachmentDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Attachment">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="path" jdbcType="VARCHAR" property="path" />
<result column="suffix" jdbcType="VARCHAR" property="suffix" />
<result column="file_name" jdbcType="VARCHAR" property="fileName" />
<result column="size" jdbcType="DOUBLE" property="size" />
<result column="md5" jdbcType="VARCHAR" property="md5" />
<result column="width" jdbcType="DOUBLE" property="width" />
<result column="height" jdbcType="DOUBLE" property="height" />
<result column="storage" jdbcType="OTHER" property="storage" />
<result column="createtime" jdbcType="INTEGER" property="createtime" />
</resultMap>
<sql id="Base_Column_List">
id, `path`, suffix, file_name, `size`, md5, width, height, `storage`, createtime
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_attachment
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ln_attachment
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Attachment" useGeneratedKeys="true">
insert into ln_attachment (`path`, suffix, file_name,
`size`, md5, width, height,
`storage`, createtime)
values (#{path,jdbcType=VARCHAR}, #{suffix,jdbcType=VARCHAR}, #{fileName,jdbcType=VARCHAR},
#{size,jdbcType=DOUBLE}, #{md5,jdbcType=VARCHAR}, #{width,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE},
#{storage,jdbcType=OTHER}, #{createtime,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Attachment" useGeneratedKeys="true">
insert into ln_attachment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="path != null">
`path`,
</if>
<if test="suffix != null">
suffix,
</if>
<if test="fileName != null">
file_name,
</if>
<if test="size != null">
`size`,
</if>
<if test="md5 != null">
md5,
</if>
<if test="width != null">
width,
</if>
<if test="height != null">
height,
</if>
<if test="storage != null">
`storage`,
</if>
<if test="createtime != null">
createtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="path != null">
#{path,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
#{suffix,jdbcType=VARCHAR},
</if>
<if test="fileName != null">
#{fileName,jdbcType=VARCHAR},
</if>
<if test="size != null">
#{size,jdbcType=DOUBLE},
</if>
<if test="md5 != null">
#{md5,jdbcType=VARCHAR},
</if>
<if test="width != null">
#{width,jdbcType=DOUBLE},
</if>
<if test="height != null">
#{height,jdbcType=DOUBLE},
</if>
<if test="storage != null">
#{storage,jdbcType=OTHER},
</if>
<if test="createtime != null">
#{createtime,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Attachment">
update ln_attachment
<set>
<if test="path != null">
`path` = #{path,jdbcType=VARCHAR},
</if>
<if test="suffix != null">
suffix = #{suffix,jdbcType=VARCHAR},
</if>
<if test="fileName != null">
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="size != null">
`size` = #{size,jdbcType=DOUBLE},
</if>
<if test="md5 != null">
md5 = #{md5,jdbcType=VARCHAR},
</if>
<if test="width != null">
width = #{width,jdbcType=DOUBLE},
</if>
<if test="height != null">
height = #{height,jdbcType=DOUBLE},
</if>
<if test="storage != null">
`storage` = #{storage,jdbcType=OTHER},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Attachment">
update ln_attachment
set `path` = #{path,jdbcType=VARCHAR},
suffix = #{suffix,jdbcType=VARCHAR},
file_name = #{fileName,jdbcType=VARCHAR},
`size` = #{size,jdbcType=DOUBLE},
md5 = #{md5,jdbcType=VARCHAR},
width = #{width,jdbcType=DOUBLE},
height = #{height,jdbcType=DOUBLE},
`storage` = #{storage,jdbcType=OTHER},
createtime = #{createtime,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,109 @@
<?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.lovenav.mapper.AuthDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Auth">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="route_url" jdbcType="VARCHAR" property="routeUrl" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="is_menu" jdbcType="TINYINT" property="isMenu" />
<result column="weigh" jdbcType="INTEGER" property="weigh" />
</resultMap>
<sql id="Base_Column_List">
id, icon, `name`, route_url, pid, is_menu, weigh
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_auth
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_auth
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Auth" useGeneratedKeys="true">
insert into ln_auth (icon, `name`, route_url,
pid, is_menu, weigh)
values (#{icon,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{routeUrl,jdbcType=VARCHAR},
#{pid,jdbcType=INTEGER}, #{isMenu,jdbcType=TINYINT}, #{weigh,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Auth" useGeneratedKeys="true">
insert into ln_auth
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="icon != null">
icon,
</if>
<if test="name != null">
`name`,
</if>
<if test="routeUrl != null">
route_url,
</if>
<if test="pid != null">
pid,
</if>
<if test="isMenu != null">
is_menu,
</if>
<if test="weigh != null">
weigh,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="routeUrl != null">
#{routeUrl,jdbcType=VARCHAR},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
</if>
<if test="isMenu != null">
#{isMenu,jdbcType=TINYINT},
</if>
<if test="weigh != null">
#{weigh,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Auth">
update ln_auth
<set>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="routeUrl != null">
route_url = #{routeUrl,jdbcType=VARCHAR},
</if>
<if test="pid != null">
pid = #{pid,jdbcType=INTEGER},
</if>
<if test="isMenu != null">
is_menu = #{isMenu,jdbcType=TINYINT},
</if>
<if test="weigh != null">
weigh = #{weigh,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Auth">
update ln_auth
set icon = #{icon,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
route_url = #{routeUrl,jdbcType=VARCHAR},
pid = #{pid,jdbcType=INTEGER},
is_menu = #{isMenu,jdbcType=TINYINT},
weigh = #{weigh,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,98 @@
<?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.lovenav.mapper.BannersDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Banners">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="img_url" jdbcType="VARCHAR" property="imgUrl" />
<result column="weigh" jdbcType="INTEGER" property="weigh" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="banner_status" jdbcType="TINYINT" property="bannerStatus" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
</resultMap>
<sql id="Base_Column_List">
id, img_url, weigh, url, banner_status, createtime
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_banners
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_banners
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Banners" useGeneratedKeys="true">
insert into ln_banners (img_url, weigh, url,
banner_status, createtime)
values (#{imgUrl,jdbcType=VARCHAR}, #{weigh,jdbcType=INTEGER}, #{url,jdbcType=VARCHAR},
#{bannerStatus,jdbcType=TINYINT}, #{createtime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Banners" useGeneratedKeys="true">
insert into ln_banners
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="imgUrl != null">
img_url,
</if>
<if test="weigh != null">
weigh,
</if>
<if test="url != null">
url,
</if>
<if test="bannerStatus != null">
banner_status,
</if>
<if test="createtime != null">
createtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="imgUrl != null">
#{imgUrl,jdbcType=VARCHAR},
</if>
<if test="weigh != null">
#{weigh,jdbcType=INTEGER},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="bannerStatus != null">
#{bannerStatus,jdbcType=TINYINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Banners">
update ln_banners
<set>
<if test="imgUrl != null">
img_url = #{imgUrl,jdbcType=VARCHAR},
</if>
<if test="weigh != null">
weigh = #{weigh,jdbcType=INTEGER},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="bannerStatus != null">
banner_status = #{bannerStatus,jdbcType=TINYINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Banners">
update ln_banners
set img_url = #{imgUrl,jdbcType=VARCHAR},
weigh = #{weigh,jdbcType=INTEGER},
url = #{url,jdbcType=VARCHAR},
banner_status = #{bannerStatus,jdbcType=TINYINT},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,63 @@
<?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.lovenav.mapper.CollectIconListDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.CollectIconList">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="url_md5" jdbcType="VARCHAR" property="urlMd5" />
<result column="icon_url" jdbcType="VARCHAR" property="iconUrl" />
</resultMap>
<sql id="Base_Column_List">
id, url_md5, icon_url
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_collect_icon_list
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ln_collect_icon_list
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.CollectIconList" useGeneratedKeys="true">
insert into ln_collect_icon_list (url_md5, icon_url)
values (#{urlMd5,jdbcType=VARCHAR}, #{iconUrl,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.CollectIconList" useGeneratedKeys="true">
insert into ln_collect_icon_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="urlMd5 != null">
url_md5,
</if>
<if test="iconUrl != null">
icon_url,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="urlMd5 != null">
#{urlMd5,jdbcType=VARCHAR},
</if>
<if test="iconUrl != null">
#{iconUrl,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.CollectIconList">
update ln_collect_icon_list
<set>
<if test="urlMd5 != null">
url_md5 = #{urlMd5,jdbcType=VARCHAR},
</if>
<if test="iconUrl != null">
icon_url = #{iconUrl,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.CollectIconList">
update ln_collect_icon_list
set url_md5 = #{urlMd5,jdbcType=VARCHAR},
icon_url = #{iconUrl,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,147 @@
<?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.lovenav.mapper.CommentDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Comment">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="url_id" jdbcType="INTEGER" property="urlId" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="root_comment_id" jdbcType="INTEGER" property="rootCommentId" />
<result column="like_count" jdbcType="BIGINT" property="likeCount" />
<result column="comment_time" jdbcType="TIMESTAMP" property="commentTime" />
<result column="comment_status" jdbcType="TINYINT" property="commentStatus" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="rating" jdbcType="INTEGER" property="rating" />
</resultMap>
<sql id="Base_Column_List">
id, url_id, user_id, content, root_comment_id, like_count, comment_time, comment_status,
update_time, rating
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_comment
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_comment
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Comment" useGeneratedKeys="true">
insert into ln_comment (url_id, user_id, content,
root_comment_id, like_count, comment_time,
comment_status, update_time, rating
)
values (#{urlId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR},
#{rootCommentId,jdbcType=INTEGER}, #{likeCount,jdbcType=BIGINT}, #{commentTime,jdbcType=TIMESTAMP},
#{commentStatus,jdbcType=TINYINT}, #{updateTime,jdbcType=TIMESTAMP}, #{rating,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Comment" useGeneratedKeys="true">
insert into ln_comment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="urlId != null">
url_id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="content != null">
content,
</if>
<if test="rootCommentId != null">
root_comment_id,
</if>
<if test="likeCount != null">
like_count,
</if>
<if test="commentTime != null">
comment_time,
</if>
<if test="commentStatus != null">
comment_status,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="rating != null">
rating,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="urlId != null">
#{urlId,jdbcType=INTEGER},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="rootCommentId != null">
#{rootCommentId,jdbcType=INTEGER},
</if>
<if test="likeCount != null">
#{likeCount,jdbcType=BIGINT},
</if>
<if test="commentTime != null">
#{commentTime,jdbcType=TIMESTAMP},
</if>
<if test="commentStatus != null">
#{commentStatus,jdbcType=TINYINT},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="rating != null">
#{rating,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Comment">
update ln_comment
<set>
<if test="urlId != null">
url_id = #{urlId,jdbcType=INTEGER},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="rootCommentId != null">
root_comment_id = #{rootCommentId,jdbcType=INTEGER},
</if>
<if test="likeCount != null">
like_count = #{likeCount,jdbcType=BIGINT},
</if>
<if test="commentTime != null">
comment_time = #{commentTime,jdbcType=TIMESTAMP},
</if>
<if test="commentStatus != null">
comment_status = #{commentStatus,jdbcType=TINYINT},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="rating != null">
rating = #{rating,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Comment">
update ln_comment
set url_id = #{urlId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
content = #{content,jdbcType=VARCHAR},
root_comment_id = #{rootCommentId,jdbcType=INTEGER},
like_count = #{likeCount,jdbcType=BIGINT},
comment_time = #{commentTime,jdbcType=TIMESTAMP},
comment_status = #{commentStatus,jdbcType=TINYINT},
update_time = #{updateTime,jdbcType=TIMESTAMP},
rating = #{rating,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,87 @@
<?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.lovenav.mapper.ConfigDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Config">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="OTHER" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
</resultMap>
<sql id="Base_Column_List">
id, `type`, `name`, `value`, updatetime
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_config
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_config
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Config" useGeneratedKeys="true">
insert into ln_config (`type`, `name`, `value`,
updatetime)
values (#{type,jdbcType=OTHER}, #{name,jdbcType=VARCHAR}, #{value,jdbcType=VARCHAR},
#{updatetime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Config" useGeneratedKeys="true">
insert into ln_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="type != null">
`type`,
</if>
<if test="name != null">
`name`,
</if>
<if test="value != null">
`value`,
</if>
<if test="updatetime != null">
updatetime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="type != null">
#{type,jdbcType=OTHER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
#{updatetime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Config">
update ln_config
<set>
<if test="type != null">
`type` = #{type,jdbcType=OTHER},
</if>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
`value` = #{value,jdbcType=VARCHAR},
</if>
<if test="updatetime != null">
updatetime = #{updatetime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Config">
update ln_config
set `type` = #{type,jdbcType=OTHER},
`name` = #{name,jdbcType=VARCHAR},
`value` = #{value,jdbcType=VARCHAR},
updatetime = #{updatetime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,87 @@
<?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.lovenav.mapper.LoginLogsDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.LoginLogs">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="login_ip" jdbcType="VARCHAR" property="loginIp" />
<result column="user_id" jdbcType="TINYINT" property="userId" />
<result column="login_time" jdbcType="TIMESTAMP" property="loginTime" />
<result column="location" jdbcType="VARCHAR" property="location" />
</resultMap>
<sql id="Base_Column_List">
id, login_ip, user_id, login_time, `location`
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_login_logs
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_login_logs
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.LoginLogs" useGeneratedKeys="true">
insert into ln_login_logs (login_ip, user_id, login_time,
`location`)
values (#{loginIp,jdbcType=VARCHAR}, #{userId,jdbcType=TINYINT}, #{loginTime,jdbcType=TIMESTAMP},
#{location,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.LoginLogs" useGeneratedKeys="true">
insert into ln_login_logs
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="loginIp != null">
login_ip,
</if>
<if test="userId != null">
user_id,
</if>
<if test="loginTime != null">
login_time,
</if>
<if test="location != null">
`location`,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="loginIp != null">
#{loginIp,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=TINYINT},
</if>
<if test="loginTime != null">
#{loginTime,jdbcType=TIMESTAMP},
</if>
<if test="location != null">
#{location,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.LoginLogs">
update ln_login_logs
<set>
<if test="loginIp != null">
login_ip = #{loginIp,jdbcType=VARCHAR},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=TINYINT},
</if>
<if test="loginTime != null">
login_time = #{loginTime,jdbcType=TIMESTAMP},
</if>
<if test="location != null">
`location` = #{location,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.LoginLogs">
update ln_login_logs
set login_ip = #{loginIp,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=TINYINT},
login_time = #{loginTime,jdbcType=TIMESTAMP},
`location` = #{location,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,98 @@
<?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.lovenav.mapper.NoticeDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Notice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="notice_status" jdbcType="TINYINT" property="noticeStatus" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
</resultMap>
<sql id="Base_Column_List">
id, title, content, url, notice_status, createtime
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_notice
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_notice
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Notice" useGeneratedKeys="true">
insert into ln_notice (title, content, url,
notice_status, createtime)
values (#{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{noticeStatus,jdbcType=TINYINT}, #{createtime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Notice" useGeneratedKeys="true">
insert into ln_notice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="title != null">
title,
</if>
<if test="content != null">
content,
</if>
<if test="url != null">
url,
</if>
<if test="noticeStatus != null">
notice_status,
</if>
<if test="createtime != null">
createtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="noticeStatus != null">
#{noticeStatus,jdbcType=TINYINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Notice">
update ln_notice
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="noticeStatus != null">
notice_status = #{noticeStatus,jdbcType=TINYINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Notice">
update ln_notice
set title = #{title,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
notice_status = #{noticeStatus,jdbcType=TINYINT},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,98 @@
<?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.lovenav.mapper.RoleDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.Role">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="role_name" jdbcType="VARCHAR" property="roleName" />
<result column="role_level" jdbcType="VARCHAR" property="roleLevel" />
<result column="pid" jdbcType="INTEGER" property="pid" />
<result column="menu_id" jdbcType="INTEGER" property="menuId" />
<result column="role_status" jdbcType="TINYINT" property="roleStatus" />
</resultMap>
<sql id="Base_Column_List">
id, role_name, role_level, pid, menu_id, role_status
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_role
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_role
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Role" useGeneratedKeys="true">
insert into ln_role (role_name, role_level, pid,
menu_id, role_status)
values (#{roleName,jdbcType=VARCHAR}, #{roleLevel,jdbcType=VARCHAR}, #{pid,jdbcType=INTEGER},
#{menuId,jdbcType=INTEGER}, #{roleStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.Role" useGeneratedKeys="true">
insert into ln_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="roleName != null">
role_name,
</if>
<if test="roleLevel != null">
role_level,
</if>
<if test="pid != null">
pid,
</if>
<if test="menuId != null">
menu_id,
</if>
<if test="roleStatus != null">
role_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="roleName != null">
#{roleName,jdbcType=VARCHAR},
</if>
<if test="roleLevel != null">
#{roleLevel,jdbcType=VARCHAR},
</if>
<if test="pid != null">
#{pid,jdbcType=INTEGER},
</if>
<if test="menuId != null">
#{menuId,jdbcType=INTEGER},
</if>
<if test="roleStatus != null">
#{roleStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.Role">
update ln_role
<set>
<if test="roleName != null">
role_name = #{roleName,jdbcType=VARCHAR},
</if>
<if test="roleLevel != null">
role_level = #{roleLevel,jdbcType=VARCHAR},
</if>
<if test="pid != null">
pid = #{pid,jdbcType=INTEGER},
</if>
<if test="menuId != null">
menu_id = #{menuId,jdbcType=INTEGER},
</if>
<if test="roleStatus != null">
role_status = #{roleStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.Role">
update ln_role
set role_name = #{roleName,jdbcType=VARCHAR},
role_level = #{roleLevel,jdbcType=VARCHAR},
pid = #{pid,jdbcType=INTEGER},
menu_id = #{menuId,jdbcType=INTEGER},
role_status = #{roleStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,76 @@
<?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.lovenav.mapper.UrlAccessDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.UrlAccess">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="url_id" jdbcType="INTEGER" property="urlId" />
<result column="time" jdbcType="TIMESTAMP" property="time" />
<result column="views" jdbcType="BIGINT" property="views" />
</resultMap>
<sql id="Base_Column_List">
id, url_id, `time`, views
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_url_access
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_url_access
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UrlAccess" useGeneratedKeys="true">
insert into ln_url_access (url_id, `time`, views
)
values (#{urlId,jdbcType=INTEGER}, #{time,jdbcType=TIMESTAMP}, #{views,jdbcType=BIGINT}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UrlAccess" useGeneratedKeys="true">
insert into ln_url_access
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="urlId != null">
url_id,
</if>
<if test="time != null">
`time`,
</if>
<if test="views != null">
views,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="urlId != null">
#{urlId,jdbcType=INTEGER},
</if>
<if test="time != null">
#{time,jdbcType=TIMESTAMP},
</if>
<if test="views != null">
#{views,jdbcType=BIGINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.UrlAccess">
update ln_url_access
<set>
<if test="urlId != null">
url_id = #{urlId,jdbcType=INTEGER},
</if>
<if test="time != null">
`time` = #{time,jdbcType=TIMESTAMP},
</if>
<if test="views != null">
views = #{views,jdbcType=BIGINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.UrlAccess">
update ln_url_access
set url_id = #{urlId,jdbcType=INTEGER},
`time` = #{time,jdbcType=TIMESTAMP},
views = #{views,jdbcType=BIGINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,147 @@
<?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.lovenav.mapper.UrlCateListDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.UrlCateList">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="createtime" jdbcType="INTEGER" property="createtime" />
<result column="url_number" jdbcType="BIGINT" property="urlNumber" />
<result column="weigh" jdbcType="BIGINT" property="weigh" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="need_login" jdbcType="TINYINT" property="needLogin" />
<result column="user_id" jdbcType="INTEGER" property="userId" />
<result column="root_cate_id" jdbcType="INTEGER" property="rootCateId" />
<result column="ico" jdbcType="VARCHAR" property="ico" />
</resultMap>
<sql id="Base_Column_List">
id, `name`, createtime, url_number, weigh, `status`, need_login, user_id, root_cate_id,
ico
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_url_cate_list
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_url_cate_list
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UrlCateList" useGeneratedKeys="true">
insert into ln_url_cate_list (`name`, createtime, url_number,
weigh, `status`, need_login,
user_id, root_cate_id, ico
)
values (#{name,jdbcType=VARCHAR}, #{createtime,jdbcType=INTEGER}, #{urlNumber,jdbcType=BIGINT},
#{weigh,jdbcType=BIGINT}, #{status,jdbcType=TINYINT}, #{needLogin,jdbcType=TINYINT},
#{userId,jdbcType=INTEGER}, #{rootCateId,jdbcType=INTEGER}, #{ico,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UrlCateList" useGeneratedKeys="true">
insert into ln_url_cate_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="urlNumber != null">
url_number,
</if>
<if test="weigh != null">
weigh,
</if>
<if test="status != null">
`status`,
</if>
<if test="needLogin != null">
need_login,
</if>
<if test="userId != null">
user_id,
</if>
<if test="rootCateId != null">
root_cate_id,
</if>
<if test="ico != null">
ico,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=INTEGER},
</if>
<if test="urlNumber != null">
#{urlNumber,jdbcType=BIGINT},
</if>
<if test="weigh != null">
#{weigh,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="needLogin != null">
#{needLogin,jdbcType=TINYINT},
</if>
<if test="userId != null">
#{userId,jdbcType=INTEGER},
</if>
<if test="rootCateId != null">
#{rootCateId,jdbcType=INTEGER},
</if>
<if test="ico != null">
#{ico,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.UrlCateList">
update ln_url_cate_list
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=INTEGER},
</if>
<if test="urlNumber != null">
url_number = #{urlNumber,jdbcType=BIGINT},
</if>
<if test="weigh != null">
weigh = #{weigh,jdbcType=BIGINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=TINYINT},
</if>
<if test="needLogin != null">
need_login = #{needLogin,jdbcType=TINYINT},
</if>
<if test="userId != null">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="rootCateId != null">
root_cate_id = #{rootCateId,jdbcType=INTEGER},
</if>
<if test="ico != null">
ico = #{ico,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.UrlCateList">
update ln_url_cate_list
set `name` = #{name,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=INTEGER},
url_number = #{urlNumber,jdbcType=BIGINT},
weigh = #{weigh,jdbcType=BIGINT},
`status` = #{status,jdbcType=TINYINT},
need_login = #{needLogin,jdbcType=TINYINT},
user_id = #{userId,jdbcType=INTEGER},
root_cate_id = #{rootCateId,jdbcType=INTEGER},
ico = #{ico,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,228 @@
<?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.lovenav.mapper.UrlListDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.UrlList">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="icon" jdbcType="VARCHAR" property="icon" />
<result column="cate_id" jdbcType="INTEGER" property="cateId" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="createtime" jdbcType="INTEGER" property="createtime" />
<result column="views" jdbcType="BIGINT" property="views" />
<result column="tags" jdbcType="VARCHAR" property="tags" />
<result column="weigh" jdbcType="BIGINT" property="weigh" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="desc" jdbcType="VARCHAR" property="desc" />
<result column="need_login" jdbcType="TINYINT" property="needLogin" />
<result column="agent_hint" jdbcType="VARCHAR" property="agentHint" />
<result column="is_need_agent" jdbcType="TINYINT" property="isNeedAgent" />
<result column="is_ad" jdbcType="TINYINT" property="isAd" />
<result column="is_top" jdbcType="TINYINT" property="isTop" />
<result column="is_encrypt" jdbcType="TINYINT" property="isEncrypt" />
</resultMap>
<sql id="Base_Column_List">
id, `name`, icon, cate_id, url, createtime, views, tags, weigh, `status`, `desc`,
need_login, agent_hint, is_need_agent, is_ad, is_top, is_encrypt
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_url_list
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ln_url_list
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UrlList" useGeneratedKeys="true">
insert into ln_url_list (`name`, icon, cate_id,
url, createtime, views,
tags, weigh, `status`,
`desc`, need_login, agent_hint,
is_need_agent, is_ad, is_top,
is_encrypt)
values (#{name,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR}, #{cateId,jdbcType=INTEGER},
#{url,jdbcType=VARCHAR}, #{createtime,jdbcType=INTEGER}, #{views,jdbcType=BIGINT},
#{tags,jdbcType=VARCHAR}, #{weigh,jdbcType=BIGINT}, #{status,jdbcType=TINYINT},
#{desc,jdbcType=VARCHAR}, #{needLogin,jdbcType=TINYINT}, #{agentHint,jdbcType=VARCHAR},
#{isNeedAgent,jdbcType=TINYINT}, #{isAd,jdbcType=TINYINT}, #{isTop,jdbcType=TINYINT},
#{isEncrypt,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UrlList" useGeneratedKeys="true">
insert into ln_url_list
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
`name`,
</if>
<if test="icon != null">
icon,
</if>
<if test="cateId != null">
cate_id,
</if>
<if test="url != null">
url,
</if>
<if test="createtime != null">
createtime,
</if>
<if test="views != null">
views,
</if>
<if test="tags != null">
tags,
</if>
<if test="weigh != null">
weigh,
</if>
<if test="status != null">
`status`,
</if>
<if test="desc != null">
`desc`,
</if>
<if test="needLogin != null">
need_login,
</if>
<if test="agentHint != null">
agent_hint,
</if>
<if test="isNeedAgent != null">
is_need_agent,
</if>
<if test="isAd != null">
is_ad,
</if>
<if test="isTop != null">
is_top,
</if>
<if test="isEncrypt != null">
is_encrypt,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="icon != null">
#{icon,jdbcType=VARCHAR},
</if>
<if test="cateId != null">
#{cateId,jdbcType=INTEGER},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
#{createtime,jdbcType=INTEGER},
</if>
<if test="views != null">
#{views,jdbcType=BIGINT},
</if>
<if test="tags != null">
#{tags,jdbcType=VARCHAR},
</if>
<if test="weigh != null">
#{weigh,jdbcType=BIGINT},
</if>
<if test="status != null">
#{status,jdbcType=TINYINT},
</if>
<if test="desc != null">
#{desc,jdbcType=VARCHAR},
</if>
<if test="needLogin != null">
#{needLogin,jdbcType=TINYINT},
</if>
<if test="agentHint != null">
#{agentHint,jdbcType=VARCHAR},
</if>
<if test="isNeedAgent != null">
#{isNeedAgent,jdbcType=TINYINT},
</if>
<if test="isAd != null">
#{isAd,jdbcType=TINYINT},
</if>
<if test="isTop != null">
#{isTop,jdbcType=TINYINT},
</if>
<if test="isEncrypt != null">
#{isEncrypt,jdbcType=TINYINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.UrlList">
update ln_url_list
<set>
<if test="name != null">
`name` = #{name,jdbcType=VARCHAR},
</if>
<if test="icon != null">
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="cateId != null">
cate_id = #{cateId,jdbcType=INTEGER},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=INTEGER},
</if>
<if test="views != null">
views = #{views,jdbcType=BIGINT},
</if>
<if test="tags != null">
tags = #{tags,jdbcType=VARCHAR},
</if>
<if test="weigh != null">
weigh = #{weigh,jdbcType=BIGINT},
</if>
<if test="status != null">
`status` = #{status,jdbcType=TINYINT},
</if>
<if test="desc != null">
`desc` = #{desc,jdbcType=VARCHAR},
</if>
<if test="needLogin != null">
need_login = #{needLogin,jdbcType=TINYINT},
</if>
<if test="agentHint != null">
agent_hint = #{agentHint,jdbcType=VARCHAR},
</if>
<if test="isNeedAgent != null">
is_need_agent = #{isNeedAgent,jdbcType=TINYINT},
</if>
<if test="isAd != null">
is_ad = #{isAd,jdbcType=TINYINT},
</if>
<if test="isTop != null">
is_top = #{isTop,jdbcType=TINYINT},
</if>
<if test="isEncrypt != null">
is_encrypt = #{isEncrypt,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.UrlList">
update ln_url_list
set `name` = #{name,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
cate_id = #{cateId,jdbcType=INTEGER},
url = #{url,jdbcType=VARCHAR},
createtime = #{createtime,jdbcType=INTEGER},
views = #{views,jdbcType=BIGINT},
tags = #{tags,jdbcType=VARCHAR},
weigh = #{weigh,jdbcType=BIGINT},
`status` = #{status,jdbcType=TINYINT},
`desc` = #{desc,jdbcType=VARCHAR},
need_login = #{needLogin,jdbcType=TINYINT},
agent_hint = #{agentHint,jdbcType=VARCHAR},
is_need_agent = #{isNeedAgent,jdbcType=TINYINT},
is_ad = #{isAd,jdbcType=TINYINT},
is_top = #{isTop,jdbcType=TINYINT},
is_encrypt = #{isEncrypt,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

View File

@@ -0,0 +1,147 @@
<?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.lovenav.mapper.UserDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.User">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="user_login" jdbcType="VARCHAR" property="userLogin" />
<result column="user_password" jdbcType="VARCHAR" property="userPassword" />
<result column="phone" jdbcType="BIGINT" property="phone" />
<result column="avatar" jdbcType="VARCHAR" property="avatar" />
<result column="nickname" jdbcType="VARCHAR" property="nickname" />
<result column="user_email" jdbcType="VARCHAR" property="userEmail" />
<result column="user_status" jdbcType="TINYINT" property="userStatus" />
<result column="user_registered" jdbcType="TIMESTAMP" property="userRegistered" />
<result column="role_id" jdbcType="TINYINT" property="roleId" />
</resultMap>
<sql id="Base_Column_List">
id, user_login, user_password, phone, avatar, nickname, user_email, user_status,
user_registered, role_id
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_user
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from ln_user
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.User" useGeneratedKeys="true">
insert into ln_user (user_login, user_password, phone,
avatar, nickname, user_email,
user_status, user_registered, role_id
)
values (#{userLogin,jdbcType=VARCHAR}, #{userPassword,jdbcType=VARCHAR}, #{phone,jdbcType=BIGINT},
#{avatar,jdbcType=VARCHAR}, #{nickname,jdbcType=VARCHAR}, #{userEmail,jdbcType=VARCHAR},
#{userStatus,jdbcType=TINYINT}, #{userRegistered,jdbcType=TIMESTAMP}, #{roleId,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.User" useGeneratedKeys="true">
insert into ln_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userLogin != null">
user_login,
</if>
<if test="userPassword != null">
user_password,
</if>
<if test="phone != null">
phone,
</if>
<if test="avatar != null">
avatar,
</if>
<if test="nickname != null">
nickname,
</if>
<if test="userEmail != null">
user_email,
</if>
<if test="userStatus != null">
user_status,
</if>
<if test="userRegistered != null">
user_registered,
</if>
<if test="roleId != null">
role_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userLogin != null">
#{userLogin,jdbcType=VARCHAR},
</if>
<if test="userPassword != null">
#{userPassword,jdbcType=VARCHAR},
</if>
<if test="phone != null">
#{phone,jdbcType=BIGINT},
</if>
<if test="avatar != null">
#{avatar,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
#{nickname,jdbcType=VARCHAR},
</if>
<if test="userEmail != null">
#{userEmail,jdbcType=VARCHAR},
</if>
<if test="userStatus != null">
#{userStatus,jdbcType=TINYINT},
</if>
<if test="userRegistered != null">
#{userRegistered,jdbcType=TIMESTAMP},
</if>
<if test="roleId != null">
#{roleId,jdbcType=TINYINT},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.User">
update ln_user
<set>
<if test="userLogin != null">
user_login = #{userLogin,jdbcType=VARCHAR},
</if>
<if test="userPassword != null">
user_password = #{userPassword,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=BIGINT},
</if>
<if test="avatar != null">
avatar = #{avatar,jdbcType=VARCHAR},
</if>
<if test="nickname != null">
nickname = #{nickname,jdbcType=VARCHAR},
</if>
<if test="userEmail != null">
user_email = #{userEmail,jdbcType=VARCHAR},
</if>
<if test="userStatus != null">
user_status = #{userStatus,jdbcType=TINYINT},
</if>
<if test="userRegistered != null">
user_registered = #{userRegistered,jdbcType=TIMESTAMP},
</if>
<if test="roleId != null">
role_id = #{roleId,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.User">
update ln_user
set user_login = #{userLogin,jdbcType=VARCHAR},
user_password = #{userPassword,jdbcType=VARCHAR},
phone = #{phone,jdbcType=BIGINT},
avatar = #{avatar,jdbcType=VARCHAR},
nickname = #{nickname,jdbcType=VARCHAR},
user_email = #{userEmail,jdbcType=VARCHAR},
user_status = #{userStatus,jdbcType=TINYINT},
user_registered = #{userRegistered,jdbcType=TIMESTAMP},
role_id = #{roleId,jdbcType=TINYINT}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@@ -0,0 +1,76 @@
<?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.lovenav.mapper.UserMetaDao">
<resultMap id="BaseResultMap" type="com.lovenav.entity.UserMeta">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="meta_key" jdbcType="VARCHAR" property="metaKey" />
<result column="meta_value" jdbcType="VARCHAR" property="metaValue" />
</resultMap>
<sql id="Base_Column_List">
id, user_id, meta_key, meta_value
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from ln_user_meta
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from ln_user_meta
where id = #{id,jdbcType=BIGINT}
</delete>
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UserMeta" useGeneratedKeys="true">
insert into ln_user_meta (user_id, meta_key, meta_value
)
values (#{userId,jdbcType=BIGINT}, #{metaKey,jdbcType=VARCHAR}, #{metaValue,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.lovenav.entity.UserMeta" useGeneratedKeys="true">
insert into ln_user_meta
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="metaKey != null">
meta_key,
</if>
<if test="metaValue != null">
meta_value,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="metaKey != null">
#{metaKey,jdbcType=VARCHAR},
</if>
<if test="metaValue != null">
#{metaValue,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.lovenav.entity.UserMeta">
update ln_user_meta
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="metaKey != null">
meta_key = #{metaKey,jdbcType=VARCHAR},
</if>
<if test="metaValue != null">
meta_value = #{metaValue,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.lovenav.entity.UserMeta">
update ln_user_meta
set user_id = #{userId,jdbcType=BIGINT},
meta_key = #{metaKey,jdbcType=VARCHAR},
meta_value = #{metaValue,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>