Commit 3d63f5af authored by 吴春's avatar 吴春

提交代码

parent 985445a6
......@@ -700,5 +700,15 @@ namespace Mall.Common
}
}
/// <summary>
/// 活动点名功能的功能code
/// </summary>
public static string EduRollCallActionCode
{
get
{
return ReadConfigKey("EduRollCallActionCode");
}
}
}
}
\ No newline at end of file
......@@ -216,5 +216,20 @@ namespace Mall.Model.Entity.Education
/// 分销商id,所有的父级分销商,英文逗号分隔
/// </summary>
public string DistributorTree { get; set; }
/// <summary>
/// 是否点名,1-没有,2-是
/// </summary>
public int IsRollCall { get; set; }
/// <summary>
/// 是否提成,1-没有,2-是
/// </summary>
public int IsCommission { get; set; }
/// <summary>
/// 提成金额
/// </summary>
public decimal CommissionPrice { get; set; }
}
}
......@@ -588,6 +588,21 @@ namespace Mall.Module.Education
/// <summary>
/// 判断用户是否有某项功能权限
/// </summary>
/// <param name="actionCode">权限编码</param>
/// <param name="postIds">岗位编号【可以多个】</param>
/// <returns></returns>
public bool CheckUserFunctionRepository(string actionCode, string postIds)
{
return RB_AccountRepository.CheckUserFunctionRepository(actionCode, postIds);
}
/// <summary>
/// 获取教育用户的基础信息
/// </summary>
......@@ -858,6 +873,20 @@ namespace Mall.Module.Education
return list;
}
/// <summary>
/// 获取用户的报名列表
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="rowsCount"></param>
/// <param name="query"></param>
/// <returns></returns>
public List<RB_Education_Consult_Extend> GetRollCallConsultList(RB_Education_Consult_Extend query)
{
var list = education_ConsultRepository.GetExportCommerceConsultList(query);
return list;
}
/// <summary>
/// 获取商会活动报名分页列表
......
......@@ -184,5 +184,32 @@ WHERE 1=1 {4}
return builder.ToString();
}
/// <summary>
/// 判断用户是否有某项功能权限
/// </summary>
/// <param name="actionCode">权限编码</param>
/// <param name="postIds">岗位编号【可以多个】</param>
/// <returns></returns>
public bool CheckUserFunctionRepository(string actionCode, string postIds)
{
int result = 0;
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT 1
FROM RB_Menu_Function AS A
WHERE 1=1 AND A.FunctionCode='{0}' AND A.Id IN(SELECT Action_Id FROM rb_role_functionpermission WHERE Role_Id IN (SELECT RoleId FROM rb_post_role WHERE PostId IN({1})))
", actionCode.Trim(), postIds);
var obj = base.ExecuteScalar(builder.ToString());
if (obj != null)
{
Int32.TryParse(obj.ToString(), out result);
}
return result > 0;
}
}
}
......@@ -2076,6 +2076,39 @@ namespace Mall.WebApi.Controllers.Education
});
return ApiResult.Success(data: pageModel);
}
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetRollCallConsultList()
{
JObject jObj = JObject.Parse(RequestParm.msg.ToString());
var query = new RB_Education_Consult_Extend()
{
ActivityId = jObj.GetInt("ActivityId", 0),
LinkMan = jObj.GetStringValue("LinkMan"),
EnrollState = jObj.GetInt("EnrollState", 0),
};
query.MallBaseId = RequestParm.MallBaseId;
query.TenantId = RequestParm.TenantId;
query.OrderStatus = 1;
var list = activityModule.GetRollCallConsultList(query);
var result = list.Select(x => new
{
x.Id,
x.LinkMan,
x.LinkTel,
x.UserId,
CreateTime = x.CreateTime.ToString("yyyy-MM-dd HH:mm:ss"),
}); ;
return ApiResult.Success(data: result);
}
#endregion
......@@ -2213,7 +2246,7 @@ namespace Mall.WebApi.Controllers.Education
#region
#region 代理的学校
/// <summary>
/// 获取代理的学校
/// </summary>
......@@ -2322,6 +2355,37 @@ namespace Mall.WebApi.Controllers.Education
DeptName = eduModel.employeeModel?.DeptName ?? "",
});
}
/// <summary>
/// 获取是否有点名功能
/// </summary>
/// <returns></returns>
[HttpPost]
public ApiResult GetEduRollCallAction()
{
var req = RequestParm;
var userInfo = AppletUserInfo;
var eduModel = activityModule.GetEducationSellBaseInfo(new RB_Education_EduSell_Extend { TenantId = userInfo.TenantId, MallBaseId = userInfo.MallBaseId, UserId = userInfo.UserId }).FirstOrDefault();
if (eduModel == null || eduModel.Id == 0)
{
return ApiResult.Failed("", new { IsEduRollCallAction = 0 });
}
if (eduModel.employeeModel != null && eduModel.employeeModel.Id > 0)
{
try
{
bool retult = activityModule.CheckUserFunctionRepository(Config.EduRollCallActionCode, eduModel.employeeModel.Post_Id.ToString());
return retult ? ApiResult.Success("", new { IsEduRollCallAction = 1 }) : ApiResult.Failed("", new { IsEduRollCallAction = 0 });
}
catch (Exception ex)
{
return ApiResult.Failed("", new { IsEduRollCallAction = 0 });
}
}
return ApiResult.Failed("", new { IsEduRollCallAction = 0 });
}
#endregion
}
}
\ No newline at end of file
{
"ConnectionStrings": {
"DefaultConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_mall;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=test_reborn_mall;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"DefaultConnectionPName": "MySql.Data.MySqlClient",
"FinanceConnection": "server=192.168.20.214;user id=reborn;password=Reborn@2018;database=reborn_finance;CharSet=utf8mb4; Convert Zero Datetime=true; ",
"FinanceConnectionPName": "MySql.Data.MySqlClient",
......@@ -43,7 +43,7 @@
"sTenpayRechargeNotify": "http://mallapi.oytour.com/api/WeChatNotify/RechargeNotify", //微信充值回调地址
"sTenpayMemberBuyNotify": "http://mallapi.oytour.com/api/WeChatNotify/MemberBuyNotify", //微信充值回调地址
"sTenpayVipBuyNotify": "http://mallapi.oytour.com/api/WeChatNotify/VipBuyNotify", //微信购买VIP回调地址
"sTenpayActivityNotify": "http://mallapi.oytour.com/api/WeChatNotify/ActivityNotify",//赞羊教育活动在线支付回调地址
"sTenpayActivityNotify": "http://mallapi.oytour.com/api/WeChatNotify/ActivityNotify", //赞羊教育活动在线支付回调地址
"NetworkDirector": 1756, //网络主管的id,用于新建供应商账户的时候的创建人
"RB_Branch_Id": 49, //所属公司id
"IncomeDirector": 1756, //财务收入创建人
......@@ -54,12 +54,15 @@
"ExpendDepartment": 331,
"RebornDMC": "reborn_dmc",
"PropertyDB": "test_property",
"IncomeFinanceApi": "http://192.168.1.13:8083/api/Mall/InsertFinanceBatchForMallIn",
"PaymentFinanceApi": "http://192.168.1.13:8083/api/Mall/InsertFinanceBatchForMallOut",
"ZYRefundFinanceApi": "http://192.168.1.13:8083/api/Mall/SetMallOrderSalesTheWayRefund",
"IncomeFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallIn",
"PaymentFinanceApi": "http://192.168.20.7:8083/api/Mall/InsertFinanceBatchForMallOut",
"ZYRefundFinanceApi": "http://192.168.20.7:8083/api/Mall/SetMallOrderSalesTheWayRefund",
"PropertyApi": "http://192.168.1.13:8087/api/ECWorkFlow/SetECSuppliesStockInFlow",
"FinanceKey": "FinanceMallInsertToERPViitto2020",
"SettlementRate": "0.60",
"EduActivityIncomeFinanceId": "9",
"EduActivityExpendFinanceId": "9",
"EduRollCallActionCode": "ActivityRollCall",
"RabbitMqConfig": {
"HostName": "47.96.25.130",
"VirtualHost": "/",
......
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