Преглед изворни кода

教育培训需求变更 代码提交

jingyuanchao пре 2 година
родитељ
комит
d9107b7947
15 измењених фајлова са 319 додато и 51 уклоњено
  1. 10 0
      project_data/sql/0.0.2/soc/soc.sql
  2. 3 6
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/dto/CoreEduTrainingPlanInsertDto.java
  3. 1 7
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/dto/SysLearningMaterialsInsertDto.java
  4. 2 3
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/vo/CoreEduTrainingPlanDataVo.java
  5. 2 2
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/vo/SysLearningMaterialsPageVo.java
  6. 0 3
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/vo/CoreSafetyIndexCalculateRuleDetailVo.java
  7. 55 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/exception/BusinessException.java
  8. 28 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/exception/CommonErrorEnum.java
  9. 8 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/exception/ErrorEnum.java
  10. 161 0
      soc-common/soc-common-core/src/main/java/com/xunmei/common/core/utils/AssertUtil.java
  11. 24 5
      soc-common/soc-common-security/src/main/java/com/xunmei/common/security/handler/GlobalExceptionHandler.java
  12. 1 1
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingPlanServiceImpl.java
  13. 5 5
      soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java
  14. 2 2
      soc-modules/soc-modules-core/src/main/resources/mapper/edu/CoreEduTrainingPlanMapper.xml
  15. 17 17
      soc-modules/soc-modules-core/src/main/resources/mapper/edu/SysLearningMaterialsMapper.xml

+ 10 - 0
project_data/sql/0.0.2/soc/soc.sql

@@ -1908,6 +1908,12 @@ INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_
 INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846752731742210, 3846752731185152, '未登连续五天', 2, 5, NULL, 3.00, NULL);
 INSERT INTO `core_safety_index_calculate_rule_item`(`id`, `rule_id`, `indicator_note`, `calculate_type`, `indicator_days`, `item_type`, `item_value`, `order_num`) VALUES (3846752731742211, 3846752731185152, ' 未登连续十天', 2, 10, NULL, 5.00, NULL);
 
+delete from sys_dict_type where dict_type='edu_materials_type';
+delete from sys_dict_data where dict_type='edu_materials_type';
+INSERT INTO sys_dict_type (dict_name, dict_type, status, create_by, create_time, update_by, update_time, remark) VALUES ('教育培训资料类型', 'edu_materials_type', '0', 'slsjyc', now(), '', null, null);
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (1, '资料类型1', '1', 'edu_materials_type', null, 'default', 'N', '0', 'slsjyc', now(), 'slsjyc', now(), null);
+INSERT INTO sys_dict_data (dict_sort, dict_label, dict_value, dict_type, css_class, list_class, is_default, status, create_by, create_time, update_by, update_time, remark) VALUES (2, '资料类型2', '2', 'edu_materials_type', null, 'default', 'N', '0', 'slsjyc', now(), 'slsjyc', now(), null);
+
 -- -------------------------------------------------------
 -- ----------新增数据 end  ----------------------------
 -- -------------------------------------------------------
@@ -1973,6 +1979,10 @@ update sys_menu set icon=SUBSTR(icon,24) WHERE icon like 'http://10.87.10.55:808
 update sys_menu set icon='#' where icon is null or icon ='';
 
 DELETE from sys_menu WHERE perms in ('device:protection:add','device:protection:edit','device:protection:remove');
+
+-- 隐藏知识库标签管理菜单
+delete  from sys_role_menu rm  where rm.menu_id in ( select id from sys_menu  where menu_name='知识库标签管理' union all select sm.id from sys_menu m inner join sys_menu sm on m.id=sm.parent_id where  m.menu_name='知识库标签管理')
+
 -- -------------------------------------------------------
 -- ----------更新数据 end  ----------------------------
 -- -------------------------------------------------------

+ 3 - 6
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/dto/CoreEduTrainingPlanInsertDto.java

