Commit e676f110 authored by liudong1993's avatar liudong1993

Merge branch 'sdzq' of http://gitlab.oytour.com/Kui2/mall.oytour.com into sdzq-ld

parents 3b639878 c2376166
......@@ -205,6 +205,59 @@ namespace Mall.Common.Plugin
/// </summary>
public string errmsg { get; set; }
}
public class templateresult
{
/// <summary>
/// openid
/// </summary>
public string openid { get; set; }
/// <summary>
/// session_key
/// </summary>
public List<templateresultModel> data { get; set; }
/// <summary>
/// 错误状态码
/// </summary>
public string errCode { get; set; }
/// <summary>
/// 错误提示信息
/// </summary>
public string errMsg { get; set; }
}
public class templateresultModel
{
/// <summary>
/// 添加至帐号下的模板 id,发送小程序订阅消息时所需
/// </summary>
public string priTmplId { get; set; }
/// <summary>
/// 模版标题
/// </summary>
public string title { get; set; }
/// <summary>
/// 模版内容
/// </summary>
public string content { get; set; }
/// <summary>
/// 模板内容示例
/// </summary>
public string example { get; set; }
/// <summary>
/// 模版类型,2 为一次性订阅,3 为长期订阅
/// </summary>
public string type { get; set; }
}
#endregion
......
......@@ -5,6 +5,7 @@ using Mall.Model.Extend.BaseSetUp;
using Mall.Repository;
using Mall.Repository.BaseSetUp;
using Mall.Repository.User;
using NPOI.SS.Formula.Functions;
using System;
using System.Collections.Generic;
using System.Linq;
......@@ -926,14 +927,32 @@ namespace Mall.Module.BaseSetUp
/// <returns></returns>
public bool AddOrUpdateFileStore(RB_File_Store model)
{
bool result = false;
int id = 0;
if (model.ID == 0)
{
return storeRepository.Insert(model) > 0;
id = storeRepository.Insert(model);
result = id > 0;
}
else
{
return storeRepository.Update(model);
id = model.ID;
result = storeRepository.Update(model);
}
//判断当前的是否设置成默认没有
if (model.IsDefault == 1 && result)//将其他的默认赋值成0
{
Dictionary<string, object> fileds = new Dictionary<string, object>() { { nameof(RB_File_Store.IsDefault), 0 }, };
List<WhereHelper> whereHelpers = new List<WhereHelper>()
{
new WhereHelper(){ FiledName=nameof(RB_File_Store.TenantId),FiledValue=model.TenantId ,OperatorEnum=OperatorEnum.Equal},
new WhereHelper(){ FiledName=nameof(RB_File_Store.MallBaseId),FiledValue=model.MallBaseId, OperatorEnum=OperatorEnum.Equal },
new WhereHelper(){ FiledName=nameof(RB_File_Store.ID),FiledValue=id, OperatorEnum=OperatorEnum.NotEqual },
};
storeRepository.Update(fileds, whereHelpers);
}
return result;
}
#endregion
......@@ -1279,7 +1298,7 @@ namespace Mall.Module.BaseSetUp
public object GetMicroShopBasics(RB_MicroShop_Basics query)
{
var model = microShopBasicsRepository.GetMicroShopBasicsList(query).FirstOrDefault();
if (model==null)
if (model == null)
{
model = new RB_MicroShop_Basics();
}
......@@ -1297,7 +1316,7 @@ namespace Mall.Module.BaseSetUp
{
template_message_list,
model
};
};
}
......
......@@ -1413,7 +1413,7 @@ namespace Mall.Module.Product
int IsNormalServer = Convert.ToInt32(Config.IsNormalServer);
if (IsNormalServer != 1)
{
token = "37_0-lYjcCk7K4srJ_SWIumrzRMY4s2UdttdugOEOLBoeQEOUEXga2hutyJrM7PC9QZkK9aXu7g4nE62J7YWfA2T6CKbq1_qPq0njfMvmk2_OZndOv-Rr1BIRhkqa6gFq71zo2Dr73T5tFe5QQ9LWQhAFAEPJ";
token = "38_LJMrD0ffPj7GXvXxgGMwDMx9Qs_tXYe0HObmYw_2IGQUTRWSk9WbmrROPvEHEGgroSkhOctTFXFO1RAcYKo0uxrTHw5aRz9NXZ_t3Tp4M486c5XkLvPamTfWg_LaegNpvAqfVGWR-IiBbVL9GURgACAUIF";
}
if (string.IsNullOrEmpty(token))
{
......
......@@ -707,6 +707,36 @@ namespace Mall.Module.User
return flag;
}
/// <summary>
/// 修改微信小程序商城订阅配置信息
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public bool SetAllMiniProgramMallSubscribeModule(RB_MiniProgram_Extend extModel)
{
bool flag = false;
if (extModel.MallBaseId > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_MiniProgram_Extend.OrderSuccessTpl),extModel.OrderSuccessTpl},
{ nameof(RB_MiniProgram_Extend.OrderCancelTpl),extModel.OrderCancelTpl},
{ nameof(RB_MiniProgram_Extend.OrderDeliverGoodsTpl),extModel.OrderDeliverGoodsTpl},
{ nameof(RB_MiniProgram_Extend.RefundTpl),extModel.RefundTpl},
{ nameof(RB_MiniProgram_Extend.ActiveStateTpl),extModel.ActiveStateTpl},
{ nameof(RB_MiniProgram_Extend.AuditResultTpl),extModel.AuditResultTpl},
{ nameof(RB_MiniProgram_Extend.ReflectSuccessTpl),extModel.ReflectSuccessTpl},
{ nameof(RB_MiniProgram_Extend.ReflectFailTpl),extModel.ReflectFailTpl},
{ nameof(RB_MiniProgram_Extend.MembersLevelChangeTpl),extModel.MembersLevelChangeTpl},
};
flag = programRepository.Update(fileds, new WhereHelper(nameof(RB_MiniProgram_Extend.MallBaseId), extModel.MallBaseId));
}
return flag;
}
/// <summary>
/// 修改微信小程序分销订阅配置信息
/// </summary>
......
......@@ -915,6 +915,7 @@ namespace Mall.WebApi.Controllers.Education
x.Major,
x.LableNameList,
x.Name,
x.TeacherId,
CreateDate = x.CreateDate.ToString("yyyy-MM-dd HH:ss:mm"),
});
......
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