Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
dfc364ee
Commit
dfc364ee
authored
Mar 16, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息调整
parent
88f9e7d9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
174 additions
and
20 deletions
+174
-20
MiaiModule.cs
Mall.Module.Miai/MiaiModule.cs
+84
-18
CommerceConsultModule.cs
Mall.Module.TradePavilion/CommerceConsultModule.cs
+55
-0
Mall.Module.TradePavilion.csproj
Mall.Module.TradePavilion/Mall.Module.TradePavilion.csproj
+1
-0
UserModule.cs
Mall.Module.User/UserModule.cs
+0
-1
AppletMiaiController.cs
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
+34
-1
No files found.
Mall.Module.Miai/MiaiModule.cs
View file @
dfc364ee
...
...
@@ -232,7 +232,7 @@ namespace Mall.Module.Miai
if
(
list
.
Any
())
{
//每种类型 额外返回数据
//
拼拼活动
#
region
拼拼活动
var
activityList
=
list
.
Where
(
x
=>
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellEnroll
||
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellEnrollCancel
||
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellComment
||
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellReply
).
ToList
();
List
<
RB_Miai_Activity_Extend
>
ActivityList
=
new
List
<
RB_Miai_Activity_Extend
>();
...
...
@@ -240,18 +240,27 @@ namespace Mall.Module.Miai
string
ActivityIds
=
string
.
Join
(
","
,
activityList
.
Select
(
x
=>
x
.
SourceId
).
Distinct
());
ActivityList
=
miai_ActivityRepository
.
GetList
(
new
RB_Miai_Activity_Extend
()
{
TenantId
=
demodel
.
TenantId
,
ActivityIds
=
ActivityIds
});
}
//星球活动
#
endregion
#
region
星球活动
var
commerceList
=
list
.
Where
(
x
=>
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
ActivityCancel
).
ToList
();
List
<
Model
.
Extend
.
TradePavilion
.
RB_Commerce_Activity_Extend
>
CommerceList
=
new
List
<
Model
.
Extend
.
TradePavilion
.
RB_Commerce_Activity_Extend
>();
if
(
commerceList
.
Any
())
{
string
ActivityIds
=
string
.
Join
(
","
,
commerceList
.
Select
(
x
=>
x
.
SourceId
).
Distinct
());
CommerceList
=
commerce_ActivityRepository
.
GetList
(
new
Model
.
Extend
.
TradePavilion
.
RB_Commerce_Activity_Extend
()
{
TenantId
=
demodel
.
TenantId
,
ActivityIds
=
ActivityIds
});
}
//圈子
#
endregion
#
region
圈子
var
circleList
=
list
.
Where
(
x
=>
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
CircleLike
||
x
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
CircleReply
).
ToList
();
List
<
Model
.
Extend
.
Education
.
Rb_Education_Dynamic_Extend
>
CircleList
=
new
List
<
Model
.
Extend
.
Education
.
Rb_Education_Dynamic_Extend
>();
if
(
circleList
.
Any
())
{
//education_DynamicRepository
string
CircleIds
=
string
.
Join
(
","
,
circleList
.
Select
(
x
=>
x
.
SourceId
).
Distinct
());
CircleList
=
education_DynamicRepository
.
GetMiAiAllDynamicList
(
new
Model
.
Extend
.
Education
.
Rb_Education_Dynamic_Extend
()
{
TenantId
=
demodel
.
TenantId
,
Ids
=
CircleIds
});
}
#
endregion
#
region
查询创建人
string
UserIds
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
CreateBy
).
Distinct
());
var
blist
=
miai_BaseInfoRepository
.
GetFirstBaseInfoList
(
new
RB_MiAi_BaseInfo_Extend
()
{
TenantId
=
demodel
.
TenantId
,
UserIds
=
UserIds
});
#
endregion
foreach
(
var
item
in
list
)
{
if
(
item
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellEnroll
||
item
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellEnrollCancel
||
item
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellComment
||
item
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellReply
)
{
...
...
@@ -260,6 +269,9 @@ namespace Mall.Module.Miai
x
.
Id
,
x
.
ActivityTitle
,
x
.
Label
,
x
.
UserName
,
x
.
Photo
,
x
.
Sex
,
ImageList
=
!
string
.
IsNullOrEmpty
(
x
.
Images
)
&&
x
.
Images
!=
"[]"
?
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
x
.
Images
)
:
new
List
<
string
>()
});
}
...
...
@@ -272,6 +284,26 @@ namespace Mall.Module.Miai
x
.
CoverImg
});
}
if
(
item
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
CircleLike
||
item
.
Type
==
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
CircleReply
)
{
item
.
ReplyContent
=
CircleList
.
Where
(
x
=>
x
.
Id
==
item
.
SourceId
).
Select
(
x
=>
new
{
x
.
Id
,
x
.
Content
,
x
.
Files
,
x
.
CreateTime
,
x
.
CoverPhoto
,
x
.
FileType
,
x
.
Seconds
,
x
.
CreateByName
,
x
.
CrearteByPhoto
});
}
var
bmodel
=
blist
.
Where
(
x
=>
x
.
UserId
==
(
demodel
.
VsisitorType
==
1
?
item
.
CreateBy
:
item
.
UserId
)).
FirstOrDefault
();
item
.
Name
=
bmodel
?.
Name
??
""
;
item
.
RealName
=
bmodel
?.
RealName
??
""
;
item
.
Photo
=
bmodel
?.
Photo
??
""
;
item
.
Sex
=
bmodel
?.
Sex
??
0
;
}
}
return
list
;
...
...
@@ -829,21 +861,55 @@ namespace Mall.Module.Miai
var
model
=
miai_ActivityRepository
.
GetEntity
(
demodel
.
ActivityId
);
if
(
model
!=
null
&&
model
.
UserId
!=
demodel
.
UserId
)
{
//设置消息推送
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
if
(
demodel
.
ReplyUserId
==
0
)
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellComment
,
UserId
=
model
.
UserId
,
SourceId
=
demodel
.
ActivityId
,
Content
=
"用户评论拼拼plus帖子"
,
Status
=
0
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
CreateBy
=
demodel
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
//设置消息推送
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellComment
,
UserId
=
model
.
UserId
,
SourceId
=
demodel
.
ActivityId
,
Content
=
demodel
.
Content
,
Status
=
0
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
CreateBy
=
demodel
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
}
else
{
//设置消息推送
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellReply
,
UserId
=
model
.
UserId
,
SourceId
=
demodel
.
ActivityId
,
Content
=
demodel
.
Content
,
Status
=
0
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
CreateBy
=
demodel
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
SpellReply
,
UserId
=
demodel
.
ReplyUserId
,
SourceId
=
demodel
.
ActivityId
,
Content
=
demodel
.
Content
,
Status
=
0
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
CreateBy
=
demodel
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
}
}
}
return
flag
;
...
...
Mall.Module.TradePavilion/CommerceConsultModule.cs
View file @
dfc364ee
...
...
@@ -8,6 +8,7 @@ using System.Collections.Generic;
using
System.Text
;
using
System.Linq
;
using
VT.FW.DB
;
using
Mall.Module.Miai
;
namespace
Mall.Module.TradePavilion
{
...
...
@@ -32,6 +33,11 @@ namespace Mall.Module.TradePavilion
/// 用户
/// </summary>
private
readonly
RB_Member_UserRepository
member_UserRepository
=
new
RB_Member_UserRepository
();
/// <summary>
/// 相亲公用
/// </summary>
private
readonly
MiaiCommonModule
miaiCommonModule
=
new
MiaiCommonModule
();
/// <summary>
/// 获取商会活动报名分页列表
...
...
@@ -185,6 +191,23 @@ namespace Mall.Module.TradePavilion
{
nameof
(
RB_Commerce_Consult_Extend
.
Status
),
Status
},
};
bool
flag
=
consultRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Commerce_Consult_Extend
.
Id
),
Id
));
if
(
flag
)
{
var
model
=
consultRepository
.
GetEntity
(
Id
);
miaiCommonModule
.
SetMessage
(
new
Model
.
Extend
.
Miai
.
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
ActivityCancel
,
UserId
=
0
,
SourceId
=
model
.
ActivityId
,
Content
=
"取消用户活动报名"
,
Status
=
0
,
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CreateBy
=
0
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
}
return
flag
;
}
...
...
@@ -255,6 +278,22 @@ namespace Mall.Module.TradePavilion
Remarks
=
"取消活动报名,退回使用点数:"
+
cmodel
.
Money
,
});
}
if
(
flag
)
{
miaiCommonModule
.
SetMessage
(
new
Model
.
Extend
.
Miai
.
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
ActivityCancel
,
UserId
=
userId
,
SourceId
=
activityId
,
Content
=
"用户取消活动报名"
,
Status
=
0
,
TenantId
=
amodel
.
TenantId
,
MallBaseId
=
amodel
.
MallBaseId
,
CreateBy
=
userId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
}
}
return
flag
;
}
...
...
@@ -315,6 +354,22 @@ namespace Mall.Module.TradePavilion
Remarks
=
"取消活动报名,退回使用点数:"
+
model
.
Money
,
});
}
if
(
Status
==
1
)
{
miaiCommonModule
.
SetMessage
(
new
Model
.
Extend
.
Miai
.
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
ActivityCancel
,
UserId
=
model
.
UserId
,
SourceId
=
model
.
ActivityId
,
Content
=
"同意取消活动报名"
,
Status
=
0
,
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
CreateBy
=
0
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
}
}
return
flag
;
}
...
...
Mall.Module.TradePavilion/Mall.Module.TradePavilion.csproj
View file @
dfc364ee
...
...
@@ -6,6 +6,7 @@
<ItemGroup>
<ProjectReference Include="..\Mall.Model\Mall.Model.csproj" />
<ProjectReference Include="..\Mall.Module.Miai\Mall.Module.Miai.csproj" />
<ProjectReference Include="..\Mall.Repository\Mall.Repository.csproj" />
</ItemGroup>
...
...
Mall.Module.User/UserModule.cs
View file @
dfc364ee
...
...
@@ -4631,7 +4631,6 @@ namespace Mall.Module.User
//2021-02-25 add by :w
var
oldBaseInfo
=
miai_BaseInfoRepository
.
GetBaseInfoList
(
new
Model
.
Extend
.
Miai
.
RB_MiAi_BaseInfo_Extend
{
UserId
=
umodel
.
Id
,
TenantId
=
umodel
.
TenantId
,
MallBaseId
=
umodel
.
MallBaseId
}).
FirstOrDefault
();
//var oldFollowList = miai_FollowMemberRepository.GetFollowMemberList(new Model.Extend.Miai.RB_MiAi_FollowMember_Extend { Status =0, UserId = umodel.Id, MallBaseId = umodel.MallBaseId, TenantId = umodel.TenantId });//我的粉丝
var
myFollowList
=
miai_FollowMemberRepository
.
GetFollowMemberList
(
new
Model
.
Extend
.
Miai
.
RB_MiAi_FollowMember_Extend
{
Status
=
0
,
CreateBy
=
umodel
.
Id
,
MallBaseId
=
umodel
.
MallBaseId
,
TenantId
=
umodel
.
TenantId
});
//我的关注
...
...
Mall.WebApi/Controllers/Miai/AppletMiaiController.cs
View file @
dfc364ee
...
...
@@ -193,6 +193,20 @@ namespace Mall.WebApi.Controllers.MallBase
programMsgModule
.
UpdateUserBlacklist
(
userInfo
.
TenantId
,
userInfo
.
MallBaseId
,
userInfo
.
UserId
);
}
programMsgModule
.
SetEducationViolationLog
(
new
RB_Education_ViolationLog
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
UserId
=
userInfo
.
UserId
,
ViolationType
=
3
,
CreateDate
=
System
.
DateTime
.
Now
});
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
ViolationNotice
,
UserId
=
userInfo
.
UserId
,
SourceId
=
0
,
Content
=
"拼拼Plus发帖内容存在违规,若多次发布违规内容将被拉黑"
,
Status
=
0
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
CreateBy
=
userInfo
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
return
ApiResult
.
Failed
(
"评论存在违规内容,若多次发布违规内容将被拉黑"
);
}
}
...
...
@@ -380,6 +394,20 @@ namespace Mall.WebApi.Controllers.MallBase
programMsgModule
.
UpdateUserBlacklist
(
userInfo
.
TenantId
,
userInfo
.
MallBaseId
,
userInfo
.
UserId
);
}
programMsgModule
.
SetEducationViolationLog
(
new
RB_Education_ViolationLog
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
UserId
=
userInfo
.
UserId
,
ViolationType
=
3
,
CreateDate
=
System
.
DateTime
.
Now
});
miaiCommonModule
.
SetMessage
(
new
RB_Miai_Message_Extend
()
{
Id
=
0
,
Type
=
Common
.
Enum
.
MiAi
.
MessageTypeEnum
.
ViolationNotice
,
UserId
=
userInfo
.
UserId
,
SourceId
=
0
,
Content
=
"拼拼Puls评论内容存在违规,若多次发布违规内容将被拉黑"
,
Status
=
0
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
CreateBy
=
userInfo
.
UserId
,
CreateDate
=
DateTime
.
Now
,
UpdateDate
=
DateTime
.
Now
});
return
ApiResult
.
Failed
(
"评论存在违规内容,若多次发布违规内容将被拉黑"
);
}
}
...
...
@@ -611,7 +639,12 @@ namespace Mall.WebApi.Controllers.MallBase
TypeName
=
x
.
Type
.
GetEnumName
(),
x
.
SourceId
,
x
.
Content
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
x
.
Name
,
x
.
RealName
,
x
.
Photo
,
x
.
Sex
,
x
.
ReplyContent
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:mm"
)
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment