Commit 1b10d783 authored by 黄奎's avatar 黄奎

代码优化

parent f11ab251
...@@ -10,5 +10,10 @@ namespace Mall.Model.Extend.TradePavilion ...@@ -10,5 +10,10 @@ namespace Mall.Model.Extend.TradePavilion
/// </summary> /// </summary>
public class RB_Commerce_Details_Extend: RB_Commerce_Details public class RB_Commerce_Details_Extend: RB_Commerce_Details
{ {
/// <summary>
/// 活动编号【查询使用】
/// </summary>
public string QActivityIds { get; set; }
} }
} }
...@@ -5,8 +5,11 @@ ...@@ -5,8 +5,11 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Remove="CacheEntity\**" />
<Compile Remove="Query\Applet\**" /> <Compile Remove="Query\Applet\**" />
<EmbeddedResource Remove="CacheEntity\**" />
<EmbeddedResource Remove="Query\Applet\**" /> <EmbeddedResource Remove="Query\Applet\**" />
<None Remove="CacheEntity\**" />
<None Remove="Query\Applet\**" /> <None Remove="Query\Applet\**" />
</ItemGroup> </ItemGroup>
...@@ -14,10 +17,6 @@ ...@@ -14,10 +17,6 @@
<Compile Remove="Extend\BaseSetUp\RB_Logistics_Pinkage_Extend.cs" /> <Compile Remove="Extend\BaseSetUp\RB_Logistics_Pinkage_Extend.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="CacheEntity\" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="VT.FW" Version="1.0.1" /> <PackageReference Include="VT.FW" Version="1.0.1" />
</ItemGroup> </ItemGroup>
......
using Mall.Model.Extend.TradePavilion;
using Mall.Repository.TradePavilion;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Module.TradePavilion
{
/// <summary>
/// 商会活动处理类
/// </summary>
public class CommerceActivityModule
{
/// <summary>
/// 商会活动仓储层对象
/// </summary>
private readonly RB_Commerce_ActivityRepository commerce_ActivityRepository = new RB_Commerce_ActivityRepository();
/// <summary>
/// 商会活动类型表仓储层对象
/// </summary>
private readonly RB_Commerce_ActivityTypeRepository activityTypeRepository = new RB_Commerce_ActivityTypeRepository();
/// <summary>
/// 商会活动详情表仓储层对象
/// </summary>
private readonly RB_Commerce_DetailsRepository detailsRepository = new RB_Commerce_DetailsRepository();
/// <summary>
/// 获取商会活动分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Commerce_Activity_Extend> GetCommerceActivityPageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_Activity_Extend query)
{
return commerce_ActivityRepository.GetCommerceActivityPageListRepository(pageIndex, pageSize, out rowsCount, query);
}
/// <summary>
/// 获取商会活动类型分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Commerce_ActivityType_Extend> GetCommerceActivityTypePageListModule(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_ActivityType_Extend query)
{
return activityTypeRepository.GetCommerceActivityTypePageListRepository(pageIndex, pageSize, out rowsCount, query);
}
/// <summary>
/// 获取商会活动详情列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Commerce_Details_Extend> GetCommerceDetailsListModule(RB_Commerce_Details_Extend query)
{
return detailsRepository.GetCommerceDetailsListRepository(query);
}
}
}
using Mall.Model.Entity.TradePavilion; using Mall.Common.Enum;
using Mall.Model.Entity.TradePavilion;
using Mall.Model.Extend.TradePavilion;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using VT.FW.DB.Dapper;
namespace Mall.Repository.TradePavilion namespace Mall.Repository.TradePavilion
{ {
...@@ -10,6 +14,46 @@ namespace Mall.Repository.TradePavilion ...@@ -10,6 +14,46 @@ namespace Mall.Repository.TradePavilion
/// </summary> /// </summary>
public class RB_Commerce_ActivityRepository : BaseRepository<RB_Commerce_Activity> public class RB_Commerce_ActivityRepository : BaseRepository<RB_Commerce_Activity>
{ {
/// <summary>
/// 获取商会活动分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Commerce_Activity_Extend> GetCommerceActivityPageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_Activity_Extend query)
{
rowsCount = 0;
DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Commerce_Activity
WHERE 1=1
");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Activity_Extend.Status), (int)DateStateEnum.Normal);
if (query == null)
{
return new List<RB_Commerce_Activity_Extend>();
}
else
{
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Activity_Extend.TenantId), query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Activity_Extend.MallBaseId), query.MallBaseId);
}
if (!string.IsNullOrEmpty(query.ActivityName))
{
builder.AppendFormat(" AND {0} LIKE @Name ", nameof(RB_Commerce_Activity_Extend.ActivityName));
parameters.Add("Name", "%" + query.ActivityName.Trim() + "%");
}
}
return GetPage<RB_Commerce_Activity_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
} }
} }
using Mall.Model.Entity.TradePavilion; using Mall.Common.Enum;
using Mall.Model.Entity.TradePavilion;
using Mall.Model.Extend.TradePavilion;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using VT.FW.DB.Dapper;
namespace Mall.Repository.TradePavilion namespace Mall.Repository.TradePavilion
{ {
...@@ -10,5 +14,46 @@ namespace Mall.Repository.TradePavilion ...@@ -10,5 +14,46 @@ namespace Mall.Repository.TradePavilion
/// </summary> /// </summary>
public class RB_Commerce_ActivityTypeRepository : BaseRepository<RB_Commerce_ActivityType> public class RB_Commerce_ActivityTypeRepository : BaseRepository<RB_Commerce_ActivityType>
{ {
/// <summary>
/// 获取商会活动类型分页列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Commerce_ActivityType_Extend> GetCommerceActivityTypePageListRepository(int pageIndex, int pageSize, out long rowsCount, RB_Commerce_ActivityType_Extend query)
{
rowsCount = 0;
DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Commerce_ActivityType
WHERE 1=1
");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_ActivityType_Extend.Status), (int)DateStateEnum.Normal);
if (query == null)
{
return new List<RB_Commerce_ActivityType_Extend>();
}
else
{
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_ActivityType_Extend.TenantId), query.TenantId);
}
if (query.MallBaseId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_ActivityType_Extend.MallBaseId), query.MallBaseId);
}
if (!string.IsNullOrEmpty(query.TypeName))
{
builder.AppendFormat(" AND {0} LIKE @Name ", nameof(RB_Commerce_ActivityType_Extend.TypeName));
parameters.Add("Name", "%" + query.TypeName.Trim() + "%");
}
}
return GetPage<RB_Commerce_ActivityType_Extend>(pageIndex, pageSize, out rowsCount, builder.ToString(), parameters).ToList();
}
} }
} }
using Mall.Model.Entity.TradePavilion; using Mall.Model.Entity.TradePavilion;
using Mall.Model.Extend.TradePavilion;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq;
using System.Text; using System.Text;
using VT.FW.DB.Dapper;
namespace Mall.Repository.TradePavilion namespace Mall.Repository.TradePavilion
{ {
...@@ -10,6 +13,37 @@ namespace Mall.Repository.TradePavilion ...@@ -10,6 +13,37 @@ namespace Mall.Repository.TradePavilion
/// </summary> /// </summary>
public class RB_Commerce_DetailsRepository : BaseRepository<RB_Commerce_Details> public class RB_Commerce_DetailsRepository : BaseRepository<RB_Commerce_Details>
{ {
/// <summary>
/// 获取商会活动详情列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Commerce_Details_Extend> GetCommerceDetailsListRepository(RB_Commerce_Details_Extend query)
{
DynamicParameters parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT *
FROM RB_Commerce_Details
WHERE 1=1
");
if (query == null)
{
return new List<RB_Commerce_Details_Extend>();
}
else
{
if (query.ActivityId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Details_Extend.ActivityId), query.ActivityId);
}
if (!string.IsNullOrEmpty(query.QActivityIds))
{
builder.AppendFormat(" AND {0} IN({1}) ", nameof(RB_Commerce_Details_Extend.ActivityId), query.QActivityIds);
}
}
return Get<RB_Commerce_Details_Extend>(builder.ToString(), parameters).ToList();
}
} }
} }
\ No newline at end of file
...@@ -33,7 +33,7 @@ SELECT * ...@@ -33,7 +33,7 @@ SELECT *
FROM RB_InvestmentProcurement FROM RB_InvestmentProcurement
WHERE 1=1 WHERE 1=1
"); ");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Company_Extend.Status), (int)DateStateEnum.Normal); builder.AppendFormat(" AND {0}={1} ", nameof(RB_InvestmentProcurement_Extend.Status), (int)DateStateEnum.Normal);
if (query == null) if (query == null)
{ {
return new List<RB_InvestmentProcurement_Extend>(); return new List<RB_InvestmentProcurement_Extend>();
......
...@@ -37,34 +37,34 @@ namespace Mall.WebApi.Controllers.User ...@@ -37,34 +37,34 @@ namespace Mall.WebApi.Controllers.User
/// <summary> /// <summary>
/// 商户账号处理类 /// 商户账号处理类
/// </summary> /// </summary>
private Module.User.TenantModule TenantModule = new Module.User.TenantModule(); private readonly Module.User.TenantModule TenantModule = new Module.User.TenantModule();
/// <summary> /// <summary>
/// 商户小程序处理类 /// 商户小程序处理类
/// </summary> /// </summary>
private Module.User.MiniProgramModule programModule = new Module.User.MiniProgramModule(); private readonly Module.User.MiniProgramModule programModule = new Module.User.MiniProgramModule();
/// <summary> /// <summary>
/// 菜单处理类 /// 菜单处理类
/// </summary> /// </summary>
private Module.User.MenuModule menuModule = new Module.User.MenuModule(); private readonly Module.User.MenuModule menuModule = new Module.User.MenuModule();
/// <summary> /// <summary>
/// 小程序图标处理类对象 /// 小程序图标处理类对象
/// </summary> /// </summary>
private Module.User.MiniProgramNaviconModule naviconModule = new Module.User.MiniProgramNaviconModule(); private readonly Module.User.MiniProgramNaviconModule naviconModule = new Module.User.MiniProgramNaviconModule();
/// <summary> /// <summary>
/// 小程序页面处理类 /// 小程序页面处理类
/// </summary> /// </summary>
private Module.User.MiniProgramPageModule programPageModule = new Module.User.MiniProgramPageModule(); private readonly Module.User.MiniProgramPageModule programPageModule = new Module.User.MiniProgramPageModule();
/// <summary> /// <summary>
/// 海报处理类对象 /// 海报处理类对象
/// </summary> /// </summary>
private Module.User.PosterModule posterModule = new Module.User.PosterModule(); private readonly Module.User.PosterModule posterModule = new Module.User.PosterModule();
/// <summary> /// <summary>
/// 插件处理类 /// 插件处理类
...@@ -74,15 +74,15 @@ namespace Mall.WebApi.Controllers.User ...@@ -74,15 +74,15 @@ namespace Mall.WebApi.Controllers.User
/// <summary> /// <summary>
/// 员工管理处理类 /// 员工管理处理类
/// </summary> /// </summary>
private Module.User.EmployeeModule employeeModule = new Module.User.EmployeeModule(); private readonly Module.User.EmployeeModule employeeModule = new Module.User.EmployeeModule();
/// <summary> /// <summary>
/// 产品处理类 /// 产品处理类
/// </summary> /// </summary>
private ProductModule productModule = new ProductModule(); private readonly ProductModule productModule = new ProductModule();
private Module.Property.AuthorizeModule authorizeModule = new Module.Property.AuthorizeModule(); private readonly Module.Property.AuthorizeModule authorizeModule = new Module.Property.AuthorizeModule();
#region 商户信息 #region 商户信息
[AllowAnonymous] [AllowAnonymous]
...@@ -941,79 +941,81 @@ namespace Mall.WebApi.Controllers.User ...@@ -941,79 +941,81 @@ namespace Mall.WebApi.Controllers.User
var data = programModule.GetMiniProgramModule(new RB_MiniProgram_Extend() { MallBaseId = RequestParm.MallBaseId }, isGetHomeData: true); var data = programModule.GetMiniProgramModule(new RB_MiniProgram_Extend() { MallBaseId = RequestParm.MallBaseId }, isGetHomeData: true);
List<object> resultList = new List<object>(); List<object> resultList = new List<object>();
List<object> normalList = new List<object>(); List<object> normalList = new List<object>
normalList.Add(new
{
key = "search",
name = "搜索框",
relation_id = 0,
is_edit = 0,
imgBg = Common.Config.GetOssFileUrl + "/Static/search-bg.png"
});
normalList.Add(new
{ {
key = "banner", new
name = "轮播图", {
relation_id = 0, key = "search",
is_edit = 0, name = "搜索框",
imgBg = Common.Config.GetOssFileUrl + "/Static/banner-bg.png" relation_id = 0,
}); is_edit = 0,
normalList.Add(new imgBg = Common.Config.GetOssFileUrl + "/Static/search-bg.png"
{ },
key = "home_nav", new
name = "导航图标", {
relation_id = 0, key = "banner",
is_edit = 1, name = "轮播图",
row_num = 4, relation_id = 0,
imgBg = Common.Config.GetOssFileUrl + "/Static/home-nav-bg.png" is_edit = 0,
}); imgBg = Common.Config.GetOssFileUrl + "/Static/banner-bg.png"
normalList.Add(new },
{ new
key = "video", {
name = "视频", key = "home_nav",
relation_id = 0, name = "导航图标",
is_edit = 1, relation_id = 0,
permission_key = "video", is_edit = 1,
video_url = "", row_num = 4,
video_pic_url = "", imgBg = Common.Config.GetOssFileUrl + "/Static/home-nav-bg.png"
imgBg = Common.Config.GetOssFileUrl + "/Static/video-bg.png" },
}); new
normalList.Add(new {
{ key = "video",
key = "notice", name = "视频",
name = "公告", relation_id = 0,
relation_id = 0, is_edit = 1,
is_edit = 1, permission_key = "video",
notice_url = "", video_url = "",
notice_bg_color = "#ED7E78", video_pic_url = "",
notice_text_color = "#FFFFFF", imgBg = Common.Config.GetOssFileUrl + "/Static/video-bg.png"
imgBg = Common.Config.GetOssFileUrl + "/Static/notice-bg.png" },
}); new
{
normalList.Add(new key = "notice",
{ name = "公告",
key = "topic", relation_id = 0,
name = "专题", is_edit = 1,
relation_id = 0, notice_url = "",
is_edit = 1, notice_bg_color = "#ED7E78",
permission_key = "topic", notice_text_color = "#FFFFFF",
topic_num = 1, imgBg = Common.Config.GetOssFileUrl + "/Static/notice-bg.png"
topic_url = "", },
topic_url_2 = "",
label_url = "", new
imgBg = Common.Config.GetOssFileUrl + "/Static/topic-bg.png" {
}); key = "topic",
normalList.Add(new name = "专题",
{ relation_id = 0,
key = "coupon", is_edit = 1,
name = "领券中心", permission_key = "topic",
relation_id = 0, topic_num = 1,
is_edit = 1, topic_url = "",
permission_key = "coupon", topic_url_2 = "",
coupon_url = "", label_url = "",
coupon_not_url = "", imgBg = Common.Config.GetOssFileUrl + "/Static/topic-bg.png"
imgBg = Common.Config.GetOssFileUrl + "/Static/coupon-bg.png" },
}); new
{
key = "coupon",
name = "领券中心",
relation_id = 0,
is_edit = 1,
permission_key = "coupon",
coupon_url = "",
coupon_not_url = "",
imgBg = Common.Config.GetOssFileUrl + "/Static/coupon-bg.png"
}
};
resultList.Add(new resultList.Add(new
{ {
...@@ -1029,15 +1031,17 @@ namespace Mall.WebApi.Controllers.User ...@@ -1029,15 +1031,17 @@ namespace Mall.WebApi.Controllers.User
IsShow = 1, IsShow = 1,
Enabled = 1 Enabled = 1
}); });
List<object> catList = new List<object>(); List<object> catList = new List<object>
catList.Add(new
{ {
key = "cat", new
name = "所有分类", {
relation_id = 0, key = "cat",
is_edit = 0, name = "所有分类",
imgBg = Common.Config.GetOssFileUrl + "/Static/cat-bg.png" relation_id = 0,
}); is_edit = 0,
imgBg = Common.Config.GetOssFileUrl + "/Static/cat-bg.png"
}
};
foreach (var item in categoryList) foreach (var item in categoryList)
{ {
catList.Add(new catList.Add(new
...@@ -1076,35 +1080,36 @@ namespace Mall.WebApi.Controllers.User ...@@ -1076,35 +1080,36 @@ namespace Mall.WebApi.Controllers.User
list = blockList list = blockList
}); });
List<object> pluginList = new List<object>(); List<object> pluginList = new List<object>
pluginList.Add(new
{ {
key = "booking", new
name = "预约", {
relation_id = 0, key = "booking",
is_edit = 0, name = "预约",
permission_key = "booking", relation_id = 0,
imgBg = Common.Config.GetOssFileUrl + "/Static/yuyue-bg.png" is_edit = 0,
}); permission_key = "booking",
pluginList.Add(new imgBg = Common.Config.GetOssFileUrl + "/Static/yuyue-bg.png"
{ },
key = "pintuan", new
name = "拼团", {
relation_id = 0, key = "pintuan",
is_edit = 0, name = "拼团",
permission_key = "pintuan", relation_id = 0,
imgBg = Common.Config.GetOssFileUrl + "/Static/yuyue-bg.png" is_edit = 0,
}); permission_key = "pintuan",
pluginList.Add(new imgBg = Common.Config.GetOssFileUrl + "/Static/yuyue-bg.png"
{ },
key = "advance", new
name = "预售", {
relation_id = 0, key = "advance",
is_edit = 0, name = "预售",
permission_key = "advance", relation_id = 0,
imgBg = Common.Config.GetOssFileUrl + "/Static/yushou-bg.png" is_edit = 0,
}); permission_key = "advance",
imgBg = Common.Config.GetOssFileUrl + "/Static/yushou-bg.png"
}
};
resultList.Add(new resultList.Add(new
{ {
key = "plugin", key = "plugin",
...@@ -1114,7 +1119,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -1114,7 +1119,7 @@ namespace Mall.WebApi.Controllers.User
var obj = new var obj = new
{ {
PlusInData = resultList, PlusInData = resultList,
HomeDataList = data.HomeDataList data.HomeDataList
}; };
return ApiResult.Success(data: obj); return ApiResult.Success(data: obj);
} }
...@@ -1245,7 +1250,6 @@ namespace Mall.WebApi.Controllers.User ...@@ -1245,7 +1250,6 @@ namespace Mall.WebApi.Controllers.User
public ApiResult SetMenu() public ApiResult SetMenu()
{ {
var extModel = JsonConvert.DeserializeObject<RB_Menu_Extend>(RequestParm.msg.ToString()); var extModel = JsonConvert.DeserializeObject<RB_Menu_Extend>(RequestParm.msg.ToString());
Int32.TryParse(RequestParm.uid.ToString(), out int TenantId);
var flag = menuModule.SetMenuModule(extModel); var flag = menuModule.SetMenuModule(extModel);
return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed(); return flag ? ApiResult.Success(data: extModel) : ApiResult.Failed();
} }
...@@ -1755,7 +1759,6 @@ namespace Mall.WebApi.Controllers.User ...@@ -1755,7 +1759,6 @@ namespace Mall.WebApi.Controllers.User
/// <returns></returns> /// <returns></returns>
public ApiResult RemoveMiniUserCenterMenuByMallId() public ApiResult RemoveMiniUserCenterMenuByMallId()
{ {
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var flag = programModule.DeleteMiniProgramUserCenterMenuModule(DetailIds: "", MallBaseId: RequestParm.MallBaseId); var flag = programModule.DeleteMiniProgramUserCenterMenuModule(DetailIds: "", MallBaseId: RequestParm.MallBaseId);
return flag ? ApiResult.Success() : ApiResult.Failed(); return flag ? ApiResult.Success() : ApiResult.Failed();
} }
...@@ -2014,11 +2017,13 @@ namespace Mall.WebApi.Controllers.User ...@@ -2014,11 +2017,13 @@ namespace Mall.WebApi.Controllers.User
list.Add(header); list.Add(header);
foreach (var item in dataList) foreach (var item in dataList)
{ {
var ExcelDataRow = new List<ExcelColumn>(); var ExcelDataRow = new List<ExcelColumn>
ExcelDataRow.Add(new ExcelColumn(value: item.Num.ToString())); {
ExcelDataRow.Add(new ExcelColumn(value: item.GoodsName)); new ExcelColumn(value: item.Num.ToString()),
ExcelDataRow.Add(new ExcelColumn(value: item.Income.ToString())); new ExcelColumn(value: item.GoodsName),
ExcelDataRow.Add(new ExcelColumn(value: item.SaleCount.ToString())); new ExcelColumn(value: item.Income.ToString()),
new ExcelColumn(value: item.SaleCount.ToString())
};
ExcelDataSource dataRow = new ExcelDataSource(30) ExcelDataSource dataRow = new ExcelDataSource(30)
{ {
ExcelRows = ExcelDataRow ExcelRows = ExcelDataRow
...@@ -2080,11 +2085,13 @@ namespace Mall.WebApi.Controllers.User ...@@ -2080,11 +2085,13 @@ namespace Mall.WebApi.Controllers.User
list.Add(header); list.Add(header);
foreach (var item in dataList) foreach (var item in dataList)
{ {
var ExcelDataRow = new List<ExcelColumn>(); var ExcelDataRow = new List<ExcelColumn>
ExcelDataRow.Add(new ExcelColumn(value: item.Num.ToString())); {
ExcelDataRow.Add(new ExcelColumn(value: item.UserName)); new ExcelColumn(value: item.Num.ToString()),
ExcelDataRow.Add(new ExcelColumn(value: item.Income.ToString())); new ExcelColumn(value: item.UserName),
ExcelDataRow.Add(new ExcelColumn(value: item.SaleCount.ToString())); new ExcelColumn(value: item.Income.ToString()),
new ExcelColumn(value: item.SaleCount.ToString())
};
ExcelDataSource dataRow = new ExcelDataSource(30) ExcelDataSource dataRow = new ExcelDataSource(30)
{ {
ExcelRows = ExcelDataRow ExcelRows = ExcelDataRow
...@@ -2158,7 +2165,7 @@ namespace Mall.WebApi.Controllers.User ...@@ -2158,7 +2165,7 @@ namespace Mall.WebApi.Controllers.User
extModel.TenantId = RequestParm.TenantId; extModel.TenantId = RequestParm.TenantId;
extModel.CreateDate = DateTime.Now; extModel.CreateDate = DateTime.Now;
var flag = programModule.SetLiveConfigModule(extModel); var flag = programModule.SetLiveConfigModule(extModel);
return ApiResult.Success(data: extModel); return flag? ApiResult.Success(data: extModel):ApiResult.Failed();
} }
#endregion #endregion
} }
......
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
<ProjectReference Include="..\Mall.Module.Product\Mall.Module.Product.csproj" /> <ProjectReference Include="..\Mall.Module.Product\Mall.Module.Product.csproj" />
<ProjectReference Include="..\Mall.Module.Property\Mall.Module.Property.csproj" /> <ProjectReference Include="..\Mall.Module.Property\Mall.Module.Property.csproj" />
<ProjectReference Include="..\Mall.Module.Reserve\Mall.Module.Reserve.csproj" /> <ProjectReference Include="..\Mall.Module.Reserve\Mall.Module.Reserve.csproj" />
<ProjectReference Include="..\Mall.Module.TradePavilion\Mall.Module.TradePavilion.csproj" />
<ProjectReference Include="..\Mall.Module.User\Mall.Module.User.csproj" /> <ProjectReference Include="..\Mall.Module.User\Mall.Module.User.csproj" />
<ProjectReference Include="..\Mall.ThirdCore\Mall.ThirdCore.csproj" /> <ProjectReference Include="..\Mall.ThirdCore\Mall.ThirdCore.csproj" />
</ItemGroup> </ItemGroup>
......
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