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
e8e6b2f1
Commit
e8e6b2f1
authored
Aug 21, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
976be710
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
5 deletions
+52
-5
UserModule.cs
Mall.Module.User/UserModule.cs
+3
-3
RB_SmallShops_CommissionRepository.cs
....Repository/Product/RB_SmallShops_CommissionRepository.cs
+22
-0
RB_SmallShops_InfoRepository.cs
Mall.Repository/User/RB_SmallShops_InfoRepository.cs
+10
-0
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+17
-2
No files found.
Mall.Module.User/UserModule.cs
View file @
e8e6b2f1
...
...
@@ -6379,14 +6379,14 @@ namespace Mall.Module.User
}
//已提现佣金 //未结算佣金
var
commModel
=
distributor_
RemitRepository
.
GetDistributorCommissionStatiscs
(
userInfo
.
UserId
);
var
commModel
=
smallShops
RemitRepository
.
GetDistributorCommissionStatiscs
(
userInfo
.
UserId
);
//提现总额
var
remitMoney
=
distributor_
RemitRepository
.
GetDistributorRemitCommission
(
userInfo
.
UserId
);
var
remitMoney
=
smallShops
RemitRepository
.
GetDistributorRemitCommission
(
userInfo
.
UserId
);
//分销订单
decimal
OrderCommission
=
smallShopsCommissionRepository
.
GetUserOrderCommissionStatistics
(
userInfo
.
UserId
);
//未结算返佣
decimal
WJSCommission
=
goods_OrderCommissionRepository
.
GetUserOrder
CommissionNoSettlement
(
userInfo
.
UserId
);
decimal
WJSCommission
=
smallShopsCommissionRepository
.
GetSmallShops
CommissionNoSettlement
(
userInfo
.
UserId
);
...
...
Mall.Repository/Product/RB_SmallShops_CommissionRepository.cs
View file @
e8e6b2f1
...
...
@@ -193,6 +193,28 @@ left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and o
return
0
;
}
/// <summary>
/// 用户未结算返佣
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
public
decimal
GetSmallShopsCommissionNoSettlement
(
int
userId
)
{
string
sql
=
$@"SELECT SUM(Commission) as Commission FROM RB_SmallShops_Commission oc
INNER JOIN rb_goods_order o on oc.OrderId=o.OrderId
left join rb_goods_orderaftersale oa on oc.OrderDetailId= oa.OrderDetialId and oa.Type=1 and oa.Status=0 and oa.ReOrderStatus in (2,3,4,5)
WHERE oc.UserId=
{
userId
}
and oc.CommissionState=1 and o.OrderStatus in (1,2,3,4,5,6) and o.Recycled=2 and oa.ReOrderId is null"
;
var
obj
=
ExecuteScalar
(
sql
);
if
(
obj
!=
null
)
{
return
Convert
.
ToDecimal
(
obj
);
}
return
0
;
}
/// <summary>
/// 获取未提现的佣金列表
/// </summary>
...
...
Mall.Repository/User/RB_SmallShops_InfoRepository.cs
View file @
e8e6b2f1
...
...
@@ -87,10 +87,20 @@ where {where} order by di.CreateDate desc";
{
where
+=
$@" and di.
{
nameof
(
RB_SmallShops_Info_Extend
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
//if (dmodel.IsSelectAuditStatus == 1)
//{
// if (dmodel.AuditStatus > 0)
// {
// where += $@" and di.{nameof(RB_SmallShops_Info_Extend.AuditStatus)} in(1,2)";
// }
//}
//else {
if
(
dmodel
.
AuditStatus
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_SmallShops_Info_Extend
.
AuditStatus
)}
=
{(
int
)
dmodel
.
AuditStatus
}
"
;
}
// }
if
(
dmodel
.
GradeId
>=
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_SmallShops_Info_Extend
.
GradeId
)}
=
{
dmodel
.
GradeId
}
"
;
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
e8e6b2f1
...
...
@@ -1183,7 +1183,7 @@ namespace Mall.WebApi.Controllers.User
var
userInfo
=
AppletUserInfo
;
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
req
.
msg
.
ToString
());
var
createDateStr
=
prams
.
GetStringValue
(
"CreateDate"
)
+
"-01"
;
var
createDateStr
=
prams
.
GetStringValue
(
"CreateDate"
)
+
"-01"
;
RB_Member_Balance_Extend
demodel
=
new
RB_Member_Balance_Extend
();
if
(!
string
.
IsNullOrWhiteSpace
(
createDateStr
))
{
...
...
@@ -1785,6 +1785,17 @@ namespace Mall.WebApi.Controllers.User
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_SmallShops_Info_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_SmallShops_Info_Extend
>(
req
.
msg
.
ToString
());
var
memberModel
=
userModule
.
GetMemberUserInfo
(
userInfo
.
UserId
);
if
(
memberModel
==
null
)
{
return
ApiResult
.
Failed
(
"用户信息不存在"
);
}
if
(
memberModel
.
SmallShopId
>
0
)
{
return
ApiResult
.
Failed
(
"当前不满足申请资格,请联系客服"
);
}
//判断是否满足当前申请条件
var
microShopBasics
=
MallBaseModule
.
GetMicroShopBasicsList
(
new
Model
.
Entity
.
BaseSetUp
.
RB_MicroShop_Basics
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
}).
FirstOrDefault
();
...
...
@@ -1855,6 +1866,10 @@ namespace Mall.WebApi.Controllers.User
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
TotalCommission
=
0
;
demodel
.
Commission
=
0
;
demodel
.
UpPrice
=
0
;
demodel
.
PriceType
=
0
;
demodel
.
Status
=
0
;
demodel
.
AuditStatus
=
microShopBasics
.
IsExamine
==
1
?
DistributorAuditStatusEnum
.
Audited
:
DistributorAuditStatusEnum
.
Auditing
;
bool
flag
=
userModule
.
ApplySmallShopsInfo
(
demodel
);
...
...
@@ -2086,7 +2101,7 @@ namespace Mall.WebApi.Controllers.User
{
model
=
userModule
.
GetSmallShopsInfoList
(
new
RB_SmallShops_Info_Extend
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
Id
=
query
.
Id
}).
OrderByDescending
(
x
=>
x
.
CreateDate
).
FirstOrDefault
();
}
if
(
model
==
null
)
if
(
model
==
null
)
{
model
=
new
RB_SmallShops_Info_Extend
();
}
...
...
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