From ae16cf0dfd90d35e21f0f5527b32e3dfa4a471a4 Mon Sep 17 00:00:00 2001 From: zy_Java <654600784@qq.com> Date: Thu, 11 Jun 2020 11:11:26 +0800 Subject: [PATCH] =?UTF-8?q?ring=E6=B6=88=E6=81=AF=E5=B7=B2=E8=AF=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/application-util-test.yml | 4 +- .../com/ccsens/tall/bean/dto/RingDto.java | 12 ++- .../dto/message/RingMessageWithReadDto.java | 6 +- .../com/ccsens/tall/bean/po/SysRingSend.java | 11 +++ .../tall/bean/po/SysRingSendExample.java | 60 ++++++++++++ .../java/com/ccsens/tall/bean/vo/RingVo.java | 15 +++ .../tall/persist/dao/SysRingMsgDao.java | 10 ++ .../com/ccsens/tall/service/IRingService.java | 6 +- .../com/ccsens/tall/service/RingService.java | 82 +++++++++++++--- .../com/ccsens/tall/service/UserService.java | 3 +- .../com/ccsens/tall/web/PluginController.java | 3 +- .../com/ccsens/tall/web/RingController.java | 12 ++- tall/src/main/resources/application-test.yml | 4 +- tall/src/main/resources/druid-test.yml | 8 +- .../resources/mapper_dao/SysRingMsgDao.xml | 93 +++++++++++++++++++ .../mapper_raw/SysRingSendMapper.xml | 25 ++++- 16 files changed, 313 insertions(+), 41 deletions(-) create mode 100644 tall/src/main/resources/mapper_dao/SysRingMsgDao.xml diff --git a/cloudutil/src/main/resources/application-util-test.yml b/cloudutil/src/main/resources/application-util-test.yml index 929fc03c..a52717f4 100644 --- a/cloudutil/src/main/resources/application-util-test.yml +++ b/cloudutil/src/main/resources/application-util-test.yml @@ -20,8 +20,8 @@ eureka: service-url: # 指定eureka server通信地址,注意/eureka/小尾巴不能少 #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ - defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ -# defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/ +# defaultZone: http://admin:admin@192.168.0.99:7010/eureka/ + defaultZone: http://admin:admin@test.tall.wiki:7010/eureka/ instance: # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server prefer-ip-address: true diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java index ab479bcb..a24cd121 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/RingDto.java @@ -28,16 +28,18 @@ public class RingDto { @NotNull(message = "项目id不能为空") @ApiModelProperty("项目id") private Long projectId; - @ApiModelProperty("消息内容") - private Integer page = 1; - @ApiModelProperty("接受的角色的id") - private Integer pageSize = 10; + @ApiModelProperty("页数") + private Integer page; + @ApiModelProperty("每页数量") + private Integer pageSize; } @Data @ApiModel("将消息设为已读") public static class MessageId { + @ApiModelProperty("项目id") + private Long projectId; @ApiModelProperty("消息id") - private Long messageId; + private List messageIdList; } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java b/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java index 8a6f7628..2943fc46 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java +++ b/tall/src/main/java/com/ccsens/tall/bean/dto/message/RingMessageWithReadDto.java @@ -11,6 +11,8 @@ public class RingMessageWithReadDto extends BaseMessageDto{ @Getter public static class Data{ private Long msgId; + private Long projectId; + private Long roleId; } private Data data; @@ -21,10 +23,12 @@ public class RingMessageWithReadDto extends BaseMessageDto{ setTime(System.currentTimeMillis()); } - public RingMessageWithReadDto(Long msgId){ + public RingMessageWithReadDto(Long msgId,Long projectId,Long roleId){ this(); Data d = new Data(); d.setMsgId(msgId); + d.setProjectId(projectId); + d.setRoleId(roleId); setData(d); } } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java index 5c346e9f..9f78d722 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSend.java @@ -18,6 +18,8 @@ public class SysRingSend implements Serializable { private Byte recStatus; + private Long readTime; + private static final long serialVersionUID = 1L; public Long getId() { @@ -76,6 +78,14 @@ public class SysRingSend implements Serializable { this.recStatus = recStatus; } + public Long getReadTime() { + return readTime; + } + + public void setReadTime(Long readTime) { + this.readTime = readTime; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -89,6 +99,7 @@ public class SysRingSend implements Serializable { sb.append(", createdAt=").append(createdAt); sb.append(", updatedAt=").append(updatedAt); sb.append(", recStatus=").append(recStatus); + sb.append(", readTime=").append(readTime); sb.append("]"); return sb.toString(); } diff --git a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java index b06f9d8a..278cf6a7 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java +++ b/tall/src/main/java/com/ccsens/tall/bean/po/SysRingSendExample.java @@ -524,6 +524,66 @@ public class SysRingSendExample { addCriterion("rec_status not between", value1, value2, "recStatus"); return (Criteria) this; } + + public Criteria andReadTimeIsNull() { + addCriterion("read_time is null"); + return (Criteria) this; + } + + public Criteria andReadTimeIsNotNull() { + addCriterion("read_time is not null"); + return (Criteria) this; + } + + public Criteria andReadTimeEqualTo(Long value) { + addCriterion("read_time =", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeNotEqualTo(Long value) { + addCriterion("read_time <>", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeGreaterThan(Long value) { + addCriterion("read_time >", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeGreaterThanOrEqualTo(Long value) { + addCriterion("read_time >=", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeLessThan(Long value) { + addCriterion("read_time <", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeLessThanOrEqualTo(Long value) { + addCriterion("read_time <=", value, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeIn(List values) { + addCriterion("read_time in", values, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeNotIn(List values) { + addCriterion("read_time not in", values, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeBetween(Long value1, Long value2) { + addCriterion("read_time between", value1, value2, "readTime"); + return (Criteria) this; + } + + public Criteria andReadTimeNotBetween(Long value1, Long value2) { + addCriterion("read_time not between", value1, value2, "readTime"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java b/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java index 9375b872..2e29e394 100644 --- a/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java +++ b/tall/src/main/java/com/ccsens/tall/bean/vo/RingVo.java @@ -1,5 +1,6 @@ package com.ccsens.tall.bean.vo; +import com.fasterxml.jackson.annotation.JsonIgnore; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @@ -8,6 +9,16 @@ import java.util.List; @Data public class RingVo { + @Data + @ApiModel("返回ring消息") + public static class PageInfoRing{ + @ApiModelProperty("当前页数") + private Integer pageNum; + @ApiModelProperty("总页数") + private Integer totalPage ; + @JsonIgnore //"总数据量" + private Integer size ; + } @Data @ApiModel("返回ring消息") public static class RingInfo{ @@ -15,8 +26,12 @@ public class RingVo { private String messageId; @ApiModelProperty("消息内容") private String value ; + @ApiModelProperty("消息发送时间") + private Long time ; @ApiModelProperty("是否是自己发送的消息") private Integer mine ; + @ApiModelProperty("未读数量") + private Integer unread; @ApiModelProperty("发送者信息") private MsgSender sender; @ApiModelProperty("接收角色的信息") diff --git a/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java index ffdb5996..cdb6c01e 100644 --- a/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java +++ b/tall/src/main/java/com/ccsens/tall/persist/dao/SysRingMsgDao.java @@ -1,8 +1,18 @@ package com.ccsens.tall.persist.dao; +import com.ccsens.tall.bean.vo.RingVo; import com.ccsens.tall.persist.mapper.SysRingMsgMapper; +import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; +import java.util.List; + @Repository public interface SysRingMsgDao extends SysRingMsgMapper { + + List selectRingInfoByProject(@Param("userId")Long userId, @Param("projectId")Long projectId, @Param("pageIndex")int pageIndex, @Param("pageSize")int pageSize); + + List selectRoleIdByUserId(@Param("userId")Long userId, @Param("projectId")Long projectId); + + void updateStatusByRoleIdAndMsgId(@Param("roleIdList")List roleIdList, @Param("messageIdList")List messageIdList); } diff --git a/tall/src/main/java/com/ccsens/tall/service/IRingService.java b/tall/src/main/java/com/ccsens/tall/service/IRingService.java index e91992cc..f88ff876 100644 --- a/tall/src/main/java/com/ccsens/tall/service/IRingService.java +++ b/tall/src/main/java/com/ccsens/tall/service/IRingService.java @@ -2,13 +2,15 @@ package com.ccsens.tall.service; import com.ccsens.tall.bean.dto.RingDto; import com.ccsens.tall.bean.vo.RingVo; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.github.pagehelper.PageInfo; import java.util.List; public interface IRingService { void sendRingMsg(Long currentUserId, RingDto.RingSendDto ringSendDto) throws Exception; - List getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto); + PageInfo getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto); - void readRingMsg(Long currentUserId, List messageList); + void readRingMsg(Long currentUserId, RingDto.MessageId message) throws JsonProcessingException; } diff --git a/tall/src/main/java/com/ccsens/tall/service/RingService.java b/tall/src/main/java/com/ccsens/tall/service/RingService.java index acc6caed..00b89421 100644 --- a/tall/src/main/java/com/ccsens/tall/service/RingService.java +++ b/tall/src/main/java/com/ccsens/tall/service/RingService.java @@ -2,32 +2,40 @@ package com.ccsens.tall.service; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.ObjectUtil; import com.ccsens.tall.bean.dto.RingDto; import com.ccsens.tall.bean.dto.message.BaseMessageDto; +import com.ccsens.tall.bean.dto.message.RingMessageWithReadDto; import com.ccsens.tall.bean.dto.message.RingMessageWithSendDto; import com.ccsens.tall.bean.po.SysRingMsg; import com.ccsens.tall.bean.po.SysRingSend; +import com.ccsens.tall.bean.po.SysRingSendExample; import com.ccsens.tall.bean.vo.RingVo; import com.ccsens.tall.persist.dao.SysRingMsgDao; import com.ccsens.tall.persist.dao.SysRingSendDao; +import com.ccsens.util.CodeEnum; import com.ccsens.util.JacksonUtil; import com.ccsens.util.config.RabbitMQConfig; +import com.ccsens.util.exception.BaseException; +import com.fasterxml.jackson.core.JsonProcessingException; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; +import java.util.*; import java.util.function.Consumer; /** * @author 逗 */ +@Slf4j @Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) public class RingService implements IRingService{ @Autowired private Snowflake snowflake; @@ -93,20 +101,70 @@ public class RingService implements IRingService{ * @return 时间倒叙查询最近10条信息。在返回的结果中需时间正序展示 */ @Override - public List getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto) { -// PageHelper.startPage(getRingDto.getPage(), getRingDto.getPageSize()); -// List ringInfoList = sysRingMsgDao.getRingInfoByProjectId(); -// new PageInfo<>(); - return null; + public PageInfo getRingInfo(Long currentUserId, RingDto.GetRingDto getRingDto) { + //计算分页信息 + int pageIndex = 0; + int pageSize = 10; + if(ObjectUtil.isNotNull(getRingDto.getPageSize())) { + pageSize = getRingDto.getPageSize(); + } + if(ObjectUtil.isNotNull(getRingDto.getPage())) { + pageIndex = (getRingDto.getPage() - 1) * pageSize; + } + getRingDto.setPage(getRingDto.getPage() == null ? 1 : getRingDto.getPage()); + getRingDto.setPageSize(getRingDto.getPageSize() == null ? 10 : getRingDto.getPageSize()); + + PageHelper.startPage(getRingDto.getPage(), getRingDto.getPageSize()); + List ringInfoList = sysRingMsgDao.selectRingInfoByProject(currentUserId,getRingDto.getProjectId(),pageIndex,pageSize); + + CollectionUtil.sort(ringInfoList,new Comparator(){ + @Override + public int compare(RingVo.RingInfo o1, RingVo.RingInfo o2) { + return (int)(o1.getTime() - o2.getTime()); + } + }); + + return new PageInfo<>(ringInfoList); } /** * 阅读消息(将消息设为已读) * @param currentUserId userId - * @param messageList 消息id,可以多个。同时将多个消息设为已读 + * @param message 项目id,和消息id,可以多个。同时将多个消息设为已读 */ @Override - public void readRingMsg(Long currentUserId, List messageList) { - + public void readRingMsg(Long currentUserId, RingDto.MessageId message) throws JsonProcessingException { + //获取当前用户在项目内的角色 + List roleIdList = sysRingMsgDao.selectRoleIdByUserId(currentUserId,message.getProjectId()); + log.info("阅读者的角色:{}",roleIdList.toString()); + //将每条消息的状态设为已读 + if(CollectionUtil.isNotEmpty(roleIdList) && CollectionUtil.isNotEmpty(message.getMessageIdList())){ + for(Long roleId : roleIdList){ + for(Long msgId : message.getMessageIdList()){ + //查找消息 + SysRingMsg sysRingMsg = sysRingMsgDao.selectByPrimaryKey(msgId); + if(ObjectUtil.isNull(sysRingMsg)){ + throw new BaseException(CodeEnum.PARAM_ERROR); + } + SysRingSendExample sysRingSendExample = new SysRingSendExample(); + sysRingSendExample.createCriteria().andRingIdEqualTo(msgId).andRoleIdEqualTo(roleId); + List sysRingSendList = sysRingSendDao.selectByExample(sysRingSendExample); + if(CollectionUtil.isNotEmpty(sysRingSendList)){ + for(SysRingSend sysRingSend : sysRingSendList){ + sysRingSend.setReadStatus((byte) 1); + sysRingSend.setReadTime(System.currentTimeMillis()); + sysRingSendDao.updateByPrimaryKeySelective(sysRingSend); + } + //将已读消息返回给发送者 + List userIdList = new ArrayList<>(); + userIdList.add(sysRingMsg.getSenderId()); + RingMessageWithReadDto ringMessageWithReadDto = new RingMessageWithReadDto(msgId,message.getProjectId(),roleId); + ringMessageWithReadDto.setReceivers(BaseMessageDto.MessageUser.userIdToUsers(userIdList)); + rabbitTemplate.convertAndSend(RabbitMQConfig.RabbitMQ_QUEUE_NAME, + JacksonUtil.beanToJson(ringMessageWithReadDto)); + } + } + } + } } } diff --git a/tall/src/main/java/com/ccsens/tall/service/UserService.java b/tall/src/main/java/com/ccsens/tall/service/UserService.java index c21a9282..ba54e11a 100644 --- a/tall/src/main/java/com/ccsens/tall/service/UserService.java +++ b/tall/src/main/java/com/ccsens/tall/service/UserService.java @@ -413,7 +413,7 @@ public class UserService implements IUserService { */ private UserVo.UserSign getUserSign(String openId, String unionId, byte identifyType, String redirect) { - UserVo.UserSign userSignVo;//1.查找对应账户,不存在则注册 + UserVo.UserSign userSignVo; List authList = null; SysAuth theAuth = null; if (ObjectUtil.isNotNull(openId)) { @@ -439,7 +439,6 @@ public class UserService implements IUserService { theAuth.setCredential(unionId); authDao.insertSelective(theAuth); - } else { //新建用户并保存微信信息 SysUser user = new SysUser(); diff --git a/tall/src/main/java/com/ccsens/tall/web/PluginController.java b/tall/src/main/java/com/ccsens/tall/web/PluginController.java index 50d3e3f0..1faec615 100644 --- a/tall/src/main/java/com/ccsens/tall/web/PluginController.java +++ b/tall/src/main/java/com/ccsens/tall/web/PluginController.java @@ -8,6 +8,7 @@ import com.ccsens.tall.service.ISysPluginService; import com.ccsens.tall.service.ITaskPluginService; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; +import com.ccsens.util.annotation.OperateType; import io.jsonwebtoken.Claims; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParams; @@ -75,7 +76,7 @@ public class PluginController { return taskDetailId; } - + @OperateType(13) @ApiOperation(value = "评论", notes = "") @ApiImplicitParams({ }) diff --git a/tall/src/main/java/com/ccsens/tall/web/RingController.java b/tall/src/main/java/com/ccsens/tall/web/RingController.java index 0e996732..ef359198 100644 --- a/tall/src/main/java/com/ccsens/tall/web/RingController.java +++ b/tall/src/main/java/com/ccsens/tall/web/RingController.java @@ -6,6 +6,7 @@ import com.ccsens.tall.bean.vo.RingVo; import com.ccsens.tall.service.IRingService; import com.ccsens.util.JsonResponse; import com.ccsens.util.WebConstant; +import com.github.pagehelper.PageInfo; import io.jsonwebtoken.Claims; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; @@ -38,14 +39,15 @@ public class RingController { } - @ApiOperation(value = "发送ring消息", notes = "") + @ApiOperation(value = "查看ring消息", notes = "") @ApiImplicitParams({ }) @RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) - public JsonResponse> getRingInfo(HttpServletRequest request, + public JsonResponse> getRingInfo(HttpServletRequest request, @ApiParam @Validated @RequestBody RingDto.GetRingDto getRingDto) throws Exception { + Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - List ringInfoList = ringService.getRingInfo(currentUserId,getRingDto); + PageInfo ringInfoList = ringService.getRingInfo(currentUserId,getRingDto); return JsonResponse.newInstance().ok(ringInfoList); } @@ -55,9 +57,9 @@ public class RingController { }) @RequestMapping(value = "/read", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) public JsonResponse readRingMsg(HttpServletRequest request, - @ApiParam @Validated @RequestBody List messageList) throws Exception { + @ApiParam @Validated @RequestBody RingDto.MessageId message) throws Exception { Long currentUserId = Long.valueOf(((Claims) request.getAttribute(WebConstant.REQUEST_KEY_CLAIMS)).getSubject()); - ringService.readRingMsg(currentUserId,messageList); + ringService.readRingMsg(currentUserId,message); return JsonResponse.newInstance().ok(); } diff --git a/tall/src/main/resources/application-test.yml b/tall/src/main/resources/application-test.yml index 21e926b1..d94955b0 100644 --- a/tall/src/main/resources/application-test.yml +++ b/tall/src/main/resources/application-test.yml @@ -32,7 +32,7 @@ swagger: enable: true eureka: instance: - ip-address: 192.168.0.99 -# ip-address: 49.233.89.188 +# ip-address: 192.168.0.99 + ip-address: 49.233.89.188 gatewayUrl: http://192.168.0.99/gateway/ notGatewayUrl: http://192.168.0.99/ \ No newline at end of file diff --git a/tall/src/main/resources/druid-test.yml b/tall/src/main/resources/druid-test.yml index b52b019f..11227332 100644 --- a/tall/src/main/resources/druid-test.yml +++ b/tall/src/main/resources/druid-test.yml @@ -15,8 +15,8 @@ spring: maxWait: 60000 minEvictableIdleTimeMillis: 300000 minIdle: 5 -# password: - password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 + password: +# password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473 poolPreparedStatements: true servletLogSlowSql: true servletLoginPassword: 111111 @@ -28,8 +28,8 @@ spring: testOnReturn: false testWhileIdle: true timeBetweenEvictionRunsMillis: 60000 -# url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 - url: jdbc:mysql://test.tall.wiki/tall?useUnicode=true&characterEncoding=UTF-8 + url: jdbc:mysql://127.0.0.1/tall?useUnicode=true&characterEncoding=UTF-8 +# url: jdbc:mysql://test.tall.wiki/tall?useUnicode=true&characterEncoding=UTF-8 username: root validationQuery: SELECT 1 FROM DUAL env: CCSENS_TALL \ No newline at end of file diff --git a/tall/src/main/resources/mapper_dao/SysRingMsgDao.xml b/tall/src/main/resources/mapper_dao/SysRingMsgDao.xml new file mode 100644 index 00000000..a2ecd542 --- /dev/null +++ b/tall/src/main/resources/mapper_dao/SysRingMsgDao.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml b/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml index 673a46bc..b1aecccf 100644 --- a/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml +++ b/tall/src/main/resources/mapper_raw/SysRingSendMapper.xml @@ -9,6 +9,7 @@ + @@ -69,7 +70,7 @@ - id, ring_id, role_id, read_status, created_at, updated_at, rec_status + id, ring_id, role_id, read_status, created_at, updated_at, rec_status, read_time @@ -188,6 +195,9 @@ rec_status = #{record.recStatus,jdbcType=TINYINT}, + + read_time = #{record.readTime,jdbcType=BIGINT}, + @@ -201,7 +211,8 @@ read_status = #{record.readStatus,jdbcType=TINYINT}, created_at = #{record.createdAt,jdbcType=TIMESTAMP}, updated_at = #{record.updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{record.recStatus,jdbcType=TINYINT} + rec_status = #{record.recStatus,jdbcType=TINYINT}, + read_time = #{record.readTime,jdbcType=BIGINT} @@ -227,6 +238,9 @@ rec_status = #{recStatus,jdbcType=TINYINT}, + + read_time = #{readTime,jdbcType=BIGINT}, + where id = #{id,jdbcType=BIGINT} @@ -237,7 +251,8 @@ read_status = #{readStatus,jdbcType=TINYINT}, created_at = #{createdAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP}, - rec_status = #{recStatus,jdbcType=TINYINT} + rec_status = #{recStatus,jdbcType=TINYINT}, + read_time = #{readTime,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} \ No newline at end of file