|
@@ -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(){
|