yangdamao 2 年之前
父節點
當前提交
17d48d7a96
共有 25 個文件被更改,包括 300 次插入6 次删除
  1. 5 0
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java
  2. 1 1
      zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/WxLoginService.java
  3. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/CertificateCommonMapper.java
  4. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/CertificateMapper.java
  5. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/CertificateTpMapper.java
  6. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/ICertificateCommonService.java
  7. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/ICertificateService.java
  8. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/ICertificateTpService.java
  9. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateCommonServiceImpl.java
  10. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateServiceImpl.java
  11. 5 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java
  12. 4 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseSubjectMapper.java
  13. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseSubjectService.java
  14. 6 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSubjectServiceImpl.java
  15. 205 4
      zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java
  16. 5 1
      zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderBusinessConfigQueryBo.java
  17. 2 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/User.java
  18. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserMapper.java
  19. 3 0
      zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserService.java
  20. 4 0
      zhongzheng-system/src/main/resources/mapper/modules/base/CertificateCommonMapper.xml
  21. 3 0
      zhongzheng-system/src/main/resources/mapper/modules/base/CertificateMapper.xml
  22. 3 0
      zhongzheng-system/src/main/resources/mapper/modules/base/CertificateTpMapper.xml
  23. 4 0
      zhongzheng-system/src/main/resources/mapper/modules/course/CourseSubjectMapper.xml
  24. 6 0
      zhongzheng-system/src/main/resources/mapper/modules/order/OrderBusinessConfigMapper.xml
  25. 9 0
      zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

+ 5 - 0
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/UserServiceImpl.java

@@ -949,6 +949,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
         return map;
     }
 
