Commit 88cf656f authored by 黄奎's avatar 黄奎

新增字段

parent b569d762
......@@ -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; }
}
}
......@@ -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 "";
......
......@@ -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";
//上架时间【降序】
......
......@@ -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 = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment