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
93c9ef08
Commit
93c9ef08
authored
Jul 31, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
赞羊返佣调整+推荐供应商
parent
d6a18812
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
442 additions
and
9 deletions
+442
-9
RB_Goods_OrderIntroduction.cs
Mall.Model/Entity/Product/RB_Goods_OrderIntroduction.cs
+118
-0
RB_Goods_OrderIntroduction_Extend.cs
...Model/Extend/Product/RB_Goods_OrderIntroduction_Extend.cs
+53
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+37
-9
RB_Goods_OrderIntroductionRepository.cs
...epository/Product/RB_Goods_OrderIntroductionRepository.cs
+234
-0
No files found.
Mall.Model/Entity/Product/RB_Goods_OrderIntroduction.cs
0 → 100644
View file @
93c9ef08
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.Product
{
/// <summary>
/// 商品订单介绍返佣信息表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_OrderIntroduction
{
/// <summary>
/// Id
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 订单id
/// </summary>
public
int
?
OrderId
{
get
;
set
;
}
/// <summary>
/// 订单明细id
/// </summary>
public
int
?
OrderDetailId
{
get
;
set
;
}
/// <summary>
/// 分销商id
/// </summary>
public
int
?
UserId
{
get
;
set
;
}
/// <summary>
/// 返利比例 百分比
/// </summary>
public
decimal
?
CommissionRatio
{
get
;
set
;
}
/// <summary>
/// 佣金
/// </summary>
public
decimal
?
Commission
{
get
;
set
;
}
/// <summary>
/// 佣金状态 1待返佣 2已返佣
/// </summary>
public
int
?
CommissionState
{
get
;
set
;
}
/// <summary>
/// 类型 1介绍供应商返利
/// </summary>
public
int
?
Type
{
get
;
set
;
}
/// <summary>
/// Remark
/// </summary>
public
string
Remark
{
get
;
set
;
}
/// <summary>
/// 商户号
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
/// <summary>
/// CreateDate
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// UpdateDate
/// </summary>
public
DateTime
?
UpdateDate
{
get
;
set
;
}
/// <summary>
/// 打款状态 1已打款 2未打款
/// </summary>
public
int
?
RemitStatus
{
get
;
set
;
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderIntroduction_Extend.cs
0 → 100644
View file @
93c9ef08
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.Product
;
namespace
Mall.Model.Extend.Product
{
/// <summary>
/// 商品订单介绍返佣表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_OrderIntroduction_Extend
:
RB_Goods_OrderIntroduction
{
/// <summary>
/// ids
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
/// <summary>
/// 订单号
/// </summary>
public
string
OrderNo
{
get
;
set
;
}
/// <summary>
/// 用户名称
/// </summary>
public
string
UserName
{
get
;
set
;
}
/// <summary>
/// 姓名
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 手机号码
/// </summary>
public
string
Mobile
{
get
;
set
;
}
/// <summary>
/// 用户头像
/// </summary>
public
string
Photo
{
get
;
set
;
}
/// <summary>
/// 分销订单查询状态 0全部 1代付款 2已付款 3已完成
/// </summary>
public
int
?
DistrbutionOrderSelectStatus
{
get
;
set
;
}
/// <summary>
/// 订单明细列表
/// </summary>
public
List
<
RB_Goods_OrderDetail_Extend
>
OrderDetailList
{
get
;
set
;
}
/// <summary>
/// 待返佣金额
/// </summary>
public
decimal
WaitCommission
{
get
;
set
;
}
}
}
Mall.Module.Product/OrderModule.cs
View file @
93c9ef08
...
@@ -3645,7 +3645,7 @@ namespace Mall.Module.Product
...
@@ -3645,7 +3645,7 @@ namespace Mall.Module.Product
}
}
#
region
分销商
id
+
分销商等级
#
region
分销商
id
+
分销商等级
int
OneUserId
=
0
,
TwoUserId
=
0
,
ThreeUserId
=
0
;
int
OneUserId
=
0
,
TwoUserId
=
0
,
ThreeUserId
=
0
;
int
OneDistributorGrade
=
0
,
TwoDistributorGrade
=
0
,
ThreeDistributorGrade
=
0
;
int
OneDistributorGrade
=
-
1
,
TwoDistributorGrade
=
-
1
,
ThreeDistributorGrade
=
-
1
;
//获取多级 分销商id
//获取多级 分销商id
if
(
basicModel
!=
null
&&
basicModel
.
DistributorTier
>
0
)
if
(
basicModel
!=
null
&&
basicModel
.
DistributorTier
>
0
)
{
{
...
@@ -3699,15 +3699,34 @@ namespace Mall.Module.Product
...
@@ -3699,15 +3699,34 @@ namespace Mall.Module.Product
#
endregion
#
endregion
if
(
OneUserId
>
0
)
if
(
OneUserId
>
0
)
{
{
OneDistributorGrade
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
OneUserId
})?.
FirstOrDefault
()?.
GradeId
??
0
;
var
dis1Model
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
OneUserId
,
AuditStatus
=
DistributorAuditStatusEnum
.
Audited
})?.
FirstOrDefault
();
if
(
dis1Model
!=
null
)
{
OneDistributorGrade
=
dis1Model
?.
GradeId
??
0
;
}
}
if
(
TwoUserId
>
0
)
else
{
OneDistributorGrade
=
-
1
;
//不是分销商
}
}
if
(
TwoUserId
>
0
&&
OneDistributorGrade
>=
0
)
{
{
TwoDistributorGrade
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
TwoUserId
})?.
FirstOrDefault
()?.
GradeId
??
0
;
var
dis2Model
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
TwoUserId
,
AuditStatus
=
DistributorAuditStatusEnum
.
Audited
})?.
FirstOrDefault
();
if
(
dis2Model
!=
null
)
{
TwoDistributorGrade
=
dis2Model
?.
GradeId
??
0
;
}
}
if
(
ThreeUserId
>
0
)
else
{
TwoDistributorGrade
=
-
1
;
}
}
if
(
ThreeUserId
>
0
&&
TwoDistributorGrade
>=
0
)
{
var
dis3Model
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
ThreeUserId
,
AuditStatus
=
DistributorAuditStatusEnum
.
Audited
})?.
FirstOrDefault
();
if
(
dis3Model
!=
null
)
{
{
ThreeDistributorGrade
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
ThreeUserId
})?.
FirstOrDefault
()?.
GradeId
??
0
;
ThreeDistributorGrade
=
dis3Model
?.
GradeId
??
0
;
}
else
{
ThreeDistributorGrade
=
-
1
;
}
}
}
#
endregion
#
endregion
#
region
分销商等级列表
#
region
分销商等级列表
...
@@ -3802,7 +3821,10 @@ namespace Mall.Module.Product
...
@@ -3802,7 +3821,10 @@ namespace Mall.Module.Product
Type
=
1
,
Type
=
1
,
IsRemit
=
0
IsRemit
=
0
};
};
if
(
OneDistributorGrade
!=
-
1
)
{
gocList
.
Add
(
gocModel
);
gocList
.
Add
(
gocModel
);
}
break
;
break
;
case
2
:
case
2
:
if
(
TwoUserId
>
0
)
if
(
TwoUserId
>
0
)
...
@@ -3870,8 +3892,11 @@ namespace Mall.Module.Product
...
@@ -3870,8 +3892,11 @@ namespace Mall.Module.Product
Type
=
1
,
Type
=
1
,
IsRemit
=
0
IsRemit
=
0
};
};
if
(
TwoDistributorGrade
!=
-
1
)
{
gocList
.
Add
(
gocModel
);
gocList
.
Add
(
gocModel
);
}
}
}
break
;
break
;
case
3
:
case
3
:
if
(
ThreeUserId
>
0
)
if
(
ThreeUserId
>
0
)
...
@@ -3952,8 +3977,11 @@ namespace Mall.Module.Product
...
@@ -3952,8 +3977,11 @@ namespace Mall.Module.Product
Type
=
1
,
Type
=
1
,
IsRemit
=
0
IsRemit
=
0
};
};
if
(
ThreeDistributorGrade
!=
-
1
)
{
gocList
.
Add
(
gocModel
);
gocList
.
Add
(
gocModel
);
}
}
}
break
;
break
;
}
}
...
...
Mall.Repository/Product/RB_Goods_OrderIntroductionRepository.cs
0 → 100644
View file @
93c9ef08
This diff is collapsed.
Click to expand it.
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