+    @Override
+    public List<User> getUserByTelNotTenant(String telphone) {
+        return baseMapper.getUserByTelNotTenant(telphone);
+    }
+
     private Long findSubjectId(String subject){
         if(subject!=null){
             String key = "SUB_"+subject;

+ 1 - 1
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/WxLoginService.java

@@ -1050,7 +1050,7 @@ public class WxLoginService implements IWxLoginService {
             Long time = bo.getEndTime() - nowTime;
             redisCache.setCacheObjectTenant(key,bo.getGoodsIds(),time.intValue(),TimeUnit.SECONDS);
             //页面路径和参数
-            pageUrl = "/pages5/scan/recommen";
+            pageUrl = "pages5/scan/recommen";
             sceneParam.append("sharekey=").append(nowTime);
         }
 

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/CertificateCommonMapper.java

@@ -6,6 +6,7 @@ import com.zhongzheng.modules.base.bo.CertificateTpQueryBo;
 import com.zhongzheng.modules.base.domain.CertificateCommon;
 import com.zhongzheng.modules.base.vo.CertificateCommonVo;
 import com.zhongzheng.modules.base.vo.CertificateTpVo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -17,4 +18,6 @@ import java.util.List;
  */
 public interface CertificateCommonMapper extends BaseMapper<CertificateCommon> {
     List<CertificateCommonVo> getList(CertificateCommonQueryBo bo);
+
+    CertificateCommon getCertificateByTenant(@Param("code") String code,@Param("newTenantId") Long newTenantId);
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/CertificateMapper.java

@@ -1,7 +1,9 @@
 package com.zhongzheng.modules.base.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.base.domain.Certificate;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 证书Mapper接口
@@ -11,4 +13,6 @@ import com.zhongzheng.modules.base.domain.Certificate;
  */
 public interface CertificateMapper extends BaseMapper<Certificate> {
 
+    @InterceptorIgnore(tenantLine = "true")
+    Certificate getCertificateByTenant(@Param("code") String code,@Param("newTenantId") Long newTenantId);
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/mapper/CertificateTpMapper.java

@@ -1,11 +1,13 @@
 package com.zhongzheng.modules.base.mapper;
 
+import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.base.bo.CertificateTpQueryBo;
 import com.zhongzheng.modules.base.bo.UserProfileQueryBo;
 import com.zhongzheng.modules.base.domain.CertificateTp;
 import com.zhongzheng.modules.base.vo.CertificateTpVo;
 import com.zhongzheng.modules.base.vo.UserProfileVo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 
@@ -17,4 +19,7 @@ import java.util.List;
  */
 public interface CertificateTpMapper extends BaseMapper<CertificateTp> {
     List<CertificateTpVo> selectListByBo(CertificateTpQueryBo bo);
+
+    @InterceptorIgnore(tenantLine = "true")
+    CertificateTp getCertificateTpByTenant(@Param("code") String code,@Param("newTenantId") Long newTenantId);
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/ICertificateCommonService.java

@@ -53,4 +53,7 @@ public interface ICertificateCommonService extends IService<CertificateCommon> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    CertificateCommon getCertificateByTenant(String code, Long newTenantId);
+
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/ICertificateService.java

@@ -52,4 +52,6 @@ public interface ICertificateService extends IService<Certificate> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    Certificate getCertificateByTenant(String code, Long newTenantId);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/ICertificateTpService.java

@@ -54,4 +54,6 @@ public interface ICertificateTpService extends IService<CertificateTp> {
 	 * @return
 	 */
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
+
+    CertificateTp getCertificateTpByTenant(String code, Long newTenantId);
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateCommonServiceImpl.java

@@ -106,4 +106,9 @@ public class CertificateCommonServiceImpl extends ServiceImpl<CertificateCommonM
         }
         return this.removeByIds(ids);
     }
+
+    @Override
+    public CertificateCommon getCertificateByTenant(String code, Long newTenantId) {
+        return baseMapper.getCertificateByTenant(code,newTenantId);
+    }
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateServiceImpl.java

@@ -110,6 +110,11 @@ public class CertificateServiceImpl extends ServiceImpl<CertificateMapper, Certi
         return this.removeByIds(ids);
     }
 
+    @Override
+    public Certificate getCertificateByTenant(String code, Long newTenantId) {
+        return baseMapper.getCertificateByTenant(code,newTenantId);
+    }
+
     private boolean checkNameUnique(Certificate entity) {
         Certificate info = getOne(new LambdaQueryWrapper<Certificate>()
                 .eq(Certificate::getCertificateName,entity.getCertificateName()).ne(Certificate::getStatus,-1)

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java

@@ -690,4 +690,9 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         }
         return this.removeByIds(ids);
     }
+
+    @Override
+    public CertificateTp getCertificateTpByTenant(String code, Long newTenantId) {
+        return baseMapper.getCertificateTpByTenant(code, newTenantId);
+    }
 }

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseSubjectMapper.java

@@ -2,10 +2,12 @@ package com.zhongzheng.modules.course.mapper;
 
 import com.zhongzheng.modules.course.bo.CourseProjectTypeQueryBo;
 import com.zhongzheng.modules.course.bo.CourseSubjectQueryBo;
+import com.zhongzheng.modules.course.domain.CourseBusiness;
 import com.zhongzheng.modules.course.domain.CourseSubject;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.zhongzheng.modules.course.vo.CourseProjectTypeVo;
 import com.zhongzheng.modules.course.vo.CourseSubjectVo;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.Collection;
 import java.util.List;
@@ -25,4 +27,6 @@ public interface CourseSubjectMapper extends BaseMapper<CourseSubject> {
     List<CourseProjectTypeVo> queryProject(Long id);
 
     Integer countNum(CourseSubjectQueryBo bo);
+
+    CourseSubject getSubjectByTenant(@Param("encoder") String encoder,@Param("newTenantId") Long newTenantId);
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/ICourseSubjectService.java

@@ -1,5 +1,6 @@
 package com.zhongzheng.modules.course.service;
 
+import com.zhongzheng.modules.course.domain.CourseBusiness;
 import com.zhongzheng.modules.course.domain.CourseSubject;
 import com.zhongzheng.modules.course.vo.CourseSubjectVo;
 import com.zhongzheng.modules.course.bo.CourseSubjectQueryBo;
@@ -51,4 +52,6 @@ public interface ICourseSubjectService extends IService<CourseSubject> {
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
     List<CourseSubjectVo> queryListAll(CourseSubjectQueryBo bo);
+
+	CourseSubject getSubjectByTenant(String encoder, Long newTenantId);
 }

+ 6 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseSubjectServiceImpl.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.common.utils.ServletUtils;
 import com.zhongzheng.modules.course.bo.*;
+import com.zhongzheng.modules.course.domain.CourseBusiness;
 import com.zhongzheng.modules.course.domain.CourseEducationType;
 import com.zhongzheng.modules.course.domain.CourseSubjectProject;
 import com.zhongzheng.modules.course.service.ICourseSubjectProjectService;
@@ -178,4 +179,9 @@ public class CourseSubjectServiceImpl extends ServiceImpl<CourseSubjectMapper, C
         }
         return entity2Vo(courseSubjectVos);
     }
+
+    @Override
+    public CourseSubject getSubjectByTenant(String encoder, Long newTenantId) {
+        return baseMapper.getSubjectByTenant(encoder,newTenantId);
+    }
 }

