Commit 8a298d62 authored by 吴春's avatar 吴春

提交

parent e741890c
......@@ -207,46 +207,55 @@ namespace Mall.Model.Entity.User
// get;
// set;
//}
///// <summary>
///// 待打款佣金描述
///// </summary>
//public string CommissionTobePaidName
//{
// get;
// set;
//}
///// <summary>
///// 用户须知描述
///// </summary>
//public string UserNotesName
//{
// get;
// set;
//}
///// <summary>
///// 我要提现描述
///// </summary>
//public string IWantToWithdrawName
//{
// get;
// set;
//}
///// <summary>
///// 提现金额描述
///// </summary>
//public string WithdrawalAmountName
//{
// get;
// set;
//}
///// <summary>
///// 提现方式描述
///// </summary>
//public string WithdrawalWayName
//{
// get;
// set;
//}
/// <summary>
/// 待打款佣金描述
/// </summary>
public string CommissionTobePaidName
{
get;
set;
}
/// <summary>
/// 用户须知描述
/// </summary>
public string UserNotesName
{
get;
set;
}
/// <summary>
/// 用户须知
/// </summary>
public string UserNotes
{
get;
set;
}
/// <summary>
/// 我要提现描述
/// </summary>
public string IWantToWithdrawName
{
get;
set;
}
/// <summary>
/// 提现金额描述
/// </summary>
public string WithdrawalAmountName
{
get;
set;
}
/// <summary>
/// 提现方式描述
/// </summary>
public string WithdrawalWayName
{
get;
set;
}
public int Status { get; set; }
......
......@@ -66,7 +66,10 @@ namespace Mall.Module.User
/// </summary>
private readonly RB_Goods_SpecificationValueRepository goods_SpecificationValueRepository = new RB_Goods_SpecificationValueRepository();
/// <summary>
/// 规格值
/// </summary>
private readonly RB_SmallShops_CustomRepository smallShopsCustomRepository = new RB_SmallShops_CustomRepository();
#region 微店管理
/// <summary>
......@@ -113,7 +116,7 @@ namespace Mall.Module.User
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public RB_SmallShops_Info_Extend GetSmallShopsInfo_V2(int UserId,int tenantId, int mallBaseId)
public RB_SmallShops_Info_Extend GetSmallShopsInfo_V2(int UserId, int tenantId, int mallBaseId)
{
var model = smallShops_InfoRepository.GetListForSingle(new RB_SmallShops_Info_Extend() { UserId = UserId, TenantId = tenantId, MallBaseId = mallBaseId }).FirstOrDefault();
return model;
......@@ -143,7 +146,8 @@ namespace Mall.Module.User
{
keyValues.Add(nameof(RB_SmallShops_Info.Remark), ssmodel.Remark);
}
else {
else
{
return false;
}
......@@ -166,7 +170,7 @@ namespace Mall.Module.User
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public bool SetSmallShopsCommission(int smallShopsId, decimal commission, int tenantId, int mallBaseId,int empId)
public bool SetSmallShopsCommission(int smallShopsId, decimal commission, int tenantId, int mallBaseId, int empId)
{
var model = smallShops_InfoRepository.GetEntity(smallShopsId);
if (model == null) { return false; }
......@@ -240,11 +244,13 @@ namespace Mall.Module.User
{
var goodsList = smallShops_PriceRepository.GetSmallShopsGoodsPricePageList(pageIndex, pageSize, out count, demodel);
List<object> RList = new List<object>();
if (goodsList.Any()) {
if (goodsList.Any())
{
//查询出所有商品id
string goodsIds = string.Join(",", goodsList.Select(x => x.GoodsId ?? 0).Distinct());
var glist = goodsRepository.GetSingleListForGoodsId(new RB_Goods_Extend() { GoodsIds = goodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
foreach (var item in glist) {
foreach (var item in glist)
{
item.CoverImage = "";
if (!string.IsNullOrEmpty(item.CarouselImage) && item.CarouselImage != "[]")
{
......@@ -259,9 +265,11 @@ namespace Mall.Module.User
var sslist = smallShops_PriceRepository.GetList(new RB_SmallShops_Price_Extend() { GoodsIds = goodsIds, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
foreach (var item in goodsList) {
foreach (var item in goodsList)
{
var model = glist.Where(x => x.Id == item.GoodsId).FirstOrDefault();
if (model != null) {
if (model != null)
{
model.SpecificationList = new List<RB_Goods_Specification_Extend>();
model.SpecificationPriceList = new List<RB_Goods_SpecificationPrice_Extend>();
if (model.IsCustomSpecification == 1)
......@@ -292,7 +300,7 @@ namespace Mall.Module.User
{
var smodel = model.SpecificationList[i];
var svmodel = smodel.SpecificationValueList.Where(x => x.Sort == Convert.ToInt32(ssarr[i])).FirstOrDefault();
attr_list.Add(new
{
attr_group_name = smodel.Name,
......@@ -304,8 +312,10 @@ namespace Mall.Module.User
//查找 设置的店铺价格
var ssmodel = sslist.Where(x => x.GoodsId == item.GoodsId && x.SpecificationKey == qitem.SpecificationSort).FirstOrDefault();
var ssPrice = qitem.SellingPrice ?? 0;
if (ssmodel != null) {
if (ssmodel.PriceType == 1) {
if (ssmodel != null)
{
if (ssmodel.PriceType == 1)
{
ssPrice += Math.Ceiling(ssPrice * (ssmodel.UpPrice ?? 0) / 100);
}
}
......@@ -387,7 +397,8 @@ namespace Mall.Module.User
{
List<object> RList = new List<object>();
var glist = goodsRepository.GetPageList(pageIndex, pageSize, out count, new RB_Goods_Extend() { Id = demodel.GoodsId ?? 0, Name = demodel.GoodsName, TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId });
if (glist.Any()) {
if (glist.Any())
{
//查询出所有商品id
string goodsIds = string.Join(",", glist.Select(x => x.Id).Distinct());
foreach (var item in glist)
......@@ -515,7 +526,8 @@ namespace Mall.Module.User
var insertList = sSPList.Where(x => !splist.Select(y => y.SpecificationKey).Contains(x.SpecificationKey)).ToList();
var updateList = splist.Where(x => sSPList.Select(y => y.SpecificationKey).Contains(x.SpecificationKey)).ToList();
var deleteList = splist.Where(x => !sSPList.Select(y => y.SpecificationKey).Contains(x.SpecificationKey)).ToList();
foreach (var item in insertList) {
foreach (var item in insertList)
{
if (item.UpPrice > 0)
{
item.SmallShopsId = model.Id;
......@@ -530,7 +542,8 @@ namespace Mall.Module.User
smallShops_PriceRepository.Insert(item);
}
}
foreach (var item in updateList) {
foreach (var item in updateList)
{
var sspmodel = sSPList.Where(x => x.SpecificationKey == item.SpecificationKey).FirstOrDefault();
if (sspmodel.UpPrice > 0)
{
......@@ -548,16 +561,20 @@ namespace Mall.Module.User
};
smallShops_PriceRepository.Update(keyValues, wheres);
}
else {
else
{
smallShops_PriceRepository.Delete(item);
}
}
foreach (var item in deleteList) {
foreach (var item in deleteList)
{
smallShops_PriceRepository.Delete(item);
}
}
else {
foreach (var item in sSPList) {
else
{
foreach (var item in sSPList)
{
if (item.UpPrice > 0)
{
item.SmallShopsId = model.Id;
......@@ -577,5 +594,85 @@ namespace Mall.Module.User
}
#endregion
#region 微店自定义
/// <summary>
/// 微信自定义列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_SmallShops_Custom> GetSmallShopsCustomList(RB_SmallShops_Custom query)
{
return smallShopsCustomRepository.GetSmallShopsCustomList(query);
}
/// <summary>
/// 设置分销自定义
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public bool SetSmallShopsCustomInfo(RB_SmallShops_Custom demodel)
{
var OModel = smallShopsCustomRepository.GetSmallShopsCustomList(new RB_SmallShops_Custom() { TenantId = demodel.TenantId, MallBaseId = demodel.MallBaseId }).FirstOrDefault();
if (OModel != null)
{
demodel.Id = OModel.Id;
Dictionary<string, object> keyValuePairs = new Dictionary<string, object>() {
{ nameof(RB_SmallShops_Custom.HeadBackImage),demodel.HeadBackImage},
{ nameof(RB_SmallShops_Custom.WithdrawalFilletPX),demodel.WithdrawalFilletPX},
{ nameof(RB_SmallShops_Custom.WithdrawalText),demodel.WithdrawalText},
{ nameof(RB_SmallShops_Custom.WithdrawalColor),demodel.WithdrawalColor},
{ nameof(RB_SmallShops_Custom.WithdrawalTextColor),demodel.WithdrawalTextColor},
{ nameof(RB_SmallShops_Custom.WithdrawalImage),demodel.WithdrawalImage},
{ nameof(RB_SmallShops_Custom.SmallShopOrderName),demodel.SmallShopOrderName},
{ nameof(RB_SmallShops_Custom.SmallShopOrderImage),demodel.SmallShopOrderImage},
{ nameof(RB_SmallShops_Custom.WithdrawalDetailName),demodel.WithdrawalDetailName},
{ nameof(RB_SmallShops_Custom.WithdrawalDetailImage),demodel.WithdrawalDetailImage},
{ nameof(RB_SmallShops_Custom.MyCustomerName),demodel.MyCustomerName},
{ nameof(RB_SmallShops_Custom.MyCustomerImage),demodel.MyCustomerImage},
{ nameof(RB_SmallShops_Custom.SmallShopQRCodeName),demodel.SmallShopQRCodeName},
{ nameof(RB_SmallShops_Custom.SmallShopQRCodeImage),demodel.SmallShopQRCodeImage},
{ nameof(RB_SmallShops_Custom.SmallShopSetUpName),demodel.SmallShopSetUpName},
{ nameof(RB_SmallShops_Custom.SmallShopSetUpImage),demodel.SmallShopSetUpImage},
{ nameof(RB_SmallShops_Custom.LiveName),demodel.LiveName},
{ nameof(RB_SmallShops_Custom.LiveImage),demodel.LiveImage},
{ nameof(RB_SmallShops_Custom.CommissionWithdrawnName),demodel.CommissionWithdrawnName},
{ nameof(RB_SmallShops_Custom.OutstandingCommissionName),demodel.OutstandingCommissionName},
{ nameof(RB_SmallShops_Custom.WithdrawableName),demodel.WithdrawableName},
{ nameof(RB_SmallShops_Custom.CommissionTobePaidName),demodel.CommissionTobePaidName},
{ nameof(RB_SmallShops_Custom.UserNotesName),demodel.UserNotesName},
{ nameof(RB_SmallShops_Custom.UserNotes),demodel.UserNotes},
{ nameof(RB_SmallShops_Custom.IWantToWithdrawName),demodel.IWantToWithdrawName},
{ nameof(RB_SmallShops_Custom.WithdrawalAmountName),demodel.WithdrawalAmountName},
{ nameof(RB_SmallShops_Custom.WithdrawalWayName),demodel.WithdrawalWayName}
};
List<WhereHelper> whereHelpers = new List<WhereHelper>() {
new WhereHelper(){
FiledName=nameof(RB_SmallShops_Custom.Id),
FiledValue=demodel.Id,
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
FiledName=nameof(RB_SmallShops_Custom.TenantId),
FiledValue=demodel.TenantId,
OperatorEnum=OperatorEnum.Equal
},
new WhereHelper(){
FiledName=nameof(RB_SmallShops_Custom.MallBaseId),
FiledValue=demodel.MallBaseId,
OperatorEnum=OperatorEnum.Equal
}
};
return smallShopsCustomRepository.Update(keyValuePairs, whereHelpers);
}
else
{
return smallShopsCustomRepository.Insert(demodel) > 0;
}
}
#endregion
}
}
......@@ -223,11 +223,18 @@ SELECT a.ID as MemberCouponId,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinCons
userWhere += $" AND {nameof(RB_DiscountCoupon_Extend.UserId)}={query.UserId}";
}
}
// string sql = @$" SELECT t.*,c.MemberNum from (SELECT a.ID,a.`Name`,a.`Describe`,a.CouponType,a.UseType,a.StartDate,a.EndDate,a.MinConsumePrice,a.MaxDiscountsPrice,a.DiscountsPrice,a.IndateDay,a.IndateType from rb_discountcoupon as a
// {where} and a.IndateType=1
//UNION ALL
//SELECT a.ID,a.`Name`,a.`Describe`,a.CouponType,a.UseType,a.StartDate,a.EndDate,a.MinConsumePrice,a.MaxDiscountsPrice,a.DiscountsPrice,a.IndateDay,a.IndateType from rb_discountcoupon as a
// {where} and a.IndateType=2 and a.StartDate>NOW() and a.EndDate<NOW() )
//as t LEFT JOIN (SELECT CouponId,COUNT(*) as MemberNum from rb_member_discountcoupon where `Status`=0 and UseState!=2 {userWhere} GROUP BY CouponId) as c on t.ID=c.CouponId ";
string sql = @$" SELECT t.*,c.MemberNum from (SELECT a.ID,a.`Name`,a.`Describe`,a.CouponType,a.UseType,a.StartDate,a.EndDate,a.MinConsumePrice,a.MaxDiscountsPrice,a.DiscountsPrice,a.IndateDay,a.IndateType from rb_discountcoupon as a
{where} and a.IndateType=1
UNION ALL
SELECT a.ID,a.`Name`,a.`Describe`,a.CouponType,a.UseType,a.StartDate,a.EndDate,a.MinConsumePrice,a.MaxDiscountsPrice,a.DiscountsPrice,a.IndateDay,a.IndateType from rb_discountcoupon as a
{where} and a.IndateType=2 and a.StartDate>NOW() and a.EndDate<NOW() )
{where} and a.IndateType=2 and a.EndDate>NOW() )
as t LEFT JOIN (SELECT CouponId,COUNT(*) as MemberNum from rb_member_discountcoupon where `Status`=0 and UseState!=2 {userWhere} GROUP BY CouponId) as c on t.ID=c.CouponId ";
return GetPage<RB_DiscountCoupon_Extend>(pageIndex, pageSize, out rowCount, sql).ToList();
}
......@@ -332,7 +339,7 @@ SELECT a.*,b.TriggerType,b.GrantNum from rb_coupon_selfmotion as b LEFT JOIN rb_
LEFT JOIN rb_coupon_selfmotionmember as c on c.SelfMotionId=b.ID
where (a.IndateType=1 or (a.IndateType=2 and a.StartDate<NOW() and a.EndDate>NOW())) {builder.ToString()}
and a.`Status`=0 and b.`Status`=0 and IsAll=1 {userWhere} ";
return Get<RB_DiscountCoupon_Extend> (sql).ToList();
return Get<RB_DiscountCoupon_Extend>(sql).ToList();
}
#endregion
......
......@@ -980,6 +980,16 @@ as t GROUP BY t.CreateDate desc";
where += $" and a.OrderNo like'%{dmodel.OrderNo}%'";
}
if (dmodel.TenantId > 0)
{
where += $" and a.TenantId={dmodel.TenantId} ";
}
if (dmodel.MallBaseId > 0)
{
where += $" and a.MallBaseId={dmodel.MallBaseId} ";
}
if (dmodel.SupplierId > 0)
{
where += $" and b.SupplierId={dmodel.SupplierId} ";
......@@ -1029,7 +1039,15 @@ GROUP BY b.GoodsId,b.SupplierId,b.OrderId ";
{
where += $" and a.OrderNo like'%{dmodel.OrderNo}%'";
}
if (dmodel.TenantId > 0)
{
where += $" and a.TenantId={dmodel.TenantId} ";
}
if (dmodel.MallBaseId > 0)
{
where += $" and a.MallBaseId={dmodel.MallBaseId} ";
}
if (dmodel.SupplierId > 0)
{
where += $" and b.SupplierId={dmodel.SupplierId} ";
......@@ -1130,7 +1148,15 @@ GROUP BY od.GoodsId,o.OrderId
{
where += $" and a.OrderNo like'%{dmodel.OrderNo}%'";
}
if (dmodel.TenantId > 0)
{
where += $" and a.TenantId={dmodel.TenantId} ";
}
if (dmodel.MallBaseId > 0)
{
where += $" and a.MallBaseId={dmodel.MallBaseId} ";
}
if (dmodel.SupplierId > 0)
{
where += $" and b.SupplierId={dmodel.SupplierId} ";
......@@ -1180,7 +1206,15 @@ GROUP BY b.Id";
{
where += $" and a.OrderNo like'%{dmodel.OrderNo}%'";
}
if (dmodel.TenantId > 0)
{
where += $" and a.TenantId={dmodel.TenantId} ";
}
if (dmodel.MallBaseId > 0)
{
where += $" and a.MallBaseId={dmodel.MallBaseId} ";
}
if (dmodel.SupplierId > 0)
{
where += $" and b.SupplierId={dmodel.SupplierId} ";
......
......@@ -6,21 +6,21 @@ using System.Text;
namespace Mall.Repository.User
{
public class RB_SmallShops_CustomRepository:BaseRepository<RB_SmallShops_Custom>
public class RB_SmallShops_CustomRepository : BaseRepository<RB_SmallShops_Custom>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_SmallShops_Custom); } }
/// <summary>
/// 物料规则列表
/// 微信自定义分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public List<RB_SmallShops_Custom> GetPageListRepository(int pageIndex, int pageSize, out long rowCount, RB_SmallShops_Custom query)
public List<RB_SmallShops_Custom> GetSmallShopsCustomPageList(int pageIndex, int pageSize, out long rowCount, RB_SmallShops_Custom query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_SmallShops_Custom.Status)}=0");
......@@ -35,21 +35,18 @@ namespace Mall.Repository.User
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.MallBaseId)}={query.MallBaseId}");
}
}
return GetPage<RB_SmallShops_Custom>(pageIndex, pageSize, out rowCount, builder.ToString()).ToList();
}
/// <summary>
/// 物流规则列表
/// 微信自定义列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_SmallShops_Custom> GetLogisticsRulesList(RB_SmallShops_Custom query)
public List<RB_SmallShops_Custom> GetSmallShopsCustomList(RB_SmallShops_Custom query)
{
StringBuilder builder = new StringBuilder();
builder.Append($" SELECT * FROM {TableName} WHERE {nameof(RB_SmallShops_Custom.Status)}=0 ");
......@@ -67,7 +64,7 @@ namespace Mall.Repository.User
{
builder.Append($" AND {nameof(RB_SmallShops_Custom.MallBaseId)}={query.MallBaseId}");
}
}
return Get<RB_SmallShops_Custom>(builder.ToString()).ToList();
}
......
......@@ -19,6 +19,7 @@ using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Configuration.Json;
using Google.Protobuf.WellKnownTypes;
using Mall.Model.Entity.User;
namespace Mall.WebApi.Controllers.User
{
......@@ -186,13 +187,15 @@ namespace Mall.WebApi.Controllers.User
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetSmallShopsCommission() {
public ApiResult SetSmallShopsCommission()
{
var req = RequestParm;
JObject parms = JObject.Parse(req.msg.ToString());
int SmallShopsId = parms.GetInt("SmallShopsId", 0);
decimal Commission = parms.GetDecimal("Commission");
if (SmallShopsId <= 0) {
if (SmallShopsId <= 0)
{
return ApiResult.Failed();
}
......@@ -201,11 +204,197 @@ namespace Mall.WebApi.Controllers.User
{
return ApiResult.Success();
}
else {
else
{
return ApiResult.Failed();
}
}
#endregion
#region 微店自定义
/// <summary>
/// 新增分销商自定义
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult SetDistributorCustomInfo()
{
var requestParm = RequestParm;
RB_SmallShops_Custom demodel = JsonConvert.DeserializeObject<RB_SmallShops_Custom>(requestParm.msg.ToString());
if (string.IsNullOrWhiteSpace(demodel.HeadBackImage))
{
return ApiResult.ParamIsNull("请传递头部背景图片");
}
if (string.IsNullOrEmpty(demodel.WithdrawalText))
{
return ApiResult.ParamIsNull("请传递提现按钮文本");
}
if (string.IsNullOrEmpty(demodel.WithdrawalColor))
{
return ApiResult.ParamIsNull("请传递提现按钮颜色");
}
if (string.IsNullOrEmpty(demodel.WithdrawalTextColor))
{
return ApiResult.ParamIsNull("请传递按钮文字颜色");
}
if (string.IsNullOrEmpty(demodel.WithdrawalImage))
{
return ApiResult.ParamIsNull("请传递提现图标");
}
if (string.IsNullOrEmpty(demodel.SmallShopOrderName))
{
return ApiResult.ParamIsNull("请传递店铺订单名称");
}
if (string.IsNullOrEmpty(demodel.SmallShopOrderImage))
{
return ApiResult.ParamIsNull("请传递店铺订单图片");
}
if (demodel.WithdrawalDetailName == null || string.IsNullOrWhiteSpace(demodel.WithdrawalDetailName))
{
return ApiResult.ParamIsNull("请传递提现明细");
}
if (string.IsNullOrEmpty(demodel.WithdrawalDetailImage))
{
return ApiResult.ParamIsNull("请传递提现明细图片");
}
if (demodel.MyCustomerName == null || string.IsNullOrWhiteSpace(demodel.MyCustomerName))
{
return ApiResult.ParamIsNull("请传递我的客户");
}
if (string.IsNullOrEmpty(demodel.MyCustomerImage))
{
return ApiResult.ParamIsNull("请传递我的客户图片");
}
if (demodel.SmallShopQRCodeName == null || string.IsNullOrWhiteSpace(demodel.SmallShopQRCodeName))
{
return ApiResult.ParamIsNull("请传递店铺二维码");
}
if (string.IsNullOrEmpty(demodel.SmallShopQRCodeImage))
{
return ApiResult.ParamIsNull("请传递店铺二维码图片");
}
if (demodel.SmallShopSetUpName == null || string.IsNullOrWhiteSpace(demodel.SmallShopSetUpName))
{
return ApiResult.ParamIsNull("请传递店铺设置");
}
if (string.IsNullOrEmpty(demodel.SmallShopSetUpImage))
{
return ApiResult.ParamIsNull("请传递店铺设置图片");
}
if (demodel.LiveName == null || string.IsNullOrWhiteSpace(demodel.LiveName))
{
return ApiResult.ParamIsNull("请传递直播名称");
}
//
if (string.IsNullOrEmpty(demodel.LiveImage))
{
return ApiResult.ParamIsNull("请传递直播图标");
}
if (string.IsNullOrEmpty(demodel.CommissionWithdrawnName))
{
return ApiResult.ParamIsNull("请传递已提现佣金描述");
}
if (string.IsNullOrEmpty(demodel.OutstandingCommissionName))
{
return ApiResult.ParamIsNull("请传递未结算佣金描述");
}
if (string.IsNullOrEmpty(demodel.WithdrawableName))
{
return ApiResult.ParamIsNull("请传递可提现佣金描述");
}
if (string.IsNullOrEmpty(demodel.CommissionTobePaidName))
{
return ApiResult.ParamIsNull("请传递待打款佣金描述");
}
if (string.IsNullOrEmpty(demodel.UserNotesName))
{
return ApiResult.ParamIsNull("请传递用户须知描述");
}
if (string.IsNullOrEmpty(demodel.UserNotes))
{
return ApiResult.ParamIsNull("请传递用户须知");
}
if (string.IsNullOrWhiteSpace(demodel.IWantToWithdrawName))
{
return ApiResult.Failed("请传递我要提现描述");
}
if (string.IsNullOrWhiteSpace(demodel.WithdrawalAmountName))
{
return ApiResult.Failed("请传递提现金额描述");
}
if (string.IsNullOrWhiteSpace(demodel.WithdrawalWayName))
{
return ApiResult.Failed("请传递提现方式描述");
}
demodel.TenantId = Convert.ToInt32(requestParm.uid);
demodel.MallBaseId = requestParm.MallBaseId;
demodel.CreateDate = DateTime.Now;
demodel.UpdateDate = DateTime.Now;
bool flag = smallShopsModule.SetSmallShopsCustomInfo(demodel);
if (flag)
{
return ApiResult.Success();
}
else
{
return ApiResult.Failed();
}
}
/// <summary>
/// 获取分销商自定义
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetDistributorCustomInfo()
{
var requestParm = RequestParm;
var model = smallShopsModule.GetSmallShopsCustomList(new Model.Entity.User.RB_SmallShops_Custom { TenantId = requestParm.TenantId, MallBaseId = requestParm.MallBaseId }).FirstOrDefault();
if (model == null)
{
model = new Model.Entity.User.RB_SmallShops_Custom();
}
return ApiResult.Success("", new
{
model.Id,
model.HeadBackImage,
model.WithdrawalFilletPX,
model.WithdrawalText,
model.WithdrawalColor,
model.WithdrawalTextColor,
model.WithdrawalImage,
model.SmallShopOrderName,
model.SmallShopOrderImage,
model.WithdrawalDetailName,
model.WithdrawalDetailImage,
model.MyCustomerName,
model.MyCustomerImage,
model.SmallShopQRCodeName,
model.SmallShopQRCodeImage,
model.SmallShopSetUpName,
model.SmallShopSetUpImage,
model.LiveName,
model.LiveImage,
model.CommissionWithdrawnName,
model.OutstandingCommissionName,
model.WithdrawableName,
model.CommissionTobePaidName,
model.UserNotesName,
model.UserNotes,
model.IWantToWithdrawName,
model.WithdrawalAmountName,
model.WithdrawalWayName,
UpdateDate = model.UpdateDate.HasValue ? model.UpdateDate.Value.ToString("yyyy-MM-dd HH:mm:ss") : "",
});
}
#endregion
}
}
\ 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