智能回复增加所属公司
This commit is contained in:
		
							parent
							
								
									f3e57f60c3
								
							
						
					
					
						commit
						de01e01025
					
				| 
						 | 
					@ -1,5 +1,6 @@
 | 
				
			||||||
package com.bonus.material.reply.entity;
 | 
					package com.bonus.material.reply.entity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.alibaba.fastjson2.annotation.JSONField;
 | 
				
			||||||
import io.swagger.annotations.ApiModelProperty;
 | 
					import io.swagger.annotations.ApiModelProperty;
 | 
				
			||||||
import lombok.Data;
 | 
					import lombok.Data;
 | 
				
			||||||
import org.springframework.format.annotation.DateTimeFormat;
 | 
					import org.springframework.format.annotation.DateTimeFormat;
 | 
				
			||||||
| 
						 | 
					@ -25,14 +26,19 @@ public class BmReply {
 | 
				
			||||||
    @ApiModelProperty(value = "创建人")
 | 
					    @ApiModelProperty(value = "创建人")
 | 
				
			||||||
    private Integer creater;
 | 
					    private Integer creater;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @ApiModelProperty(value = "创建人所属公司")
 | 
				
			||||||
 | 
					    private Integer replyCom;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @ApiModelProperty(value = "创建时间")
 | 
					    @ApiModelProperty(value = "创建时间")
 | 
				
			||||||
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
 | 
					    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
 | 
				
			||||||
 | 
					    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
 | 
				
			||||||
    private Date createrTime;
 | 
					    private Date createrTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @ApiModelProperty(value = "修改人")
 | 
					    @ApiModelProperty(value = "修改人")
 | 
				
			||||||
    private Integer updater;
 | 
					    private Integer updater;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @ApiModelProperty(value = "修改时间")
 | 
					    @ApiModelProperty(value = "修改时间")
 | 
				
			||||||
 | 
					    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
 | 
				
			||||||
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
 | 
					    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
 | 
				
			||||||
    private Date updaterTime;
 | 
					    private Date updaterTime;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,18 +21,21 @@ public class ReplyServiceImpl implements ReplyService {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public List<BmReply> list(BmReply bmReply) {
 | 
					    public List<BmReply> list(BmReply bmReply) {
 | 
				
			||||||
 | 
					        bmReply.setReplyCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue());
 | 
				
			||||||
        return replyMapper.list(bmReply);
 | 
					        return replyMapper.list(bmReply);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public Integer add(BmReply bmReply) {
 | 
					    public Integer add(BmReply bmReply) {
 | 
				
			||||||
        bmReply.setCreater(SecurityUtils.getLoginUser().getUserid().intValue());
 | 
					        bmReply.setCreater(SecurityUtils.getLoginUser().getUserid().intValue());
 | 
				
			||||||
 | 
					        bmReply.setReplyCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue());
 | 
				
			||||||
        return replyMapper.add(bmReply);
 | 
					        return replyMapper.add(bmReply);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public Integer edit(BmReply bmReply) {
 | 
					    public Integer edit(BmReply bmReply) {
 | 
				
			||||||
        bmReply.setUpdater(SecurityUtils.getLoginUser().getUserid().intValue());
 | 
					        bmReply.setUpdater(SecurityUtils.getLoginUser().getUserid().intValue());
 | 
				
			||||||
 | 
					        bmReply.setReplyCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId().intValue());
 | 
				
			||||||
        return replyMapper.edit(bmReply);
 | 
					        return replyMapper.edit(bmReply);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,8 +4,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
				
			||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
					"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 | 
				
			||||||
<mapper namespace="com.bonus.material.reply.mapper.ReplyMapper">
 | 
					<mapper namespace="com.bonus.material.reply.mapper.ReplyMapper">
 | 
				
			||||||
    <insert id="add" useGeneratedKeys="true" keyProperty="id">
 | 
					    <insert id="add" useGeneratedKeys="true" keyProperty="id">
 | 
				
			||||||
        insert into bm_reply(reply_title, reply_content, creater, creater_time)
 | 
					        insert into bm_reply(reply_title, reply_content, creater, creater_time, reply_com)
 | 
				
			||||||
        values(#{replyTitle}, #{replyContent}, #{creater}, now())
 | 
					        values(#{replyTitle}, #{replyContent}, #{creater}, now(), #{replyCom})
 | 
				
			||||||
    </insert>
 | 
					    </insert>
 | 
				
			||||||
    <update id="edit">
 | 
					    <update id="edit">
 | 
				
			||||||
        update bm_reply
 | 
					        update bm_reply
 | 
				
			||||||
| 
						 | 
					@ -19,6 +19,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
				
			||||||
            <if test="updater != null">
 | 
					            <if test="updater != null">
 | 
				
			||||||
                updater = #{updater},
 | 
					                updater = #{updater},
 | 
				
			||||||
            </if>
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="replyCom != null">
 | 
				
			||||||
 | 
					                reply_com = #{replyCom},
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
            updater_time = now()
 | 
					            updater_time = now()
 | 
				
			||||||
        </set>
 | 
					        </set>
 | 
				
			||||||
        where id = #{id}
 | 
					        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 != ''">
 | 
					            <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')
 | 
					                AND br.creater_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
 | 
				
			||||||
            </if>
 | 
					            </if>
 | 
				
			||||||
 | 
					            <if test="replyCom != null">
 | 
				
			||||||
 | 
					                AND reply_com = #{replyCom},
 | 
				
			||||||
 | 
					            </if>
 | 
				
			||||||
        </where>
 | 
					        </where>
 | 
				
			||||||
    </select>
 | 
					    </select>
 | 
				
			||||||
</mapper>
 | 
					</mapper>
 | 
				
			||||||
		Loading…
	
		Reference in New Issue