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
47678d51
Commit
47678d51
authored
Jul 24, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
c92aba70
8562ceec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
54 additions
and
37 deletions
+54
-37
UserModule.cs
Mall.Module.User/UserModule.cs
+50
-33
ApiFilterAttribute.cs
Mall.WebApi/Filter/ApiFilterAttribute.cs
+4
-4
No files found.
Mall.Module.User/UserModule.cs
View file @
47678d51
...
...
@@ -1544,7 +1544,7 @@ namespace Mall.Module.User
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
bool
SetDistributorInfoForFX
(
int
FXGradeId
,
int
UserId
,
int
TenantId
,
int
MallBaseId
)
public
bool
SetDistributorInfoForFX
(
int
FXGradeId
,
int
UserId
,
int
TenantId
,
int
MallBaseId
)
{
var
demodel
=
new
RB_Distributor_Info_Extend
();
demodel
.
UserId
=
UserId
;
...
...
@@ -1617,7 +1617,7 @@ namespace Mall.Module.User
/// <param name="uid"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
string
SetDistributorAudit
(
string
userIds
,
int
type
,
int
newGradeId
,
string
remark
,
string
uid
,
int
mallBaseId
,
int
empId
)
public
string
SetDistributorAudit
(
string
userIds
,
int
type
,
int
newGradeId
,
string
remark
,
string
uid
,
int
mallBaseId
,
int
empId
)
{
var
trans
=
distributor_InfoRepository
.
DbTransaction
;
try
...
...
@@ -1775,7 +1775,8 @@ namespace Mall.Module.User
}
};
bool
flag
=
distributor_InfoRepository
.
Update
(
keyValues
,
wheres
,
trans
);
if
(
flag
)
{
if
(
flag
)
{
//记录日志
distributor_LogRepository
.
Insert
(
new
RB_Distributor_Log
()
{
...
...
@@ -2248,7 +2249,8 @@ namespace Mall.Module.User
}
}
}
if
(!
string
.
IsNullOrEmpty
(
remodel
.
ReOrderNos
)
&&
!
string
.
IsNullOrEmpty
(
remodel
.
ReVipIds
))
{
if
(!
string
.
IsNullOrEmpty
(
remodel
.
ReOrderNos
)
&&
!
string
.
IsNullOrEmpty
(
remodel
.
ReVipIds
))
{
List
<
int
>
VipIdList
=
JsonConvert
.
DeserializeObject
<
List
<
int
>>(
remodel
.
ReVipIds
);
if
(
VipIdList
.
Any
())
{
...
...
@@ -2486,7 +2488,8 @@ namespace Mall.Module.User
}
};
bool
flag
=
distributor_InfoRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
if
(
flag
)
{
//记录日志
distributor_LogRepository
.
Insert
(
new
RB_Distributor_Log
()
{
...
...
@@ -3064,7 +3067,8 @@ namespace Mall.Module.User
{
var
gmodel
=
distributor_FXGradeRepository
.
GetEntity
(
model
.
FXGradeId
);
GradeName
=
gmodel
?.
GradeName
??
"默认等级"
;
if
(
gmodel
.
IsGuest
==
3
)
{
if
(
gmodel
.
IsGuest
==
3
)
{
IsVip
=
1
;
}
}
...
...
@@ -3114,7 +3118,8 @@ namespace Mall.Module.User
{
//求其所有下线的数量
var
UserIds
=
member_UserRepository
.
GetMemberChildIdStr
(
umodel
.
Id
);
if
(!
string
.
IsNullOrEmpty
(
UserIds
))
{
if
(!
string
.
IsNullOrEmpty
(
UserIds
))
{
string
[]
arr
=
UserIds
.
Split
(
','
);
fxNum
=
arr
.
Length
-
1
;
}
...
...
@@ -3466,9 +3471,12 @@ namespace Mall.Module.User
string
OrderNos
=
""
;
decimal
TMoney
=
(
demodel
.
AppliedMoney
??
0
);
//首先查询 vip购买返佣,有的话 优先提vip返佣的
if
(
viplist
.
Any
())
{
foreach
(
var
item
in
viplist
)
{
if
(
TMoney
>
0
)
{
if
(
viplist
.
Any
())
{
foreach
(
var
item
in
viplist
)
{
if
(
TMoney
>
0
)
{
TMoney
-=
(
item
.
Commission
??
0
);
Dictionary
<
string
,
object
>
keyValues2
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_VipBuy_Commission_Extend
.
IsRemit
),
1
}
...
...
@@ -3523,7 +3531,8 @@ namespace Mall.Module.User
{
OrderNos
+=
" 余额"
+
TMoney
+
"尚未找到相关订单"
;
}
else
if
(
TMoney
<
0
)
{
else
if
(
TMoney
<
0
)
{
OrderNos
+=
" 多出"
+
(
0
-
TMoney
)
+
"存在未匹配到正确的订单"
;
}
...
...
@@ -3663,7 +3672,8 @@ namespace Mall.Module.User
/// </summary>
/// <param name="userInfo"></param>
/// <returns></returns>
public
object
GerUserMyTeamTitelListForFX
(
AppletUserInfo
userInfo
)
{
public
object
GerUserMyTeamTitelListForFX
(
AppletUserInfo
userInfo
)
{
string
UserIds
=
member_UserRepository
.
GetMemberChildIdStr
(
userInfo
.
UserId
);
//获取下级所有等级
var
disList
=
distributor_InfoRepository
.
GetFXGreadeListForMyTeam
(
new
RB_Distributor_Info_Extend
()
{
UserIds
=
UserIds
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
...
...
@@ -3745,7 +3755,7 @@ namespace Mall.Module.User
}
var
gmodel
=
distributor_FXGradeRepository
.
GetEntity
(
model
.
FXGradeId
);
var
upgmodel
=
distributor_FXGradeRepository
.
GetDistrbutorUpgrade
(
gmodel
?.
Grade
??
0
,
userInfo
.
TenantId
,
userInfo
.
MallBaseId
);
if
(
upgmodel
==
null
||
(
upgmodel
.
IsUpgrade
??
2
)
!=
1
)
if
(
upgmodel
==
null
||
(
upgmodel
.
IsUpgrade
??
2
)
!=
1
)
{
return
new
{
...
...
@@ -3795,7 +3805,8 @@ namespace Mall.Module.User
public
string
SetUserDistrbutorUpgradeForFX
(
int
gradeId
,
AppletUserInfo
userInfo
)
{
var
disModel
=
distributor_BasicsRepository
.
GetList
(
new
RB_Distributor_Basics_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
}).
FirstOrDefault
();
if
((
disModel
?.
IsEnableFXGrade
??
2
)
!=
1
)
{
if
((
disModel
?.
IsEnableFXGrade
??
2
)
!=
1
)
{
return
"未启用自动升级"
;
}
var
model
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
UserId
=
userInfo
.
UserId
,
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
}).
FirstOrDefault
();
...
...
@@ -3862,10 +3873,12 @@ namespace Mall.Module.User
public
List
<
RB_VipBuy_Commission_Extend
>
GetUserVipCommissionOrdersPageList
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_VipBuy_Commission_Extend
demodel
)
{
var
List
=
vipBuy_CommissionRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
List
.
Any
())
{
if
(
List
.
Any
())
{
string
fxgradeids
=
string
.
Join
(
","
,
List
.
Select
(
x
=>
x
.
Grade
??
0
).
Distinct
());
var
fxlist
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
GradeIds
=
fxgradeids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
foreach
(
var
item
in
List
)
{
foreach
(
var
item
in
List
)
{
var
fxmodel
=
fxlist
.
Where
(
x
=>
x
.
Id
==
item
.
Grade
).
FirstOrDefault
();
item
.
GradeDescription
=
fxmodel
.
GradeName
+
"佣金"
;
}
...
...
@@ -4068,11 +4081,14 @@ namespace Mall.Module.User
var
MemberGrade
=
"普通用户"
;
string
MemberGradeIcon
=
""
;
if
(
umodel
.
MemberGrade
>
0
)
{
if
(
umodel
.
MemberGrade
>
0
)
{
var
mgModel
=
member_GradeRepository
.
GetEntity
(
umodel
.
MemberGrade
);
if
(
mgModel
!=
null
)
{
if
(
mgModel
!=
null
)
{
MemberGrade
=
mgModel
.
Name
;
if
(
mgModel
.
Icon
>
0
)
{
if
(
mgModel
.
Icon
>
0
)
{
MemberGradeIcon
=
material_InfoRepository
.
GetEntity
(
mgModel
.
Icon
)?.
Path
??
""
;
}
}
...
...
@@ -4661,8 +4677,8 @@ namespace Mall.Module.User
};
}
var
gmodel
=
distributor_HPGradeInfoRepository
.
GetEntity
(
model
.
HPGradeId
);
var
fxmodel
=
distributor_FXGradeRepository
.
GetEntity
(
model
.
FXGradeId
);
var
gmodel
=
distributor_HPGradeInfoRepository
.
GetEntity
(
(
model
.
HPGradeId
??
0
)
);
var
fxmodel
=
distributor_FXGradeRepository
.
GetEntity
(
(
model
.
FXGradeId
??
0
)
);
return
new
{
Status
=
1
,
...
...
@@ -5081,7 +5097,8 @@ namespace Mall.Module.User
{
var
FXList
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
fxgradeModel
=
FXList
.
Where
(
x
=>
x
.
Id
==
gradeId
).
FirstOrDefault
();
if
(
fxgradeModel
==
null
||
fxgradeModel
.
IsGuest
==
1
)
{
if
(
fxgradeModel
==
null
||
fxgradeModel
.
IsGuest
==
1
)
{
return
new
{
Status
=
2
,
Msg
=
"等级不存在"
};
}
var
pModel
=
FXList
.
Where
(
x
=>
x
.
IsGuest
==
1
).
FirstOrDefault
();
...
...
Mall.WebApi/Filter/ApiFilterAttribute.cs
View file @
47678d51
...
...
@@ -197,7 +197,7 @@ namespace Mall.WebApi.Filter
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
TokenOverdue
,
message
=
"用户凭证失效,请重新登录
1
"
,
message
=
"用户凭证失效,请重新登录"
,
data
=
null
});
}
...
...
@@ -208,7 +208,7 @@ namespace Mall.WebApi.Filter
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
TokenIllegal
,
message
=
"用户凭证无效,请重新登录
2
"
,
message
=
"用户凭证无效,请重新登录"
,
data
=
null
});
}
...
...
@@ -220,7 +220,7 @@ namespace Mall.WebApi.Filter
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
TokenIllegal
,
message
=
"用户凭证失效,请重新登录
3
"
,
message
=
"用户凭证失效,请重新登录"
,
data
=
null
});
}
...
...
@@ -231,7 +231,7 @@ namespace Mall.WebApi.Filter
new
ApiResult
{
resultCode
=
(
int
)
ResultCode
.
TokenIllegal
,
message
=
"用户凭证为空,请重新登录
4
"
,
message
=
"用户凭证为空,请重新登录"
,
data
=
null
});
}
...
...
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