智能回复增加所属公司
This commit is contained in:
parent
f3e57f60c3
commit
de01e01025
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,18 +21,21 @@ public class ReplyServiceImpl implements ReplyService {
|
|||
|
||||
@Override
|
||||
public List<BmReply> 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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.reply.mapper.ReplyMapper">
|
||||
<insert id="add" useGeneratedKeys="true" keyProperty="id">
|
||||
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})
|
||||
</insert>
|
||||
<update id="edit">
|
||||
update bm_reply
|
||||
|
|
@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="updater != null">
|
||||
updater = #{updater},
|
||||
</if>
|
||||
<if test="replyCom != null">
|
||||
reply_com = #{replyCom},
|
||||
</if>
|
||||
updater_time = now()
|
||||
</set>
|
||||
where id = #{id}
|
||||
|
|
@ -49,6 +52,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND br.creater_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
</if>
|
||||
<if test="replyCom != null">
|
||||
AND reply_com = #{replyCom},
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue