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
15cbfc16
Commit
15cbfc16
authored
Oct 28, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
d7ee7a30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
11 deletions
+17
-11
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+14
-8
RB_MiAi_BaseInfoRepository.cs
Mall.Repository/Miai/RB_MiAi_BaseInfoRepository.cs
+3
-3
No files found.
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
15cbfc16
...
...
@@ -3,7 +3,9 @@ using System.Collections.Generic;
using
System.Linq
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Model.Extend.User
;
using
Mall.Repository.MarketingCenter
;
using
Mall.Repository.User
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
using
VT.FW.DB
;
...
...
@@ -21,6 +23,8 @@ namespace Mall.Module.MarketingCenter
private
readonly
RB_Miniprogram_TemplateRepository
miniprogram_TemplateRepository
=
new
RB_Miniprogram_TemplateRepository
();
private
readonly
Repository
.
Miai
.
RB_MiAi_BaseInfoRepository
miai_BaseInfoRepository
=
new
Repository
.
Miai
.
RB_MiAi_BaseInfoRepository
();
private
readonly
Repository
.
Miai
.
RB_MiAi_BaseInfoQueryRepository
miai_BaseInfoQueryRepository
=
new
Repository
.
Miai
.
RB_MiAi_BaseInfoQueryRepository
();
/// <summary>
/// 小程序模板分页列表
/// </summary>
...
...
@@ -643,8 +647,11 @@ namespace Mall.Module.MarketingCenter
miaiUserItem
.
list
=
driveData
.
list
;
int
Sex
=
0
;
int
Age
=
0
;
string
userGroupIds
=
""
;
//用户所在的分组
if
(
UserId
>
0
)
//说明用户登录了的
{
var
userInfo
=
new
RB_Member_UserRepository
().
GetMemberUserEntityRepository
(
new
RB_Member_User_Extend
()
{
Id
=
UserId
});
userGroupIds
=
userInfo
?.
BelongGroupIds
;
//查看用户的
var
baseInfo
=
miai_BaseInfoRepository
.
GetBaseInfoList
(
new
Model
.
Extend
.
Miai
.
RB_MiAi_BaseInfo_Extend
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
UserId
=
UserId
}).
FirstOrDefault
();
if
(
baseInfo
!=
null
)
...
...
@@ -681,7 +688,8 @@ namespace Mall.Module.MarketingCenter
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
UserIds
=
Ids
,
UserId
=
UserId
UserId
=
UserId
,
UserGroupIds
=
userGroupIds
,
});
List
<
miaiUserDetail
>
newGoodsList
=
new
List
<
miaiUserDetail
>();
foreach
(
var
goodItem
in
miaiUserItem
.
list
)
...
...
@@ -716,10 +724,9 @@ namespace Mall.Module.MarketingCenter
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
UserId
=
UserId
,
Sex
=
Sex
Sex
=
Sex
,
UserGroupIds
=
userGroupIds
,
};
if
(
Sex
>
0
)
{
var
queryBaseInfoModel
=
miai_BaseInfoQueryRepository
.
GetBaseInfoQueryList
(
new
Model
.
Entity
.
Miai
.
RB_MiAi_BaseInfoQuery
...
...
@@ -752,7 +759,6 @@ namespace Mall.Module.MarketingCenter
foreach
(
var
tempGood
in
tempGoodsList
)
{
var
lastItem
=
new
miaiUserDetail
();
// var tempGood = tempGoodsList?.Where(qitem => qitem.UserId == goodItem.id)?.FirstOrDefault();
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
lastItem
.
id
=
tempGood
.
UserId
;
...
...
@@ -783,6 +789,7 @@ namespace Mall.Module.MarketingCenter
Sort
=
2
,
Sex
=
Sex
,
UserId
=
UserId
,
UserGroupIds
=
userGroupIds
,
FollowRate
=
miaiUserItem
.
FollowRate
==
0
?
1
:
miaiUserItem
.
FollowRate
,
BrowseRate
=
miaiUserItem
.
BrowseRate
==
0
?
1
:
miaiUserItem
.
BrowseRate
,
});
...
...
@@ -821,13 +828,13 @@ namespace Mall.Module.MarketingCenter
MallBaseId
=
MallBaseId
,
Sort
=
3
,
Sex
=
Sex
,
UserId
=
UserId
UserId
=
UserId
,
UserGroupIds
=
userGroupIds
,
});
List
<
miaiUserDetail
>
newGoodsList
=
new
List
<
miaiUserDetail
>();
foreach
(
var
tempGood
in
tempGoodsList
)
{
var
lastItem
=
new
miaiUserDetail
();
// var tempGood = tempGoodsList?.Where(qitem => qitem.UserId == goodItem.id)?.FirstOrDefault();
if
(
tempGood
!=
null
&&
tempGood
.
Id
>
0
)
{
lastItem
.
id
=
tempGood
.
UserId
;
...
...
@@ -848,7 +855,6 @@ namespace Mall.Module.MarketingCenter
}
miaiUserItem
.
list
=
newGoodsList
;
}
}
else
{
...
...
Mall.Repository/Miai/RB_MiAi_BaseInfoRepository.cs
View file @
15cbfc16
...
...
@@ -283,7 +283,7 @@ WHERE a.Status=0 and b.Blacklist!=1 ");
{
tempStr
+=
" OR "
;
}
tempStr
+=
string
.
Join
(
" FIND_IN_SET('{0}',b.BelongGroupIds) "
,
groupIdList
[
i
]);
tempStr
+=
string
.
Format
(
" FIND_IN_SET('{0}',b.BelongGroupIds) "
,
groupIdList
[
i
]);
}
if
(!
string
.
IsNullOrEmpty
(
tempStr
))
{
...
...
@@ -370,7 +370,7 @@ WHERE a.Status=0 AND b.Blacklist!=1 ");
{
tempStr
+=
" OR "
;
}
tempStr
+=
string
.
Join
(
" FIND_IN_SET('{0}',b.BelongGroupIds) "
,
groupIdList
[
i
]);
tempStr
+=
string
.
Format
(
" FIND_IN_SET('{0}',b.BelongGroupIds) "
,
groupIdList
[
i
]);
}
if
(!
string
.
IsNullOrEmpty
(
tempStr
))
{
...
...
@@ -465,7 +465,7 @@ WHERE 1=1");
{
tempStr
+=
" OR "
;
}
tempStr
+=
string
.
Join
(
"
FIND_IN_SET('{0}',a.BelongGroupIds) "
,
groupIdList
[
i
]);
tempStr
+=
string
.
Format
(
"
FIND_IN_SET('{0}',a.BelongGroupIds) "
,
groupIdList
[
i
]);
}
if
(!
string
.
IsNullOrEmpty
(
tempStr
))
{
...
...
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