实体层,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,48 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_admin
*/
@Data
public class Admin implements Serializable {
/**
* id
*/
private Integer id;
/**
* 管理员登录账号
*/
private String adminAccount;
/**
* 管理员登录密码
*/
private String adminPassword;
/**
* 管理员邮箱
*/
private String adminEmail;
/**
* 角色组id
*/
private Integer roleId;
/**
* 创建时间
*/
private Date createtime;
/**
* 状态0有效/1禁用
*/
private Integer adminStatus;
private static final long serialVersionUID = 1L;
}

View File

@@ -1,4 +0,0 @@
package com.lovenav.entity;
public class AdminEntity {
}

View File

@@ -0,0 +1,24 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* 管理员资料表
* ln_admin_meta
*/
@Data
public class AdminMeta implements Serializable {
private Long id;
/**
* 管理员id
*/
private Long adminId;
private String metaKey;
private String metaValue;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,63 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* 附件表
* ln_attachment
*/
@Data
public class Attachment implements Serializable {
/**
* id
*/
private Long id;
/**
* 路径
*/
private String path;
/**
* 后缀
*/
private String suffix;
/**
* 文件名
*/
private String fileName;
/**
* 大小
*/
private Double size;
/**
* md5
*/
private String md5;
/**
* 宽
*/
private Double width;
/**
* 高
*/
private Double height;
/**
* 保存地址 local=本地
*/
private Object storage;
/**
* 创建时间
*/
private Integer createtime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,45 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* 后台菜单
* ln_auth
*/
@Data
public class Auth implements Serializable {
private Integer id;
/**
* 图标
*/
private String icon;
/**
* 菜单名称
*/
private String name;
/**
* 菜单路由
*/
private String routeUrl;
/**
* 上级id
*/
private Integer pid;
/**
* 是否作为菜单展示 1是0不是
*/
private Byte isMenu;
/**
* 权重
*/
private Integer weigh;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,43 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_banners
*/
@Data
public class Banners implements Serializable {
/**
* id
*/
private Integer id;
/**
* 图片url
*/
private String imgUrl;
/**
* 权重
*/
private Integer weigh;
/**
* 跳转链接
*/
private String url;
/**
* 状态0有效/1无效
*/
private Byte bannerStatus;
/**
* 创建时间
*/
private Date createtime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,25 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* 图标表
* ln_collect_icon_list
*/
@Data
public class CollectIconList implements Serializable {
private Long id;
/**
* 网址
*/
private String urlMd5;
/**
* 图片地址
*/
private String iconUrl;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,63 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_comment
*/
@Data
public class Comment implements Serializable {
/**
* id
*/
private Integer id;
/**
* 所属url id
*/
private Integer urlId;
/**
* 用户id
*/
private Integer userId;
/**
* 评论内容
*/
private String content;
/**
* 父评论id
*/
private Integer rootCommentId;
/**
* 点赞数
*/
private Long likeCount;
/**
* 评论时间
*/
private Date commentTime;
/**
* 状态
*/
private Byte commentStatus;
/**
* 更新时间
*/
private Date updateTime;
/**
* 用户评级
*/
private Integer rating;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,38 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_config
*/
@Data
public class Config implements Serializable {
/**
* id
*/
private Integer id;
/**
* 类型
*/
private Object type;
/**
* 名称
*/
private String name;
/**
* 值
*/
private String value;
/**
* 更新时间
*/
private Date updatetime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,38 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_login_logs
*/
@Data
public class LoginLogs implements Serializable {
/**
* id
*/
private Integer id;
/**
* ip
*/
private String loginIp;
/**
* 用户id
*/
private Byte userId;
/**
* 登录时间
*/
private Date loginTime;
/**
* 地址
*/
private String location;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,43 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_notice
*/
@Data
public class Notice implements Serializable {
/**
* id
*/
private Integer id;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String content;
/**
* 跳转链接
*/
private String url;
/**
* 状态0显示/1隐藏
*/
private Byte noticeStatus;
/**
* 创建时间
*/
private Date createtime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,42 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* ln_role
*/
@Data
public class Role implements Serializable {
/**
* id
*/
private Integer id;
/**
* 角色名称
*/
private String roleName;
/**
* 角色等级
*/
private String roleLevel;
/**
* 上级角色
*/
private Integer pid;
/**
* 菜单权限
*/
private Integer menuId;
/**
* 状态0有效/1禁用
*/
private Byte roleStatus;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,33 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_url_access
*/
@Data
public class UrlAccess implements Serializable {
/**
* id
*/
private Integer id;
/**
* url id
*/
private Integer urlId;
/**
* 日期
*/
private Date time;
/**
* 访问量
*/
private Long views;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,62 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* ln_url_cate_list
*/
@Data
public class UrlCateList implements Serializable {
/**
* id
*/
private Integer id;
/**
* 名称
*/
private String name;
/**
* 创建时间
*/
private Integer createtime;
/**
* url 数量
*/
private Long urlNumber;
/**
* 权重
*/
private Long weigh;
/**
* 状态
*/
private Byte status;
/**
* 需要登录才能查看
*/
private Byte needLogin;
/**
* 用户id
*/
private Integer userId;
/**
* 根标签
*/
private Integer rootCateId;
/**
* 图标
*/
private String ico;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,97 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* ln_url_list
*/
@Data
public class UrlList implements Serializable {
/**
* id
*/
private Long id;
/**
* 网站名称
*/
private String name;
/**
* 网站图标
*/
private String icon;
/**
* 标签id
*/
private Integer cateId;
/**
* url
*/
private String url;
/**
* 创建时间
*/
private Integer createtime;
/**
* 访问数量
*/
private Long views;
/**
* 标签
*/
private String tags;
/**
* 权重
*/
private Long weigh;
/**
* 状态
*/
private Byte status;
/**
* 描述
*/
private String desc;
/**
* 需要登录才能查看
*/
private Byte needLogin;
/**
* 代理提示语
*/
private String agentHint;
/**
* 是否需要代理 1需要0不需要
*/
private Byte isNeedAgent;
/**
* 是否广告1是0不是
*/
private Byte isAd;
/**
* 是否全局置顶1是0不是
*/
private Byte isTop;
/**
* 是否加密1加密/0不加密
*/
private Byte isEncrypt;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,63 @@
package com.lovenav.entity;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_user
*/
@Data
public class User implements Serializable {
/**
* id
*/
private Integer id;
/**
* 用户登录名
*/
private String userLogin;
/**
* 用户密码
*/
private String userPassword;
/**
* 用户手机号
*/
private Long phone;
/**
* 用户头像
*/
private String avatar;
/**
* 用户昵称
*/
private String nickname;
/**
* 用户邮箱
*/
private String userEmail;
/**
* 用户状态0正常/1禁用
*/
private Byte userStatus;
/**
* 用户注册时间
*/
private Date userRegistered;
/**
* 角色组
*/
private Byte roleId;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,21 @@
package com.lovenav.entity;
import java.io.Serializable;
import lombok.Data;
/**
* 用户信息表
* ln_user_meta
*/
@Data
public class UserMeta implements Serializable {
private Long id;
private Long userId;
private String metaKey;
private String metaValue;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Admin;
import org.springframework.stereotype.Repository;
@Repository
public interface AdminDao {
int deleteByPrimaryKey(Integer id);
int insert(Admin record);
int insertSelective(Admin record);
Admin selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Admin record);
int updateByPrimaryKey(Admin record);
}

View File

@@ -1,4 +0,0 @@
package com.lovenav.mapper;
public interface AdminMapper {
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.AdminMeta;
import org.springframework.stereotype.Repository;
@Repository
public interface AdminMetaDao {
int deleteByPrimaryKey(Long id);
int insert(AdminMeta record);
int insertSelective(AdminMeta record);
AdminMeta selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(AdminMeta record);
int updateByPrimaryKey(AdminMeta record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Attachment;
import org.springframework.stereotype.Repository;
@Repository
public interface AttachmentDao {
int deleteByPrimaryKey(Long id);
int insert(Attachment record);
int insertSelective(Attachment record);
Attachment selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(Attachment record);
int updateByPrimaryKey(Attachment record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Auth;
import org.springframework.stereotype.Repository;
@Repository
public interface AuthDao {
int deleteByPrimaryKey(Integer id);
int insert(Auth record);
int insertSelective(Auth record);
Auth selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Auth record);
int updateByPrimaryKey(Auth record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Banners;
import org.springframework.stereotype.Repository;
@Repository
public interface BannersDao {
int deleteByPrimaryKey(Integer id);
int insert(Banners record);
int insertSelective(Banners record);
Banners selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Banners record);
int updateByPrimaryKey(Banners record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.CollectIconList;
import org.springframework.stereotype.Repository;
@Repository
public interface CollectIconListDao {
int deleteByPrimaryKey(Long id);
int insert(CollectIconList record);
int insertSelective(CollectIconList record);
CollectIconList selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(CollectIconList record);
int updateByPrimaryKey(CollectIconList record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Comment;
import org.springframework.stereotype.Repository;
@Repository
public interface CommentDao {
int deleteByPrimaryKey(Integer id);
int insert(Comment record);
int insertSelective(Comment record);
Comment selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Comment record);
int updateByPrimaryKey(Comment record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Config;
import org.springframework.stereotype.Repository;
@Repository
public interface ConfigDao {
int deleteByPrimaryKey(Integer id);
int insert(Config record);
int insertSelective(Config record);
Config selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Config record);
int updateByPrimaryKey(Config record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.LoginLogs;
import org.springframework.stereotype.Repository;
@Repository
public interface LoginLogsDao {
int deleteByPrimaryKey(Integer id);
int insert(LoginLogs record);
int insertSelective(LoginLogs record);
LoginLogs selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(LoginLogs record);
int updateByPrimaryKey(LoginLogs record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Notice;
import org.springframework.stereotype.Repository;
@Repository
public interface NoticeDao {
int deleteByPrimaryKey(Integer id);
int insert(Notice record);
int insertSelective(Notice record);
Notice selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Notice record);
int updateByPrimaryKey(Notice record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.Role;
import org.springframework.stereotype.Repository;
@Repository
public interface RoleDao {
int deleteByPrimaryKey(Integer id);
int insert(Role record);
int insertSelective(Role record);
Role selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(Role record);
int updateByPrimaryKey(Role record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.UrlAccess;
import org.springframework.stereotype.Repository;
@Repository
public interface UrlAccessDao {
int deleteByPrimaryKey(Integer id);
int insert(UrlAccess record);
int insertSelective(UrlAccess record);
UrlAccess selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(UrlAccess record);
int updateByPrimaryKey(UrlAccess record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.UrlCateList;
import org.springframework.stereotype.Repository;
@Repository
public interface UrlCateListDao {
int deleteByPrimaryKey(Integer id);
int insert(UrlCateList record);
int insertSelective(UrlCateList record);
UrlCateList selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(UrlCateList record);
int updateByPrimaryKey(UrlCateList record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.UrlList;
import org.springframework.stereotype.Repository;
@Repository
public interface UrlListDao {
int deleteByPrimaryKey(Long id);
int insert(UrlList record);
int insertSelective(UrlList record);
UrlList selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(UrlList record);
int updateByPrimaryKey(UrlList record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.User;
import org.springframework.stereotype.Repository;
@Repository
public interface UserDao {
int deleteByPrimaryKey(Integer id);
int insert(User record);
int insertSelective(User record);
User selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(User record);
int updateByPrimaryKey(User record);
}

View File

@@ -0,0 +1,19 @@
package com.lovenav.mapper;
import com.lovenav.entity.UserMeta;
import org.springframework.stereotype.Repository;
@Repository
public interface UserMetaDao {
int deleteByPrimaryKey(Long id);
int insert(UserMeta record);
int insertSelective(UserMeta record);
UserMeta selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(UserMeta record);
int updateByPrimaryKey(UserMeta record);
}

View File

@@ -0,0 +1,45 @@
package generate;
import java.io.Serializable;
import lombok.Data;
/**
* 后台菜单
* ln_auth
*/
@Data
public class LnAuth implements Serializable {
private Integer id;
/**
* 图标
*/
private String icon;
/**
* 菜单名称
*/
private String name;
/**
* 菜单路由
*/
private String routeUrl;
/**
* 上级id
*/
private Integer pid;
/**
* 是否作为菜单展示 1是0不是
*/
private Byte isMenu;
/**
* 权重
*/
private Integer weigh;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,19 @@
package generate;
import generate.LnAuth;
import org.springframework.stereotype.Repository;
@Repository
public interface LnAuthDao {
int deleteByPrimaryKey(Integer id);
int insert(LnAuth record);
int insertSelective(LnAuth record);
LnAuth selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(LnAuth record);
int updateByPrimaryKey(LnAuth record);
}

View File

@@ -0,0 +1,43 @@
package generate;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ln_banners
*/
@Data
public class LnBanners implements Serializable {
/**
* id
*/
private Integer id;
/**
* 图片url
*/
private String imgUrl;
/**
* 权重
*/
private Integer weigh;
/**
* 跳转链接
*/
private String url;
/**
* 状态0有效/1无效
*/
private Byte bannerStatus;
/**
* 创建时间
*/
private Date createtime;
private static final long serialVersionUID = 1L;
}

View File

@@ -0,0 +1,19 @@
package generate;
import generate.LnBanners;
import org.springframework.stereotype.Repository;
@Repository
public interface LnBannersDao {
int deleteByPrimaryKey(Integer id);
int insert(LnBanners record);
int insertSelective(LnBanners record);
LnBanners selectByPrimaryKey(Integer id);
int updateByPrimaryKeySelective(LnBanners record);
int updateByPrimaryKey(LnBanners record);
}

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>