修改了外链证书的问题

This commit is contained in:
wucongxing8150 2025-08-29 13:12:06 +08:00
parent d8e89ca0d7
commit 6a2742d539
8 changed files with 56 additions and 37 deletions

View File

@ -106,6 +106,7 @@ public class ClinicalController extends BaseController {
request.getHospitalId(),
request.getDoctorId(),
request.getLabelIden(),
request.getIsNeedLink(),
request.handleOrder()
);
@ -195,6 +196,7 @@ public class ClinicalController extends BaseController {
request.getHospitalId(),
request.getDoctorId(),
request.getLabelIden(),
request.getIsNeedLink(),
request.handleOrder()
);

View File

@ -27,6 +27,7 @@ public interface CaseClinicalArticleDao extends BaseMapper<CaseClinicalArticleMo
@Param("hospitalId") String hospitalId,
@Param("doctorId") String doctorId,
@Param("labelIden") String labelIden,
@Param("isNeedLink") Integer isNeedLink,
@Param("order") Map<String, String> order
);

View File

@ -29,6 +29,7 @@ public interface CaseClinicalVideoDao extends BaseMapper<CaseClinicalVideoModel>
@Param("hospitalId") String hospitalId,
@Param("doctorId") String doctorId,
@Param("labelIden") String labelIden,
@Param("isNeedLink") Integer isNeedLink,
@Param("order") Map<String, String> order
);

View File

@ -41,6 +41,9 @@ public class getClinicalArticleSearchPage {
@JsonProperty("is_need_num")
private Integer isNeedNum = 0;
// 是否需要外部链接0: 1:
@JsonProperty("is_need_link")
private Integer isNeedLink = 1;
// 排序字段
private OrderRequest order;

View File

@ -41,6 +41,10 @@ public class getClinicalVideoSearchPage {
@JsonProperty("is_need_num")
private Integer isNeedNum = 0;
// 是否需要外部链接0: 1:
@JsonProperty("is_need_link")
private Integer isNeedLink = 1;
// 排序字段
private OrderRequest order;

View File

@ -919,51 +919,53 @@ public class CaseClinicalVideoService {
// 增加需要增加的医院数据
addHospitalSet.add(String.valueOf(caseClinicalDoctor.getHospitalId()));
// 生成用户证书-文章/视频
if (qrCodeByte == null || qrCodeByte.length == 0) {
// 生成二维码图片
if (caseClinicalVideo.getShareQrcode() == null){
try {
// 生成用户分享二维码-文章/视频
qrCodeByte = userService.CreateUserCaseClinicalUnlimitedQrcode(String.valueOf(caseClinicalVideo.getVideoId()),2);
} catch (Exception e) {
// 不处理
throw new BusinessException("-1", "无法完成此操作1");
if (caseClinicalVideo.getIsLink() != 1){
// 生成用户证书-文章/视频
if (qrCodeByte == null || qrCodeByte.length == 0) {
// 生成二维码图片
if (caseClinicalVideo.getShareQrcode() == null){
try {
// 生成用户分享二维码-文章/视频
qrCodeByte = userService.CreateUserCaseClinicalUnlimitedQrcode(String.valueOf(caseClinicalVideo.getVideoId()),2);
} catch (Exception e) {
// 不处理
throw new BusinessException("-1", "无法完成此操作1");
}
}else{
// 下载二维码图片
qrCodeByte = Oss.getObjectToByte(caseClinicalVideo.getShareQrcode().replaceFirst("^/+", ""));
if (qrCodeByte == null) {
throw new BusinessException("-1", "无法完成此操作2");
}
}
}
// 下载头像
byte[] avatarByte = new byte[0];
if (caseClinicalDoctor.getAvatar() != null && !caseClinicalDoctor.getAvatar().isEmpty()) {
avatarByte = Oss.getObjectToByte(caseClinicalDoctor.getAvatar().replaceFirst("^/+", ""));
}else{
// 下载二维码图片
qrCodeByte = Oss.getObjectToByte(caseClinicalVideo.getShareQrcode().replaceFirst("^/+", ""));
if (qrCodeByte == null) {
throw new BusinessException("-1", "无法完成此操作2");
try {
avatarByte = ImageUtil.readImageToBytes("static/cert/avatar.png");
} catch (Exception e) {
throw new BusinessException("-1", e.getMessage());
}
}
}
// 下载头像
byte[] avatarByte = new byte[0];
if (caseClinicalDoctor.getAvatar() != null && !caseClinicalDoctor.getAvatar().isEmpty()) {
avatarByte = Oss.getObjectToByte(caseClinicalDoctor.getAvatar().replaceFirst("^/+", ""));
}else{
try {
avatarByte = ImageUtil.readImageToBytes("static/cert/avatar.png");
} catch (Exception e) {
throw new BusinessException("-1", e.getMessage());
if (avatarByte == null) {
throw new BusinessException("-1", "无法完成此操作");
}
}
if (avatarByte == null) {
throw new BusinessException("-1", "无法完成此操作");
userService.CreateUserCert(
String.valueOf(caseClinicalVideo.getVideoId()),
2,
String.valueOf(caseClinicalDoctor.getDoctorId()),
qrCodeByte,
avatarByte
);
}
userService.CreateUserCert(
String.valueOf(caseClinicalVideo.getVideoId()),
2,
String.valueOf(caseClinicalDoctor.getDoctorId()),
qrCodeByte,
avatarByte
);
}
if (!addHospitalSet.isEmpty()){

View File

@ -77,6 +77,9 @@
<if test="labelIden != null and labelIden != ''">
AND l.app_iden = #{labelIden}
</if>
<if test="isNeedLink == 0">
AND l.is_link = 0
</if>
) AS result
JOIN case_clinical_article a ON a.article_id = result.article_id
<if test="order != null and !order.isEmpty()">

View File

@ -45,6 +45,9 @@
<if test="labelIden != null and labelIden != ''">
AND l.app_iden = #{labelIden}
</if>
<if test="isNeedLink == 0">
AND l.is_link = 0
</if>
<if test="order != null and !order.isEmpty()">
ORDER BY
<foreach item="entry" index="key" collection="order" separator=",">