This commit is contained in:
2023-12-20 16:20:49 +08:00
parent dd432ead11
commit 026a299f88
48 changed files with 37 additions and 438 deletions

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.dao.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>