From de01e01025466c248347ca5451e2eb94c0708305 Mon Sep 17 00:00:00 2001 From: "liang.chao" <1360241448@qq.com> Date: Tue, 17 Dec 2024 13:23:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=99=BA=E8=83=BD=E5=9B=9E=E5=A4=8D=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=89=80=E5=B1=9E=E5=85=AC=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/material/reply/entity/BmReply.java | 6 ++++++ .../material/reply/service/impl/ReplyServiceImpl.java | 3 +++ .../resources/mapper/material/reply/ReplyMapper.xml | 10 ++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/entity/BmReply.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/entity/BmReply.java index a7f4457..0cb2f81 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/entity/BmReply.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/entity/BmReply.java @@ -1,5 +1,6 @@ package com.bonus.material.reply.entity; +import com.alibaba.fastjson2.annotation.JSONField; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -25,14 +26,19 @@ public class BmReply { @ApiModelProperty(value = "创建人") private Integer creater; + @ApiModelProperty(value = "创建人所属公司") + private Integer replyCom; + @ApiModelProperty(value = "创建时间") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JSONField(format = "yyyy-MM-dd HH:mm:ss") private Date createrTime; @ApiModelProperty(value = "修改人") private Integer updater; @ApiModelProperty(value = "修改时间") + @JSONField(format = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date updaterTime; diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/service/impl/ReplyServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/service/impl/ReplyServiceImpl.java index 5c1ef64..ee5c97b 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/service/impl/ReplyServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/reply/service/impl/ReplyServiceImpl.java @@ -21,18 +21,21 @@ public class ReplyServiceImpl implements ReplyService { @Override public List list(BmReply bmReply) { + bmReply.setReplyCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue()); return replyMapper.list(bmReply); } @Override public Integer add(BmReply bmReply) { bmReply.setCreater(SecurityUtils.getLoginUser().getUserid().intValue()); + bmReply.setReplyCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue()); return replyMapper.add(bmReply); } @Override public Integer edit(BmReply bmReply) { bmReply.setUpdater(SecurityUtils.getLoginUser().getUserid().intValue()); + bmReply.setReplyCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue()); return replyMapper.edit(bmReply); } diff --git a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/reply/ReplyMapper.xml b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/reply/ReplyMapper.xml index d9aa5e0..a85bbaa 100644 --- a/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/reply/ReplyMapper.xml +++ b/bonus-modules/bonus-material-mall/src/main/resources/mapper/material/reply/ReplyMapper.xml @@ -4,8 +4,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - insert into bm_reply(reply_title, reply_content, creater, creater_time) - values(#{replyTitle}, #{replyContent}, #{creater}, now()) + insert into bm_reply(reply_title, reply_content, creater, creater_time, reply_com) + values(#{replyTitle}, #{replyContent}, #{creater}, now(), #{replyCom}) update bm_reply @@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" updater = #{updater}, + + reply_com = #{replyCom}, + updater_time = now() where id = #{id} @@ -49,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND br.creater_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59') + + AND reply_com = #{replyCom}, + \ No newline at end of file