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
88cf656f
Commit
88cf656f
authored
Oct 18, 2022
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增字段
parent
b569d762
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
16 deletions
+33
-16
RB_Goods.cs
Mall.Model/Entity/Product/RB_Goods.cs
+5
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+5
-7
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+12
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+11
-9
No files found.
Mall.Model/Entity/Product/RB_Goods.cs
View file @
88cf656f
...
...
@@ -678,5 +678,10 @@ namespace Mall.Model.Entity.Product
/// 进阶小课堂老师Id
/// </summary>
public
int
EduTeacherId
{
get
;
set
;
}
/// <summary>
///进阶小课堂 是否显示商品(1-显示,0-不显示)
/// </summary>
public
int
IsShow
{
get
;
set
;
}
}
}
Mall.Module.Product/ProductModule.cs
View file @
88cf656f
...
...
@@ -1449,18 +1449,17 @@ namespace Mall.Module.Product
var
appletWeChatModel
=
programRepository
.
GetEntity
(
mallBaseId
);
string
token
=
CacheManager
.
AppletWeChat
.
WeiXinReidsCache
.
Get
(
appletWeChatModel
.
MiniAppId
);
int
IsNormalServer
=
Convert
.
ToInt32
(
Config
.
IsNormalServer
);
if
(
IsNormalServer
!=
1
)
{
token
=
"38_LJMrD0ffPj7GXvXxgGMwDMx9Qs_tXYe0HObmYw_2IGQUTRWSk9WbmrROPvEHEGgroSkhOctTFXFO1RAcYKo0uxrTHw5aRz9NXZ_t3Tp4M486c5XkLvPamTfWg_LaegNpvAqfVGWR-IiBbVL9GURgACAUIF"
;
}
//
if (IsNormalServer != 1)
//
{
//
token = "38_LJMrD0ffPj7GXvXxgGMwDMx9Qs_tXYe0HObmYw_2IGQUTRWSk9WbmrROPvEHEGgroSkhOctTFXFO1RAcYKo0uxrTHw5aRz9NXZ_t3Tp4M486c5XkLvPamTfWg_LaegNpvAqfVGWR-IiBbVL9GURgACAUIF";
//
}
if
(
string
.
IsNullOrEmpty
(
token
))
{
token
=
Common
.
Pay
.
WeChatPat
.
TokenHelper
.
GetLXYToken
(
token
,
appletWeChatModel
.
MiniAppId
,
appletWeChatModel
.
MiniAppSecret
);
System
.
Threading
.
Tasks
.
Task
.
Run
(()
=>
CacheManager
.
AppletWeChat
.
WeiXinReidsCache
.
Set
(
appletWeChatModel
.
MiniAppId
,
token
));
}
if
(!
string
.
IsNullOrEmpty
(
token
))
{
//string GetImageUrl = "https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=" + token;//获取二维码
{
string
GetImageUrl
=
"https://api.weixin.qq.com/wxa/getwxacode?access_token="
+
token
;
//获取小程序码
var
postData
=
new
{
...
...
@@ -1471,7 +1470,6 @@ namespace Mall.Module.Product
string
basepath
=
AppContext
.
BaseDirectory
;
string
path_server
=
basepath
+
"\\upfile\\temporary\\"
+
pathName
;
var
Robj
=
HttpHelper
.
HttpPostForGetWXQRCodePath
(
GetImageUrl
,
JsonHelper
.
Serialize
(
postData
),
path_server
);
//var Robj1 = HttpHelper.HttpPost(GetImageUrl, JsonHelper.Serialize(postData), "");
return
"/upfile/temporary/"
+
pathName
;
}
return
""
;
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
88cf656f
...
...
@@ -140,6 +140,10 @@ namespace Mall.Repository.Product
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsEduType
)}
=0"
;
}
if
(
dmodel
.
TenantId
==
27
||
dmodel
.
MallBaseId
==
17
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
IsShow
)}
in(1)"
;
}
string
orderBy
=
" g.CreateDate desc"
;
if
(
dmodel
.
OrderBy
==
1
)
{
...
...
@@ -659,6 +663,10 @@ where {where} group by g.Id order by {orderBy}";
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsPageType
)}
in(0,2)"
;
}
}
if
(
dmodel
.
TenantId
==
27
||
dmodel
.
MallBaseId
==
17
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
IsShow
)}
in(1)"
;
}
string
sql
=
$@"
SELECT g.*,C.CategoryId
FROM RB_Goods g INNER JOIN rb_goods_category c on g.Id=c.GoodsId
...
...
@@ -983,6 +991,10 @@ WHERE {where} group by g.Id order by g.CreateDate desc";
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
EduTeacherId
)}
=
{
dmodel
.
EduTeacherId
}
"
;
}
if
(
dmodel
.
TenantId
==
27
||
dmodel
.
MallBaseId
==
17
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
IsShow
)}
in(1)"
;
}
//默认综合【升序】
string
orderBy
=
$" order by g.
{
nameof
(
RB_Goods_Extend
.
Sort
)}
asc"
;
//上架时间【降序】
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
88cf656f
...
...
@@ -73,7 +73,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetHome
()
{
...
...
@@ -488,7 +488,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetAppConfig
()
{
...
...
@@ -521,7 +521,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetUserCenter
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
...
...
@@ -688,7 +689,8 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetUserInfo
()
{
if
(
RequestParm
.
OpenId
!=
null
&&
!
string
.
IsNullOrWhiteSpace
(
RequestParm
.
OpenId
))
...
...
@@ -708,7 +710,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetWeChatOpenId
()
{
...
...
@@ -723,7 +725,7 @@ namespace Mall.WebApi.Controllers.MallBase
miniAppUserCache
=
Common
.
Plugin
.
WeiXinHelper
.
GetWeChatOpenId
(
miniProgram
.
MiniAppId
,
miniProgram
.
MiniAppSecret
,
code
);
}
}
var
newGuid
=
"MiniAppOpenId_"
+
Guid
.
NewGuid
().
ToString
();
var
newGuid
=
"MiniAppOpenId_"
+
Guid
.
NewGuid
().
ToString
();
UserReidsCache
.
SetMiniAppUsetOpenId
(
newGuid
,
miniAppUserCache
);
return
ApiResult
.
Success
(
data
:
newGuid
);
}
...
...
@@ -734,7 +736,7 @@ namespace Mall.WebApi.Controllers.MallBase
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetMessageTemplate
()
{
...
...
@@ -751,14 +753,14 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 获取用户信息
/// </summary>
/// <returns></returns>
[
HttpGet
]
[
HttpPost
]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
[
AllowAnonymous
]
[
RateValve
(
Policy
=
Policy
.
Ip
,
Limit
=
10
,
Duration
=
60
)]
public
ApiResult
GetGoosPoster
()
{
string
MiniAppId
=
""
;
...
...
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