Commit 568bc0f9 authored by 黄奎's avatar 黄奎

页面修改

parent 2c6dd821
......@@ -327,5 +327,27 @@ namespace Edu.Module.Customer
var list = customer_FinishdetailsRepository.GetCustomerFinishdetailsPageRepository(pageIndex, pageSize, out rowsCount, query);
return list;
}
/// <summary>
/// 客户兑换奖品
/// </summary>
/// <returns></returns>
public virtual bool ExchangeKudoModule(int customerId, string exchangeCode, out string message)
{
message = "";
bool flag = false;
Dictionary<string, object> fileds = new Dictionary<string, object>()
{
{nameof(RB_Customer_Finishtask_Extend.ExchangeStatus),2 } ,
{nameof(RB_Customer_Finishtask_Extend.ExchangeTime),DateTime.Now },
};
List<WhereHelper> where = new List<WhereHelper>()
{
new WhereHelper(nameof(RB_Customer_Finishtask_Extend.ExchangeCode),exchangeCode),
new WhereHelper(nameof(RB_Customer_Finishtask_Extend.CustomerId),customerId),
};
flag = customer_FinishtaskRepository.Update(fileds, where);
return flag;
}
}
}
......@@ -417,5 +417,18 @@ namespace Edu.WebApi.Controllers.Customer
return ApiResult.Success(data: pageModel);
}
#endregion
/// <summary>
/// 兑换奖品
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult ExchangeKudo()
{
string exchangeCode = base.ParmJObj.GetStringValue("ExchangeCode");
var CustomerId = base.ParmJObj.GetInt("CustomerId");
bool flag = taskModule.ExchangeKudoModule(CustomerId, exchangeCode, out string message);
return flag ? ApiResult.Success() : ApiResult.Failed(message: message);
}
}
}
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