+ 205 - 4
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -984,17 +984,23 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         if (Validator.isEmpty(bo.getTelphone())) {
             throw new CustomException("参数错误");
         }
-        User user = iUserService.getOne(new LambdaQueryWrapper<User>()
-                .eq(User::getTelphone, bo.getTelphone()));
-        if (ObjectUtils.isNull(user)) {
+
+        List<User> users = iUserService.getUserByTelNotTenant(bo.getTelphone());
+        if (CollectionUtils.isNotEmpty(users)) {
             throw new CustomException("通过手机号获取用户信息失败");
         }
         //获取用户订单商品信息
-        List<UserGoodsListVo> voList = baseMapper.getOrderGoodsListByUser(user.getUserId());
+        List<UserGoodsListVo> voList = new ArrayList<>();
+        users.forEach(item -> {
+            List<UserGoodsListVo> orderGoodsListByUser = baseMapper.getOrderGoodsListByUser(item.getUserId());
+            voList.addAll(orderGoodsListByUser);
+        });
+
         if (CollectionUtils.isEmpty(voList)) {
             return new ArrayList<>();
         }
         voList.forEach(goodsVo -> {
+            User user = users.stream().filter(x -> x.getTenantId().equals(goodsVo.getTenantId())).findFirst().orElse(null);
             //已学和未学
             Long secLong = 0L;
             Long studyLong = 0L;
@@ -1390,19 +1396,214 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                     if (ObjectUtil.isNotNull(newCourseHandouts)){
                         goods.setHandoutsId(newCourseHandouts.getHandoutsId());
                     }else {
+                        //讲义业务层次
+                        List<CourseHandoutsBusiness> handoutsBusinessList = iCourseHandoutsBusinessService
+                                .list(new LambdaQueryWrapper<CourseHandoutsBusiness>()
+                                .eq(CourseHandoutsBusiness::getHandoutsId, courseHandouts.getHandoutsId()));
                         newCourseHandouts.setHandoutsId(null);
                         newCourseHandouts.setTenantId(newTenantId);
                         iCourseHandoutsService.save(newCourseHandouts);
                         goods.setHandoutsId(courseHandouts.getHandoutsId());
+                        if (CollectionUtils.isNotEmpty(handoutsBusinessList)){
+                            List<CourseHandoutsBusiness> collect = handoutsBusinessList.stream().map(business -> {
+                                business.setId(null);
+                                business.setTenantId(newTenantId);
+                                //项目
+                                business.setEducationId(getNewEducationTypeId(business.getEducationId(), newTenantId));
+                                //业务
+                                business.setBusinessId(getNewBusinessId(business.getBusinessId(), newTenantId));
+                                //科目
+                                business.setSubjectId(getNewSubjectId(business.getSubjectId(), newTenantId));
+                                //讲义
+                                business.setHandoutsId(courseHandouts.getHandoutsId());
+                                return business;
+                            }).collect(Collectors.toList());
+                            iCourseHandoutsBusinessService.saveBatch(collect);
+                        }
+                    }
+                }
+            }
+
+            //科目ID,拼接
+            if (StringUtils.isNotBlank(goods.getSubjectIds())){
+                List<Long> subIds = new ArrayList<>();
+                List<Long> ids = Arrays.asList(goods.getSubjectIds().split(",")).stream().map(x -> Long.valueOf(x)).collect(Collectors.toList());
+                ids.forEach(item -> {
+                    Long newSubjectId = getNewSubjectId(item, newTenantId);
+                    if (ObjectUtils.isNotNull(newSubjectId)){
+                        subIds.add(newSubjectId);
                     }
+                });
+                if (CollectionUtils.isNotEmpty(subIds)){
+                    goods.setSubjectIds(subIds.stream().map(x -> x.toString()).collect(Collectors.joining(",")));
                 }
             }
 
+            //证书类型
+            if (ObjectUtils.isNotNull(goods.getCertificateTypeId())){
+                goods.setCertificateTypeId(getNewCertificateTypeId(goods.getCertificateTypeId(),newTenantId));
+            }
+
+            //证书
+            if (ObjectUtils.isNotNull(goods.getCertificateId())){
+                goods.setCertificateId(getNewCertificateId(goods.getCertificateId(),newTenantId));
+            }
+
+            //证书模板
+            if (ObjectUtils.isNotNull(goods.getCertificateTpId())){
+                CertificateTp certificateTp = iCertificateTpService.getById(goods.getCertificateTpId());
+                if (ObjectUtils.isNotNull(certificateTp)){
+                    CertificateTp newCertificateTp =iCertificateTpService.getCertificateTpByTenant(certificateTp.getCode(),newTenantId);
+                    if (ObjectUtils.isNotNull(newCertificateTp)){
+                        goods.setCertificateTpId(newCertificateTp.getTpId());
+                    }else {
+                        certificateTp.setTpId(null);
+                        certificateTp.setTenantId(newTenantId);
+                        certificateTp.setCertificateId(getNewCertificateId(certificateTp.getCertificateId(),newTenantId));
+                        certificateTp.setTpId(getNewCertificateTypeId(certificateTp.getTpId(),newTenantId));
+                        iCertificateTpService.save(certificateTp);
+                        goods.setCertificateTpId(certificateTp.getTpId());
+                    }
+                }
+            }
+
+            //规格模板
+            if (ObjectUtils.isNotNull(goods.getSpecTemplateId())){
+
+            }
 
         }
         return false;
     }
 
