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
4ad1c780
Commit
4ad1c780
authored
Jul 22, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
7ec4692a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
22 deletions
+31
-22
UserCommonModule.cs
Mall.Module.User/UserCommonModule.cs
+25
-20
WeChatPayController.cs
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
+6
-2
No files found.
Mall.Module.User/UserCommonModule.cs
View file @
4ad1c780
...
...
@@ -418,21 +418,6 @@ namespace Mall.Module.User
TenantId
=
model
.
TenantId
;
MallBaseId
=
model
.
MallBaseId
;
var
trans
=
vipBuyRepository
.
DbTransaction
;
//2020-07-17 Add By:W
Dictionary
<
string
,
object
>
keyValuesVip
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Vip_Buy
.
PayTime
),
Time_End
},
{
nameof
(
RB_Vip_Buy
.
PayState
),
1
},
{
nameof
(
RB_Vip_Buy
.
MerchantsNo
),
Out_Trade_No
}
};
List
<
WhereHelper
>
wheresVip
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
{
FiledName
=
nameof
(
RB_Vip_Buy
.
Id
),
FiledValue
=
OrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
vipBuyRepository
.
Update
(
keyValuesVip
,
wheresVip
,
trans
);
//更新会员购买记录 2020-07-17 Add By: W End
//判断返佣的过期时间
if
(
distributorModel
.
VipExpiryDate
.
HasValue
)
...
...
@@ -452,6 +437,24 @@ namespace Mall.Module.User
distributorModel
.
VipExpiryDate
=
model
.
ExpiryDate
;
}
//2020-07-17 Add By:W
Dictionary
<
string
,
object
>
keyValuesVip
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Vip_Buy
.
PayTime
),
Time_End
},
{
nameof
(
RB_Vip_Buy
.
PayState
),
1
},
{
nameof
(
RB_Vip_Buy
.
MerchantsNo
),
Out_Trade_No
},
{
nameof
(
RB_Vip_Buy
.
ExpiryDate
),
distributorModel
.
VipExpiryDate
}
};
List
<
WhereHelper
>
wheresVip
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
{
FiledName
=
nameof
(
RB_Vip_Buy
.
Id
),
FiledValue
=
OrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
vipBuyRepository
.
Update
(
keyValuesVip
,
wheresVip
,
trans
);
//更新会员购买记录 2020-07-17 Add By: W End
//2020-07-20 Add By:W
Dictionary
<
string
,
object
>
keyValuesDistributor
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Distributor_Info
.
VipExpiryDate
),
distributorModel
.
VipExpiryDate
},
...
...
@@ -472,13 +475,13 @@ namespace Mall.Module.User
if
(
basicModel
.
IsEnableFXGrade
==
1
)
{
if
(
uModel
==
null
)
{
return
false
;
}
if
(
uModel
==
null
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
}
//粉象等级列表
var
FXList
=
distributor_FXGradeRepository
.
GetList
(
new
RB_Distributor_FXGrade_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
var
VipModel
=
FXList
.
Where
(
x
=>
x
.
IsGuest
==
3
).
FirstOrDefault
();
if
(
VipModel
==
null
)
{
return
false
;
}
if
(
VipModel
==
null
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
}
var
PTModel
=
FXList
.
Where
(
x
=>
x
.
IsGuest
==
1
).
FirstOrDefault
();
if
(
PTModel
==
null
)
{
return
false
;
}
if
(
PTModel
==
null
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
}
//vip购买返佣金额列表
var
FXCList
=
distributor_FXCommissionRepository
.
GetFXCommissionList
(
new
RB_Distributor_FXCommission_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
});
var
disModel
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
UserId
=
BuyUserId
,
AuditStatus
=
Common
.
Enum
.
User
.
DistributorAuditStatusEnum
.
Audited
}).
FirstOrDefault
();
...
...
@@ -486,18 +489,20 @@ namespace Mall.Module.User
{
if
(
disModel
.
FXGradeId
!=
VipModel
.
Id
&&
disModel
.
FXGradeId
!=
PTModel
.
Id
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
}
//求其上级
var
pmodel
=
member_UserRepository
.
GetEntity
(
uModel
.
SuperiorId
);
if
(
pmodel
==
null
)
{
return
false
;
}
if
(
pmodel
==
null
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
}
var
dispModel
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
TenantId
,
MallBaseId
=
MallBaseId
,
UserId
=
pmodel
.
Id
,
AuditStatus
=
Common
.
Enum
.
User
.
DistributorAuditStatusEnum
.
Audited
}).
FirstOrDefault
();
if
(
dispModel
!=
null
)
{
var
pfxModel
=
FXList
.
Where
(
x
=>
x
.
Id
==
dispModel
.
FXGradeId
).
FirstOrDefault
();
if
(
pfxModel
==
null
)
{
return
false
;
}
if
(
pfxModel
==
null
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
}
if
(
pfxModel
.
Grade
<
VipModel
.
Grade
)
{
vipBuyRepository
.
DBSession
.
Rollback
();
return
false
;
//其上级不是vip 直接后面的全部不提
}
//查询出当前用户的所有上级
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
View file @
4ad1c780
...
...
@@ -465,8 +465,12 @@ namespace Mall.WebApi.Controllers.AppletWeChat
RB_MiniProgram_Extend
miniProgram
=
new
RB_MiniProgram_Extend
();
//2020年5月26号新增
miniProgram
=
new
RB_MiniProgram_Extend
{
MiniAppId
=
"wxacd9f8cc3480d29e"
,
WeChatApiSecret
=
"936110e2c2214340b9829a3608bde6b0"
,
WeChatPayMerchants
=
"1562277941"
};
// programModule.GetMiniProgramModule(new RB_MiniProgram_Extend { MallBaseId = 1, TenantId =1 });
string
RefundOrderNo
=
System
.
DateTime
.
Now
.
ToString
(
"yyyyMMddHHmmssfff"
);
var
Robj
=
userCommonModule
.
InsertVipBuyCommission
(
21233
,
3
,
"20200720152634009282"
,
"20200720152634009282111"
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
Convert
.
ToDecimal
(
365.00
),
System
.
DateTime
.
Now
);
// var parmsInfo = RequestParm;
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
string
orderNo
=
parms
.
GetStringValue
(
"orderNo"
);
int
orderId
=
parms
.
GetInt
(
"orderId"
);
int
userId
=
parms
.
GetInt
(
"userId"
);
var
Robj
=
userCommonModule
.
InsertVipBuyCommission
(
userId
,
orderId
,
orderNo
,
orderNo
+
"1111"
,
Common
.
Enum
.
Goods
.
OrderPayTypeEnum
.
WeChatPay
,
Convert
.
ToDecimal
(
365.00
),
System
.
DateTime
.
Now
);
return
ApiResult
.
Success
(
""
,
Robj
);
}
...
...
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