1 Star 0 Fork 0

Peter77/api-design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
NotificationMessageDao.xml 3.79 KB
一键复制 编辑 原始数据 按行查看 历史
CHENHUAMING 提交于 2021-06-29 19:17 . OK
<?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.best.tnet.basic.dao.notification.NotificationMessageDao">
<resultMap id="resultMap" type="com.best.tnet.basic.pojo.notification.po.NotificationMessagePO">
<result column="id" jdbcType="BIGINT" property="id"/>
<result column="uid" jdbcType="VARCHAR" property="uid"/>
<result column="u_type" jdbcType="VARCHAR" property="uType"/>
<result column="domain_id" jdbcType="BIGINT" property="domainId"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="msg_content" jdbcType="VARCHAR" property="msgContent"/>
<result column="category" jdbcType="VARCHAR" property="category"/>
<result column="extras" jdbcType="VARCHAR" property="extras"/>
<result column="source" jdbcType="VARCHAR" property="source"/>
<result column="read" jdbcType="BIT" property="read"/>
<result column="badge_add_num" jdbcType="INTEGER" property="badgeAddNum"/>
<result column="notification_time" jdbcType="TIMESTAMP" property="notificationTime"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
</resultMap>
<insert id="create" parameterType="com.best.tnet.basic.pojo.notification.po.NotificationMessagePO" keyProperty="id" keyColumn = "id" useGeneratedKeys="true">
insert into tn_notification_message (
id,
uid,
u_type,
domain_id,
title,
msg_content,
category,
extras,
source,
read,
badge_add_num,
notification_time,
create_time
)
values (
#{id,jdbcType=BIGINT},
#{uid,jdbcType=VARCHAR},
#{uType,jdbcType=VARCHAR},
#{domainId,jdbcType=BIGINT},
#{title,jdbcType=VARCHAR},
#{msgContent,jdbcType=VARCHAR},
#{category,jdbcType=VARCHAR},
#{extras,jdbcType=VARCHAR},
#{source,jdbcType=VARCHAR},
#{read,jdbcType=BIT},
#{badgeAddNum,jdbcType=INTEGER},
#{notificationTime,jdbcType=TIMESTAMP},
sysdate()
)
</insert>
<update id="update">
update tn_notification_message set
id = #{id,jdbcType=BIGINT},
uid = #{uid,jdbcType=VARCHAR},
u_type = #{uType,jdbcType=VARCHAR},
domain_id = #{domainId,jdbcType=BIGINT},
title = #{title,jdbcType=VARCHAR},
msg_content = #{msgContent,jdbcType=VARCHAR},
category = #{category,jdbcType=VARCHAR},
extras = #{extras,jdbcType=VARCHAR},
source = #{source,jdbcType=VARCHAR},
read = #{read,jdbcType=BIT},
badge_add_num = #{badgeAddNum,jdbcType=INTEGER},
notification_time = #{notificationTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT} and optlock = #{optlock,jdbcType=INTEGER}
</update>
<delete id="remove" parameterType="long">
delete from tn_notification_message where id = #{id, jdbcType=BIGINT}
</delete>
<delete id="removeByIds" parameterType="java.util.List">
delete from tn_notification_message where id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{list[${index}], jdbcType=BIGINT}
</foreach>
</delete>
<select id="get" resultMap="resultMap" parameterType="long">
select * from tn_notification_message where id = #{id, jdbcType=BIGINT}
</select>
<select id="getByIds" resultMap="resultMap" >
select * from tn_notification_message where id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{list[${index}], jdbcType=BIGINT}
</foreach>
</select>
<select id="searchByPage" resultMap="resultMap" >
select * from tn_notification_message order by id desc
</select>
<select id="getAll" resultMap="resultMap" >
select * from tn_notification_message
</select>
</mapper>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/peter9975/api-design.git
[email protected]:peter9975/api-design.git
peter9975
api-design
api-design
master

搜索帮助