Commit 37c39d24 authored by liudong1993's avatar liudong1993

活动调整

parent b7a590e9
......@@ -92,5 +92,16 @@ namespace Mall.Model.Entity.TradePavilion
/// 报名截止时间
/// </summary>
public DateTime? SignEndTime { get; set; }
}
/// <summary>
/// 是否免费 1是 2否
/// </summary>
public int IsFree { get; set; }
/// <summary>
/// 报名点数
/// </summary>
public int Price { get; set; }
}
}
......@@ -55,5 +55,45 @@ namespace Mall.Model.Entity.TradePavilion
/// 删除状态
/// </summary>
public DateStateEnum Status { get; set; }
}
/// <summary>
/// 报名人数
/// </summary>
public int PeopleNum { get; set; }
/// <summary>
/// 单价(点数)
/// </summary>
public int UnitPrice { get; set; }
/// <summary>
/// 支付点数
/// </summary>
public int Money { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Remark { get; set; }
/// <summary>
/// 是否申请取消 1是 2否
/// </summary>
public int IsApplyForCancel { get; set; }
/// <summary>
/// 取消备注
/// </summary>
public string CancelRemark { get; set; }
/// <summary>
/// 申请取消审核状态 1同意 2拒绝
/// </summary>
public int ApplyForCancelStatus { get; set; }
/// <summary>
/// 拒绝备注
/// </summary>
public string RejectRemark { get; set; }
}
}
......@@ -19,5 +19,10 @@ namespace Mall.Model.Extend.TradePavilion
/// 用户编号【查询使用】
/// </summary>
public string QUserIds { get; set; }
/// <summary>
/// 报名状态 1正常 2取消 3查询所有
/// </summary>
public int EnrollState { get; set; }
}
}
......@@ -98,6 +98,8 @@ namespace Mall.Module.TradePavilion
{nameof(RB_Commerce_Activity_Extend.UpdateDate),model.UpdateDate },
{nameof(RB_Commerce_Activity_Extend.SignStartTime),model.SignStartTime },
{nameof(RB_Commerce_Activity_Extend.SignEndTime),model.SignEndTime },
{nameof(RB_Commerce_Activity_Extend.IsFree),model.IsFree },
{nameof(RB_Commerce_Activity_Extend.Price),model.Price },
};
flag = commerce_ActivityRepository.Update(fileds, new WhereHelper(nameof(RB_Commerce_Activity_Extend.Id), model.Id));
}
......
......@@ -28,13 +28,26 @@ SELECT *
FROM RB_Commerce_Consult
WHERE 1=1
");
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.Status), (int)DateStateEnum.Normal);
if (query == null)
{
return new List<RB_Commerce_Consult_Extend>();
}
else
{
if (query.EnrollState > 0)
{
if (query.EnrollState == 1)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.Status), (int)DateStateEnum.Normal);
}
else if (query.EnrollState == 2) {
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.Status), (int)DateStateEnum.Delete);
}
}
else
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.Status), (int)DateStateEnum.Normal);
}
if (query.TenantId > 0)
{
builder.AppendFormat(" AND {0}={1} ", nameof(RB_Commerce_Consult_Extend.TenantId), query.TenantId);
......
......@@ -418,6 +418,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
UserId = jObj.GetInt("UserId"),
LinkMan = jObj.GetStringValue("LinkMan"),
LinkTel = jObj.GetStringValue("LinkTel"),
PeopleNum = jObj.GetInt("PeopleNum"),
UnitPrice = jObj.GetInt("UnitPrice"),
Money = jObj.GetInt("Money"),
Remark = jObj.GetStringValue("Remark"),
};
var userInfo = AppletUserInfo;
extModel.Status = Common.Enum.DateStateEnum.Normal;
......@@ -425,8 +429,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
extModel.TenantId = userInfo?.TenantId ?? 0;
extModel.UserId = userInfo?.UserId ?? 0;
extModel.CreateTime = DateTime.Now;
var flag = consultModule.SetCommerceConsultModule(extModel);
return flag ? ApiResult.Success() : ApiResult.Failed();
string msg = consultModule.SetCommerceConsultModule(extModel);
return msg == "" ? ApiResult.Success() : ApiResult.Failed(msg);
}
/// <summary>
......@@ -437,8 +441,9 @@ namespace Mall.WebApi.Controllers.TradePavilion
{
JObject jObj = JObject.Parse(RequestParm.msg.ToString());
var ActivityId = jObj.GetInt("ActivityId");
string CancelRemark = jObj.GetStringValue("CancelRemark");
var userInfo = AppletUserInfo;
var flag = consultModule.CancelCommerceConsultModule(ActivityId, userInfo.UserId);
var flag = consultModule.CancelCommerceConsultModule(ActivityId, CancelRemark, userInfo.UserId);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
......@@ -336,8 +336,10 @@ namespace Mall.WebApi.Controllers.TradePavilion
CoverImg = jObj.GetStringValue("CoverImg"),
ActivityType = jObj.GetInt("ActivityType"),
ActivityInfo = jObj.GetStringValue("ActivityInfo"),
SignStartTime=jObj.GetDateTime("SignStartTime"),
SignStartTime = jObj.GetDateTime("SignStartTime"),
SignEndTime = jObj.GetDateTime("SignEndTime"),
IsFree = jObj.GetInt("IsFree", 2),
Price = jObj.GetInt("Price", 0)
};
try
{
......@@ -484,7 +486,8 @@ namespace Mall.WebApi.Controllers.TradePavilion
JObject jObj = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Commerce_Consult_Extend()
{
LinkMan = jObj.GetStringValue("LinkMan")
LinkMan = jObj.GetStringValue("LinkMan"),
EnrollState = jObj.GetInt("EnrollState", 0)
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
......@@ -518,6 +521,28 @@ namespace Mall.WebApi.Controllers.TradePavilion
var flag = consultModule.RemoveCommerceConsultModule(Id, Status);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
/// <summary>
/// 操作商会活动报名申请取消
/// </summary>
/// <returns></returns>
public ApiResult SetCommerceConsultApplyCancel()
{
JObject parms = JObject.Parse(RequestParm.msg.ToString());
var Id = parms.GetInt("Id", 0);
var ApplyForCancelStatus = parms.GetInt("ApplyForCancelStatus", 0);//申请取消审核状态 1同意 2拒绝
var RejectRemark = parms.GetStringValue("RejectRemark");//拒绝备注
if (Id <= 0) {
return ApiResult.ParamIsNull("请传递");
}
if (ApplyForCancelStatus == 2) {
if (string.IsNullOrEmpty(RejectRemark)) {
return ApiResult.ParamIsNull("请输入拒绝的原因");
}
}
var flag = consultModule.SetCommerceConsultApplyCancel(Id, ApplyForCancelStatus, RejectRemark);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
#endregion
#region 新闻信息管理
......
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