|
@@ -219,7 +219,7 @@ public class WorkKnowledgeBaseReadLikeService extends CrudService<WorkKnowledgeB
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 首次阅读时给创建人发放积分
|
|
|
|
|
|
|
+ * 首次阅读时给阅读人发放积分
|
|
|
*/
|
|
*/
|
|
|
private void grantPointsForFirstRead(String fileId, String readerUserId) {
|
|
private void grantPointsForFirstRead(String fileId, String readerUserId) {
|
|
|
try {
|
|
try {
|
|
@@ -258,8 +258,8 @@ public class WorkKnowledgeBaseReadLikeService extends CrudService<WorkKnowledgeB
|
|
|
if (rule != null && rule.getPointValue() != null) {
|
|
if (rule != null && rule.getPointValue() != null) {
|
|
|
int pointValue = Integer.parseInt(rule.getPointValue());
|
|
int pointValue = Integer.parseInt(rule.getPointValue());
|
|
|
if (pointValue > 0) {
|
|
if (pointValue > 0) {
|
|
|
- // 插入积分明细(change_type=3 表示阅读积分)
|
|
|
|
|
- insertPointDetail(ownerUserId, fileId, 3, categoryId, rule.getId(), pointValue);
|
|
|
|
|
|
|
+ // 插入积分明细(change_type=3 表示阅读积分),给阅读人发放积分
|
|
|
|
|
+ insertPointDetail(readerUserId, fileId, 3, categoryId, rule.getId(), pointValue);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
@@ -269,7 +269,7 @@ public class WorkKnowledgeBaseReadLikeService extends CrudService<WorkKnowledgeB
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
- * 首次点赞时给创建人发放积分
|
|
|
|
|
|
|
+ * 首次点赞时给点赞人发放积分
|
|
|
*/
|
|
*/
|
|
|
private void grantPointsForFirstLike(String fileId, String likerUserId) {
|
|
private void grantPointsForFirstLike(String fileId, String likerUserId) {
|
|
|
try {
|
|
try {
|
|
@@ -308,8 +308,8 @@ public class WorkKnowledgeBaseReadLikeService extends CrudService<WorkKnowledgeB
|
|
|
if (rule != null && rule.getPointValue() != null) {
|
|
if (rule != null && rule.getPointValue() != null) {
|
|
|
int pointValue = Integer.parseInt(rule.getPointValue());
|
|
int pointValue = Integer.parseInt(rule.getPointValue());
|
|
|
if (pointValue > 0) {
|
|
if (pointValue > 0) {
|
|
|
- // 插入积分明细(change_type=4 表示点赞积分)
|
|
|
|
|
- insertPointDetail(ownerUserId, fileId, 4, categoryId, rule.getId(), pointValue);
|
|
|
|
|
|
|
+ // 插入积分明细(change_type=4 表示点赞积分),给点赞人发放积分
|
|
|
|
|
+ insertPointDetail(likerUserId, fileId, 4, categoryId, rule.getId(), pointValue);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|