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
dbce75a9
Commit
dbce75a9
authored
Sep 15, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交代码
parent
691b5cd6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
7 deletions
+63
-7
RB_ERP_Authorize.cs
Mall.Model/Entity/Property/RB_ERP_Authorize.cs
+6
-0
RB_DiscountCoupon_Extend.cs
....Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
+4
-0
RB_ERP_Authorize_Extend.cs
Mall.Model/Extend/Property/RB_ERP_Authorize_Extend.cs
+2
-0
AuthorizeModule.cs
Mall.Module.Property/AuthorizeModule.cs
+20
-0
AuthorizeController.cs
Mall.WebApi/Controllers/Property/AuthorizeController.cs
+24
-1
AppletUserController.cs
Mall.WebApi/Controllers/User/AppletUserController.cs
+7
-6
No files found.
Mall.Model/Entity/Property/RB_ERP_Authorize.cs
View file @
dbce75a9
...
...
@@ -75,5 +75,11 @@ namespace Mall.Model.Entity.Property
/// </summary>
public
int
ERPGroupId
{
get
;
set
;
}
/// <summary>
/// 是否推送IM消息 0-否,1-是
/// </summary>
public
int
IsSendIMMsg
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
View file @
dbce75a9
...
...
@@ -48,6 +48,10 @@ namespace Mall.Model.Extend.MarketingCenter
public
int
[]
MemberLevelList
{
get
;
set
;
}
/// <summary>
/// 订单号
/// </summary>
public
int
OrderId
{
get
;
set
;
}
/// <summary>
...
...
Mall.Model/Extend/Property/RB_ERP_Authorize_Extend.cs
View file @
dbce75a9
...
...
@@ -23,5 +23,7 @@ namespace Mall.Model.Extend.Property
/// 电商员工信息
/// </summary>
public
string
MallUserName
{
get
;
set
;
}
public
string
Ids
{
get
;
set
;
}
}
}
Mall.Module.Property/AuthorizeModule.cs
View file @
dbce75a9
...
...
@@ -113,7 +113,27 @@ namespace Mall.Module.Property
}
return
false
;
}
/// <summary>
/// 更新是否授权发送IM消息
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
UpdateSendIMMsg
(
RB_ERP_Authorize_Extend
model
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_ERP_Authorize
.
IsSendIMMsg
),
model
.
IsSendIMMsg
},
{
nameof
(
RB_ERP_Authorize
.
UpdateDate
),
model
.
UpdateDate
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_ERP_Authorize
.
ID
),
FiledValue
=
model
.
Ids
,
OperatorEnum
=
OperatorEnum
.
IN
}
};
return
authorizeRepository
.
Update
(
keyValues
,
wheres
);
}
#
endregion
...
...
Mall.WebApi/Controllers/Property/AuthorizeController.cs
View file @
dbce75a9
...
...
@@ -50,7 +50,8 @@ namespace Mall.WebApi.Controllers.Property
x
.
Account
,
x
.
MallUserName
,
CreateDate
=
x
.
CreateDate
.
HasValue
?
x
.
CreateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
UpdateDate
=
x
.
UpdateDate
.
HasValue
?
x
.
UpdateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
UpdateDate
=
x
.
UpdateDate
.
HasValue
?
x
.
UpdateDate
.
Value
.
ToString
(
"yyyy-MM-dd"
)
:
""
,
x
.
IsSendIMMsg
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
@@ -94,6 +95,7 @@ namespace Mall.WebApi.Controllers.Property
demodel
.
MallBaseId
=
parms
.
MallBaseId
;
demodel
.
CreateBy
=
UserInfo
.
EmpId
;
demodel
.
CreateDate
=
System
.
DateTime
.
Now
;
demodel
.
IsSendIMMsg
=
0
;
}
if
(
string
.
IsNullOrWhiteSpace
(
demodel
.
DomainName
))
{
...
...
@@ -198,6 +200,27 @@ namespace Mall.WebApi.Controllers.Property
}
/// <summary>
/// 授权是否发送IM消息权限
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
UpdateSendIMMsg
()
{
var
parms
=
RequestParm
;
RB_ERP_Authorize_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_ERP_Authorize_Extend
>(
parms
.
msg
.
ToString
());
bool
result
=
authorizeModule
.
UpdateSendIMMsg
(
demodel
);
if
(
result
)
{
return
ApiResult
.
Success
(
"操作成功"
);
}
else
{
return
ApiResult
.
Failed
(
"操作失败"
);
}
}
}
}
\ No newline at end of file
Mall.WebApi/Controllers/User/AppletUserController.cs
View file @
dbce75a9
...
...
@@ -1242,18 +1242,19 @@ namespace Mall.WebApi.Controllers.User
{
//先判断是否是新人购买并付款
var
orderList
=
productModule
.
GetOrderListByOrderStatus
(
new
RB_Goods_Order_Extend
{
TenantId
=
query
.
TenantId
,
MallBaseId
=
query
.
MallBaseId
,
UserId
=
query
.
UserId
});
if
(
orderList
.
Where
(
x
=>
(
int
)
x
.
OrderStatus
>
1
).
Count
()
>
1
)
//查询当前订单号信息
var
orderModel
=
orderList
.
Where
(
x
=>
x
.
OrderId
==
query
.
OrderId
).
FirstOrDefault
();
//判断这个订单号之前有没有付款成功的订单信息
if
(
orderList
.
Where
(
x
=>
x
.
OrderId
!=
orderModel
.
OrderId
&&
(
int
)
x
.
OrderStatus
>
1
).
Count
()
>
0
)
{
query
.
TriggerType
=
2
;
resultModel
=
couponModule
.
AutoCoupon
(
query
);
}
else
{
if
(
orderList
.
Where
(
x
=>
(
int
)
x
.
OrderStatus
>
1
).
Count
()
<=
1
)
{
query
.
TriggerType
=
4
;
resultModel
=
couponModule
.
AutoCoupon
(
query
);
}
query
.
TriggerType
=
4
;
resultModel
=
couponModule
.
AutoCoupon
(
query
);
if
(
resultModel
==
null
||
resultModel
.
ID
==
0
)
{
query
.
TriggerType
=
2
;
...
...
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