|
@@ -93,12 +93,14 @@ namespace GxPress.Service.Implement.Collection
|
|
|
UserId = request.UserId,
|
|
|
SourceUserId = request.SourceUserId,
|
|
|
EndCollectionDataId = request.CollectionDataId,
|
|
|
- EndCollectionType = request.CollectionType
|
|
|
+ EndCollectionType = request.CollectionType,
|
|
|
};
|
|
|
+ var resultJson = await StructCollectionData(request.CollectionDataId, request.CollectionType, request.SourceUserId);
|
|
|
+ collection.ResultJson = JsonConvert.SerializeObject(resultJson);
|
|
|
var query = new SqlKata.Query();
|
|
|
query.Where(nameof(Entity.Collection.UserId), request.UserId)
|
|
|
- .Where(nameof(Entity.Collection.CollectionType), request.CollectionType)
|
|
|
- .Where(nameof(Entity.Collection.CollectionDataId), request.CollectionDataId);
|
|
|
+ .Where(nameof(Entity.Collection.CollectionType), request.CollectionType)
|
|
|
+ .Where(nameof(Entity.Collection.CollectionDataId), request.CollectionDataId);
|
|
|
if (request.SourceUserId > 0)
|
|
|
query.Where(nameof(Entity.Collection.SourceUserId), request.SourceUserId);
|
|
|
//查询是否存在
|
|
@@ -247,6 +249,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
analyzeRequest.TypeValue = request.CollectionType;
|
|
|
await _analyzeService.SetAnalyzeAsync(analyzeRequest);
|
|
|
}
|
|
|
+
|
|
|
var collectionId = await _collectionRepository.InsertAsync(collection);
|
|
|
//添加收藏信息
|
|
|
var middleInsertTypeRequest = new MiddleInsertTypeRequest
|
|
@@ -565,7 +568,7 @@ namespace GxPress.Service.Implement.Collection
|
|
|
|
|
|
//通知
|
|
|
if (collectionType == GxPress.EnumConst.AllTypeConst.Notice.GetHashCode()
|
|
|
- || collectionType == GxPress.EnumConst.AllTypeConst.Missive.GetHashCode()
|
|
|
+ || collectionType == GxPress.EnumConst.AllTypeConst.Missive.GetHashCode()
|
|
|
|| collectionType == GxPress.EnumConst.AllTypeConst.Anonymity.GetHashCode())
|
|
|
{
|
|
|
var notice = await _noticeRepository.GetAsync(collectionDataId);
|