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
7fe4c33e
Commit
7fe4c33e
authored
Aug 11, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
88b50c3f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
73 additions
and
4 deletions
+73
-4
UserModule.cs
Mall.Module.User/UserModule.cs
+14
-2
MallBaseController.cs
Mall.WebApi/Controllers/MallBase/MallBaseController.cs
+3
-1
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+56
-1
No files found.
Mall.Module.User/UserModule.cs
View file @
7fe4c33e
...
@@ -6077,6 +6077,18 @@ namespace Mall.Module.User
...
@@ -6077,6 +6077,18 @@ namespace Mall.Module.User
}
}
return
false
;
return
false
;
}
}
#
endregion
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_SmallShops_Info_Extend
>
GetSmallShopsInfoList
(
RB_SmallShops_Info_Extend
dmodel
)
{
return
smallShopsInfoRepository
.
GetList
(
dmodel
);
}
#
endregion
}
}
}
Mall.WebApi/Controllers/MallBase/MallBaseController.cs
View file @
7fe4c33e
...
@@ -1177,7 +1177,9 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -1177,7 +1177,9 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
if
(
query
.
PriceType
==
1
)
if
(
query
.
PriceType
==
1
)
{
{
query
.
FixedPrice
=
0
;
query
.
CustomMaxFixedPrice
=
0
;
query
.
CustomMinFixedPrice
=
0
;
}
}
else
if
(
query
.
PriceType
==
2
)
else
if
(
query
.
PriceType
==
2
)
{
{
...
...
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
7fe4c33e
...
@@ -19,6 +19,7 @@ using Mall.Model.Extend.MarketingCenter;
...
@@ -19,6 +19,7 @@ using Mall.Model.Extend.MarketingCenter;
using
Mall.Model.Entity.User
;
using
Mall.Model.Entity.User
;
using
NPOI.SS.Formula.Functions
;
using
NPOI.SS.Formula.Functions
;
using
Google.Protobuf.WellKnownTypes
;
using
Google.Protobuf.WellKnownTypes
;
using
Mall.Module.BaseSetUp
;
namespace
Mall.WebApi.Controllers.User
namespace
Mall.WebApi.Controllers.User
{
{
...
@@ -35,6 +36,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -35,6 +36,7 @@ namespace Mall.WebApi.Controllers.User
private
readonly
UserVipModule
userVipModule
=
new
UserVipModule
();
private
readonly
UserVipModule
userVipModule
=
new
UserVipModule
();
private
readonly
SupplierModule
supplierModule
=
new
SupplierModule
();
private
readonly
SupplierModule
supplierModule
=
new
SupplierModule
();
private
readonly
Module
.
Product
.
ProductModule
productModule
=
new
Module
.
Product
.
ProductModule
();
private
readonly
Module
.
Product
.
ProductModule
productModule
=
new
Module
.
Product
.
ProductModule
();
private
readonly
MallBaseModule
MallBaseModule
=
new
MallBaseModule
();
#
region
收货地址
#
region
收货地址
/// <summary>
/// <summary>
...
@@ -1709,7 +1711,60 @@ namespace Mall.WebApi.Controllers.User
...
@@ -1709,7 +1711,60 @@ namespace Mall.WebApi.Controllers.User
var
userInfo
=
AppletUserInfo
;
var
userInfo
=
AppletUserInfo
;
RB_SmallShops_Info_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_SmallShops_Info_Extend
>(
req
.
msg
.
ToString
());
RB_SmallShops_Info_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_SmallShops_Info_Extend
>(
req
.
msg
.
ToString
());
//判断是否满足当前申请条件
//判断是否满足当前申请条件
var
microShopBasics
=
MallBaseModule
.
GetMicroShopBasicsList
(
new
Model
.
Entity
.
BaseSetUp
.
RB_MicroShop_Basics
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
}).
FirstOrDefault
();
if
(
microShopBasics
==
null
)
{
return
ApiResult
.
Failed
(
"微店申请暂未开启"
);
}
if
(
microShopBasics
.
IsOpen
!=
2
)
{
return
ApiResult
.
Failed
(
"微店申请暂未开启"
);
}
if
(
microShopBasics
.
ApplyCondition
>
0
)
{
var
distributorInfoModel
=
userModule
.
GetDistributorInfoList
(
new
RB_Distributor_Info_Extend
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
UserId
=
userInfo
.
UserId
}).
FirstOrDefault
();
if
(
microShopBasics
.
ApplyMemberLevel
>
0
&&
microShopBasics
.
ApplyCondition
==
1
)
{
var
list
=
userModule
.
GetDistributorGradeDropdownList
(
new
RB_Distributor_Grade_Extend
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
nowLevel
=
list
.
Where
(
x
=>
x
.
Id
==
microShopBasics
.
ApplyMemberLevel
).
FirstOrDefault
();
//申请等级的最低id
var
memberLevel
=
list
.
Where
(
x
=>
x
.
Id
==
distributorInfoModel
.
GradeId
).
FirstOrDefault
();
//会员当前的等级
if
((
memberLevel
.
Grade
??
0
)
<
(
nowLevel
.
Grade
??
0
))
{
return
ApiResult
.
Failed
(
"当前等级不满足"
);
}
}
else
if
(
microShopBasics
.
ApplyMemberLevel
>
0
&&
microShopBasics
.
ApplyCondition
==
2
)
{
var
list
=
userModule
.
GetFXDistributorGradeList
(
new
RB_Distributor_FXGrade_Extend
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
});
var
nowLevel
=
list
.
Where
(
x
=>
x
.
Id
==
microShopBasics
.
ApplyMemberLevel
).
FirstOrDefault
();
//申请等级的最低id
var
memberLevel
=
list
.
Where
(
x
=>
x
.
Id
==
distributorInfoModel
.
FXGradeId
).
FirstOrDefault
();
//会员当前的等级
if
((
memberLevel
.
Grade
??
0
)
<
(
nowLevel
.
Grade
??
0
))
{
return
ApiResult
.
Failed
(
"当前等级不满足"
);
}
}
}
//判断是否已经申请过,已申请并拒绝不能再次申请
var
oldList
=
userModule
.
GetSmallShopsInfoList
(
new
RB_SmallShops_Info_Extend
{
TenantId
=
userInfo
.
TenantId
,
MallBaseId
=
userInfo
.
MallBaseId
,
UserId
=
userInfo
.
UserId
}).
OrderByDescending
(
x
=>
x
.
CreateDate
).
FirstOrDefault
();
if
(
oldList
!=
null
)
{
if
(
oldList
.
AuditStatus
==
DistributorAuditStatusEnum
.
Reject
)
{
return
ApiResult
.
Failed
(
"您之前的申请已被拒绝,不能再次申请"
);
}
else
if
(
oldList
.
AuditStatus
==
DistributorAuditStatusEnum
.
Audited
)
{
return
ApiResult
.
Failed
(
"您的申请已通过,请勿重复申请"
);
}
else
if
(
oldList
.
AuditStatus
==
DistributorAuditStatusEnum
.
Auditing
)
{
return
ApiResult
.
Failed
(
"您已申请,请等待审核"
);
}
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
if
(
string
.
IsNullOrEmpty
(
demodel
.
Name
))
{
{
...
@@ -1725,7 +1780,7 @@ namespace Mall.WebApi.Controllers.User
...
@@ -1725,7 +1780,7 @@ namespace Mall.WebApi.Controllers.User
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
Status
=
0
;
demodel
.
Status
=
0
;
demodel
.
AuditStatus
=
DistributorAuditStatusEnum
.
Auditing
;
demodel
.
AuditStatus
=
microShopBasics
.
IsExamine
==
1
?
DistributorAuditStatusEnum
.
Audited
:
DistributorAuditStatusEnum
.
Auditing
;
bool
flag
=
userModule
.
ApplySmallShopsInfo
(
demodel
);
bool
flag
=
userModule
.
ApplySmallShopsInfo
(
demodel
);
if
(
flag
)
if
(
flag
)
{
{
...
...
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