作者 王勇

设置删除时间,增加消息记录方法

正在显示 19 个修改的文件 包含 233 行增加109 行删除
... ... @@ -2,11 +2,9 @@ package com.sunyo.wlpt.message.bus.service.controller;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pagehelper.PageInfo;
import com.sunyo.wlpt.message.bus.service.domain.MessageNote;
import com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete;
import com.sunyo.wlpt.message.bus.service.domain.*;
import com.sunyo.wlpt.message.bus.service.response.ResultJson;
import com.sunyo.wlpt.message.bus.service.service.MessageNoteService;
import com.sunyo.wlpt.message.bus.service.service.SchedulingDeleteService;
import com.sunyo.wlpt.message.bus.service.service.*;
import com.sunyo.wlpt.message.bus.service.utils.IdUtils;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*;
... ... @@ -25,6 +23,21 @@ import java.util.Date;
public class MessageNoteController {
@Resource
private BusServerService busServerService;
@Resource
private VirtualHostService virtualHostService;
@Resource
private BusExchangeService busExchangeService;
@Resource
private BusQueueService busQueueService;
@Resource
private RoutingKeyService routingKeyService;
@Resource
private MessageNoteService messageNoteService;
@Resource
... ... @@ -140,7 +153,7 @@ public class MessageNoteController {
@PutMapping("/update")
public ResultJson updateMessageNote(@RequestBody MessageNote messageNote) {
ResultJson result = new ResultJson<>();
int num = messageNoteService.updateByPrimaryKeySelective(messageNote);
int num = messageNoteService.updateByPrimaryKeySelective(note_fillName(messageNote));
if (num > 0) {
result.setCode("200");
result.setMsg("编辑-消息收发记录,成功");
... ... @@ -162,7 +175,10 @@ public class MessageNoteController {
ResultJson result = new ResultJson<>();
// 设置id
messageNote.setId(IdUtils.generateId());
int num = messageNoteService.insertSelective(messageNote);
if (!"".equals(messageNote.getAlias_sendContent()) && messageNote.getAlias_sendContent() != null) {
messageNote.setSendContent(messageNote.getAlias_sendContent().getBytes());
}
int num = messageNoteService.insertSelective(note_fillName(messageNote));
if (num > 0) {
result.setCode("200");
result.setMsg("添加-消息收发记录,成功");
... ... @@ -188,4 +204,33 @@ public class MessageNoteController {
// 定时自动删除
messageNoteService.autoDelete(deleteTime);
}
/**
* 填充名称
*
* @param messageNote {@link MessageNote}
* @return
*/
public MessageNote note_fillName(MessageNote messageNote) {
// 填充,服务器名称
BusServer busServer = busServerService.selectByPrimaryKey(messageNote.getServerId());
messageNote.setServerName(busServer.getServerName());
// 填充,虚拟主机名称
VirtualHost virtualHost = virtualHostService.selectByPrimaryKey(messageNote.getVirtualHostId());
messageNote.setVirtualHostName(virtualHost.getVirtualHostName());
// 填充,交换机名称
BusExchange busExchange = busExchangeService.selectByPrimaryKey(messageNote.getExchangeId());
messageNote.setExchangeName(busExchange.getExchangeName());
// 填充,队列名称
BusQueue busQueue = busQueueService.selectByPrimaryKey(messageNote.getQueueId());
messageNote.setQueueName(busQueue.getQueueName());
// 填充,路由键名称
RoutingKey routingKey = routingKeyService.selectByPrimaryKey(messageNote.getRoutingKeyId());
messageNote.setRoutingKeyName(routingKey.getRoutingKeyName());
return messageNote;
}
}
... ...
package com.sunyo.wlpt.message.bus.service.controller;
import com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete;
import com.sunyo.wlpt.message.bus.service.response.ResultJson;
import com.sunyo.wlpt.message.bus.service.service.SchedulingDeleteService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author 子诚
* Description:
* 时间:2020/7/15 16:58
*/
@CrossOrigin
@RequestMapping("bus/scheduling")
@RestController
public class SchedulingDeleteController {
@Resource
private SchedulingDeleteService schedulingDeleteService;
/**
* 获取删除时间
*
* @return {@link ResultJson}
*/
@GetMapping("/get")
public ResultJson getDeleteTime() {
SchedulingDelete schedulingDelete = getSchedulingDelete();
return schedulingDelete.getDeleteTime() > 0 ? new ResultJson("200", "获取删除时间,成功", schedulingDelete) : new ResultJson("500", "获取删除时间,失败");
}
/**
* 设置删除时间
*
* @param deleteTime 删除时间
* @return {@link ResultJson}
*/
@GetMapping("/set")
public ResultJson setDeleteTime(Integer deleteTime) {
SchedulingDelete schedulingDelete = getSchedulingDelete();
schedulingDelete.setDeleteTime(deleteTime);
int num = schedulingDeleteService.updateByPrimaryKeySelective(schedulingDelete);
return num > 0 ? new ResultJson("200", "修改删除时间,成功") : new ResultJson("500", "修改删除时间,失败");
}
private SchedulingDelete getSchedulingDelete() {
// 类型
String deleteType = "message_note";
// 首先获取可自主设置的默认时间
SchedulingDelete schedulingDelete = schedulingDeleteService.selectByType(deleteType);
return schedulingDelete;
}
}
... ...
... ... @@ -35,6 +35,7 @@ public class UserMessageBindingController {
@Resource
private RoutingKeyService routingKeyService;
@Resource
private UserMessageBindingService userMessageBindingService;
... ... @@ -143,7 +144,7 @@ public class UserMessageBindingController {
@PutMapping("/update")
public ResultJson updateUserMessageBinding(@RequestBody UserMessageBinding userMessageBinding) {
ResultJson result = new ResultJson<>();
int num = userMessageBindingService.updateByPrimaryKeySelective(fillName(userMessageBinding));
int num = userMessageBindingService.updateByPrimaryKeySelective(umb_fillName(userMessageBinding));
if (num > 0) {
result.setCode("200");
result.setMsg("编辑-账户消息配置-信息,成功");
... ... @@ -165,7 +166,7 @@ public class UserMessageBindingController {
ResultJson result = new ResultJson<>();
// 设置id
userMessageBinding.setId(IdUtils.generateId());
int num = userMessageBindingService.insertSelective(fillName(userMessageBinding));
int num = userMessageBindingService.insertSelective(umb_fillName(userMessageBinding));
if (num > 0) {
result.setCode("200");
result.setMsg("添加-账户消息配置-信息,成功");
... ... @@ -180,7 +181,7 @@ public class UserMessageBindingController {
* 编辑 or 新增方法,根绝前端传递来的id值,来填充对应的name
* 服务器id,虚拟主机id,交换机id,队列id,路由键id
*/
public UserMessageBinding fillName(UserMessageBinding userMessageBinding) {
public UserMessageBinding umb_fillName(UserMessageBinding userMessageBinding) {
// 填充,服务器名称
BusServer busServer = busServerService.selectByPrimaryKey(userMessageBinding.getServerId());
userMessageBinding.setServerName(busServer.getServerName());
... ...
... ... @@ -10,7 +10,7 @@ import lombok.NoArgsConstructor;
/**
* @author 子诚
* Description:消息收发记录表(默认存储七天)
* 时间:2020/7/13 18:58
* 时间:2020/7/15 10:45
*/
@Data
... ... @@ -18,7 +18,7 @@ import lombok.NoArgsConstructor;
@NoArgsConstructor
public class MessageNote implements Serializable {
private static final long serialVersionUID = 4952900873210696428L;
private static final long serialVersionUID = -2119333801860569470L;
/**
* 消息收发记录表的ID
... ... @@ -101,6 +101,16 @@ public class MessageNote implements Serializable {
private byte[] sendContent;
/**
* 发送消息内容,别名
*/
private String alias_sendContent;
/**
* 相关描述
*/
private String description;
/**
* 创建时间
*/
private Date gmtCreate;
... ...
package com.sunyo.wlpt.message.bus.service.domain;
import java.io.Serializable;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
... ... @@ -8,27 +9,34 @@ import lombok.NoArgsConstructor;
/**
* @author 子诚
* Description:自动定时删除的时间设置表
* 时间:2020/7/14 10:35
* 时间:2020/7/15 10:28
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SchedulingDelete implements Serializable {
private static final long serialVersionUID = -3199487735394538126L;
private static final long serialVersionUID = -4810544767961191508L;
/**
* 时间设置表的ID
*/
* 时间设置表的ID
*/
private String id;
/**
* 设置时间
*/
* 设置时间
*/
private Integer deleteTime;
/**
* 类型
*/
* 类型
*/
private String deleteType;
/**
* 相关描述
*/
private String description;
}
\ No newline at end of file
... ...
... ... @@ -10,15 +10,14 @@ import lombok.NoArgsConstructor;
/**
* @author 子诚
* Description:账户信息绑定配置表
* 时间:2020/7/13 18:03
* 时间:2020/7/15 10:37
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserMessageBinding implements Serializable {
private static final long serialVersionUID = 7133408333518754607L;
private static final long serialVersionUID = 1036230195492305641L;
/**
* 账户信息绑定配置表的ID
... ... @@ -91,6 +90,11 @@ public class UserMessageBinding implements Serializable {
private String subscriber;
/**
* 相关描述
*/
private String description;
/**
* 创建时间
*/
private Date gmtCreate;
... ...
package com.sunyo.wlpt.message.bus.service.mapper;
import com.sunyo.wlpt.message.bus.service.domain.MessageNote;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;import org.apache.ibatis.annotations.Param;import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/7/13 18:58
* 时间:2020/7/15 10:45
*/
@Mapper
public interface MessageNoteMapper {
... ...
... ... @@ -7,7 +7,7 @@ import org.apache.ibatis.annotations.Param;
/**
* @author 子诚
* Description:
* 时间:2020/7/14 10:35
* 时间:2020/7/15 10:28
*/
@Mapper
public interface SchedulingDeleteMapper {
... ... @@ -63,7 +63,7 @@ public interface SchedulingDeleteMapper {
* 获取时间设置表
*
* @param deleteType 删除的类型
* @return {@link SchedulingDelete }
* @return {@link SchedulingDelete}
*/
SchedulingDelete selectByType(@Param("deleteType") String deleteType);
}
\ No newline at end of file
... ...
... ... @@ -6,7 +6,7 @@ import org.apache.ibatis.annotations.Mapper;import java.util.List;
/**
* @author 子诚
* Description:
* 时间:2020/7/13 18:03
* 时间:2020/7/15 10:37
*/
@Mapper
public interface UserMessageBindingMapper {
... ...
... ... @@ -77,3 +77,4 @@ public interface MessageNoteService {
}
... ...
... ... @@ -66,3 +66,4 @@ public interface SchedulingDeleteService {
*/
SchedulingDelete selectByType(String deleteType);
}
... ...
package com.sunyo.wlpt.message.bus.service.service;
import com.github.pagehelper.PageInfo;
import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding;import java.util.List;
import com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding;
import java.util.List;
/**
* @author 子诚
... ... @@ -71,3 +73,4 @@ public interface UserMessageBindingService {
... ...
... ... @@ -15,6 +15,8 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.List;
import static java.util.stream.Collectors.toList;
/**
* @author 子诚
* Description:
... ... @@ -85,6 +87,11 @@ public class MessageNoteServiceImpl implements MessageNoteService {
public PageInfo selectMessageNoteList(MessageNote messageNote, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum, pageSize);
List<MessageNote> messageNoteList = messageNoteMapper.selectMessageNoteList(messageNote);
// 使用stream 并行将 byte[] 转换成 String
messageNoteList.parallelStream().forEach(item -> {
String content = new String(item.getSendContent());
item.setAlias_sendContent(content + "");
});
PageInfo<MessageNote> pageInfo = new PageInfo<>(messageNoteList);
return pageInfo;
}
... ... @@ -97,3 +104,4 @@ public class MessageNoteServiceImpl implements MessageNoteService {
}
... ...
... ... @@ -55,3 +55,4 @@ public class SchedulingDeleteServiceImpl implements SchedulingDeleteService {
}
}
... ...
... ... @@ -92,3 +92,4 @@ public class UserMessageBindingServiceImpl implements UserMessageBindingService
... ...
package com.sunyo.wlpt.message.bus.service.vo;
import com.sunyo.wlpt.message.bus.service.domain.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 子诚
* Description:UserMessageBinding的一个继承类,进行聚合
* 时间:2020/7/14 17:33
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserMessageBindingVO extends UserMessageBinding implements Serializable {
private static final long serialVersionUID = 5417123427960404665L;
/**
* 一条配置记录,对应一个服务器
*/
private BusServer busServer;
/**
* 一条配置记录,对应一个虚拟主机
*/
private VirtualHost virtualHost;
/**
* 一条配置记录,对应一个交换机
*/
private BusExchange busExchange;
/**
* 一条配置记录,对应一个队列
*/
private BusQueue busQueue;
/**
* 一条配置记录,对应一个路由键
*/
private RoutingKey routingKey;
}
... ... @@ -20,14 +20,15 @@
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
<result column="receive_time" jdbcType="TIMESTAMP" property="receiveTime" />
<result column="send_content" jdbcType="BLOB" property="sendContent" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,
exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name,
send_time, receive_time, send_content, gmt_create, gmt_modified
id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,
exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name,
send_time, receive_time, send_content, description, gmt_create, gmt_modified
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--@mbg.generated-->
... ... @@ -48,15 +49,15 @@
virtual_host_name, exchange_id, exchange_name,
queue_id, queue_name, routing_key_id,
routing_key_name, send_time, receive_time,
send_content, gmt_create, gmt_modified
)
send_content, description, gmt_create,
gmt_modified)
values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR},
#{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR},
#{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{routingKeyId,jdbcType=VARCHAR},
#{routingKeyName,jdbcType=VARCHAR}, #{sendTime,jdbcType=TIMESTAMP}, #{receiveTime,jdbcType=TIMESTAMP},
#{sendContent,jdbcType=BLOB}, #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP}
)
#{sendContent,jdbcType=BLOB}, #{description,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
#{gmtModified,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.MessageNote">
<!--@mbg.generated-->
... ... @@ -110,6 +111,9 @@
<if test="sendContent != null">
send_content,
</if>
<if test="description != null">
description,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
... ... @@ -166,6 +170,9 @@
<if test="sendContent != null">
#{sendContent,jdbcType=BLOB},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
... ... @@ -223,6 +230,9 @@
<if test="sendContent != null">
send_content = #{sendContent,jdbcType=BLOB},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
... ... @@ -250,6 +260,7 @@
send_time = #{sendTime,jdbcType=TIMESTAMP},
receive_time = #{receiveTime,jdbcType=TIMESTAMP},
send_content = #{sendContent,jdbcType=BLOB},
description = #{description,jdbcType=VARCHAR},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
... ... @@ -298,6 +309,6 @@
<!-- 自动删除 message_note记录 -->
<delete id="autoDelete" parameterType="java.lang.Integer">
delete from message_note
where to_days(now())-to_days(gmt_create) >= #{deleteTime,jdbcType=INTEGER}
where to_days(now())-to_days(gmt_create) &gt;= #{deleteTime,jdbcType=INTEGER}
</delete>
</mapper>
\ No newline at end of file
... ...
... ... @@ -7,10 +7,11 @@
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="delete_time" jdbcType="INTEGER" property="deleteTime" />
<result column="delete_type" jdbcType="VARCHAR" property="deleteType" />
<result column="description" jdbcType="VARCHAR" property="description" />
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, delete_time, delete_type
id, delete_time, delete_type, description
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--@mbg.generated-->
... ... @@ -19,19 +20,6 @@
from scheduling_delete
where id = #{id,jdbcType=VARCHAR}
</select>
<select id="selectByType" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from scheduling_delete
<where>
<!-- 删除类型 -->
<if test="deleteType != null and deleteType !=''">
delete_type = #{deleteType,jdbcType=VARCHAR}
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
<!--@mbg.generated-->
delete from scheduling_delete
... ... @@ -39,10 +27,10 @@
</delete>
<insert id="insert" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
<!--@mbg.generated-->
insert into scheduling_delete (id, delete_time, delete_type
)
values (#{id,jdbcType=VARCHAR}, #{deleteTime,jdbcType=INTEGER}, #{deleteType,jdbcType=VARCHAR}
)
insert into scheduling_delete (id, delete_time, delete_type,
description)
values (#{id,jdbcType=VARCHAR}, #{deleteTime,jdbcType=INTEGER}, #{deleteType,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
<!--@mbg.generated-->
... ... @@ -57,6 +45,9 @@
<if test="deleteType != null">
delete_type,
</if>
<if test="description != null">
description,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
... ... @@ -68,6 +59,9 @@
<if test="deleteType != null">
#{deleteType,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.SchedulingDelete">
... ... @@ -80,6 +74,9 @@
<if test="deleteType != null">
delete_type = #{deleteType,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
... ... @@ -87,7 +84,21 @@
<!--@mbg.generated-->
update scheduling_delete
set delete_time = #{deleteTime,jdbcType=INTEGER},
delete_type = #{deleteType,jdbcType=VARCHAR}
delete_type = #{deleteType,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectByType" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from scheduling_delete
<where>
<!-- 删除类型 -->
<if test="deleteType != null and deleteType !=''">
delete_type = #{deleteType,jdbcType=VARCHAR}
</if>
</where>
limit 1
</select>
</mapper>
\ No newline at end of file
... ...
... ... @@ -18,6 +18,7 @@
<result column="routing_key_id" jdbcType="VARCHAR" property="routingKeyId" />
<result column="routing_key_name" jdbcType="VARCHAR" property="routingKeyName" />
<result column="subscriber" jdbcType="VARCHAR" property="subscriber" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="gmt_create" jdbcType="TIMESTAMP" property="gmtCreate" />
<result column="gmt_modified" jdbcType="TIMESTAMP" property="gmtModified" />
</resultMap>
... ... @@ -25,7 +26,7 @@
<!--@mbg.generated-->
id, user_id, username, server_id, `server_name`, virtual_host_id, virtual_host_name,
exchange_id, exchange_name, queue_id, queue_name, routing_key_id, routing_key_name,
subscriber, gmt_create, gmt_modified
subscriber, description, gmt_create, gmt_modified
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
<!--@mbg.generated-->
... ... @@ -45,14 +46,14 @@
server_id, `server_name`, virtual_host_id,
virtual_host_name, exchange_id, exchange_name,
queue_id, queue_name, routing_key_id,
routing_key_name, subscriber, gmt_create,
gmt_modified)
routing_key_name, subscriber, description,
gmt_create, gmt_modified)
values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{username,jdbcType=VARCHAR},
#{serverId,jdbcType=VARCHAR}, #{serverName,jdbcType=VARCHAR}, #{virtualHostId,jdbcType=VARCHAR},
#{virtualHostName,jdbcType=VARCHAR}, #{exchangeId,jdbcType=VARCHAR}, #{exchangeName,jdbcType=VARCHAR},
#{queueId,jdbcType=VARCHAR}, #{queueName,jdbcType=VARCHAR}, #{routingKeyId,jdbcType=VARCHAR},
#{routingKeyName,jdbcType=VARCHAR}, #{subscriber,jdbcType=VARCHAR}, #{gmtCreate,jdbcType=TIMESTAMP},
#{gmtModified,jdbcType=TIMESTAMP})
#{routingKeyName,jdbcType=VARCHAR}, #{subscriber,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{gmtCreate,jdbcType=TIMESTAMP}, #{gmtModified,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.sunyo.wlpt.message.bus.service.domain.UserMessageBinding">
<!--@mbg.generated-->
... ... @@ -100,6 +101,9 @@
<if test="subscriber != null">
subscriber,
</if>
<if test="description != null">
description,
</if>
<if test="gmtCreate != null">
gmt_create,
</if>
... ... @@ -150,6 +154,9 @@
<if test="subscriber != null">
#{subscriber,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
#{gmtCreate,jdbcType=TIMESTAMP},
</if>
... ... @@ -201,6 +208,9 @@
<if test="subscriber != null">
subscriber = #{subscriber,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="gmtCreate != null">
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
</if>
... ... @@ -226,6 +236,7 @@
routing_key_id = #{routingKeyId,jdbcType=VARCHAR},
routing_key_name = #{routingKeyName,jdbcType=VARCHAR},
subscriber = #{subscriber,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
gmt_create = #{gmtCreate,jdbcType=TIMESTAMP},
gmt_modified = #{gmtModified,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
... ...