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
e7fae75a
Commit
e7fae75a
authored
Oct 13, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提叫一键订阅
parent
1a882c48
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
509 additions
and
49 deletions
+509
-49
WeiXinHelper.cs
Mall.Common/Plugin/WeiXinHelper.cs
+53
-0
MallBaseModule.cs
Mall.Module.BaseSetUp/MallBaseModule.cs
+23
-4
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+1
-1
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+30
-0
AppletEducationController.cs
...WebApi/Controllers/Education/AppletEducationController.cs
+1
-0
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+401
-44
No files found.
Mall.Common/Plugin/WeiXinHelper.cs
View file @
e7fae75a
...
...
@@ -205,6 +205,59 @@ namespace Mall.Common.Plugin
/// </summary>
public
string
errmsg
{
get
;
set
;
}
}
public
class
templateresult
{
/// <summary>
/// openid
/// </summary>
public
string
openid
{
get
;
set
;
}
/// <summary>
/// session_key
/// </summary>
public
List
<
templateresultModel
>
data
{
get
;
set
;
}
/// <summary>
/// 错误状态码
/// </summary>
public
string
errCode
{
get
;
set
;
}
/// <summary>
/// 错误提示信息
/// </summary>
public
string
errMsg
{
get
;
set
;
}
}
public
class
templateresultModel
{
/// <summary>
/// 添加至帐号下的模板 id,发送小程序订阅消息时所需
/// </summary>
public
string
priTmplId
{
get
;
set
;
}
/// <summary>
/// 模版标题
/// </summary>
public
string
title
{
get
;
set
;
}
/// <summary>
/// 模版内容
/// </summary>
public
string
content
{
get
;
set
;
}
/// <summary>
/// 模板内容示例
/// </summary>
public
string
example
{
get
;
set
;
}
/// <summary>
/// 模版类型,2 为一次性订阅,3 为长期订阅
/// </summary>
public
string
type
{
get
;
set
;
}
}
#
endregion
...
...
Mall.Module.BaseSetUp/MallBaseModule.cs
View file @
e7fae75a
...
...
@@ -5,6 +5,7 @@ using Mall.Model.Extend.BaseSetUp;
using
Mall.Repository
;
using
Mall.Repository.BaseSetUp
;
using
Mall.Repository.User
;
using
NPOI.SS.Formula.Functions
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
...
...
@@ -926,14 +927,32 @@ namespace Mall.Module.BaseSetUp
/// <returns></returns>
public
bool
AddOrUpdateFileStore
(
RB_File_Store
model
)
{
bool
result
=
false
;
int
id
=
0
;
if
(
model
.
ID
==
0
)
{
return
storeRepository
.
Insert
(
model
)
>
0
;
id
=
storeRepository
.
Insert
(
model
);
result
=
id
>
0
;
}
else
{
return
storeRepository
.
Update
(
model
);
id
=
model
.
ID
;
result
=
storeRepository
.
Update
(
model
);
}
//判断当前的是否设置成默认没有
if
(
model
.
IsDefault
==
1
&&
result
)
//将其他的默认赋值成0
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_File_Store
.
IsDefault
),
0
},
};
List
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_File_Store
.
TenantId
),
FiledValue
=
model
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_File_Store
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_File_Store
.
ID
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
NotEqual
},
};
storeRepository
.
Update
(
fileds
,
whereHelpers
);
}
return
result
;
}
#
endregion
...
...
@@ -1279,7 +1298,7 @@ namespace Mall.Module.BaseSetUp
public
object
GetMicroShopBasics
(
RB_MicroShop_Basics
query
)
{
var
model
=
microShopBasicsRepository
.
GetMicroShopBasicsList
(
query
).
FirstOrDefault
();
if
(
model
==
null
)
if
(
model
==
null
)
{
model
=
new
RB_MicroShop_Basics
();
}
...
...
@@ -1297,7 +1316,7 @@ namespace Mall.Module.BaseSetUp
{
template_message_list
,
model
};
};
}
...
...
Mall.Module.Product/ProductModule.cs
View file @
e7fae75a
...
...
@@ -1413,7 +1413,7 @@ namespace Mall.Module.Product
int
IsNormalServer
=
Convert
.
ToInt32
(
Config
.
IsNormalServer
);
if
(
IsNormalServer
!=
1
)
{
token
=
"3
7_0-lYjcCk7K4srJ_SWIumrzRMY4s2UdttdugOEOLBoeQEOUEXga2hutyJrM7PC9QZkK9aXu7g4nE62J7YWfA2T6CKbq1_qPq0njfMvmk2_OZndOv-Rr1BIRhkqa6gFq71zo2Dr73T5tFe5QQ9LWQhAFAEPJ
"
;
token
=
"3
8_LJMrD0ffPj7GXvXxgGMwDMx9Qs_tXYe0HObmYw_2IGQUTRWSk9WbmrROPvEHEGgroSkhOctTFXFO1RAcYKo0uxrTHw5aRz9NXZ_t3Tp4M486c5XkLvPamTfWg_LaegNpvAqfVGWR-IiBbVL9GURgACAUIF
"
;
}
if
(
string
.
IsNullOrEmpty
(
token
))
{
...
...
Mall.Module.User/MiniProgramModule.cs
View file @
e7fae75a
...
...
@@ -707,6 +707,36 @@ namespace Mall.Module.User
return
flag
;
}
/// <summary>
/// 修改微信小程序商城订阅配置信息
/// </summary>
/// <param name="extModel"></param>
/// <returns></returns>
public
bool
SetAllMiniProgramMallSubscribeModule
(
RB_MiniProgram_Extend
extModel
)
{
bool
flag
=
false
;
if
(
extModel
.
MallBaseId
>
0
)
{
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiniProgram_Extend
.
OrderSuccessTpl
),
extModel
.
OrderSuccessTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
OrderCancelTpl
),
extModel
.
OrderCancelTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
OrderDeliverGoodsTpl
),
extModel
.
OrderDeliverGoodsTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
RefundTpl
),
extModel
.
RefundTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
ActiveStateTpl
),
extModel
.
ActiveStateTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
AuditResultTpl
),
extModel
.
AuditResultTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
ReflectSuccessTpl
),
extModel
.
ReflectSuccessTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
ReflectFailTpl
),
extModel
.
ReflectFailTpl
},
{
nameof
(
RB_MiniProgram_Extend
.
MembersLevelChangeTpl
),
extModel
.
MembersLevelChangeTpl
},
};
flag
=
programRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_MiniProgram_Extend
.
MallBaseId
),
extModel
.
MallBaseId
));
}
return
flag
;
}
/// <summary>
/// 修改微信小程序分销订阅配置信息
/// </summary>
...
...
Mall.WebApi/Controllers/Education/AppletEducationController.cs
View file @
e7fae75a
...
...
@@ -915,6 +915,7 @@ namespace Mall.WebApi.Controllers.Education
x
.
Major
,
x
.
LableNameList
,
x
.
Name
,
x
.
TeacherId
,
CreateDate
=
x
.
CreateDate
.
ToString
(
"yyyy-MM-dd HH:ss:mm"
),
});
...
...
Mall.WebApi/Controllers/User/TenantController.cs
View file @
e7fae75a
This diff is collapsed.
Click to expand it.
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