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
30530b7f
Commit
30530b7f
authored
Jun 04, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
a6f0e473
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
5 deletions
+64
-5
RB_SupplierRepository.cs
Mall.Repository/User/RB_SupplierRepository.cs
+52
-0
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+12
-5
No files found.
Mall.Repository/User/RB_SupplierRepository.cs
View file @
30530b7f
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.User
{
/// <summary>
/// 供应商
/// </summary>
public
class
RB_SupplierRepository
:
RepositoryBase
<
RB_Supplier
>
{
public
string
TableName
{
get
{
return
nameof
(
RB_Supplier
);
}
}
/// <summary>
/// 分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public
List
<
RB_Supplier_Extend
>
GetPageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Supplier_Extend
dmodel
)
{
string
where
=
" 1=1 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Supplier
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and
{
nameof
(
RB_Supplier
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
string
sql
=
$@"select * from
{
TableName
}
where
{
where
}
order by Id desc"
;
return
GetPage
<
RB_Supplier_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
RB_Supplier_Extend
>
GetList
(
RB_Supplier_Extend
dmodel
)
{
string
where
=
" 1=1 "
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and a.
{
nameof
(
RB_Supplier
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and a.
{
nameof
(
RB_Supplier
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(
dmodel
.
ID
>
0
)
{
where
+=
$@" and a.
{
nameof
(
RB_Supplier
.
ID
)}
=
{
dmodel
.
ID
}
"
;
}
string
sql
=
$@"select * from
{
TableName
}
where
{
where
}
order by Id desc"
;
return
Get
<
RB_Supplier_Extend
>(
sql
).
ToList
();
}
}
}
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
30530b7f
...
...
@@ -680,9 +680,10 @@ namespace Mall.WebApi.Controllers.User
x
.
IndateType
,
StartDate
=
x
.
StartDate
.
HasValue
?
x
.
StartDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:ss:mm"
)
:
""
,
EndDate
=
x
.
EndDate
.
HasValue
?
x
.
EndDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:ss:mm"
)
:
""
,
IsReceive
=
x
.
MemberNum
>
0
,
UseType
=
((
int
)
x
.
UseType
==
1
||
(
int
)
x
.
UseType
==
4
)
?
x
.
UseType
.
GetEnumName
()
:
(
x
.
ProductList
!=
null
&&
x
.
ProductList
.
Any
()
?
string
.
Join
(
"、"
,
x
.
ProductList
.
Select
(
x
=>
x
.
Relevance
))
:
""
)
IsReceive
=
x
.
MemberNum
>
0
?
1
:
0
,
UseTypeStr
=
((
int
)
x
.
UseType
==
3
||
(
int
)
x
.
UseType
==
4
)
?
x
.
UseType
.
GetEnumName
()
:
(
x
.
ProductList
!=
null
&&
x
.
ProductList
.
Any
()
?
string
.
Join
(
"、"
,
x
.
ProductList
.
Select
(
x
=>
x
.
Relevance
))
:
""
),
x
.
UseType
,
x
.
ProductList
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
@@ -727,6 +728,11 @@ namespace Mall.WebApi.Controllers.User
return
ApiResult
.
Failed
(
"您已领取优惠券"
);
}
if
(
oldLogisticsModel
.
EndDate
.
Value
<
System
.
DateTime
.
Now
)
{
return
ApiResult
.
Failed
(
"优惠券时间已过期"
);
}
var
allMemberInfo
=
userModule
.
GetMemberUserInfo
(
userInfo
.
UserId
);
//判断优惠券是否有等级限制
if
(
oldLogisticsModel
.
OnlyMember
==
1
)
...
...
@@ -804,8 +810,9 @@ namespace Mall.WebApi.Controllers.User
x
.
MemberCouponId
,
StartDate
=
x
.
StartDate
.
HasValue
?
x
.
StartDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:ss:mm"
)
:
""
,
EndDate
=
x
.
EndDate
.
HasValue
?
x
.
EndDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:ss:mm"
)
:
""
,
UseType
=
((
int
)
x
.
UseType
==
1
||
(
int
)
x
.
UseType
==
4
)
?
x
.
UseType
.
GetEnumName
()
:
(
x
.
ProductList
!=
null
&&
x
.
ProductList
.
Any
()
?
string
.
Join
(
"、"
,
x
.
ProductList
.
Select
(
x
=>
x
.
Relevance
))
:
""
)
UseTypeStr
=
((
int
)
x
.
UseType
==
3
||
(
int
)
x
.
UseType
==
4
)
?
x
.
UseType
.
GetEnumName
()
:
(
x
.
ProductList
!=
null
&&
x
.
ProductList
.
Any
()
?
string
.
Join
(
"、"
,
x
.
ProductList
.
Select
(
x
=>
x
.
Relevance
))
:
""
),
x
.
UseType
,
x
.
ProductList
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
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