he2802 hai 1 ano
pai
achega
1190b99bab

+ 1 - 1
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -77,7 +77,7 @@ aliyun:
         policy:
             expire: 30 # 签名有效期(S)
         maxSize: 100 # 上传文件大小(M)
-        callback: http://120.79.166.78:19004/aliyun/oss/callback # 文件上传成功后的回调地址
+        callback: http://120.79.166.78:19013/aliyun/oss/callback # 文件上传成功后的回调地址
         dir:
             prefix: oss/images/ # 上传文件夹路径前缀 `
 

+ 1 - 1
zhongzheng-api/src/main/resources/application-dev.yml

@@ -77,7 +77,7 @@ aliyun:
         policy:
             expire: 30 # 签名有效期(S)
         maxSize: 100 # 上传文件大小(M)
-        callback: http://120.79.166.78:19004/aliyun/oss/callback # 文件上传成功后的回调地址
+        callback: http://120.79.166.78:19012/aliyun/oss/callback # 文件上传成功后的回调地址
         dir:
             prefix: oss/images/ # 上传文件夹路径前缀 `
 poliv:

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

@@ -45,6 +45,8 @@ public interface ICertificateTpService extends IService<CertificateTp> {
 
 	String makeCertificatePhoto(ClassGradeUserQueryBo bo);
 
+	String makeBatchCertificatePhoto(ClassGradeUserQueryBo bo);
+
 	List<CertificateTpVo> selectListByBo(CertificateTpQueryBo bo);
 
 	/**

+ 24 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/base/service/impl/CertificateTpServiceImpl.java

@@ -43,14 +43,19 @@ import com.zhongzheng.modules.goods.vo.GoodsVo;
 import com.zhongzheng.modules.grade.bo.ClassGradeUserQueryBo;
 import com.zhongzheng.modules.grade.domain.ClassGradeUser;
 import com.zhongzheng.modules.grade.service.IClassGradeUserService;
+import com.zhongzheng.modules.grade.service.impl.ClassGradeServiceImpl;
+import com.zhongzheng.modules.system.domain.SysOldOrg;
 import com.zhongzheng.modules.user.bo.UserCertificateAddBo;
 import com.zhongzheng.modules.user.bo.UserStudyRecordQueryBo;
+import com.zhongzheng.modules.user.domain.UserCertificate;
 import com.zhongzheng.modules.user.service.IUserCertificateService;
 import com.zhongzheng.modules.user.service.IUserService;
 import com.zhongzheng.modules.user.service.IUserStudyRecordService;
 import com.zhongzheng.modules.user.vo.UserStudyRecordVo;
 import com.zhongzheng.modules.user.vo.UserVo;
 import org.apache.commons.lang3.ArrayUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
@@ -76,6 +81,8 @@ import java.util.stream.Collectors;
 @Service
 public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, CertificateTp> implements ICertificateTpService {
 
+    private static Logger log = LoggerFactory.getLogger(CertificateTpServiceImpl.class);
+
     @Autowired
     private IGoodsService iGoodsService;
     @Autowired
@@ -179,6 +186,13 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         if(Validator.isEmpty(bo.getUserId())||Validator.isEmpty(bo.getGradeId())||Validator.isEmpty(bo.getGoodsId())){
             throw new CustomException("数据错误");
         }
+        UserCertificate userCertificate = iUserCertificateService.getOne(new LambdaQueryWrapper<UserCertificate>()
+                .eq(UserCertificate::getUserId, bo.getUserId())
+                .eq(UserCertificate::getGradeId,bo.getGradeId()).last("limit 1"));
+        if(Validator.isNotEmpty(userCertificate)){
+            log.info("已存在证书" + bo.getUserId()+"-"+bo.getGradeId(), "");
+            return null;
+        }
         bo.setPageSize(null);
         bo.setPageNum(null);
         GoodsVo goodsVo = iGoodsService.selectDetail(bo.getGoodsId());
@@ -260,9 +274,17 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
                     }
                 }
             }
-
         }
+        return null;
+    }
 
+    @Override
+    public String makeBatchCertificatePhoto(ClassGradeUserQueryBo bo) {
+        List<ClassGradeUser> list = iClassGradeUserService.list(new LambdaQueryWrapper<ClassGradeUser>()
+                .eq(ClassGradeUser::getPeriodStatus, 1).ge(ClassGradeUser::getCreateTime,bo.getCreateTime()));
+        for(ClassGradeUser gradeUser : list){
+            
+        }
         return null;
     }
 
@@ -614,6 +636,7 @@ public class CertificateTpServiceImpl extends ServiceImpl<CertificateTpMapper, C
         addBo.setMoreCertificateStatus(goodsVo.getMoreCertificateStatus());
         addBo.setModuleId(moduleId);
         addBo.setPublicClassHours(goodsVo.getPublicClassHours().setScale( 0, BigDecimal.ROUND_HALF_UP ));
+        addBo.setOrderGoodsId(bo.getOrderGoodsId());
         return addBo;
     }
     private String getCertificateCode(){

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -3528,6 +3528,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     }
 
 
+
+
     /**
      * 实体类转化成视图对象
      *

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserCertificateAddBo.java

@@ -89,4 +89,6 @@ public class UserCertificateAddBo {
     @ApiModelProperty("公共学时")
     private BigDecimal publicClassHours;
 
+    private Long orderGoodsId;
+
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/domain/UserCertificate.java

@@ -75,4 +75,5 @@ private static final long serialVersionUID=1L;
 
     private BigDecimal publicClassHours;
 
+    private Long orderGoodsId;
 }