Commit c5f20f75 authored by liudong1993's avatar liudong1993

商品管理

parent 1eb51310
using Mall.Common.Plugin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mall.Common.Enum.Goods
{
/// <summary>
/// 司导商品类型枚举
/// </summary>
public enum GuideCarGoodsTypeEnum
{
/// <summary>
/// 接机
/// </summary>
[EnumField("接机")]
JJ = 1,
/// <summary>
/// 送机
/// </summary>
[EnumField("送机")]
SJ = 2,
/// <summary>
/// 市区
/// </summary>
[EnumField("市区")]
SQ = 3,
/// <summary>
/// 周边
/// </summary>
[EnumField("周边")]
ZB = 4,
/// <summary>
/// 线路用车
/// </summary>
[EnumField("线路用车")]
Line = 5
}
}
......@@ -459,5 +459,61 @@ namespace Mall.Model.Entity.Product
/// 发货地
/// </summary>
public string SendArea { get; set; }
/// <summary>
/// 商品分类 0正常商品 1司导商品
/// </summary>
public int GoodsClassify { get; set; }
/// <summary>
/// 站点id
/// </summary>
public int? SiteId { get; set; }
/// <summary>
/// 导游id
/// </summary>
public int? GuideId { get; set; }
/// <summary>
/// 车辆id
/// </summary>
public int? CarId { get; set; }
/// <summary>
/// 车颜色id
/// </summary>
public int? CarColorId { get; set; }
/// <summary>
/// 车牌号
/// </summary>
public string CarNumber { get; set; }
/// <summary>
/// 车购买年份
/// </summary>
public string CarBuyYear { get; set; }
/// <summary>
/// 服务类型 枚举
/// </summary>
public GuideCarGoodsTypeEnum? CarType { get; set; }
/// <summary>
/// 使用日期 天
/// </summary>
public decimal? UserDay { get; set; }
/// <summary>
/// 线路名称
/// </summary>
public string LineName { get; set; }
/// <summary>
/// 关联城市或景点
/// </summary>
public string LineDescription { get; set; }
/// <summary>
/// 是否拼座 1是 2否
/// </summary>
public int? IsSpell { get; set; }
/// <summary>
/// 乘坐人数
/// </summary>
public int? RideNum { get; set; }
/// <summary>
/// 提前预定时间
/// </summary>
public int? AdvanceDay { get; set; }
}
}
using VT.FW.DB;
using Mall.Common.Enum.Goods;
using Mall.Common.Enum.User;
using System;
using System.Collections.Generic;
using System.Text;
namespace Mall.Model.Entity.Product
{
/// <summary>
/// 司导可预定实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_TargetDate
{
/// <summary>
/// Id
/// </summary>
public int Id
{
get;
set;
}
/// <summary>
/// 商品id
/// </summary>
public int GoodsId
{
get;
set;
}
/// <summary>
/// 可预定日期
/// </summary>
public DateTime? Date { get; set; }
}
}
......@@ -15,6 +15,14 @@ namespace Mall.Model.Extend.Product
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_Extend : RB_Goods
{
/// <summary>
/// 可预定日期
/// </summary>
public List<RB_Goods_TargetDate_Extend> TargetDateList { get; set; }
/// <summary>
/// 线路描述list
/// </summary>
public List<string> LineDescriptionList { get; set; }
/// <summary>
/// 微店id
/// </summary>
......
using VT.FW.DB;
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
using Mall.Model.Entity.BaseSetUp;
using Mall.Model.Extend.BaseSetUp;
namespace Mall.Model.Extend.Product
{
/// <summary>
/// 商品可预定日期表扩展实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DefaultConnection")]
public class RB_Goods_TargetDate_Extend : RB_Goods_TargetDate
{
/// <summary>
/// 商品ids
/// </summary>
public string GoodsIds { get; set; }
}
}
This diff is collapsed.
......@@ -7,7 +7,7 @@ using System.Text;
namespace Mall.Repository.GuideCar
{
public class RB_GuideCar_BaseRepository : BaseRepository<RB_GuideCar_Base>
public class RB_GuideCar_BaseRepository : BaseRepository<RB_GuideCar_Base>
{
/// <summary>
......@@ -18,7 +18,7 @@ namespace Mall.Repository.GuideCar
public List<RB_GuideCar_Base_Extend> GetList(RB_GuideCar_Base_Extend dmodel)
{
string where = $" 1=1 ";
if (dmodel.TenantId > 0)
if (dmodel.TenantId > 0)
{
where += $@" and {nameof(RB_GuideCar_Base.TenantId)}={dmodel.TenantId}";
}
......
using System;
using System.Collections.Generic;
using System.Text;
using Mall.Model.Entity.Product;
using Mall.Model.Extend.Product;
using System.Linq;
namespace Mall.Repository.Product
{
/// <summary>
/// 商品可预定日期仓储层
/// </summary>
public class RB_Goods_TargetDateRepository : BaseRepository<RB_Goods_TargetDate>
{
/// <summary>
/// 列表
/// </summary>
/// <param name="dmodel">查询条件</param>
/// <returns></returns>
public List<RB_Goods_TargetDate_Extend> GetList(RB_Goods_TargetDate_Extend dmodel)
{
string where = $" 1=1 and Date >= '{DateTime.Now.ToString("yyyy-MM-dd")}'";
if (dmodel.Id > 0) {
where += $@" and {nameof(RB_Goods_TargetDate.Id)}={dmodel.Id}";
}
if (dmodel.GoodsId > 0) {
where += $@" and {nameof(RB_Goods_TargetDate.GoodsId)}={dmodel.GoodsId}";
}
if (!string.IsNullOrEmpty(dmodel.GoodsIds)) {
where += $@" and {nameof(RB_Goods_TargetDate.GoodsId)} in({dmodel.GoodsIds})";
}
string sql = $@"select * from RB_Goods_TargetDate where {where} order by Date asc";
return Get<RB_Goods_TargetDate_Extend>(sql).ToList();
}
}
}
......@@ -2056,6 +2056,7 @@ namespace Mall.WebApi.Controllers.MallBase
demodel.SubName ??= "";//副标题
demodel.IsLiveGoods ??= 2;//是否直播商品 1是 2否
demodel.SendArea ??= "";//发货地
demodel.GoodsClassify = 0;
if (demodel.IsProxy == 1 && demodel.CostPrice > 0)
{
decimal ProxyMoney = 0;
......
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