Merge remote-tracking branch 'origin/master'
# Conflicts: # yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/bpm/service/knows/KnowledgeService.java
This commit is contained in:
commit
22b0639fd0
@ -86,6 +86,6 @@ public interface ErrorCodeConstants {
|
||||
// ========== 评论 1_009_017_000 ==========
|
||||
ErrorCode COMMENT_NOT_EXISTS = new ErrorCode(1_009_017_000, "评论不存在");
|
||||
// ========== 我的收藏 1_009_018_000
|
||||
ErrorCode STAR2_NOT_EXISTS = new ErrorCode(1_009_018_000, "我的收藏不存在");
|
||||
ErrorCode STAR2_NOT_EXISTS = new ErrorCode(1_009_018_000, "收藏不存在");
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@ToString(callSuper = true)
|
||||
public class Star2PageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16811")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "知识id", example = "27650")
|
||||
private Long kowsmId;
|
||||
|
||||
@ -28,4 +31,4 @@ public class Star2PageReqVO extends PageParam {
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -12,6 +12,10 @@ import com.alibaba.excel.annotation.*;
|
||||
@ExcelIgnoreUnannotated
|
||||
public class Star2RespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16811")
|
||||
@ExcelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "知识id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27650")
|
||||
@ExcelProperty("知识id")
|
||||
private Long kowsmId;
|
||||
|
@ -9,6 +9,9 @@ import javax.validation.constraints.*;
|
||||
@Data
|
||||
public class Star2SaveReqVO {
|
||||
|
||||
@Schema(description = "id", example = "16811")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "知识id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27650")
|
||||
@NotNull(message = "知识id不能为空")
|
||||
private Long kowsmId;
|
||||
|
@ -37,7 +37,6 @@ public interface Star2Convert {
|
||||
if (knowledge != null){
|
||||
Star2VO.setKowsmTitle(knowledge.getKnowTitle());
|
||||
}
|
||||
System.out.println(Star2VO);
|
||||
return Star2VO;
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ public interface Star2Mapper extends BaseMapperX<Star2DO> {
|
||||
|
||||
default PageResult<Star2DO> selectPage(Star2PageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<Star2DO>()
|
||||
.eqIfPresent(Star2DO::getId, reqVO.getId())
|
||||
.eqIfPresent(Star2DO::getKowsmId, reqVO.getKowsmId())
|
||||
.eqIfPresent(Star2DO::getUserId, reqVO.getUserId())
|
||||
.eqIfPresent(Star2DO::getKowsId, reqVO.getKowsId())
|
||||
@ -26,4 +27,4 @@ public interface Star2Mapper extends BaseMapperX<Star2DO> {
|
||||
.orderByDesc(Star2DO::getId));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,16 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.knows;
|
||||
|
||||
import java.util.*;
|
||||
import cn.iocoder.yudao.framework.common.util.collection.CollectionUtils;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.knows.vo.*;
|
||||
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOALeavePageReqVO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.knows.KnowledgeDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.knows.CommentDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.knows.KnowtypeDO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@ -66,12 +69,14 @@ public interface KnowledgeService {
|
||||
* @return 评论列表
|
||||
*/
|
||||
List<CommentDO> getCommentListByKnowId(Long knowId);
|
||||
/**
|
||||
* 更新请假申请的状态
|
||||
*
|
||||
* @param id 编号
|
||||
* @param status 结果
|
||||
*/
|
||||
void updateKnowledgeStatus(Long id, Integer status);
|
||||
|
||||
List<KnowledgeDO> getKnowledgeList(KnowledgePageReqVO listReqVO);
|
||||
|
||||
List<KnowledgeDO> getKnowledgeList(Collection<Long> ids);
|
||||
default Map<Long, KnowledgeDO> getKnowledgeMap(Collection<Long> ids) {
|
||||
List<KnowledgeDO> list = getKnowledgeList(ids);
|
||||
return CollectionUtils.convertMap(list, KnowledgeDO::getId);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.bpm.service.knows;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.BpmProcessInstanceApi;
|
||||
import cn.iocoder.yudao.module.bpm.api.task.dto.BpmProcessInstanceCreateReqDTO;
|
||||
import cn.iocoder.yudao.module.bpm.dal.dataobject.oa.BpmOALeaveDO;
|
||||
@ -114,6 +115,17 @@ public class KnowledgeServiceImpl implements KnowledgeService {
|
||||
list.forEach(o -> o.setKnowId(knowId));
|
||||
commentMapper.insertBatch(list);
|
||||
}
|
||||
@Override
|
||||
public List<KnowledgeDO> getKnowledgeList(KnowledgePageReqVO listReqVO) {
|
||||
return knowledgeMapper.selectList(listReqVO);
|
||||
}
|
||||
@Override
|
||||
public List<KnowledgeDO> getKnowledgeList(Collection<Long> ids) {
|
||||
if (CollUtil.isEmpty(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return knowledgeMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
private void updateCommentList(Long knowId, List<CommentDO> list) {
|
||||
deleteCommentByKnowId(knowId);
|
||||
|
Loading…
Reference in New Issue
Block a user