he2802 1 year ago
parent
commit
909a9776ae

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserCertificateMapper.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.user.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.user.bo.UserCertificateQueryBo;
 import com.zhongzheng.modules.user.domain.UserCertificate;
@@ -16,5 +17,6 @@ import java.util.List;
 public interface UserCertificateMapper extends BaseMapper<UserCertificate> {
     Long selectMaxId();
     List<UserCertificateVo> selectList(UserCertificateQueryBo bo);
+    @InterceptorIgnore(tenantLine = "true")
     UserCertificateVo selectDetail(UserCertificateQueryBo code);
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserCertificateServiceImpl.java

@@ -5,6 +5,7 @@ import cn.hutool.core.lang.Validator;
 import cn.hutool.core.util.StrUtil;
 import com.zhongzheng.common.exception.CustomException;
 import com.zhongzheng.common.utils.DateUtils;
+import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.mapper.CourseMenuMapper;
 import com.zhongzheng.modules.course.service.IMajorService;
 import com.zhongzheng.modules.course.vo.CourseChapterVo;
@@ -85,6 +86,9 @@ public class UserCertificateServiceImpl extends ServiceImpl<UserCertificateMappe
         if(Validator.isEmpty(userCertificateVo)){
             throw new CustomException("证书不存在");
         }
+        if(Validator.isNotEmpty(userCertificateVo.getTenantId())){
+            ServletUtils.getResponse().setHeader("TenantId",userCertificateVo.getTenantId());
+        }
         MajorVo majorVo = iMajorService.queryById(userCertificateVo.getMajorId());
         if(Validator.isEmpty(majorVo)){
             throw new CustomException("专业不存在");

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserCertificateVo.java

@@ -127,4 +127,6 @@ public class UserCertificateVo {
 
 	@ApiModelProperty("专业")
 	private String major;
+
+	private String tenantId;
 }

+ 1 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserCertificateMapper.xml

@@ -59,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="chapterStr" column="chapter_str"/>
         <result property="moduleId" column="module_id"/>
         <result property="moreCertificateStatus" column="more_certificate_status"/>
+        <result property="tenantId" column="tenant_id"/>
     </resultMap>
 
     <select id="selectMaxId"   resultType="Long">