+    private Long getNewCertificateId(Long certificateId,Long newTenantId){
+        CertificateCommon certificateCommon = iCertificateCommonService.getById(certificateId);
+        if (ObjectUtils.isNotNull(certificateCommon)){
+            CertificateCommon newCertificateCommon = iCertificateCommonService.getCertificateByTenant(certificateCommon.getCode(),newTenantId);
+            if (ObjectUtils.isNotNull(newCertificateCommon)){
+                return newCertificateCommon.getId();
+            }else {
+                certificateCommon.setId(null);
+                certificateCommon.setTenantId(newTenantId);
+                //证书类型
+                //证书类型
+                if (ObjectUtils.isNotNull(certificateCommon.getCertificateTypeId())){
+                    certificateCommon.setCertificateTypeId(getNewCertificateTypeId(certificateCommon.getCertificateTypeId(),newTenantId));
+                }
+                iCertificateCommonService.save(certificateCommon);
+                return certificateCommon.getId();
+            }
+        }
+        return null;
+    }
+
+    private Long getNewCertificateTypeId(Long certificateTypeId,Long newTenantId){
+        Certificate certificate = iCertificateService.getById(certificateTypeId);
+        if (ObjectUtils.isNotNull(certificate)){
+            Certificate newCertificate = iCertificateService.getCertificateByTenant(certificate.getCode(),newTenantId);
+            if (ObjectUtils.isNotNull(newCertificate)){
+                return newCertificate.getId();
+            }else {
+                certificate.setId(null);
+                certificate.setTenantId(newTenantId);
+                iCertificateService.save(certificate);
+                return certificate.getId();
+            }
+        }
+        return null;
+    }
+
+    private Long getNewEducationTypeId(Long oldEducationTypeId,Long newTenantId){
+        //教育类型
+        CourseEducationType educationType = iCourseEducationTypeService.getById(oldEducationTypeId);
+        if (ObjectUtils.isNull(educationType)){
+            return null;
+        }
+        CourseEducationType newEducationType = iCourseEducationTypeService.getEducationTypeBytenant(educationType.getEncoder(), newTenantId);
+        if (ObjectUtil.isNull(newEducationType)){
+            //新增教育类型
+            educationType.setId(null);
+            educationType.setTenantId(newTenantId);
+            iCourseEducationTypeService.save(educationType);
+            return educationType.getId();
+        }
+        return newEducationType.getId();
+    }
+
+    private Long getNewProjectTypeId(Long projectTypeId,Long newTenantId){
+        //项目类型
+        CourseProjectType project = iCourseProjectTypeService.getById(projectTypeId);
+        if (ObjectUtils.isNull(project)){
+            return null;
+        }
+        CourseProjectType newProject = iCourseProjectTypeService.getProjectByTenant(project.getEncoder(),newTenantId);
+        if (ObjectUtil.isNull(newProject)){
+            //新增项目类型
+            project.setId(null);
+            project.setTenantId(newTenantId);
+            //教育类型
+            Long newEducationTypeId = getNewEducationTypeId(project.getEducationId().longValue(), newTenantId);
+            project.setEducationId(newEducationTypeId.intValue());
+            iCourseProjectTypeService.save(project);
+
+            return project.getId();
+        }
+        return newProject.getId();
+    }
+
+    private Long getNewBusinessId(Long businessId,Long newTenantId){
+        //业务层次
+        CourseBusiness business = iCourseBusinessService.getById(businessId);
+        if (ObjectUtils.isNull(business)){
+            return null;
+        }
+        CourseBusiness newBusiness = iCourseBusinessService.getBusinessByTenant(business.getEncoder(),newTenantId);
+        if (ObjectUtil.isNull(newBusiness)){
+            //新增业务层次
+            business.setId(null);
+            business.setTenantId(newTenantId);
+            iCourseBusinessService.save(business);
+            return business.getId();
+        }
+        return newBusiness.getId();
+    }
+
+
+    private Long getNewSubjectId(Long subjectId,Long newTenantId){
+        //业务层次
+        CourseSubject courseSubject = iCourseSubjectService.getById(subjectId);
+        if (ObjectUtils.isNull(courseSubject)){
+            return null;
+        }
+        CourseSubject newCourseSubject = iCourseSubjectService.getSubjectByTenant(courseSubject.getEncoder(),newTenantId);
+        if (ObjectUtil.isNull(newCourseSubject)){
+            //业务项目关联
+            List<CourseSubjectProject> projectList = iCourseSubjectProjectService
+                            .list(new LambdaQueryWrapper<CourseSubjectProject>()
+                            .eq(CourseSubjectProject::getSubjectId, courseSubject.getId()));
+            //新增业务层次
+            courseSubject.setId(null);
+            courseSubject.setTenantId(newTenantId);
+            iCourseSubjectService.save(courseSubject);
+
+            if (CollectionUtils.isNotEmpty(projectList)){
+                List<CourseSubjectProject> collect = projectList.stream().map(item -> {
+                    item.setId(null);
+                    item.setSubjectId(courseSubject.getId());
+                    //项目ID
+                    Long newProjectTypeId = getNewProjectTypeId(item.getProjectId(), newTenantId);
+                    item.setProjectId(newProjectTypeId);
+                    item.setTenantId(newTenantId);
+                    return item;
+                }).collect(Collectors.toList());
+                iCourseSubjectProjectService.saveBatch(collect);
+            }
+            return courseSubject.getId();
+        }
+        return newCourseSubject.getId();
+    }
+
+
     @Override
     @Transactional(rollbackFor = Exception.class)
     public boolean goodsBatchCopyTenant(GoodsBatchCopyTenantBo bo) {

+ 5 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderBusinessConfigQueryBo.java

@@ -38,8 +38,12 @@ public class OrderBusinessConfigQueryBo extends BaseEntity {
 
 
 	/** 业务层次id */
-	@ApiModelProperty("业务层次id")
+	@ApiModelProperty("业务层次ID")
 	private Long businessId;
+	@ApiModelProperty("项目类型ID")
+	private Long projectId;
+	@ApiModelProperty("教育类型ID")
+	private Long educationId;
 	/** 配置名称 */
 	@ApiModelProperty("配置名称")
 	private String configName;

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/User.java

@@ -182,6 +182,8 @@ private static final long serialVersionUID=1L;
     /** 密码 */
     private String password;
 
+    private Long tenantId;
+
     /** 商品视频数 */
     @TableField(exist = false)
     private Long goodsCourseNum;

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/mapper/UserMapper.java

@@ -49,4 +49,7 @@ public interface UserMapper extends BaseMapper<User> {
 
     @InterceptorIgnore(tenantLine = "true")
     User queryUserByTelphoneTenant(@Param("telphone") String telphone,@Param("tenantId")Long tenantId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    List<User> getUserByTelNotTenant(@Param("telphone")String telphone);
 }

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/IUserService.java

@@ -118,4 +118,7 @@ public interface IUserService extends IService<User> {
 	User queryUserByTelphoneTenant(String telphone,Long tenantId);
 
 	Map<String, Object> telphone_login(UserAppTelphoneLoginBo bo);
+
+    List<User> getUserByTelNotTenant(String telphone);
+
 }

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/CertificateCommonMapper.xml

@@ -44,4 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
     </select>
 
+    <select id="getCertificateByTenant" parameterType="map" resultType="com.zhongzheng.modules.base.domain.CertificateCommon">
+        SELECT * from certificate_common where code = #{code} and tenant_id = #{newTenantId}
+    </select>
+
 </mapper>

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/CertificateMapper.xml

@@ -13,5 +13,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="code" column="code"/>
     </resultMap>
 
+    <select id="getCertificateByTenant" parameterType="map" resultType="com.zhongzheng.modules.base.domain.Certificate">
+        select * from certificate where code = #{code} and tenant_id = #{newTenantId}
+    </select>
 
 </mapper>

+ 3 - 0
zhongzheng-system/src/main/resources/mapper/modules/base/CertificateTpMapper.xml

@@ -58,6 +58,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND ct.certificate_id =#{certificateId}
         </if>
     </select>
+    <select id="getCertificateTpByTenant" parameterType="map" resultType="com.zhongzheng.modules.base.domain.CertificateTp">
+        select * from certificate_tp where code = #{code} and tenant_id = #{newTenantId}
+    </select>
 
 
 </mapper>

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseSubjectMapper.xml

@@ -129,4 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and cs.id != #{id}
         </if>
     </select>
+
+    <select id="getSubjectByTenant" parameterType="map"  resultType="com.zhongzheng.modules.course.domain.CourseSubject">
+        select * from course_subject where encoder = #{encoder} and tenant_id = #{newTenantId}
+    </select>
 </mapper>

+ 6 - 0
zhongzheng-system/src/main/resources/mapper/modules/order/OrderBusinessConfigMapper.xml

@@ -40,6 +40,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="businessId != null and businessId != ''">
             and obc.business_id = #{businessId}
         </if>
+        <if test="projectId != null and projectId != ''">
+            and cpt.id = #{projectId}
+        </if>
+        <if test="educationId != null and educationId != ''">
+            and cet.id = #{educationId}
+        </if>
     </select>
 
     <select id="getDetail" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigQueryBo" resultMap="OrderBusinessConfigVoResult">

+ 9 - 0
zhongzheng-system/src/main/resources/mapper/modules/user/UserMapper.xml

@@ -428,4 +428,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
           AND status = 1 AND tenant_id = #{tenantId}
     </select>
 
+    <select id="getUserByTelNotTenant" parameterType="java.lang.String" resultType="com.zhongzheng.modules.user.domain.User">
+        SELECT
+            *
+        FROM
+            `user`
+        WHERE
+            telphone = #{telphone} AND status = 1
+    </select>
+
 </mapper>