23 changed files with 213 additions and 21 deletions
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @CreateTime 2020/7/28 14:35 |
|||
*/ |
|||
@Data |
|||
public class MessagePushTextFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2156552140364818299L; |
|||
|
|||
private String ToUserName; |
|||
private String FromUserName; |
|||
private Date weChatCreateTime; |
|||
private String MsgType; |
|||
private String Content; |
|||
private String MsgId; |
|||
private Integer delFlag = 0; |
|||
private Integer revision = 0; |
|||
private String createdBy = "APP_USER"; |
|||
private String updatedBy = "APP_USER"; |
|||
} |
@ -0,0 +1,35 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.form.MessagePushTextFormDTO; |
|||
import com.epmet.entity.MessagePushTextEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-28 |
|||
*/ |
|||
@Mapper |
|||
public interface MessagePushTextDao extends BaseDao<MessagePushTextEntity> { |
|||
|
|||
int insertMessageText(MessagePushTextFormDTO entity); |
|||
} |
@ -0,0 +1,71 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-07-28 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("message_push_text") |
|||
public class MessagePushTextEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 开发者微信号 |
|||
*/ |
|||
private String toUserName; |
|||
|
|||
/** |
|||
* 发送方帐号(一个OpenID) |
|||
*/ |
|||
private String fromUserName; |
|||
|
|||
/** |
|||
* 消息创建时间 |
|||
*/ |
|||
private Date wechatCreateTime; |
|||
|
|||
/** |
|||
* 消息类型,文本为text |
|||
*/ |
|||
private String msgType; |
|||
|
|||
/** |
|||
* 文本消息内容 |
|||
*/ |
|||
private String content; |
|||
|
|||
/** |
|||
* 消息id,64位整型 |
|||
*/ |
|||
private String msgId; |
|||
|
|||
} |
@ -0,0 +1,18 @@ |
|||
alter table code_operation_history modify column DESCRIPTION varchar(2048) COMMENT '描述'; |
|||
|
|||
CREATE TABLE `message_push_text` ( |
|||
`ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, |
|||
`TO_USER_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '开发者微信号', |
|||
`FROM_USER_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '发送方帐号(一个OpenID)', |
|||
`WECHAT_CREATE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '消息创建时间', |
|||
`MSG_TYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息类型,文本为text', |
|||
`CONTENT` varchar(3072) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '文本消息内容', |
|||
`MSG_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '消息id,64位整型', |
|||
`DEL_FLAG` int(11) NOT NULL COMMENT '删除状态 0:正常,1:删除', |
|||
`REVISION` int(11) NOT NULL COMMENT '乐观锁', |
|||
`CREATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '创建人', |
|||
`CREATED_TIME` datetime(0) NOT NULL COMMENT '创建时间', |
|||
`UPDATED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '更新人', |
|||
`UPDATED_TIME` datetime(0) NOT NULL COMMENT '更新时间', |
|||
PRIMARY KEY (`ID`) USING BTREE |
|||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = ' ' ROW_FORMAT = Dynamic; |
@ -0,0 +1,26 @@ |
|||
<?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.epmet.dao.MessagePushTextDao"> |
|||
|
|||
|
|||
<insert id="insertMessageText"> |
|||
INSERT INTO message_push_text ( ID, TO_USER_NAME, FROM_USER_NAME, WECHAT_CREATE_TIME, MSG_TYPE, CONTENT, MSG_ID, DEL_FLAG, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME ) |
|||
VALUES |
|||
( |
|||
REPLACE ( UUID(), '-', '' ), |
|||
#{ToUserName}, |
|||
#{FromUserName}, |
|||
#{weChatCreateTime}, |
|||
#{MsgType}, |
|||
#{Content}, |
|||
#{MsgId}, |
|||
#{delFlag}, |
|||
#{revision}, |
|||
#{createdBy}, |
|||
NOW(), |
|||
#{updatedBy}, |
|||
NOW() |
|||
) |
|||
</insert> |
|||
</mapper> |
Loading…
Reference in new issue