Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
c450e290
Commit
c450e290
authored
Jul 22, 2021
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
878a12e1
f7c83eec
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
241 additions
and
10 deletions
+241
-10
Config.cs
Mall.Common/Config.cs
+10
-0
RB_Education_Consult.cs
Mall.Model/Entity/Education/RB_Education_Consult.cs
+15
-0
ActivityModule.cs
Mall.Module.Education/ActivityModule.cs
+56
-1
RB_AccountRepository.cs
Mall.Repository/Education/RB_AccountRepository.cs
+27
-0
RB_Education_ActivityRepository.cs
Mall.Repository/Education/RB_Education_ActivityRepository.cs
+1
-1
RB_Education_ConsultRepository.cs
Mall.Repository/Education/RB_Education_ConsultRepository.cs
+4
-1
WeChatPayController.cs
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
+2
-0
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+116
-2
EducationController.cs
Mall.WebApi/Controllers/Education/EducationController.cs
+2
-0
appsettings.json
Mall.WebApi/appsettings.json
+8
-5
No files found.
Mall.Common/Config.cs
View file @
c450e290
...
...
@@ -700,5 +700,15 @@ namespace Mall.Common
}
}
/// <summary>
/// 活动点名功能的功能code
/// </summary>
public
static
string
EduRollCallActionCode
{
get
{
return
ReadConfigKey
(
"EduRollCallActionCode"
);
}
}
}
}
\ No newline at end of file
Mall.Model/Entity/Education/RB_Education_Consult.cs
View file @
c450e290
...
...
@@ -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
;
}
}
}
Mall.Module.Education/ActivityModule.cs
View file @
c450e290
...
...
@@ -599,6 +599,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>
...
...
@@ -778,7 +793,7 @@ namespace Mall.Module.Education
public
List
<
RB_Education_Consult_Extend
>
GetCommerceConsultListRepository_V3
(
int
pageIndex
,
int
pageSize
,
out
long
rowsCount
,
RB_Education_Consult_Extend
query
)
{
var
list
=
education_ConsultRepository
.
GetCommerceConsultListRepository_V3
(
pageIndex
,
pageSize
,
out
rowsCount
,
query
);
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
!=
null
&&
list
.
Any
())
{
if
(
list
.
Any
(
x
=>
x
.
EduUserId
>
0
))
{
...
...
@@ -869,6 +884,46 @@ 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>
/// 批量更新报名人员的点名状态
/// </summary>
/// <param name="list"></param>
/// <returns></returns>
public
bool
UpdateBatchRollCall
(
List
<
RB_Education_Consult_Extend
>
list
)
{
bool
flag
=
false
;
foreach
(
var
item
in
list
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Education_Consult_Extend
.
IsRollCall
),
item
.
IsRollCall
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
{
FiledName
=
nameof
(
RB_Education_Consult_Extend
.
Id
),
FiledValue
=
item
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
education_ConsultRepository
.
Update
(
keyValues
,
wheres
);
//更新会员是否点名
}
return
flag
;
}
/// <summary>
/// 获取商会活动报名分页列表
...
...
Mall.Repository/Education/RB_AccountRepository.cs
View file @
c450e290
...
...
@@ -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
;
}
}
}
Mall.Repository/Education/RB_Education_ActivityRepository.cs
View file @
c450e290
...
...
@@ -172,7 +172,7 @@ WHERE 1=1
}
else
{
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Education_Activity_Extend
.
Id
));
builder
.
AppendFormat
(
" ORDER BY A.{0} DESC "
,
nameof
(
RB_Education_Activity_Extend
.
StartTime
));
}
}
return
GetPage
<
RB_Education_Activity_Extend
>(
pageIndex
,
pageSize
,
out
rowsCount
,
builder
.
ToString
(),
parameters
).
ToList
();
...
...
Mall.Repository/Education/RB_Education_ConsultRepository.cs
View file @
c450e290
...
...
@@ -401,7 +401,10 @@ left join rb_education_activity b on a.ActivityId = b.Id where 1=1
{
builder
.
AppendFormat
(
" AND b.{0} LIKE '%{1}%' "
,
nameof
(
RB_Education_Activity_Extend
.
ActivityName
),
query
.
ActivityName
.
Trim
());
}
if
(
query
.
IsCommission
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Education_Consult_Extend
.
IsCommission
),
query
.
IsCommission
);
}
if
(
query
.
ActivityId
>
0
)
{
builder
.
AppendFormat
(
" AND a.{0}={1} "
,
nameof
(
RB_Education_Consult_Extend
.
ActivityId
),
query
.
ActivityId
);
...
...
Mall.WebApi/Controllers/AppletWeChat/WeChatPayController.cs
View file @
c450e290
...
...
@@ -922,6 +922,8 @@ namespace Mall.WebApi.Controllers.AppletWeChat
demodel
.
IsCancelConfirm
=
model
.
IsCancelConfirm
;
demodel
.
CreateTime
=
System
.
DateTime
.
Now
;
demodel
.
EduStudentId
=
(
bmodel
!=
null
&&
bmodel
.
Id
>
0
)
?
bmodel
.
StudentId
:
0
;
demodel
.
IsCommission
=
1
;
demodel
.
IsRollCall
=
1
;
var
umodel
=
userModule
.
GetMemberUserInfo
(
demodel
.
UserId
);
demodel
.
OrderSource
=
umodel
.
Source
;
//判断当前人的点数
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
c450e290
...
...
@@ -1758,7 +1758,7 @@ namespace Mall.WebApi.Controllers.Education
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
var
list
=
activityModule
.
GetActivityPageListModule
(
pageModel
.
pageIndex
,
pageModel
.
pageSize
,
out
long
rowsCount
,
query
,
isQuerySignup
:
true
);
if
(
userInfo
.
UserId
>
0
)
{
foreach
(
var
item
in
list
)
...
...
@@ -2076,6 +2076,89 @@ namespace Mall.WebApi.Controllers.Education
});
return
ApiResult
.
Success
(
data
:
pageModel
);
}
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetRollCallConsultList
()
{
var
userInfo
=
AppletUserInfo
;
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
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
OrderStatus
=
1
;
// query.IsCommission = 1;
var
list
=
activityModule
.
GetRollCallConsultList
(
query
);
var
result
=
list
.
Select
(
x
=>
new
{
x
.
Id
,
x
.
LinkMan
,
x
.
LinkTel
,
x
.
UserId
,
x
.
IsRollCall
,
x
.
IsCommission
,
x
.
ActivityId
,
CreateTime
=
x
.
CreateTime
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
),
});
return
ApiResult
.
Success
(
data
:
result
);
}
/// <summary>
/// 获取商会活动报名分页列表
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetUpdateRollCallConsultList
()
{
var
userInfo
=
AppletUserInfo
;
List
<
RB_Education_Consult_Extend
>
newList
=
JsonConvert
.
DeserializeObject
<
List
<
RB_Education_Consult_Extend
>>(
RequestParm
.
msg
.
ToString
());
if
(
newList
==
null
||
!
newList
.
Any
())
{
return
ApiResult
.
Failed
(
"订单已全部提成/暂无报入订单"
);
}
var
query
=
new
RB_Education_Consult_Extend
();
query
.
EnrollState
=
0
;
query
.
ActivityId
=
newList
.
FirstOrDefault
()?.
ActivityId
??
0
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
OrderStatus
=
1
;
// query.IsCommission = 1;
var
list
=
new
List
<
RB_Education_Consult_Extend
>();
if
(
query
.
ActivityId
>
0
)
{
list
=
activityModule
.
GetRollCallConsultList
(
query
);
}
List
<
RB_Education_Consult_Extend
>
resultList
=
new
List
<
RB_Education_Consult_Extend
>();
foreach
(
var
item
in
newList
)
{
var
oldItem
=
list
.
Where
(
x
=>
x
.
IsCommission
==
1
&&
item
.
Id
==
x
.
Id
).
FirstOrDefault
();
if
(
oldItem
!=
null
&&
oldItem
.
Id
>
0
)
{
oldItem
.
IsRollCall
=
item
.
IsRollCall
;
resultList
.
Add
(
oldItem
);
}
}
if
(
resultList
==
null
||
!
resultList
.
Any
())
{
return
ApiResult
.
Failed
(
"订单已全部提成/暂无报入订单"
);
}
bool
result
=
activityModule
.
UpdateBatchRollCall
(
resultList
);
return
result
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
"点名更新失败"
);
}
#
endregion
...
...
@@ -2213,7 +2296,7 @@ namespace Mall.WebApi.Controllers.Education
#
region
#
region
代理的学校
/// <summary>
/// 获取代理的学校
/// </summary>
...
...
@@ -2322,6 +2405,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
Mall.WebApi/Controllers/Education/EducationController.cs
View file @
c450e290
...
...
@@ -2837,6 +2837,8 @@ namespace Mall.WebApi.Controllers.Education
var
umodel
=
new
RB_Member_User_Extend
();
demodel
.
OrderSource
=
UserSourceEnum
.
EduERP
;
demodel
.
PaymentWay
=
OrderPaymentTypeEnum
.
OfflinePay
;
demodel
.
IsCommission
=
1
;
demodel
.
IsRollCall
=
1
;
int
id
=
activityModule
.
SetActivityEnrollInfo
(
demodel
,
umodel
);
if
(
id
>
0
)
{
...
...
Mall.WebApi/appsettings.json
View file @
c450e290
{
"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"
:
"/"
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment