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
238cdb17
Commit
238cdb17
authored
Jul 21, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
b8e4fecd
894fe17b
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
145 additions
and
11 deletions
+145
-11
RB_Distributor_Info_Extend.cs
Mall.Model/Extend/User/RB_Distributor_Info_Extend.cs
+7
-0
RB_Vip_Buy_Extend.cs
Mall.Model/Extend/User/RB_Vip_Buy_Extend.cs
+3
-0
UserCommonModule.cs
Mall.Module.User/UserCommonModule.cs
+1
-1
RB_Distributor_InfoRepository.cs
Mall.Repository/User/RB_Distributor_InfoRepository.cs
+63
-8
RB_Vip_BuyRepository.cs
Mall.Repository/User/RB_Vip_BuyRepository.cs
+1
-0
MallHelper.cs
Mall.WebApi/Controllers/Mall/MallHelper.cs
+1
-1
UserController.cs
Mall.WebApi/Controllers/User/UserController.cs
+4
-1
FinanceModule.cs
Mall.WindowsService/Module/FinanceModule.cs
+65
-0
No files found.
Mall.Model/Extend/User/RB_Distributor_Info_Extend.cs
View file @
238cdb17
...
...
@@ -88,5 +88,12 @@ namespace Mall.Model.Extend.User
public
string
OpenId
{
get
;
set
;
}
/// <summary>
/// 查询过期的vip购买记录 0-不查询,1-查询
/// </summary>
public
int
IsSelectOverTime
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Vip_Buy_Extend.cs
View file @
238cdb17
...
...
@@ -27,5 +27,8 @@ namespace Mall.Model.Extend.User
/// 返佣列表
/// </summary>
public
List
<
RB_VipBuy_Commission_Extend
>
CommissionList
{
get
;
set
;
}
}
}
Mall.Module.User/UserCommonModule.cs
View file @
238cdb17
...
...
@@ -66,7 +66,7 @@ namespace Mall.Module.User
/// </summary>
private
readonly
RB_Distributor_FXCommissionRepository
distributor_FXCommissionRepository
=
new
RB_Distributor_FXCommissionRepository
();
/// <summary>
/// 粉象
发脓
等级
/// 粉象
返佣
等级
/// </summary>
private
readonly
RB_Distributor_FXGradeRepository
distributor_FXGradeRepository
=
new
RB_Distributor_FXGradeRepository
();
...
...
Mall.Repository/User/RB_Distributor_InfoRepository.cs
View file @
238cdb17
...
...
@@ -24,26 +24,32 @@ namespace Mall.Repository.User
public
List
<
RB_Distributor_Info_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Distributor_Info_Extend
dmodel
)
{
string
where
=
$@" 1=1 and di.
{
nameof
(
RB_Distributor_Info
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
AuditStatus
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
AuditStatus
)}
=
{(
int
)
dmodel
.
AuditStatus
}
"
;
}
if
(
dmodel
.
GradeId
>=
0
)
{
if
(
dmodel
.
GradeId
>=
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
GradeId
)}
=
{
dmodel
.
GradeId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
Name
)}
like '%
{
dmodel
.
Name
}
%'"
;
}
if
(
dmodel
.
Source
>
0
)
{
if
(
dmodel
.
Source
>
0
)
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
Source
)}
=
{(
int
)
dmodel
.
Source
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
NickName
))
...
...
@@ -54,7 +60,8 @@ namespace Mall.Repository.User
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
Mobile
)}
like '%
{
dmodel
.
Mobile
}
%'"
;
}
if
(
dmodel
.
SuperiorId
>
0
)
{
if
(
dmodel
.
SuperiorId
>
0
)
{
where
+=
$@" and u.
{
nameof
(
RB_Member_User
.
SuperiorId
)}
=
{
dmodel
.
SuperiorId
}
"
;
}
...
...
@@ -88,7 +95,8 @@ where {where} order by di.CreateDate desc";
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
AuditStatus
)}
=
{(
int
)
dmodel
.
AuditStatus
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserIds
))
{
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserIds
))
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
UserId
)}
in(
{
dmodel
.
UserIds
}
)"
;
}
if
(
dmodel
.
GradeId
>=
0
)
...
...
@@ -239,5 +247,52 @@ inner join rb_member_user u on di.UserId=u.Id
where
{
where
}
order by di.CreateDate desc"
;
return
Get
<
RB_Distributor_Info_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 获取过期的vip列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Distributor_Info_Extend
>
GetOverTimeVipList
(
RB_Distributor_Info_Extend
dmodel
)
{
string
where
=
$@" 1=1 and di.
{
nameof
(
RB_Distributor_Info
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
UserId
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
UserId
)}
=
{
dmodel
.
UserId
}
"
;
}
if
(
dmodel
.
AuditStatus
>
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
AuditStatus
)}
=
{(
int
)
dmodel
.
AuditStatus
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
UserIds
))
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
UserId
)}
in(
{
dmodel
.
UserIds
}
)"
;
}
if
(
dmodel
.
GradeId
>=
0
)
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
GradeId
)}
=
{
dmodel
.
GradeId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
Name
))
{
where
+=
$@" and di.
{
nameof
(
RB_Distributor_Info
.
Name
)}
like '%
{
dmodel
.
Name
}
%'"
;
}
if
(
dmodel
.
IsSelectOverTime
>
0
)
{
where
+=
$@" and DATE_FORMAT( di.
{
nameof
(
RB_Distributor_Info
.
VipExpiryDate
)}
,'%y-%m-%d')=DATE_FORMAT(
{
DateTime
.
Now
.
AddDays
(-
1
)}
,'%y-%m-%d')"
;
}
string
sql
=
$@"select di.* from RB_Distributor_Info di where
{
where
}
order by di.CreateDate desc"
;
return
Get
<
RB_Distributor_Info_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/User/RB_Vip_BuyRepository.cs
View file @
238cdb17
...
...
@@ -47,6 +47,7 @@ namespace Mall.Repository.User
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Vip_Buy_Extend
.
PayState
)}
=
{
query
.
PayState
}
"
);
}
}
return
GetPage
<
RB_Vip_Buy_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
...
...
Mall.WebApi/Controllers/Mall/MallHelper.cs
View file @
238cdb17
...
...
@@ -1912,7 +1912,7 @@ namespace Mall.WebApi.Controllers
one_share
=
new
{
name
=
distributorCustom
?.
OneDistributionName
,
defaultStr
=
"一级分销名称"
},
second_share
=
new
{
name
=
distributorCustom
?.
TwoDistributionName
,
defaultStr
=
"二级分销名称"
},
three_share
=
new
{
name
=
distributorCustom
?.
ThreeDistributionName
,
defaultStr
=
"三级分销名称"
},
isshowvipbuypic
=
new
{
name
=
distributorCustom
?.
IsShowVIPBuyPic
,
defaultStr
=
"0"
}
,
isshowvipbuypic
=
distributorCustom
?.
IsShowVIPBuyPic
,
vipbuyico
=
distributorCustom
?.
VipBuyICO
,
vipbuyurl
=
distributorCustom
?.
VipBuyUrl
,
},
...
...
Mall.WebApi/Controllers/User/UserController.cs
View file @
238cdb17
...
...
@@ -1118,7 +1118,10 @@ namespace Mall.WebApi.Controllers.User
model
.
OneDistributionName
,
model
.
TwoDistributionName
,
model
.
ThreeDistributionName
,
UpdateDate
=
model
.
UpdateDate
.
HasValue
?
model
.
UpdateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
UpdateDate
=
model
.
UpdateDate
.
HasValue
?
model
.
UpdateDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
model
.
VipBuyICO
,
model
.
VipBuyUrl
,
model
.
IsShowVIPBuyPic
});
}
...
...
Mall.WindowsService/Module/FinanceModule.cs
View file @
238cdb17
...
...
@@ -6,6 +6,7 @@ using Mall.Common.Enum.User;
using
Mall.Common.Plugin
;
using
Mall.Model.Entity.Finance
;
using
Mall.Model.Entity.Product
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.Finance
;
using
Mall.Model.Extend.Product
;
using
Mall.Model.Extend.User
;
...
...
@@ -104,6 +105,12 @@ namespace Mall.WindowsService.Module
private
static
RB_Vip_BuyRepository
vip_BuyRepository
=
new
RB_Vip_BuyRepository
();
/// <summary>
/// vip购买仓储层
/// </summary>
private
static
readonly
RB_Vip_BuyRepository
vipBuyRepository
=
new
RB_Vip_BuyRepository
();
#
region
收入
/// <summary>
...
...
@@ -1531,5 +1538,63 @@ and DATE_FORMAT(b.PaymentTime,'%y-%m-%d')<DATE_FORMAT('{endDate}','%y-%m-%d') A
#
endregion
#
region
分享商
VIP
过期
/// <summary>
/// 分享商VIP过期
/// </summary>
/// <returns></returns>
public
static
bool
DistributorVipModule
()
{
var
flag
=
false
;
try
{
var
financeConfigurineList
=
distributor_InfoRepository
.
GetOverTimeVipList
(
new
RB_Distributor_Info_Extend
{
IsSelectOverTime
=
1
,
AuditStatus
=
DistributorAuditStatusEnum
.
Audited
});
var
mallList
=
financeConfigurineList
.
GroupBy
(
x
=>
new
{
x
.
TenantId
,
x
.
MallBaseId
});
foreach
(
var
item
in
mallList
)
{
var
fxGradeModel
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
{
TenantId
=
item
.
Key
.
TenantId
,
MallBaseId
=
item
.
Key
.
MallBaseId
,
IsGuest
=
1
}).
FirstOrDefault
();
var
list
=
financeConfigurineList
.
Where
(
x
=>
x
.
MallBaseId
==
item
.
Key
.
MallBaseId
&
x
.
TenantId
==
item
.
Key
.
TenantId
&
x
.
FXGradeId
!=
fxGradeModel
.
Id
);
if
(
list
!=
null
&&
list
.
Any
())
{
foreach
(
var
itemDistributor
in
list
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
};
keyValues
.
Add
(
nameof
(
RB_Distributor_Info
.
FXGradeId
),
fxGradeModel
.
Id
);
keyValues
.
Add
(
nameof
(
RB_Goods_Order_Extend
.
CancelTime
),
DateTime
.
Now
);
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
OrderId
),
FiledValue
=
itemDistributor
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
TenantId
),
FiledValue
=
itemDistributor
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_Order_Extend
.
MallBaseId
),
FiledValue
=
itemDistributor
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
goods_OrderRepository
.
Update
(
keyValues
,
wheres
);
}
}
}
}
catch
(
Exception
ex
)
{
Helper
.
LogHelper
.
Write
(
ex
.
Message
);
}
return
flag
;
}
#
endregion
}
}
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