@@ -1,13 +1,10 @@
 package com.xunmei.common.core.domain.edu.dto;
 
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
 import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
 import java.util.Date;
 import java.util.List;
 
@@ -41,14 +38,14 @@ public class CoreEduTrainingPlanInsertDto {
         @ApiModelProperty(value = "是否立即生效", notes = "0:否,1:是")
         private Boolean buildTaskNow=Boolean.FALSE;
 
-        @Size(min = 1,message = "计划培训角色")
+        /*@Size(min = 1,message = "计划培训角色")
         @ApiModelProperty(value = "计划执行角色")
-        private List<Long> planRoleId;
+        private List<Long> planRoleId;*/
 
         @ApiModelProperty(value = "培训机构类型")
         private Integer execOrgType;
 
-        @ApiModelProperty(value = "计划执行角色")
+        @ApiModelProperty(value = "计划执行具体机构")
         private List<Long> planExecOrgIdList;
 
         @ApiModelProperty(value = "备注")

+ 1 - 7
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/dto/SysLearningMaterialsInsertDto.java

@@ -1,9 +1,5 @@
 package com.xunmei.common.core.domain.edu.dto;
 
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableLogic;
-import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.xunmei.common.core.web.domain.BaseEntity;
 import io.swagger.annotations.ApiModel;
@@ -11,8 +7,6 @@ import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 
 import java.util.List;
 
@@ -37,7 +31,7 @@ public class SysLearningMaterialsInsertDto extends BaseEntity {
     private String content;
 
     @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
-    @ApiModelProperty(value = "资料类型(知识库标签)")
+    @ApiModelProperty(value = "资料类型(知识库标签字典)")
     private Long knowledgeId;
 
     @ApiModelProperty(value = "所属机构")

+ 2 - 3
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/vo/CoreEduTrainingPlanDataVo.java

@@ -2,7 +2,6 @@ package com.xunmei.common.core.domain.edu.vo;
 
 import com.fasterxml.jackson.databind.annotation.JsonSerialize;
 import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToExecOrg;
-import com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToRole;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
@@ -67,8 +66,8 @@ public class CoreEduTrainingPlanDataVo {
     @ApiModelProperty(value = "下发计划id")
     private Long parentId;
 
-    @ApiModelProperty(value = "计划执行角色")
-    private List<CoreEduTrainingPlanToRole> planRoleList;
+   /* @ApiModelProperty(value = "计划执行角色")
+    private List<CoreEduTrainingPlanToRole> planRoleList;*/
 
     @ApiModelProperty(value = "计划执行机构")
     private List<CoreEduTrainingPlanToExecOrg> planExecOrgList;

+ 2 - 2
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/edu/vo/SysLearningMaterialsPageVo.java

@@ -27,8 +27,8 @@ public class SysLearningMaterialsPageVo {
     private String title;
 
     @JsonSerialize(using = com.fasterxml.jackson.databind.ser.std.ToStringSerializer.class)
-    @ApiModelProperty(value = "资料类型名称(知识库标签名称)")
-    private String knowledgeName;
+    @ApiModelProperty(value = "资料类型(字典)")
+    private Long knowledgeId;
 
     @ApiModelProperty(value = "所属机构")
     private Long orgId;

+ 0 - 3
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/domain/safetyindex/vo/CoreSafetyIndexCalculateRuleDetailVo.java

@@ -18,21 +18,18 @@ public class CoreSafetyIndexCalculateRuleDetailVo {
     @ApiModelProperty("机构类型名称")
     private String orgTypeText;
 
-    @JsonIgnore
     @ApiModelProperty("指标分类code")
     private String typeCode;
 
     @ApiModelProperty("指标分类名称")
     private String typeCodeText;
 
-    @JsonIgnore
     @ApiModelProperty("指标项目code")
     private String projectCode;
 
     @ApiModelProperty("指标项目名称")
     private String projectCodeText;
 
-    @JsonIgnore
     @ApiModelProperty("指标要点code")
     private String pointCode;
 

+ 55 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/exception/BusinessException.java

@@ -0,0 +1,55 @@
+package com.xunmei.common.core.exception;
+
+import lombok.Data;
+
+@Data
+public class BusinessException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     *  错误码
+     */
+    protected Integer errorCode;
+
+    /**
+     *  错误信息
+     */
+    protected String errorMsg;
+
+    public BusinessException() {
+        super();
+    }
+
+    public BusinessException(String errorMsg) {
+        super(errorMsg);
+        this.errorMsg = errorMsg;
+    }
+
+    public BusinessException(Integer errorCode, String errorMsg) {
+        super(errorMsg);
+        this.errorCode = errorCode;
+        this.errorMsg = errorMsg;
+    }
+
+    public BusinessException(Integer errorCode, String errorMsg, Throwable cause) {
+        super(errorMsg, cause);
+        this.errorCode = errorCode;
+        this.errorMsg = errorMsg;
+    }
+
+    public BusinessException(ErrorEnum error) {
+        super(error.getErrorMsg());
+        this.errorCode = error.getErrorCode();
+        this.errorMsg = error.getErrorMsg();
+    }
+
+    @Override
+    public String getMessage() {
+        return errorMsg;
+    }
+
+    @Override
+    public synchronized Throwable fillInStackTrace() {
+        return this;
+    }
+}

+ 28 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/exception/CommonErrorEnum.java

@@ -0,0 +1,28 @@
+package com.xunmei.common.core.exception;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+
+@AllArgsConstructor
+@Getter
+public enum CommonErrorEnum implements ErrorEnum {
+
+    SYSTEM_ERROR(-1, "系统出小差了,请稍后再试哦~~"),
+    PARAM_VALID(-2, "参数校验失败{0}"),
+    FREQUENCY_LIMIT(-3, "请求太频繁了,请稍后再试哦~~"),
+    LOCK_LIMIT(-4, "请求太频繁了,请稍后再试哦~~"),
+    ;
+    private final Integer code;
+    private final String msg;
+
+    @Override
+    public Integer getErrorCode() {
+        return this.code;
+    }
+
+    @Override
+    public String getErrorMsg() {
+        return this.msg;
+    }
+}

+ 8 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/exception/ErrorEnum.java

@@ -0,0 +1,8 @@
+package com.xunmei.common.core.exception;
+
+public interface ErrorEnum {
+
+    Integer getErrorCode();
+
+    String getErrorMsg();
+}

+ 161 - 0
soc-common/soc-common-core/src/main/java/com/xunmei/common/core/utils/AssertUtil.java

@@ -0,0 +1,161 @@
+package com.xunmei.common.core.utils;
+
+import cn.hutool.core.util.ObjectUtil;
+import com.xunmei.common.core.exception.BusinessException;
+import com.xunmei.common.core.exception.CommonErrorEnum;
+import com.xunmei.common.core.exception.ErrorEnum;
+import org.hibernate.validator.HibernateValidator;
+
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import java.text.MessageFormat;
+import java.util.*;
+
+/**
+ * 校验工具类
+ */
+public class AssertUtil {
+
+    /**
+     * 校验到失败就结束
+     */
+    private static Validator failFastValidator = Validation.byProvider(HibernateValidator.class)
+            .configure()
+            .failFast(true)
+            .buildValidatorFactory().getValidator();
+
+    /**
+     * 全部校验
+     */
+    private static Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
+
+    /**
+     * 注解验证参数(校验到失败就结束)
+     *
+     * @param obj
+     */
+    public static <T> void fastFailValidate(T obj) {
+        Set<ConstraintViolation<T>> constraintViolations = failFastValidator.validate(obj);
+        if (constraintViolations.size() > 0) {
+            throwException(CommonErrorEnum.PARAM_VALID, constraintViolations.iterator().next().getMessage());
+        }
+    }
+
+    /**
+     * 注解验证参数(全部校验,抛出异常)
+     *
+     * @param obj
+     */
+    public static <T> void allCheckValidateThrow(T obj) {
+        Set<ConstraintViolation<T>> constraintViolations = validator.validate(obj);
+        if (constraintViolations.size() > 0) {
+            StringBuilder errorMsg = new StringBuilder();
+            Iterator<ConstraintViolation<T>> iterator = constraintViolations.iterator();
+            while (iterator.hasNext()) {
+                ConstraintViolation<T> violation = iterator.next();
+                //拼接异常信息
+                errorMsg.append(violation.getPropertyPath().toString()).append(":").append(violation.getMessage()).append(",");
+            }
+            //去掉最后一个逗号
+            throwException(CommonErrorEnum.PARAM_VALID, errorMsg.toString().substring(0, errorMsg.length() - 1));
+        }
+    }
+
+
+    /**
+     * 注解验证参数(全部校验,返回异常信息集合)
+     *
+     * @param obj
+     */
+    public static <T> Map<String, String> allCheckValidate(T obj) {
+        Set<ConstraintViolation<T>> constraintViolations = validator.validate(obj);
+        if (constraintViolations.size() > 0) {
+            Map<String, String> errorMessages = new HashMap<>();
+            Iterator<ConstraintViolation<T>> iterator = constraintViolations.iterator();
+            while (iterator.hasNext()) {
+                ConstraintViolation<T> violation = iterator.next();
+                errorMessages.put(violation.getPropertyPath().toString(), violation.getMessage());
+            }
+            return errorMessages;
+        }
+        return new HashMap<>();
+    }
+
+    //如果不是true,则抛异常
+    public static void isTrue(boolean expression, String msg) {
+        if (!expression) {
+            throwException(msg);
+        }
+    }
+
+    public static void isTrue(boolean expression, ErrorEnum errorEnum, Object... args) {
+        if (!expression) {
+            throwException(errorEnum, args);
+        }
+    }
+
+    //如果是true,则抛异常
+    public static void isFalse(boolean expression, String msg) {
+        if (expression) {
+            throwException(msg);
+        }
+    }
+
+    //如果是true,则抛异常
+    public static void isFalse(boolean expression, ErrorEnum errorEnum, Object... args) {
+        if (expression) {
+            throwException(errorEnum, args);
+        }
+    }
+
+    //如果不是非空对象,则抛异常
+    public static void isNotEmpty(Object obj, String msg) {
+        if (isEmpty(obj)) {
+            throwException(msg);
+        }
+    }
+
+    //如果不是非空对象,则抛异常
+    public static void isNotEmpty(Object obj, ErrorEnum errorEnum, Object... args) {
+        if (isEmpty(obj)) {
+            throwException(errorEnum, args);
+        }
+    }
+
+    //如果不是非空对象,则抛异常
+    public static void isEmpty(Object obj, String msg) {
+        if (!isEmpty(obj)) {
+            throwException(msg);
+        }
+    }
+
+    public static void equal(Object o1, Object o2, String msg) {
+        if (!ObjectUtil.equal(o1, o2)) {
+            throwException(msg);
+        }
+    }
+
+    public static void notEqual(Object o1, Object o2, String msg) {
+        if (ObjectUtil.equal(o1, o2)) {
+            throwException(msg);
+        }
+    }
+
+    private static boolean isEmpty(Object obj) {
+        return ObjectUtil.isEmpty(obj);
+    }
+
+    private static void throwException(String msg) {
+        throwException(null, msg);
+    }
+
+    private static void throwException(ErrorEnum errorEnum, Object... arg) {
+        if (Objects.isNull(errorEnum)) {
+            errorEnum = CommonErrorEnum.SYSTEM_ERROR;
+        }
+        throw new BusinessException(errorEnum.getErrorCode(), MessageFormat.format(errorEnum.getErrorMsg(), arg));
+    }
+
+
+}

+ 24 - 5
soc-common/soc-common-security/src/main/java/com/xunmei/common/security/handler/GlobalExceptionHandler.java

@@ -1,9 +1,7 @@
 package com.xunmei.common.security.handler;
 
 import com.xunmei.common.core.constant.HttpStatus;
-import com.xunmei.common.core.exception.DemoModeException;
-import com.xunmei.common.core.exception.InnerAuthException;
-import com.xunmei.common.core.exception.ServiceException;
+import com.xunmei.common.core.exception.*;
 import com.xunmei.common.core.exception.auth.NotPermissionException;
 import com.xunmei.common.core.exception.auth.NotRoleException;
 import com.xunmei.common.core.utils.StringUtils;
@@ -108,14 +106,14 @@ public class GlobalExceptionHandler
 
     /**
      * 自定义验证异常
-     */
+     *//*
     @ExceptionHandler(MethodArgumentNotValidException.class)
     public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e)
     {
         log.error(e.getMessage(), e);
         String message = e.getBindingResult().getFieldError().getDefaultMessage();
         return AjaxResult.error(message);
-    }
+    }*/
 
     /**
      * 内部认证异常
@@ -134,4 +132,25 @@ public class GlobalExceptionHandler
     {
         return AjaxResult.error("演示模式,不允许操作");
     }
+
+    /**
+     * validation参数校验异常
+     */
+    @ExceptionHandler(value = MethodArgumentNotValidException.class)
+    public AjaxResult methodArgumentNotValidExceptionExceptionHandler(MethodArgumentNotValidException e) {
+        StringBuilder errorMsg = new StringBuilder();
+        e.getBindingResult().getFieldErrors().forEach(x -> errorMsg.append(x.getField()).append(x.getDefaultMessage()).append(","));
+        String message = errorMsg.toString();
+        log.info("validation parameters error!The reason is:{}", message);
+        return AjaxResult.error(CommonErrorEnum.PARAM_VALID.getErrorCode(), message.substring(0, message.length() - 1));
+    }
+
+    /**
+     * 自定义校验异常(如参数校验等)
+     */
+    @ExceptionHandler(value = BusinessException.class)
+    public AjaxResult businessExceptionHandler(BusinessException e) {
+        log.info("business exception!The reason is:{}", e.getMessage(), e);
+        return AjaxResult.error(e.getErrorCode(), e.getMessage());
+    }
 }

+ 1 - 1
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingPlanServiceImpl.java

@@ -197,7 +197,7 @@ public class CoreEduTrainingPlanServiceImpl extends ServiceImpl<CoreEduTrainingP
         plan.setBelongOrgName(r.getShortName());
         plan.setBelongOrgPath(r.getPath());
         plan.setFileList(ObjectUtil.isNotEmpty(request.getFileList()) ? JSON.toJSONString(request.getFileList()) : null);
-        batchSavePlanToRole(request.getPlanRoleId(), plan.getId());
+        //batchSavePlanToRole(request.getPlanRoleId(), plan.getId());
         batchSavePlanToExecOrg(request.getPlanExecOrgIdList(), plan.getId());
         plan.setStandard(0);
         plan.setIssue(0);

+ 5 - 5
soc-modules/soc-modules-core/src/main/java/com/xunmei/core/edu/service/impl/CoreEduTrainingTaskServiceImpl.java

@@ -341,7 +341,7 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
     }
 
     private void saveTaskAndRoleData(CoreEduTrainingPlanDataVo plan, Date start, Date end, List<SysOrg> orgList) {
-        List<CoreEduTrainingPlanToRole> planRoleList = plan.getPlanRoleList();
+        //List<CoreEduTrainingPlanToRole> planRoleList = plan.getPlanRoleList();
         List<CoreEduTrainingTask> taskList = new ArrayList<>();
         List<CoreEduTrainingTaskToRole> taskRoleList = new ArrayList<>();
         Map<Integer, DateRange> dateRangeMap = DateUtils.splitDateRange(start, end, plan.getExecTimes());
@@ -370,13 +370,13 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
                 trainingTask.setCreateTime(new Date());
                 trainingTask.setUpdateTime(new Date());
                 taskList.add(trainingTask);
-                for (CoreEduTrainingPlanToRole planToRole : planRoleList) {
+                /*for (CoreEduTrainingPlanToRole planToRole : planRoleList) {
                     CoreEduTrainingTaskToRole coreEduTrainingTaskToRole = new CoreEduTrainingTaskToRole();
                     coreEduTrainingTaskToRole.setEduTrainingTaskId(trainingTask.getId());
                     coreEduTrainingTaskToRole.setRoleId(planToRole.getRoleId());
                     coreEduTrainingTaskToRole.setRoleName(planToRole.getRoleName());
                     taskRoleList.add(coreEduTrainingTaskToRole);
-                }
+                }*/
             }
 
 
@@ -384,9 +384,9 @@ public class CoreEduTrainingTaskServiceImpl extends ServiceImpl<CoreEduTrainingT
         if (ObjectUtil.isNotEmpty(taskList)) {
             this.saveBatch(taskList);
         }
-        if (ObjectUtil.isNotEmpty(taskRoleList)) {
+        /*if (ObjectUtil.isNotEmpty(taskRoleList)) {
             coreEduTrainingTaskToRoleService.saveBatch(taskRoleList);
-        }
+        }*/
     }
 
 

+ 2 - 2
soc-modules/soc-modules-core/src/main/resources/mapper/edu/CoreEduTrainingPlanMapper.xml

@@ -50,11 +50,11 @@
         <result property="issue" column="issue"/>
         <result property="parentId" column="parent_id"/>
         <result property="file" column="file_list"/>
-        <collection property="planRoleList" ofType="com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToRole"
+        <!--<collection property="planRoleList" ofType="com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToRole"
                     select="com.xunmei.core.edu.mapper.CoreEduTrainingPlanToRoleMapper.selectListByPlanId" column="id">
             <result column="plan_id" property="planId"/>
             <result column="role_id" property="roleId"/>
-        </collection>
+        </collection>-->
         <collection property="planExecOrgList"
                     ofType="com.xunmei.common.core.domain.edu.domain.CoreEduTrainingPlanToExecOrg"
                     select="com.xunmei.core.edu.mapper.CoreEduTrainingPlanToExecOrgMapper.selectLisByPlanId"

+ 17 - 17
soc-modules/soc-modules-core/src/main/resources/mapper/edu/SysLearningMaterialsMapper.xml

@@ -294,7 +294,7 @@
     <sql id="pageBaseColumn">
         m.id,
         title,
-        k.name as knowledgeName,
+        m.knowledge_id,
         m.org_id,
         m.org_name,
         is_open,
@@ -310,42 +310,42 @@
         select
         <include refid="pageBaseColumn"/>
         from sys_learning_materials m
-        inner join sys_knowledge k on m.knowledge_id = k.id
+      <!--  inner join sys_knowledge k on m.knowledge_id = k.id-->
         inner join sys_user u on u.id=m.create_by
-        where m.deleted = 0 and k.deleted = 0 and m.org_id=#{request.orgId} and m.is_open = 1
+        where m.deleted = 0 and m.org_id=#{request.orgId} and m.is_open = 1
         <include refid="pageRequest"/>
     </select>
     <select id="selectPageData2" resultType="com.xunmei.common.core.domain.edu.vo.SysLearningMaterialsPageVo">
         select
         <include refid="pageBaseColumn"/>
         from sys_learning_materials m
-        inner join sys_knowledge k on m.knowledge_id = k.id
+       <!-- inner join sys_knowledge k on m.knowledge_id = k.id-->
         inner join sys_user u on u.id=m.create_by
-        where m.deleted = 0 and k.deleted = 0 and m.org_id=#{request.curOrgId} and m.is_open = 1
+        where m.deleted = 0  and m.org_id=#{request.curOrgId} and m.is_open = 1
         <include refid="pageRequest"/>
-        or(m.deleted = 0 and k.deleted = 0 and  m.create_by=#{request.userId}  <include refid="pageRequest"/>)
+        or(m.deleted = 0 and  m.create_by=#{request.userId}  <include refid="pageRequest"/>)
     </select>
     <select id="selectPageData3" resultType="com.xunmei.common.core.domain.edu.vo.SysLearningMaterialsPageVo">
         select
         <include refid="pageBaseColumn"/>
         from sys_learning_materials m
-        inner join sys_knowledge k on m.knowledge_id = k.id
+        <!--inner join sys_knowledge k on m.knowledge_id = k.id-->
         inner join sys_user u on u.id=m.create_by
-        where( m.deleted = 0 and k.deleted = 0 and m.org_id=#{request.curOrgId} and m.is_open = 1  <include refid="pageRequest"/>)
-        or(m.deleted = 0 and k.deleted = 0 and m.create_by=#{request.userId}  <include refid="pageRequest"/>)
-        or(m.deleted = 0 and k.deleted = 0 and m.org_path like concat(#{request.orgPath},'%') and m.is_open = 1<include refid="pageRequest"/>)
+        where( m.deleted = 0 and m.org_id=#{request.curOrgId} and m.is_open = 1  <include refid="pageRequest"/>)
+        or(m.deleted = 0 and m.create_by=#{request.userId}  <include refid="pageRequest"/>)
+        or(m.deleted = 0 and m.org_path like concat(#{request.orgPath},'%') and m.is_open = 1<include refid="pageRequest"/>)
     </select>
     <select id="selectPageData4" resultType="com.xunmei.common.core.domain.edu.vo.SysLearningMaterialsPageVo">
         select
         <include refid="pageBaseColumn"/>
         from sys_learning_materials m
-        inner join sys_knowledge k on m.knowledge_id = k.id
+        <!--inner join sys_knowledge k on m.knowledge_id = k.id-->
         inner join sys_user u on u.id=m.create_by
-        where ( m.deleted = 0 and k.deleted = 0 and m.org_id=#{request.curOrgId} and m.is_open = 1 <include refid="pageRequest"/> )
-        or(m.deleted = 0 and k.deleted = 0 and m.create_by=#{request.userId} <include refid="pageRequest"/>)
-        or(m.deleted = 0 and k.deleted = 0 and m.org_path like concat(#{request.orgPath},'%') and m.is_open = 1<include refid="pageRequest"/>)
+        where ( m.deleted = 0 and m.org_id=#{request.curOrgId} and m.is_open = 1 <include refid="pageRequest"/> )
+        or(m.deleted = 0 and m.create_by=#{request.userId} <include refid="pageRequest"/>)
+        or(m.deleted = 0 and m.org_path like concat(#{request.orgPath},'%') and m.is_open = 1<include refid="pageRequest"/>)
         <!--父级公开数据-->
-        or(m.deleted = 0 and k.deleted = 0 and  m.org_id in <foreach collection="request.orgIdList" item="item" open="(" separator="," close=")">
+        or(m.deleted = 0 and  m.org_id in <foreach collection="request.orgIdList" item="item" open="(" separator="," close=")">
         #{item}
     </foreach> and m.is_open = 1<include refid="pageRequest"/>)
     </select>
@@ -353,9 +353,9 @@
         select
         <include refid="pageBaseColumn"/>
         from sys_learning_materials m
-        inner join sys_knowledge k on m.knowledge_id = k.id
+       <!-- inner join sys_knowledge k on m.knowledge_id = k.id-->
         inner join sys_user u on u.id=m.create_by
-        where m.deleted = 0 and k.deleted = 0 and
+        where m.deleted = 0 and
         m.org_path like concat(#{request.orgPath},'%') and m.is_open = 1
         <include refid="pageRequest"/>
     </select>