Commit c67adeb7 authored by 吴春's avatar 吴春
parents 4b9546dd 50df1b85
using System;
using VT.FW.DB;
namespace Mall.Model.Entity.Product
{
/// <summary>
/// 商品关联区域表实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_GroupBuy_Area
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 商品id
/// </summary>
public int? GoodsId
{
get;
set;
}
/// <summary>
/// 区域id
/// </summary>
public int? AreaId
{
get;
set;
}
/// <summary>
/// 区域类型 1国家 2省 3市 4区
/// </summary>
public int? AreaType
{
get;
set;
}
/// <summary>
/// 删除状态
/// </summary>
public int? Status
{
get;
set;
}
/// <summary>
/// 商户号
/// </summary>
public int TenantId
{
get;
set;
}
/// <summary>
/// 小程序id
/// </summary>
public int MallBaseId
{
get;
set;
}
/// <summary>
/// CreateDate
/// </summary>
public DateTime? CreateDate
{
get;
set;
}
}
}

using VT.FW.DB;
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
namespace Mall.Model.Extend.Product
{
/// <summary>
/// 商品关联区域表扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_GroupBuy_Area_Extend : RB_GroupBuy_Area
{
/// <summary>
/// 区域名称
/// </summary>
public string AreaName { get; set; }
/// <summary>
/// 商品ids
/// </summary>
public string GoodsIds { get; set; }
}
}
\ No newline at end of file
......@@ -131,5 +131,10 @@ namespace Mall.Model.Extend.Product
/// 服务列表
/// </summary>
public List<RB_ImageCommonModel> ServiceList { get; set; }
/// <summary>
/// 区域列表
/// </summary>
public List<RB_GroupBuy_Area_Extend> AreaList { get; set; }
}
}
This diff is collapsed.
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Product;
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
namespace Mall.Repository.Product
{
/// <summary>
/// 拼团地区信息
/// </summary>
public class RB_GroupBuy_AreaRepository : BaseRepository<RB_GroupBuy_Area>
{
/// <summary>
/// 根据查询条件获取地区信息
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_GroupBuy_Area_Extend> GetGroupBuyAreaRepository(RB_GroupBuy_Area_Extend query)
{
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT ga.*,d.Name as AreaName
FROM rb_groupbuy_area ga INNER JOIN rb_destination d ON ga.AreaId=d.ID
WHERE 1=1
");
builder.Append($" and ga.{nameof(RB_GroupBuy_Area_Extend.Status)}=0 ");
if (query.TenantId > 0)
{
builder.Append($@" and ga.{nameof(RB_GroupBuy_Area_Extend.TenantId)}={query.TenantId}");
}
if (query.MallBaseId > 0)
{
builder.Append($@" and ga.{nameof(RB_GroupBuy_Area_Extend.MallBaseId)}={query.MallBaseId}");
}
if (query.Id > 0)
{
builder.Append($@" and ga.{nameof(RB_GroupBuy_Area_Extend.Id)}={query.Id}");
}
if (query.GoodsId > 0)
{
builder.Append($@" and ga.{nameof(RB_GroupBuy_Area_Extend.GoodsId)}={query.GoodsId}");
}
if (!string.IsNullOrEmpty(query.GoodsIds))
{
builder.Append($@" and ga.{nameof(RB_GroupBuy_Area_Extend.GoodsId)} in({query.GoodsIds})");
}
builder.AppendFormat(" order by ga.Id desc ");
return Get<RB_GroupBuy_Area_Extend>(builder.ToString()).ToList();
}
}
}
......@@ -45,8 +45,7 @@ namespace Mall.WebApi.Controllers.CAP
[DotNetCore.CAP.CapSubscribe("show.time")]
public void CheckReceiveMessage(string result)
{
string str = "";
//string str = "";
Console.WriteLine(result);
}
}
......
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<_LastSelectedProfileId>F:\工作\微途\外网代码\mall.oytour.com_2\Mall.WindowsService\Properties\PublishProfiles\FolderProfile.pubxml</_LastSelectedProfileId>
</PropertyGroup>
<ItemGroup>
<Compile Update="WindowsService.cs">
<SubType>Component</SubType>
</Compile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishDir>F:\mallservices</PublishDir>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
<PublishTrimmed>False</PublishTrimmed>
</PropertyGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
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