记得上下班打卡 | git大法好,push需谨慎

Commit d3aeaf7f authored by wangyifan's avatar wangyifan

Merge branch 'master' into dev-caomeihuzhao-V1.1

parents 00f57842 cb5c38b4
......@@ -104,4 +104,7 @@ public interface AdamCaomeiBadgeMapper extends BaseMapper<AdamCaomeiBadge> {
"values (#{userId}, #{badgeId}, #{source}, now())"
})
int insertUserBadge(@Param("userId") String userId, @Param("badgeId") String badgeId, @Param("source") Integer source);
@Select("select title from kylin_performances where performances_id = #{performanceId}")
String selectKylinPerformanceTitleById(@Param("performanceId") String performanceId);
}
......@@ -67,7 +67,7 @@
IFNULL(b.icon, '') AS icon,
IFNULL(b.share_text, '') AS shareText,
IFNULL(b.type, 0) AS type,
IFNULL(b.performance_id, '') AS performanceId,
performance_id AS performanceId,
ub.created_at AS claimedAt,
ub.source AS source
FROM adam_caomei_user_badge ub
......
......@@ -812,6 +812,11 @@ public class AdamRdmService {
if (vo != null) {
return vo.getTitle();
}
// 从数据库查询
String title = adamCaomeiBadgeMapper.selectKylinPerformanceTitleById(performanceId);
if (!StringUtils.isEmpty(title)) {
return title;
}
return null;
} catch (Exception e) {
log.warn("[getPerformanceTitleById] 读取演出缓存失败, performanceId: {}", performanceId, e);
......
......@@ -230,6 +230,8 @@ public class AdamCaomeiBadgeUserServiceImpl implements IAdamCaomeiBadgeUserServi
dto.setType(badge.getType());
dto.setClaimedAt(now);
dto.setSource(source);
dto.setSubTitle(badge.getSubTitle());
dto.setPerformanceId(StringUtils.defaultString(badge.getPerformanceId()));
adamRdmService.addUserCaomeiBadgeDtoByUid(uid, badgeVos, dto);
......
......@@ -130,6 +130,7 @@ public class AdamCaomeiPassportUserServiceImpl implements IAdamCaomeiPassportUse
dto.setType(b.getType());
dto.setClaimedAt(grantAt);
dto.setSource(1);
dto.setSubTitle(b.getSubTitle());
return dto;
})
.collect(Collectors.toList());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment