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
1e0c950a
Commit
1e0c950a
authored
May 13, 2020
by
吴春
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交小程序直播
parent
e6f22bc0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1117 additions
and
52 deletions
+1117
-52
Config.cs
Mall.Common/Config.cs
+10
-1
StringHelper.cs
Mall.Common/Plugin/StringHelper.cs
+16
-14
WeiXinHelper.cs
Mall.Common/Plugin/WeiXinHelper.cs
+1
-1
RB_Live_House.cs
Mall.Model/Entity/AppletWeChat/RB_Live_House.cs
+70
-0
RB_Member_Subscription.cs
Mall.Model/Entity/User/RB_Member_Subscription.cs
+64
-0
RB_Live_House_Extend.cs
Mall.Model/Extend/AppletWeChat/RB_Live_House_Extend.cs
+26
-0
RB_Member_Subscription_Extend.cs
Mall.Model/Extend/User/RB_Member_Subscription_Extend.cs
+21
-0
Mall.Model.csproj
Mall.Model/Mall.Model.csproj
+0
-2
CouponModule.cs
Mall.Module.MarketingCenter/CouponModule.cs
+23
-11
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+430
-11
RB_Live_HouseRepository.cs
Mall.Repository/AppletWeChat/RB_Live_HouseRepository.cs
+68
-0
Mall.Repository.csproj
Mall.Repository/Mall.Repository.csproj
+0
-4
RB_Member_SubscriptionRepository.cs
Mall.Repository/User/RB_Member_SubscriptionRepository.cs
+62
-0
PublishController.cs
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
+316
-6
mall.oytour.com.pubxml.user
...pi/Properties/PublishProfiles/mall.oytour.com.pubxml.user
+5
-0
appsettings.json
Mall.WebApi/appsettings.json
+2
-1
web.config
Mall.WebApi/web.config
+3
-1
No files found.
Mall.Common/Config.cs
View file @
1e0c950a
...
...
@@ -308,6 +308,15 @@ namespace Mall.Common
return
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"DeveloperKitsPort"
).
Value
;
}
}
/// <summary>
/// 小程序生成二维码跳转地址
/// </summary>
public
static
string
FirstPage
{
get
{
return
new
ConfigurationBuilder
().
Add
(
new
JsonConfigurationSource
{
Path
=
"appsettings.json"
}).
Build
().
GetSection
(
"FirstPage"
).
Value
;
}
}
}
}
\ No newline at end of file
Mall.Common/Plugin/StringHelper.cs
View file @
1e0c950a
...
...
@@ -194,6 +194,7 @@ namespace Mall.Common.Plugin
}
}
/// <summary>
/// 获取年份月份中的最后一天
/// </summary>
...
...
@@ -510,7 +511,8 @@ namespace Mall.Common.Plugin
{
TotalDay
=
Saturday
+
Sunday
+
2
;
}
else
{
else
{
TotalDay
=
Saturday
+
Sunday
+
1
;
}
}
...
...
@@ -567,22 +569,22 @@ namespace Mall.Common.Plugin
}
}
#
endregion
#
endregion
#
region
字符转换
#
region
字符转换
/// <summary>
/// 为字符串左边填充字符
/// <example>
/// 111 LPAD(,'0',8) --> 00000111
/// </example>
/// </summary>
/// <param name="str">字符串</param>
/// <param name="swap">替换的字符</param>
/// <param name="length">长度</param>
/// <returns></returns>
public
static
string
LPAD
(
object
str
,
string
swap
,
int
length
)
/// <summary>
/// 为字符串左边填充字符
/// <example>
/// 111 LPAD(,'0',8) --> 00000111
/// </example>
/// </summary>
/// <param name="str">字符串</param>
/// <param name="swap">替换的字符</param>
/// <param name="length">长度</param>
/// <returns></returns>
public
static
string
LPAD
(
object
str
,
string
swap
,
int
length
)
{
string
s
=
str
.
ToString
();
...
...
Mall.Common/Plugin/WeiXinHelper.cs
View file @
1e0c950a
...
...
@@ -6,7 +6,7 @@ namespace Mall.Common.Plugin
{
public
class
WeiXinHelper
{
}
/// <summary>
...
...
Mall.Model/Entity/AppletWeChat/RB_Live_House.cs
0 → 100644
View file @
1e0c950a
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.AppletWeChat
{
/// <summary>
/// 直播房间信息
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Live_House
{
/// <summary>
/// 房间号
/// </summary>
public
int
ID
{
get
;
set
;
}
/// <summary>
/// 商户id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
public
DateTime
CreateDate
{
get
;
set
;
}
/// <summary>
/// 房间名
/// </summary>
public
string
name
{
get
;
set
;
}
/// <summary>
/// 房间id
/// </summary>
public
string
roomid
{
get
;
set
;
}
/// <summary>
/// 直播间背景墙
/// </summary>
public
string
cover_img
{
get
;
set
;
}
/// <summary>
/// 直播状态
/// </summary>
public
string
live_status
{
get
;
set
;
}
/// <summary>
/// 直播计划开始时间
/// </summary>
public
string
start_time
{
get
;
set
;
}
/// <summary>
/// 直播计划结束时间
/// </summary>
public
string
end_time
{
get
;
set
;
}
/// <summary>
/// 主播名
/// </summary>
public
string
anchor_name
{
get
;
set
;
}
/// <summary>
/// 主播图片
/// </summary>
public
string
anchor_img
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_Member_Subscription.cs
0 → 100644
View file @
1e0c950a
using
Mall.Common.AOP
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 会员订阅消息实体表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Member_Subscription
{
/// <summary>
/// 编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 会员id
/// </summary>
public
int
?
UserId
{
get
;
set
;
}
/// <summary>
/// 订阅模板id
/// </summary>
public
string
TempleteId
{
get
;
set
;
}
/// <summary>
/// OpenId
/// </summary>
public
string
OpenId
{
get
;
set
;
}
/// <summary>
/// 类型 1赞羊
/// </summary>
public
int
?
Type
{
get
;
set
;
}
/// <summary>
/// 删除
/// </summary>
public
int
Status
{
get
;
set
;
}
/// <summary>
/// 次数
/// </summary>
public
int
?
Count
{
get
;
set
;
}
/// <summary>
/// 商户号id
/// </summary>
public
int
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序id
/// </summary>
public
int
MallBaseId
{
get
;
set
;
}
}
}
Mall.Model/Extend/AppletWeChat/RB_Live_House_Extend.cs
0 → 100644
View file @
1e0c950a
using
Mall.Model.Entity.AppletWeChat
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.AppletWeChat
{
public
class
RB_Live_House_Extend
{
/// <summary>
/// errcode = 0 代表成功;errcode = 1 代表未创建直播房间
/// </summary>
public
string
errcode
{
get
;
set
;
}
public
string
errmsg
{
get
;
set
;
}
public
List
<
RB_Live_House
>
room_info
{
get
;
set
;
}
/// <summary>
/// 房间总数
/// </summary>
public
string
total
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Member_Subscription_Extend.cs
0 → 100644
View file @
1e0c950a
using
Mall.Common.AOP
;
using
Mall.Model.Entity.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Extend.User
{
/// <summary>
/// 订阅消息扩展表
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Member_Subscription_Extend
:
RB_Member_Subscription
{
/// <summary>
/// 模板ids
/// </summary>
public
List
<
string
>
TempleteIdList
{
get
;
set
;
}
}
}
Mall.Model/Mall.Model.csproj
View file @
1e0c950a
...
...
@@ -10,8 +10,6 @@
<ItemGroup>
<Folder Include="CacheEntity\" />
<Folder Include="Entity\AppletWeChat\" />
<Folder Include="Extend\AppletWeChat\" />
</ItemGroup>
<ItemGroup>
...
...
Mall.Module.MarketingCenter/CouponModule.cs
View file @
1e0c950a
...
...
@@ -191,23 +191,35 @@ namespace Mall.Module.MarketingCenter
{
id
=
model
.
ID
;
flag
=
discountCouponRepository
.
Update
(
model
,
trans
);
var
listProduct
=
productRepository
.
GetCouponProductList
(
new
RB_DiscountCoupon_Product
{
TenantId
=
model
.
TenantId
,
MallBaseId
=
model
.
MallBaseId
,
DiscountCouponId
=
id
});
if
(
listProduct
!=
null
&&
listProduct
.
Any
())
{
foreach
(
var
item
in
model
.
ProductList
)
{
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_DiscountCoupon_Product
.
Status
),
1
},
{
nameof
(
RB_DiscountCoupon_Product
.
UpdateDate
),
model
.
UpdateDate
},
};
IList
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
IList
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_DiscountCoupon_Product
.
ID
),
FiledValue
=
item
.
ID
,
OperatorEnum
=
OperatorEnum
.
Equal
}
new
WhereHelper
(){
FiledName
=
nameof
(
RB_DiscountCoupon_Product
.
DiscountCouponId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
flag
=
productRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
}
}
productRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
////var listProduct = productRepository.GetCouponProductList(new RB_DiscountCoupon_Product { TenantId = model.TenantId, MallBaseId = model.MallBaseId, DiscountCouponId = id });
////if (listProduct != null && listProduct.Any())
////{
//// foreach (var item in listProduct)
//// {
//// IDictionary<string, object> fileds = new Dictionary<string, object>()
//// {
//// { nameof(RB_DiscountCoupon_Product.Status),1},
//// { nameof(RB_DiscountCoupon_Product.UpdateDate),model.UpdateDate},
//// };
//// IList<WhereHelper> whereHelpers = new List<WhereHelper>()
//// {
//// new WhereHelper (){ FiledName=nameof(RB_DiscountCoupon_Product.ID),FiledValue=item.ID,OperatorEnum=OperatorEnum.Equal}
//// };
//// flag = productRepository.Update(fileds, whereHelpers, trans);
//// }
////}
if
(
model
.
ProductList
!=
null
&&
model
.
ProductList
.
Any
())
{
...
...
Mall.Module.User/MiniProgramModule.cs
View file @
1e0c950a
This diff is collapsed.
Click to expand it.
Mall.Repository/AppletWeChat/RB_Live_HouseRepository.cs
0 → 100644
View file @
1e0c950a
using
Mall.Model.Entity.AppletWeChat
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.AppletWeChat
{
/// <summary>
/// 直播房间仓储层
/// </summary>
public
class
RB_Live_HouseRepository
:
RepositoryBase
<
RB_Live_House
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_Live_House
);
}
}
/// <summary>
/// 获取直播房间
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Live_House
>
GetLiveHouseListRepository
(
RB_Live_House
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE 1=1"
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Live_House
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Live_House
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
}
return
Get
<
RB_Live_House
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取直播房间
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Live_House
>
GetLiveHousePageList
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Live_House
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
$" SELECT * FROM
{
TableName
}
WHERE 1=1"
);
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Live_House
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND
{
nameof
(
RB_Live_House
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
}
return
GetPage
<
RB_Live_House
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/Mall.Repository.csproj
View file @
1e0c950a
...
...
@@ -21,8 +21,4 @@
<ProjectReference Include="..\Mall.Model\Mall.Model.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="AppletWeChat\" />
</ItemGroup>
</Project>
Mall.Repository/User/RB_Member_SubscriptionRepository.cs
0 → 100644
View file @
1e0c950a
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
namespace
Mall.Repository.User
{
/// <summary>
/// 会员订阅微信消息仓储层
/// </summary>
public
class
RB_Member_SubscriptionRepository
:
RepositoryBase
<
RB_Member_Subscription
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_Member_Subscription
);
}
}
/// <summary>
/// 获取列表
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public
List
<
RB_Member_Subscription_Extend
>
GetList
(
RB_Member_Subscription_Extend
where
)
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
Append
(
$@"SELECT * from
{
TableName
}
where Status=0"
);
if
(
where
!=
null
)
{
if
(
where
.
MallBaseId
>
0
)
{
sb
.
AppendFormat
(
" and MallBaseId={0}"
,
where
.
MallBaseId
);
}
if
(
where
.
TenantId
>
0
)
{
sb
.
AppendFormat
(
" and TenantId={0}"
,
where
.
TenantId
);
}
if
(
where
.
UserId
>
0
)
{
sb
.
AppendFormat
(
" and UserId={0}"
,
where
.
UserId
);
}
if
(
where
.
Type
>
0
)
{
sb
.
AppendFormat
(
" and Type={0}"
,
where
.
Type
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
TempleteId
))
{
sb
.
AppendFormat
(
" and TempleteId ='{0}'"
,
where
.
TempleteId
);
}
if
(!
string
.
IsNullOrEmpty
(
where
.
OpenId
))
{
sb
.
AppendFormat
(
" and OpenId ='{0}'"
,
where
.
OpenId
);
}
}
return
Get
<
RB_Member_Subscription_Extend
>(
sb
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
View file @
1e0c950a
This diff is collapsed.
Click to expand it.
Mall.WebApi/Properties/PublishProfiles/mall.oytour.com.pubxml.user
View file @
1e0c950a
...
...
@@ -8,4 +8,9 @@
<TimeStampOfAssociatedLegacyPublishXmlFile
/>
<_PublishTargetUrl>
F:\网站发布\Mall.oytour.com
</_PublishTargetUrl>
</PropertyGroup>
<ItemGroup>
<File
Include=
"run.cmd"
>
<publishTime>
04/22/2020 10:26:33
</publishTime>
</File>
</ItemGroup>
</Project>
\ No newline at end of file
Mall.WebApi/appsettings.json
View file @
1e0c950a
...
...
@@ -22,7 +22,8 @@
"Mongo"
:
"mongodb://192.168.2.214:27017"
,
"MongoDBName"
:
"Mall"
,
"ProjectUrl"
:
"D:/project/GitProject/tripfriend"
,
"DeveloperKitsPort"
:
"54333"
,
"DeveloperKitsPort"
:
"63994"
,
"FirstPage"
:
"pages/index/index.html"
,
"RedisSetting"
:
{
"RedisServer"
:
"192.168.2.214"
,
"RedisPort"
:
"6379"
,
...
...
Mall.WebApi/web.config
View file @
1e0c950a
...
...
@@ -5,9 +5,11 @@
<
handlers
>
<
add
name
=
"aspNetCore"
path
=
"*"
verb
=
"*"
modules
=
"AspNetCoreModuleV2"
resourceType
=
"Unspecified"
/>
</
handlers
>
<
aspNetCore
processPath
=
"
.\Mall.WebApi.exe"
arguments
=
".\Mall.WebApi.dll"
stdoutLogEnabled
=
"false"
stdoutLogFile
=
".\logs\stdout"
hostingModel
=
"OutOf
Process"
>
<
aspNetCore
processPath
=
"
%LAUNCHER_PATH%"
arguments
=
"%LAUNCHER_ARGS%"
stdoutLogEnabled
=
"false"
stdoutLogFile
=
".\logs\stdout"
hostingModel
=
"In
Process"
>
<
environmentVariables
>
<
environmentVariable
name
=
"ASPNETCORE_ENVIRONMENT"
value
=
"Development"
/>
<
environmentVariable
name
=
"ASPNETCORE_HTTPS_PORT"
value
=
"44370"
/>
<
environmentVariable
name
=
"COMPLUS_ForceENC"
value
=
"1"
/>
</
environmentVariables
>
</
aspNetCore
>
</
system
.
webServer
>
...
...
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