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
29c176b5
Commit
29c176b5
authored
Jun 15, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
c9f3ca9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
3 deletions
+98
-3
RB_Member_CouponRepository.cs
Mall.Repository/User/RB_Member_CouponRepository.cs
+43
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+2
-1
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+53
-2
No files found.
Mall.Repository/User/RB_Member_CouponRepository.cs
View file @
29c176b5
...
...
@@ -383,5 +383,48 @@ LEFT JOIN rb_member_user as d on d.AliasName=a.UserId where a.UseState=1 {buil
return
GetPage
<
RB_Member_DiscountCoupon_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
/// <summary>
/// 我的优惠券
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Member_DiscountCoupon_Extend
>
GetAllMemberCouponPageList
(
RB_Member_DiscountCoupon_Extend
query
)
{
string
where
=
" where a.`Status`=0 "
;
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
where
+=
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
;
}
if
(
query
.
MallBaseId
>
0
)
{
where
+=
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
;
}
if
(
query
.
UserId
>
0
)
{
where
+=
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
;
}
if
(
query
.
UseState
==
0
)
{
where
+=
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
)}
=
{
query
.
UseState
}
AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
EndDate
)}
> NOW()"
;
}
else
if
(
query
.
UseState
==
1
)
{
where
+=
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
)}
=
{
query
.
UseState
}
"
;
}
else
if
(
query
.
UseState
==
2
)
{
where
+=
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
EndDate
)}
<NOW() AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
)}
=0"
;
}
}
string
sql
=
@
$" SELECT a.* from rb_member_discountcoupon as a
{
where
}
"
;
return
Get
<
RB_Member_DiscountCoupon_Extend
>(
sql
).
ToList
();
}
}
}
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
29c176b5
...
...
@@ -66,7 +66,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// </summary>
private
readonly
UserModule
userModule
=
new
UserModule
();
private
readonly
Module
.
MarketingCenter
.
CouponModule
couponModule
=
new
Module
.
MarketingCenter
.
CouponModule
();
/// <summary>
/// 小程序页面处理类
...
...
@@ -429,6 +429,7 @@ namespace Mall.WebApi.Controllers.MallBase
{
var
memberModel
=
userModule
.
GetAppletUserCenterStatistics
(
RequestParm
.
OpenId
);
user_info
=
memberModel
;
}
var
data
=
new
object
();
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
29c176b5
...
...
@@ -396,6 +396,57 @@ namespace Mall.WebApi.Controllers.User
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
//public ApiResult GetMiniAllTemplent()
//{
// //向微信服务端 使用登录凭证 code 获取 session_key 和 openid
// var extModel = JsonConvert.DeserializeObject<RB_MiniProgram_Extend>(RequestParm.msg.ToString());
// extModel.MallBaseId = RequestParm.MallBaseId;
// extModel.TenantId = RequestParm.TenantId;
// var newMini = programModule.GetMiniProgramModule(extModel);
// string token = CacheManager.AppletWeChat.WeiXinReidsCache.Get(newMini.MiniAppId);
// if (string.IsNullOrEmpty(token))
// {
// token = Mall.Common.Pay.WeChatPat.TokenHelper.GetLXYToken(token, newMini.MiniAppId, newMini.MiniAppSecret);
// System.Threading.Tasks.Task.Run(() => CacheManager.AppletWeChat.WeiXinReidsCache.Set(newMini.MiniAppId, token));
// }
// if (string.IsNullOrEmpty(token))
// {
// return ApiResult.Failed("");
// }
// string url = "https://api.weixin.qq.com/cgi-bin/wxopen/template/list?access_token=" + token;
// string type = "utf-8";
// GetUsersHelper GetUsersHelper = new GetUsersHelper();
// string wenXinResult = string.Empty;
// JObject jo = null;
// result res = new result();
// try
// {
// wenXinResult = GetUsersHelper.GetUrltoHtml(url, type);//获取微信服务器返回字符串
// jo = (JObject)JsonConvert.DeserializeObject(wenXinResult);//将字符串转换为json格式
// //微信服务器验证成功
// res.openid = jo["errcode"].ToString();
// }
// catch (Exception ex)
// {
// Common.Plugin.LogHelper.Write(ex, string.Format("GetWx:wenXinResult:{0},code:}", wenXinResult));
// //微信服务器验证失败
// res.errcode = jo["errcode"].ToString();
// res.errmsg = jo["errmsg"].ToString();
// }
// return ApiResult.Success("");
//}
/// <summary>
/// 删除底部导航
/// </summary>
...
...
@@ -864,7 +915,7 @@ namespace Mall.WebApi.Controllers.User
{
superList
.
Add
(
secondItem
);
}
var
firstMenuList
=
menuList
.
Where
(
qitem
=>
qitem
.
MenuId
==
secondItem
.
ParentId
).
ToList
();
var
firstMenuList
=
menuList
.
Where
(
qitem
=>
qitem
.
MenuId
==
secondItem
.
ParentId
).
ToList
();
foreach
(
var
firstItem
in
firstMenuList
)
{
if
(!(
superList
.
Where
(
qitem
=>
qitem
.
MenuId
==
firstItem
.
MenuId
).
Count
()
>
0
))
...
...
@@ -1455,7 +1506,7 @@ namespace Mall.WebApi.Controllers.User
};
return
ApiResult
.
Success
(
data
:
obj
);
}
/// <summary>
/// 下载商品购买力TOP排行
/// </summary>
...
...
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