he2802 1 gadu atpakaļ
vecāks
revīzija
c0a7b30f16

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

@@ -193,6 +193,9 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
                 .eq(ObjectUtils.isNotNull(bo.getOrderGoodsId()),ClassGradeUser::getOrderGoodsId, bo.getOrderGoodsId())
                 .eq(ClassGradeUser::getGradeId,bo.getGradeId()).last("limit 1"));
         UserVo userVo = iUserService.queryById(bo.getUserId());
+        if(Validator.isEmpty(userVo.getRealname())){
+            throw new CustomException("生成证书姓名缺失");
+        }
         if(Validator.isNotEmpty(goodsVo.getMoreCertificateStatus())&&goodsVo.getMoreCertificateStatus()==1){
             //获取章列表
             List<CourseChapterVo> chapterList =  iClassGradeUserService.findChapterList(bo);