parent
8bd9136fed
commit
d22be6e782
@ -0,0 +1,29 @@
|
|||||||
|
package com.ruoyi.flyingbook.domain;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】对象 lark_user_active_comment
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LarkUserActiveComment extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 用户活动关联关系id */
|
||||||
|
private Long userActiveRelatoin;
|
||||||
|
|
||||||
|
/** 评论内容 */
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @see com.ruoyi.common.enums.FlagStatus
|
||||||
|
*/
|
||||||
|
private Long flag;
|
||||||
|
}
|
@ -0,0 +1,19 @@
|
|||||||
|
package com.ruoyi.flyingbook.domain.larkactive;
|
||||||
|
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkActive;
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkUserActiveComment;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】对象 lark_active
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-16
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class LarkActiveCommentVo extends LarkUserActiveComment {
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,65 @@
|
|||||||
|
package com.ruoyi.flyingbook.mapper;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkUserActiveComment;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
public interface LarkUserActiveCommentMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param id 【请填写功能名称】ID
|
||||||
|
* @return 【请填写功能名称】
|
||||||
|
*/
|
||||||
|
public LarkUserActiveComment selectLarkUserActiveCommentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】列表
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 【请填写功能名称】集合
|
||||||
|
*/
|
||||||
|
public List<LarkUserActiveComment> selectLarkUserActiveCommentList(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertLarkUserActiveComment(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLarkUserActiveComment(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param id 【请填写功能名称】ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLarkUserActiveCommentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLarkUserActiveCommentByIds(Long[] ids);
|
||||||
|
|
||||||
|
public List<LarkUserActiveComment> selectLarkUserActiveCommentList(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
}
|
@ -0,0 +1,70 @@
|
|||||||
|
package com.ruoyi.flyingbook.service;
|
||||||
|
|
||||||
|
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkUserActiveComment;
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkUserActiveRelatoin;
|
||||||
|
import com.ruoyi.flyingbook.domain.edi.ResponseVo;
|
||||||
|
import com.ruoyi.flyingbook.domain.larkactive.LarkActiveCommentVo;
|
||||||
|
import com.ruoyi.flyingbook.domain.larkactive.LarkActiveUserRelationRequest;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
public interface ILarkUserActiveCommentService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param id 【请填写功能名称】ID
|
||||||
|
* @return 【请填写功能名称】
|
||||||
|
*/
|
||||||
|
public LarkUserActiveComment selectLarkUserActiveCommentById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】列表
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 【请填写功能名称】集合
|
||||||
|
*/
|
||||||
|
public List<LarkUserActiveComment> selectLarkUserActiveCommentList(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertLarkUserActiveComment(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLarkUserActiveComment(LarkUserActiveComment larkUserActiveComment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的【请填写功能名称】ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLarkUserActiveCommentByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除【请填写功能名称】信息
|
||||||
|
*
|
||||||
|
* @param id 【请填写功能名称】ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteLarkUserActiveCommentById(Long id);
|
||||||
|
|
||||||
|
public ResponseVo<LarkUserActiveRelatoin> comment(LarkActiveUserRelationRequest request);
|
||||||
|
public ResponseVo<LarkActiveCommentVo> queryComment(LarkActiveUserRelationRequest request);
|
||||||
|
}
|
@ -0,0 +1,210 @@
|
|||||||
|
package com.ruoyi.flyingbook.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.enums.FlagStatus;
|
||||||
|
import com.ruoyi.common.enums.LarkActiveStageEnum;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkActive;
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkLoginLog;
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkUserActiveComment;
|
||||||
|
import com.ruoyi.flyingbook.domain.LarkUserActiveRelatoin;
|
||||||
|
import com.ruoyi.flyingbook.domain.edi.ResponseVo;
|
||||||
|
import com.ruoyi.flyingbook.domain.larkactive.LarkActiveCommentVo;
|
||||||
|
import com.ruoyi.flyingbook.domain.larkactive.LarkActiveUserRelationRequest;
|
||||||
|
import com.ruoyi.flyingbook.mapper.LarkActiveMapper;
|
||||||
|
import com.ruoyi.flyingbook.mapper.LarkLoginLogMapper;
|
||||||
|
import com.ruoyi.flyingbook.mapper.LarkUserActiveCommentMapper;
|
||||||
|
import com.ruoyi.flyingbook.mapper.LarkUserActiveRelatoinMapper;
|
||||||
|
import com.ruoyi.flyingbook.service.ILarkLoginLogService;
|
||||||
|
import com.ruoyi.flyingbook.service.ILarkUserActiveCommentService;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 【请填写功能名称】Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-08-22
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class LarkUserActiveCommentServiceImpl implements ILarkUserActiveCommentService {
|
||||||
|
@Autowired
|
||||||
|
private LarkUserActiveCommentMapper larkUserActiveCommentMapper;
|
||||||
|
@Autowired
|
||||||
|
private LarkActiveMapper larkActiveMapper;
|
||||||
|
@Autowired
|
||||||
|
private LarkUserActiveRelatoinMapper larkUserActiveRelatoinMapper;
|
||||||
|
@Autowired
|
||||||
|
private ILarkLoginLogService larkLoginLogService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param id 【请填写功能名称】ID
|
||||||
|
* @return 【请填写功能名称】
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public LarkUserActiveComment selectLarkUserActiveCommentById(Long id) {
|
||||||
|
return larkUserActiveCommentMapper.selectLarkUserActiveCommentById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询【请填写功能名称】列表
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 【请填写功能名称】
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<LarkUserActiveComment> selectLarkUserActiveCommentList(LarkUserActiveComment larkUserActiveComment) {
|
||||||
|
return larkUserActiveCommentMapper.selectLarkUserActiveCommentList(larkUserActiveComment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertLarkUserActiveComment(LarkUserActiveComment larkUserActiveComment) {
|
||||||
|
larkUserActiveComment.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return larkUserActiveCommentMapper.insertLarkUserActiveComment(larkUserActiveComment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param larkUserActiveComment 【请填写功能名称】
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateLarkUserActiveComment(LarkUserActiveComment larkUserActiveComment) {
|
||||||
|
larkUserActiveComment.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return larkUserActiveCommentMapper.updateLarkUserActiveComment(larkUserActiveComment);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除【请填写功能名称】
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的【请填写功能名称】ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteLarkUserActiveCommentByIds(Long[] ids) {
|
||||||
|
return larkUserActiveCommentMapper.deleteLarkUserActiveCommentByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除【请填写功能名称】信息
|
||||||
|
*
|
||||||
|
* @param id 【请填写功能名称】ID
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteLarkUserActiveCommentById(Long id) {
|
||||||
|
return larkUserActiveCommentMapper.deleteLarkUserActiveCommentById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseVo<LarkUserActiveRelatoin> comment(LarkActiveUserRelationRequest request) {
|
||||||
|
List<LarkActive> larkActives = larkActiveMapper.selectLarkActiveByName(request.getLarkActiveName(), FlagStatus.OK.getCode());
|
||||||
|
if (CollectionUtils.isEmpty(larkActives)) {
|
||||||
|
return new ResponseVo();
|
||||||
|
}
|
||||||
|
LarkActive active = larkActives.get(0);
|
||||||
|
LarkUserActiveRelatoin relatoin = queryUserActiveRelation(request.getCompanyName(), request.getUserName(), active.getId());
|
||||||
|
if (relatoin == null) {
|
||||||
|
return new ResponseVo();
|
||||||
|
}
|
||||||
|
//创建评论
|
||||||
|
buildComment(request, relatoin);
|
||||||
|
relatoin.setActiveStage(LarkActiveStageEnum.ADJUST.getCode());
|
||||||
|
larkUserActiveRelatoinMapper.updateLarkUserActiveRelatoin(relatoin);
|
||||||
|
return new ResponseVo();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void buildComment(LarkActiveUserRelationRequest request, LarkUserActiveRelatoin relatoin) {
|
||||||
|
LarkUserActiveComment larkUserActiveComment = new LarkUserActiveComment();
|
||||||
|
larkUserActiveComment.setCreateTime(new Date());
|
||||||
|
larkUserActiveComment.setCreateBy(request.getUserName());
|
||||||
|
larkUserActiveComment.setUserActiveRelatoin(relatoin.getId());
|
||||||
|
larkUserActiveComment.setContent(request.getComment());
|
||||||
|
larkUserActiveComment.setFlag(FlagStatus.OK.getCode());
|
||||||
|
larkUserActiveCommentMapper.insertLarkUserActiveComment(larkUserActiveComment);
|
||||||
|
}
|
||||||
|
|
||||||
|
private LarkUserActiveRelatoin queryUserActiveRelation(String companyName, String userName, Long activeId) {
|
||||||
|
LarkUserActiveRelatoin relatoin = new LarkUserActiveRelatoin();
|
||||||
|
relatoin.setUserName(userName);
|
||||||
|
relatoin.setActiveId(activeId);
|
||||||
|
relatoin.setFlag(FlagStatus.OK.getCode());
|
||||||
|
List<LarkUserActiveRelatoin> larkUserActiveRelatoins = larkUserActiveRelatoinMapper.selectLarkUserActiveRelatoinList(relatoin);
|
||||||
|
if (CollectionUtils.isNotEmpty(larkUserActiveRelatoins)) {
|
||||||
|
return larkUserActiveRelatoins.get(0);
|
||||||
|
} else {
|
||||||
|
relatoin.setCreateBy("System");
|
||||||
|
relatoin.setCreateTime(new Date());
|
||||||
|
relatoin.setActiveStage(LarkActiveStageEnum.SUBMIT.getCode());
|
||||||
|
relatoin.setCompanyName(companyName);
|
||||||
|
larkUserActiveRelatoinMapper.insertLarkUserActiveRelatoin(relatoin);
|
||||||
|
return relatoin;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ResponseVo<LarkActiveCommentVo> queryComment(LarkActiveUserRelationRequest request) {
|
||||||
|
ResponseVo<LarkActiveCommentVo> responseVo = new ResponseVo();
|
||||||
|
LarkUserActiveComment larkUserActiveComment = new LarkUserActiveComment();
|
||||||
|
larkUserActiveComment.setFlag(FlagStatus.OK.getCode());
|
||||||
|
List<LarkUserActiveComment> larkUserActiveComments = larkUserActiveCommentMapper.selectLarkUserActiveCommentList(larkUserActiveComment);
|
||||||
|
List<Long> userLarkRelationIdList = larkUserActiveComments.stream()
|
||||||
|
.filter(r -> {
|
||||||
|
return r.getUserActiveRelatoin() != null;
|
||||||
|
})
|
||||||
|
.map(LarkUserActiveComment::getUserActiveRelatoin)
|
||||||
|
.distinct().collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<String, LarkLoginLog> userInfoMap = new HashMap<>();
|
||||||
|
Map<Long, String> relationMap = new HashMap<>();
|
||||||
|
if (CollectionUtils.isNotEmpty(userLarkRelationIdList)) {
|
||||||
|
List<LarkUserActiveRelatoin> larkUserActiveRelatoins = larkUserActiveRelatoinMapper.queryByIdList(userLarkRelationIdList);
|
||||||
|
relationMap = larkUserActiveRelatoins.stream().collect(Collectors.toMap(LarkUserActiveRelatoin::getId, LarkUserActiveRelatoin::getUserName, (k1, k2) -> k1));
|
||||||
|
List<String> openIdList = larkUserActiveRelatoins.stream()
|
||||||
|
.filter(r -> {
|
||||||
|
return StringUtils.isNotBlank(r.getUserName());
|
||||||
|
}).map(LarkUserActiveRelatoin::getUserName)
|
||||||
|
.distinct().collect(Collectors.toList());
|
||||||
|
if (CollectionUtils.isNotEmpty(openIdList)) {
|
||||||
|
userInfoMap = larkLoginLogService.queryByOpenId(openIdList);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
Map<Long, String> finalRelationMap = relationMap;
|
||||||
|
Map<String, LarkLoginLog> finalUserInfoMap = userInfoMap;
|
||||||
|
List<LarkActiveCommentVo> activeCommentVos = larkUserActiveComments.stream().map(r -> {
|
||||||
|
LarkActiveCommentVo larkActiveCommentVo = new LarkActiveCommentVo();
|
||||||
|
BeanUtils.copyProperties(r, larkActiveCommentVo);
|
||||||
|
Long userActiveRelatoin = r.getUserActiveRelatoin();
|
||||||
|
String openId = finalRelationMap.get(userActiveRelatoin);
|
||||||
|
if (StringUtils.isNotBlank(openId)) {
|
||||||
|
LarkLoginLog userInfo = finalUserInfoMap.getOrDefault(openId, new LarkLoginLog());
|
||||||
|
larkActiveCommentVo.setUserName(userInfo.getUserName());
|
||||||
|
larkActiveCommentVo.setImage(userInfo.getImageUrl());
|
||||||
|
}
|
||||||
|
return larkActiveCommentVo;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
responseVo.setDataList(activeCommentVos);
|
||||||
|
return responseVo;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
<?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.ruoyi.flyingbook.mapper.LarkUserActiveCommentMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.flyingbook.domain.LarkUserActiveComment" id="LarkUserActiveCommentResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="userActiveRelatoin" column="user_active_relatoin" />
|
||||||
|
<result property="content" column="content" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="flag" column="flag" />
|
||||||
|
<result property="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectLarkUserActiveCommentVo">
|
||||||
|
select id, user_active_relatoin, content, create_by, create_time, update_by, update_time, flag, remark from lark_user_active_comment
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectLarkUserActiveCommentList" parameterType="com.ruoyi.flyingbook.domain.LarkUserActiveComment" resultMap="LarkUserActiveCommentResult">
|
||||||
|
<include refid="selectLarkUserActiveCommentVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="userActiveRelatoin != null "> and user_active_relatoin = #{userActiveRelatoin}</if>
|
||||||
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||||
|
<if test="flag != null "> and flag = #{flag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectLarkUserActiveCommentById" parameterType="Long" resultMap="LarkUserActiveCommentResult">
|
||||||
|
<include refid="selectLarkUserActiveCommentVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertLarkUserActiveComment" parameterType="com.ruoyi.flyingbook.domain.LarkUserActiveComment" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into lark_user_active_comment
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="userActiveRelatoin != null">user_active_relatoin,</if>
|
||||||
|
<if test="content != null">content,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
<if test="flag != null">flag,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="userActiveRelatoin != null">#{userActiveRelatoin},</if>
|
||||||
|
<if test="content != null">#{content},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
<if test="flag != null">#{flag},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateLarkUserActiveComment" parameterType="com.ruoyi.flyingbook.domain.LarkUserActiveComment">
|
||||||
|
update lark_user_active_comment
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="userActiveRelatoin != null">user_active_relatoin = #{userActiveRelatoin},</if>
|
||||||
|
<if test="content != null">content = #{content},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
<if test="flag != null">flag = #{flag},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteLarkUserActiveCommentById" parameterType="Long">
|
||||||
|
delete from lark_user_active_comment where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteLarkUserActiveCommentByIds" parameterType="String">
|
||||||
|
delete from lark_user_active_comment where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue