Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
huatu_API
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
liudong1993
huatu_API
Commits
dabb85e5
Commit
dabb85e5
authored
Aug 26, 2025
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
企业微信新订单推送调整
parent
58b4daf0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
30 deletions
+39
-30
CustomerOrderModule.cs
REBORN.Module.SellModule/CustomerOrderModule.cs
+10
-3
SellOrderModule.cs
REBORN.Module.SellModule/SellOrderModule.cs
+3
-1
VisaService.cs
REBORN.Services.DMCService/VisaService.cs
+3
-1
SellOrderService.cs
REBORN.Services.SellService/SellOrderService.cs
+23
-25
No files found.
REBORN.Module.SellModule/CustomerOrderModule.cs
View file @
dabb85e5
...
@@ -5,6 +5,7 @@ using REBORN.Common;
...
@@ -5,6 +5,7 @@ using REBORN.Common;
using
REBORN.Common.API
;
using
REBORN.Common.API
;
using
REBORN.Common.EMail
;
using
REBORN.Common.EMail
;
using
REBORN.Common.Enum
;
using
REBORN.Common.Enum
;
using
REBORN.Common.Enum.Dmc
;
using
REBORN.Common.Enum.Sell
;
using
REBORN.Common.Enum.Sell
;
using
REBORN.Common.Plugin
;
using
REBORN.Common.Plugin
;
using
REBORN.Model.Entity
;
using
REBORN.Model.Entity
;
...
@@ -1173,7 +1174,9 @@ namespace REBORN.Module.SellModule
...
@@ -1173,7 +1174,9 @@ namespace REBORN.Module.SellModule
#
region
推送企微机器人消息
#
region
推送企微机器人消息
var
mpcModel
=
messagePushConfigRepository
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
demodel
.
GroupId
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
var
mpcModel
=
messagePushConfigRepository
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
demodel
.
GroupId
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
if
(
userInfo
.
SimpleEasy
==
1
&&
!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
int
sendType
=
(
int
)
MessagePushSendType
.
NewOrder
;
var
sendTypeList
=
StringHelper
.
StringToListInt
(
mpcModel
?.
SendType
??
""
);
if
(
userInfo
.
SimpleEasy
==
1
&&
sendTypeList
!=
null
&&
(
sendTypeList
.
Any
(
x
=>
x
==
sendType
))&&
!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
{
{
string
jdName
=
hotel
?.
Name
;
string
jdName
=
hotel
?.
Name
;
...
@@ -3620,7 +3623,9 @@ namespace REBORN.Module.SellModule
...
@@ -3620,7 +3623,9 @@ namespace REBORN.Module.SellModule
// var dictModel = dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = demodel.GroupId, DictKey = "Client_OrderPush_Url" }).FirstOrDefault();
// var dictModel = dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = demodel.GroupId, DictKey = "Client_OrderPush_Url" }).FirstOrDefault();
var
mpcModel
=
messagePushConfigRepository
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
demodel
.
GroupId
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
var
mpcModel
=
messagePushConfigRepository
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
demodel
.
GroupId
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
if
(
userInfo
.
SimpleEasy
==
1
&&
!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
int
sendType
=
(
int
)
MessagePushSendType
.
NewOrder
;
var
sendTypeList
=
StringHelper
.
StringToListInt
(
mpcModel
?.
SendType
??
""
);
if
(
userInfo
.
SimpleEasy
==
1
&&
sendTypeList
!=
null
&&
(
sendTypeList
.
Any
(
x
=>
x
==
sendType
))
&&
!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
{
{
string
jdName
=
ticketCouponsRepository
.
GetEntity
(
demodel
.
CouponsId
)?.
Name
??
""
;
string
jdName
=
ticketCouponsRepository
.
GetEntity
(
demodel
.
CouponsId
)?.
Name
??
""
;
...
@@ -5313,7 +5318,9 @@ namespace REBORN.Module.SellModule
...
@@ -5313,7 +5318,9 @@ namespace REBORN.Module.SellModule
LogContent
=
userInfo
.
emName
+
"新增订单"
LogContent
=
userInfo
.
emName
+
"新增订单"
});
});
var
mpcModel
=
messagePushConfigRepository
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
demodel
.
GroupId
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
var
mpcModel
=
messagePushConfigRepository
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
demodel
.
GroupId
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
if
(
userInfo
.
SimpleEasy
==
1
&&
!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
int
sendType
=
(
int
)
MessagePushSendType
.
NewOrder
;
var
sendTypeList
=
StringHelper
.
StringToListInt
(
mpcModel
?.
SendType
??
""
);
if
(
userInfo
.
SimpleEasy
==
1
&&
sendTypeList
!=
null
&&
(
sendTypeList
.
Any
(
x
=>
x
==
sendType
))
&&
!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
{
{
// string jdName = ticketCouponsRepository.GetEntity(demodel.CouponsId)?.Name ?? "";
// string jdName = ticketCouponsRepository.GetEntity(demodel.CouponsId)?.Name ?? "";
...
...
REBORN.Module.SellModule/SellOrderModule.cs
View file @
dabb85e5
...
@@ -6759,7 +6759,9 @@ namespace REBORN.Module.SellModule
...
@@ -6759,7 +6759,9 @@ namespace REBORN.Module.SellModule
//自动更新候补订单
//自动更新候补订单
updaeTravelOrderWaitingRepository.UpdateOrderWaitingRepository(tmodel, null);
updaeTravelOrderWaitingRepository.UpdateOrderWaitingRepository(tmodel, null);
var mpcModel = messagePushConfigRepository.GetList(new RB_MessagePushConfig { SendType = "1" ,RB_Group_Id= dmodel .RB_Group_Id})?.FirstOrDefault() ?? new RB_MessagePushConfig();
var mpcModel = messagePushConfigRepository.GetList(new RB_MessagePushConfig { SendType = "1" ,RB_Group_Id= dmodel .RB_Group_Id})?.FirstOrDefault() ?? new RB_MessagePushConfig();
if (isAddorder && userInfo.SimpleEasy == 1&& !string.IsNullOrWhiteSpace(mpcModel?.WeChatBotWebhookUrl ?? "") && (mpcModel?.WeChatBotEnabled ?? 0) == 1)
int sendType = (int)MessagePushSendType.NewOrder;
var sendTypeList = StringHelper.StringToListInt(mpcModel?.SendType ?? "");
if (isAddorder && userInfo.SimpleEasy == 1 && sendTypeList != null && (sendTypeList.Any(x => x == sendType)) && !string.IsNullOrWhiteSpace(mpcModel?.WeChatBotWebhookUrl ?? "") && (mpcModel?.WeChatBotEnabled ?? 0) == 1)
{
{
//推送消息到企业微信
//推送消息到企业微信
//新增订单,推送消息
//新增订单,推送消息
REBORN.Services.DMCService/VisaService.cs
View file @
dabb85e5
...
@@ -5273,7 +5273,9 @@ namespace REBORN.Services.DMCService
...
@@ -5273,7 +5273,9 @@ namespace REBORN.Services.DMCService
else
if
(
userInfo
.
SimpleEasy
==
1
)
else
if
(
userInfo
.
SimpleEasy
==
1
)
{
{
var
mpcModel
=
messagePushConfigModule
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
userInfo
.
RB_Group_id
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
var
mpcModel
=
messagePushConfigModule
.
GetList
(
new
RB_MessagePushConfig
{
SendType
=
"1"
,
RB_Group_Id
=
userInfo
.
RB_Group_id
})?.
FirstOrDefault
()
??
new
RB_MessagePushConfig
();
if
(!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
int
sendType
=
(
int
)
MessagePushSendType
.
NewOrder
;
var
sendTypeList
=
StringHelper
.
StringToListInt
(
mpcModel
?.
SendType
??
""
);
if
(!
string
.
IsNullOrWhiteSpace
(
mpcModel
?.
WeChatBotWebhookUrl
??
""
)
&&
sendTypeList
!=
null
&&
(
sendTypeList
.
Any
(
x
=>
x
==
sendType
))
&&
(
mpcModel
?.
WeChatBotEnabled
??
0
)
==
1
)
{
//新增订单,推送消息
{
//新增订单,推送消息
try
try
{
{
...
...
REBORN.Services.SellService/SellOrderService.cs
View file @
dabb85e5
...
@@ -10851,20 +10851,19 @@ namespace REBORN.Services.SellService
...
@@ -10851,20 +10851,19 @@ namespace REBORN.Services.SellService
if
(!
string
.
IsNullOrWhiteSpace
(
isMyOrderStr
))
if
(!
string
.
IsNullOrWhiteSpace
(
isMyOrderStr
))
{
{
isMyOrder
=
parm
.
GetInt
(
"IsMyOrder"
,
1
);
isMyOrder
=
parm
.
GetInt
(
"IsMyOrder"
,
1
);
//
if (isMyOrder == 1)//自己的订单
if
(
isMyOrder
==
1
)
//自己的订单
//
{
{
//
OrderInfo.CreateBy = userInfo.EmployeeId;
OrderInfo
.
CreateBy
=
userInfo
.
EmployeeId
;
// OrderInfo.RB_Branch_
Id = userInfo.RB_Branch_id;
OrderInfo
.
Branch
Id
=
userInfo
.
RB_Branch_id
;
//
}
}
}
}
//else
else
//{
{
// OrderInfo.CreateBy = userInfo.EmployeeId;
int
empBranchId
=
parm
.
GetInt
(
"RB_Branch_Id"
,
-
1
);
// OrderInfo.RB_Branch_Id = userInfo.RB_Branch_id;
OrderInfo
.
BranchId
=
empBranchId
;
//}
}
int
empBranchId
=
parm
.
GetInt
(
"RB_Branch_Id"
,
-
1
);
OrderInfo
.
BranchId
=
empBranchId
;
OrderInfo
.
CreateBy
=
userInfo
.
EmployeeId
;
var
list
=
sellOrderModule
.
GetTravelOrderList_V2
(
pmodel
.
pageIndex
,
pmodel
.
pageSize
,
OrderInfo
,
out
long
count
,
""
,
true
,
true
,
userInfo
:
userInfo
,
isMyOrder
:
isMyOrder
);
var
list
=
sellOrderModule
.
GetTravelOrderList_V2
(
pmodel
.
pageIndex
,
pmodel
.
pageSize
,
OrderInfo
,
out
long
count
,
""
,
true
,
true
,
userInfo
:
userInfo
,
isMyOrder
:
isMyOrder
);
var
data
=
list
.
Select
(
x
=>
new
var
data
=
list
.
Select
(
x
=>
new
{
{
...
@@ -11206,7 +11205,7 @@ namespace REBORN.Services.SellService
...
@@ -11206,7 +11205,7 @@ namespace REBORN.Services.SellService
JObject
parm
=
JObject
.
Parse
(
request
.
msg
.
ToString
());
JObject
parm
=
JObject
.
Parse
(
request
.
msg
.
ToString
());
UserInfo
userInfo
=
CacheManager
.
User
.
RbUserCache
.
GetUserLoginInfo
(
request
.
uid
);
UserInfo
userInfo
=
CacheManager
.
User
.
RbUserCache
.
GetUserLoginInfo
(
request
.
uid
);
RB_Travel_Order_Extend
OrderInfo
=
JsonConvert
.
DeserializeObject
<
RB_Travel_Order_Extend
>(
request
.
msg
.
ToString
());
RB_Travel_Order_Extend
OrderInfo
=
JsonConvert
.
DeserializeObject
<
RB_Travel_Order_Extend
>(
request
.
msg
.
ToString
());
OrderInfo
.
CreateBy
=
userInfo
.
EmployeeId
;
//
OrderInfo.CreateBy = userInfo.EmployeeId;
OrderInfo
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
OrderInfo
.
RB_Group_Id
=
userInfo
.
RB_Group_id
;
OrderInfo
.
OutBranchId
=
-
1
;
OrderInfo
.
OutBranchId
=
-
1
;
string
isMyOrderStr
=
parm
.
GetStringValue
(
"IsMyOrder"
);
string
isMyOrderStr
=
parm
.
GetStringValue
(
"IsMyOrder"
);
...
@@ -11214,18 +11213,17 @@ namespace REBORN.Services.SellService
...
@@ -11214,18 +11213,17 @@ namespace REBORN.Services.SellService
if
(!
string
.
IsNullOrWhiteSpace
(
isMyOrderStr
))
if
(!
string
.
IsNullOrWhiteSpace
(
isMyOrderStr
))
{
{
isMyOrder
=
parm
.
GetInt
(
"IsMyOrder"
,
1
);
isMyOrder
=
parm
.
GetInt
(
"IsMyOrder"
,
1
);
//if (isMyOrder == 1)//自己的订单
if
(
isMyOrder
==
1
)
//自己的订单
//{
{
OrderInfo
.
RB_Branch_Id
=
userInfo
.
RB_Branch_id
;
//}
OrderInfo
.
CreateBy
=
userInfo
.
EmployeeId
;
}
}
else
{
int
empBranchId
=
parm
.
GetInt
(
"RB_Branch_Id"
,
-
1
);
OrderInfo
.
BranchId
=
empBranchId
;
}
}
//else
//{
// OrderInfo.CreateBy = userInfo.EmployeeId;
//}
int
empBranchId
=
parm
.
GetInt
(
"RB_Branch_Id"
,
-
1
);
OrderInfo
.
BranchId
=
empBranchId
;
OrderInfo
.
CreateBy
=
userInfo
.
EmployeeId
;
var
model
=
sellOrderModule
.
GetTravelOrderListStatistics_V2
(
OrderInfo
,
userInfo
,
isMyOrder
:
isMyOrder
)
??
new
RB_Travel_Order_Extend
();
var
model
=
sellOrderModule
.
GetTravelOrderListStatistics_V2
(
OrderInfo
,
userInfo
,
isMyOrder
:
isMyOrder
)
??
new
RB_Travel_Order_Extend
();
return
ApiResult
.
Success
(
""
,
new
return
ApiResult
.
Success
(
""
,
new
{
{
...
...
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