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
69019936
Commit
69019936
authored
May 15, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
9d3d507a
bfeb420f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
2553 additions
and
18 deletions
+2553
-18
RB_DiscountCoupon.cs
Mall.Model/Entity/MarketingCenter/RB_DiscountCoupon.cs
+1
-1
RB_Article.cs
Mall.Model/Entity/User/RB_Article.cs
+97
-0
RB_MiniProgram.cs
Mall.Model/Entity/User/RB_MiniProgram.cs
+6
-0
RB_Stores.cs
Mall.Model/Entity/User/RB_Stores.cs
+160
-0
RB_Topic_Type.cs
Mall.Model/Entity/User/RB_Topic_Type.cs
+88
-0
RB_Video.cs
Mall.Model/Entity/User/RB_Video.cs
+111
-0
RB_DiscountCoupon_Extend.cs
....Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
+11
-1
RB_DiscountCoupon_Product_Extend.cs
...xtend/MarketingCenter/RB_DiscountCoupon_Product_Extend.cs
+11
-0
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+649
-1
RB_Article_Extend.cs
Mall.Model/Extend/User/RB_Article_Extend.cs
+18
-0
RB_Member_DiscountCoupon_Extend.cs
Mall.Model/Extend/User/RB_Member_DiscountCoupon_Extend.cs
+3
-0
RB_MiniProgram_Extend.cs
Mall.Model/Extend/User/RB_MiniProgram_Extend.cs
+3
-0
RB_Stores_Extend.cs
Mall.Model/Extend/User/RB_Stores_Extend.cs
+17
-0
RB_Topic_Type_Extend.cs
Mall.Model/Extend/User/RB_Topic_Type_Extend.cs
+18
-0
RB_Video_Extend.cs
Mall.Model/Extend/User/RB_Video_Extend.cs
+18
-0
CouponModule.cs
Mall.Module.MarketingCenter/CouponModule.cs
+19
-4
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+12
-0
ContentModule.cs
Mall.Module.User/ContentModule.cs
+398
-0
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+42
-0
RB_DiscountCouponRepository.cs
...Repository/MarketingCenter/RB_DiscountCouponRepository.cs
+108
-2
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+2
-2
RB_ArticleRepository.cs
Mall.Repository/User/RB_ArticleRepository.cs
+76
-0
RB_Member_CouponRepository.cs
Mall.Repository/User/RB_Member_CouponRepository.cs
+8
-3
RB_StoresRepository.cs
Mall.Repository/User/RB_StoresRepository.cs
+68
-0
RB_Topic_TypeRepository.cs
Mall.Repository/User/RB_Topic_TypeRepository.cs
+76
-0
RB_VideoRepository.cs
Mall.Repository/User/RB_VideoRepository.cs
+68
-0
PublishController.cs
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
+14
-2
AppletCouponController.cs
...Api/Controllers/MarketingCenter/AppletCouponController.cs
+64
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+17
-0
MContentController.cs
Mall.WebApi/Controllers/User/MContentController.cs
+347
-0
TenantController.cs
Mall.WebApi/Controllers/User/TenantController.cs
+23
-2
No files found.
Mall.Model/Entity/MarketingCenter/RB_DiscountCoupon.cs
View file @
69019936
...
...
@@ -106,7 +106,7 @@ namespace Mall.Model.Entity.MarketingCenter
/// <summary>
/// 领取方式设置
2
-领劵中心
/// 领取方式设置
1
-领劵中心
/// </summary>
public
int
PickupCenter
{
get
;
set
;
}
...
...
Mall.Model/Entity/User/RB_Article.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 文章表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Article
{
/// <summary>
/// 文章编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 文章标题
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
SortNum
{
get
;
set
;
}
/// <summary>
/// 禁用状态(0-禁用,1-启用)
/// </summary>
public
int
?
IsDisable
{
get
;
set
;
}
/// <summary>
/// 文章内容
/// </summary>
public
string
Content
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_MiniProgram.cs
View file @
69019936
...
...
@@ -371,5 +371,11 @@ namespace Mall.Model.Entity.User
/// </summary>
public
int
LivePlayerPlugin
{
get
;
set
;
}
/// <summary>
/// 发布时填写的版本号
/// </summary>
public
string
Version
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_Stores.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 门店表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Stores
{
/// <summary>
/// 门店编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 门店名称
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 门店电话
/// </summary>
public
string
Tel
{
get
;
set
;
}
/// <summary>
/// 门店地址
/// </summary>
public
string
Address
{
get
;
set
;
}
/// <summary>
/// 门店经度纬度
/// </summary>
public
string
LngLat
{
get
;
set
;
}
/// <summary>
/// 门店评分
/// </summary>
public
int
?
Score
{
get
;
set
;
}
/// <summary>
/// 门店介绍
/// </summary>
public
string
Intro
{
get
;
set
;
}
/// <summary>
/// 门店封面图
/// </summary>
public
string
CoverImg
{
get
;
set
;
}
/// <summary>
/// 门店轮播图
/// </summary>
public
string
NavImg
{
get
;
set
;
}
/// <summary>
/// 营业开始时间
/// </summary>
public
string
StartTime
{
get
;
set
;
}
/// <summary>
/// 营业结束时间
/// </summary>
public
string
EndTime
{
get
;
set
;
}
/// <summary>
/// 是否全天营业(1-是)
/// </summary>
public
int
?
IsAllDay
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_Topic_Type.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 专题分类表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Topic_Type
{
/// <summary>
/// 专题分类编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 专题分类名称
/// </summary>
public
string
TopicName
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
SortNum
{
get
;
set
;
}
/// <summary>
/// 禁用状态(0-禁用,1-启用)
/// </summary>
public
int
?
IsDisable
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
Mall.Model/Entity/User/RB_Video.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 视频表实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Video
{
/// <summary>
/// 视频编号
/// </summary>
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 视频标题
/// </summary>
public
string
Title
{
get
;
set
;
}
/// <summary>
/// 视频来源(1-源地址,2-腾讯)
/// </summary>
public
int
?
SourceType
{
get
;
set
;
}
/// <summary>
/// 视频链接
/// </summary>
public
string
VedioUrl
{
get
;
set
;
}
/// <summary>
/// 视频封面图
/// </summary>
public
string
VedioCoverImg
{
get
;
set
;
}
/// <summary>
/// 视频详情介绍
/// </summary>
public
string
VedioIntro
{
get
;
set
;
}
/// <summary>
/// 排序
/// </summary>
public
int
?
SortNum
{
get
;
set
;
}
/// <summary>
/// 商户号Id
/// </summary>
public
int
?
TenantId
{
get
;
set
;
}
/// <summary>
/// 小程序Id
/// </summary>
public
int
?
MallBaseId
{
get
;
set
;
}
/// <summary>
/// 创建时间
/// </summary>
public
DateTime
?
CreateDate
{
get
;
set
;
}
/// <summary>
/// 删除状态
/// </summary>
public
int
?
Status
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
View file @
69019936
...
...
@@ -19,10 +19,12 @@ namespace Mall.Model.Extend.MarketingCenter
public
List
<
RB_DiscountCoupon_Product_Extend
>
ProductList
{
get
;
set
;
}
/// <summary>
/// 发放优惠券的时候会员id
/// 发放优惠券的时候会员id
s
/// </summary>
public
string
UserIds
{
get
;
set
;
}
/// <summary>
/// 发放数量
/// </summary>
...
...
@@ -36,5 +38,13 @@ namespace Mall.Model.Extend.MarketingCenter
/// 会员等级
/// </summary>
public
int
[]
MemberLevelList
{
get
;
set
;
}
/// <summary>
/// 发放优惠券的时候会员id
/// </summary>
public
int
UserId
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_DiscountCoupon_Product_Extend.cs
View file @
69019936
...
...
@@ -17,5 +17,16 @@ namespace Mall.Model.Extend.MarketingCenter
/// 关联信息(商品图片/分类名称)
/// </summary>
public
string
Relevance
{
get
;
set
;
}
/// <summary>
/// 商品价格(下单获取优惠券)
/// </summary>
public
decimal
GoodsPrice
{
get
;
set
;
}
/// <summary>
/// 商品分类id
/// </summary>
public
int
[]
GoodsClassId
{
get
;
set
;
}
}
}
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
69019936
This diff is collapsed.
Click to expand it.
Mall.Model/Extend/User/RB_Article_Extend.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 文章表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Article_Extend
:
Model
.
Entity
.
User
.
RB_Article
{
}
}
Mall.Model/Extend/User/RB_Member_DiscountCoupon_Extend.cs
View file @
69019936
...
...
@@ -57,5 +57,8 @@ namespace Mall.Model.Extend.User
/// 优惠卷ids
/// </summary>
public
string
CouponIds
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_MiniProgram_Extend.cs
View file @
69019936
...
...
@@ -12,6 +12,7 @@ namespace Mall.Model.Extend.User
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_MiniProgram_Extend
:
Model
.
Entity
.
User
.
RB_MiniProgram
{
/// <summary>
/// 账号
/// </summary>
...
...
@@ -91,5 +92,7 @@ namespace Mall.Model.Extend.User
/// 获取可跳转小程序
/// </summary>
public
string
[]
JumpAppIdList
{
get
;
set
;
}
}
}
Mall.Model/Extend/User/RB_Stores_Extend.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 门店表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Stores_Extend
:
Model
.
Entity
.
User
.
RB_Stores
{
}
}
Mall.Model/Extend/User/RB_Topic_Type_Extend.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 专题分类表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Topic_Type_Extend
:
Model
.
Entity
.
User
.
RB_Topic_Type
{
}
}
Mall.Model/Extend/User/RB_Video_Extend.cs
0 → 100644
View file @
69019936
using
Mall.Common.AOP
;
using
Mall.Common.Enum.User
;
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
namespace
Mall.Model.Entity.User
{
/// <summary>
/// 视频表扩展实体
/// </summary>
[
Serializable
]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Video_Extend
:
Model
.
Entity
.
User
.
RB_Video
{
}
}
Mall.Module.MarketingCenter/CouponModule.cs
View file @
69019936
...
...
@@ -178,6 +178,7 @@ namespace Mall.Module.MarketingCenter
id
=
discountCouponRepository
.
Insert
(
model
,
trans
);
if
(
id
>
0
&&
model
.
ProductList
!=
null
&&
model
.
ProductList
.
Any
())
{
model
.
ProductList
.
ForEach
(
x
=>
x
.
DiscountCouponType
=
model
.
UseType
);
model
.
ProductList
.
ForEach
(
x
=>
x
.
MallBaseId
=
model
.
MallBaseId
);
model
.
ProductList
.
ForEach
(
x
=>
x
.
TenantId
=
model
.
TenantId
);
model
.
ProductList
.
ForEach
(
x
=>
x
.
CreateDate
=
model
.
CreateDate
);
...
...
@@ -202,7 +203,7 @@ namespace Mall.Module.MarketingCenter
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_DiscountCoupon_Product
.
DiscountCouponId
),
FiledValue
=
id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
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())
////{
...
...
@@ -223,6 +224,7 @@ namespace Mall.Module.MarketingCenter
if
(
model
.
ProductList
!=
null
&&
model
.
ProductList
.
Any
())
{
model
.
ProductList
.
ForEach
(
x
=>
x
.
DiscountCouponType
=
model
.
UseType
);
model
.
ProductList
.
ForEach
(
x
=>
x
.
MallBaseId
=
model
.
MallBaseId
);
model
.
ProductList
.
ForEach
(
x
=>
x
.
TenantId
=
model
.
TenantId
);
model
.
ProductList
.
ForEach
(
x
=>
x
.
CreateDate
=
model
.
CreateDate
);
...
...
@@ -412,6 +414,19 @@ namespace Mall.Module.MarketingCenter
}
return
flag
;
}
/// <summary>
/// 根据用户id和商品分类以及商品id获取未使用的优惠券信息
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_DiscountCoupon_Extend
>
GetNoUseCouponList
(
RB_DiscountCoupon_Extend
query
)
{
return
discountCouponRepository
.
GetNoUseCouponList
(
query
);
}
#
endregion
#
region
自动发放优惠券规则
...
...
@@ -439,7 +454,7 @@ namespace Mall.Module.MarketingCenter
public
List
<
RB_Coupon_SelfMotion_Extend
>
GettRepositoryList
(
RB_Coupon_SelfMotion_Extend
query
)
{
var
list
=
selfMotionRepository
.
GettRepositoryList
(
query
);
return
list
;
}
...
...
@@ -486,7 +501,7 @@ namespace Mall.Module.MarketingCenter
{
id
=
model
.
ID
;
flag
=
selfMotionRepository
.
Update
(
model
,
trans
);
// var listProduct = selfMotionMemberRepository.GetListRepository(new RB_Coupon_SelfMotionMember_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, SelfMotionId = id });
// var listProduct = selfMotionMemberRepository.GetListRepository(new RB_Coupon_SelfMotionMember_Extend { TenantId = model.TenantId, MallBaseId = model.MallBaseId, SelfMotionId = id });
//if (listProduct != null && listProduct.Any())
//{
// foreach (var item in model.UserList)
...
...
@@ -514,7 +529,7 @@ namespace Mall.Module.MarketingCenter
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Coupon_SelfMotionMember
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Coupon_SelfMotionMember
.
TenantId
),
FiledValue
=
model
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
selfMotionMemberRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
selfMotionMemberRepository
.
Update
(
fileds
,
whereHelpers
,
trans
);
if
(
model
.
UserList
!=
null
&&
model
.
UserList
.
Any
())
...
...
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
69019936
...
...
@@ -115,6 +115,18 @@ namespace Mall.Module.MarketingCenter
case
"image-text"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
imagetextItem
>(
item
.
data
.
ToString
());
break
;
case
"coupon"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
couponItem
>(
item
.
data
.
ToString
());
break
;
case
"timer"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
timerItem
>(
item
.
data
.
ToString
());
break
;
case
"pintuan"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
pintuanItem
>(
item
.
data
.
ToString
());
break
;
case
"booking"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
bookingItem
>(
item
.
data
.
ToString
());
break
;
case
"bargain"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
bargainItem
>(
item
.
data
.
ToString
());
break
;
case
"integral-mall"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
integralmallItem
>(
item
.
data
.
ToString
());
break
;
case
"lottery"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
lotteryItem
>(
item
.
data
.
ToString
());
break
;
case
"advance"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
advanceItem
>(
item
.
data
.
ToString
());
break
;
case
"vip-card"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
vipcardItem
>(
item
.
data
.
ToString
());
break
;
case
"live"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
liveItem
>(
item
.
data
.
ToString
());
break
;
case
"empty"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
emptyItem
>(
item
.
data
.
ToString
());
break
;
case
"ad"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
adItem
>(
item
.
data
.
ToString
());
break
;
case
"modal"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
modalItem
>(
item
.
data
.
ToString
());
break
;
case
"quick-nav"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
quicknavItem
>(
item
.
data
.
ToString
());
break
;
}
}
}
...
...
Mall.Module.User/ContentModule.cs
0 → 100644
View file @
69019936
This diff is collapsed.
Click to expand it.
Mall.Module.User/MiniProgramModule.cs
View file @
69019936
...
...
@@ -528,6 +528,48 @@ namespace Mall.Module.User
};
return
programRepository
.
Update
(
fileds
,
whereHelpers
);
}
/// <summary>
/// 修改微信小程序是否开启直播
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
UpdateLivePlayerPlugin
(
RB_MiniProgram_Extend
model
)
{
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiniProgram_Extend
.
LivePlayerPlugin
),
model
.
LivePlayerPlugin
},
};
IList
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_MiniProgram
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
programRepository
.
Update
(
fileds
,
whereHelpers
);
}
/// <summary>
/// 修改当前小程序发布的版本号
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public
bool
UpdateVersion
(
RB_MiniProgram_Extend
model
)
{
IDictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_MiniProgram_Extend
.
Version
),
model
.
Version
},
};
IList
<
WhereHelper
>
whereHelpers
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_MiniProgram
.
MallBaseId
),
FiledValue
=
model
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
return
programRepository
.
Update
(
fileds
,
whereHelpers
);
}
#
endregion
...
...
Mall.Repository/MarketingCenter/RB_DiscountCouponRepository.cs
View file @
69019936
using
Mall.Model.Entity.MarketingCenter
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.MarketingCenter
;
using
System
;
using
System.Collections.Generic
;
...
...
@@ -7,12 +8,18 @@ using System.Text;
namespace
Mall.Repository.MarketingCenter
{
public
class
RB_DiscountCouponRepository
:
RepositoryBase
<
RB_DiscountCoupon
>
public
class
RB_DiscountCouponRepository
:
RepositoryBase
<
RB_DiscountCoupon
>
{
/// <summary>
/// 表名称
/// </summary>
public
string
TableName
{
get
{
return
nameof
(
RB_DiscountCoupon
);
}
}
/// <summary>
/// 表名称
/// </summary>
public
string
discountCouponTableName
{
get
{
return
nameof
(
RB_Member_DiscountCoupon
);
}
}
/// <summary>
/// 卡券信息列表
/// </summary>
...
...
@@ -71,12 +78,111 @@ namespace Mall.Repository.MarketingCenter
{
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
Name
)}
like '%
{
query
.
Name
}
%'"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
ID
)}
in(
{
query
.
CouponIds
}
)"
);
}
}
return
Get
<
RB_DiscountCoupon_Extend
>(
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 根据用户id和商品分类以及商品id获取未使用的优惠券信息
/// </summary>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_DiscountCoupon_Extend
>
GetNoUseCouponList
(
RB_DiscountCoupon_Extend
query
)
{
string
where
=
" and a.StartDate<NOW() and a.EndDate>NOW() and b.`Status`=0 and a.UseState=0 "
;
string
goodsClassWhere
=
""
;
//分类
string
goodsWhere
=
""
;
//商品
string
allWhere
=
""
;
//通用
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
where
+=
$" AND b.
{
nameof
(
RB_DiscountCoupon_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
;
}
if
(
query
.
MallBaseId
>
0
)
{
where
+=
$" AND b.
{
nameof
(
RB_DiscountCoupon_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
;
}
if
(
query
.
UserId
>
0
)
{
where
+=
$" AND a.
{
nameof
(
RB_DiscountCoupon_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
;
}
if
(
query
.
ProductList
!=
null
&&
query
.
ProductList
.
Any
())
{
List
<
int
>
allGoodsClass
=
new
List
<
int
>();
foreach
(
var
item
in
query
.
ProductList
)
{
if
(!
string
.
IsNullOrWhiteSpace
(
goodsWhere
))
{
goodsWhere
+=
$" or (c.ProductId =
{
item
.
ProductId
}
and b.MinConsumePrice<=
{
item
.
GoodsPrice
}
) "
;
}
else
{
goodsWhere
+=
$" (c.ProductId =
{
item
.
ProductId
}
and b.MinConsumePrice<=
{
item
.
GoodsPrice
}
) "
;
}
allGoodsClass
.
AddRange
(
item
.
GoodsClassId
.
ToList
());
}
goodsWhere
=
" and ("
+
goodsWhere
+
")"
;
//分类
var
goodsClassList
=
allGoodsClass
.
GroupBy
(
x
=>
x
);
foreach
(
var
item
in
goodsClassList
)
{
decimal
nowPrice
=
0
;
foreach
(
var
classItem
in
query
.
ProductList
)
{
if
(
classItem
.
GoodsClassId
.
Any
(
x
=>
x
==
item
.
Key
))
{
nowPrice
+=
classItem
.
GoodsPrice
;
}
}
if
(!
string
.
IsNullOrWhiteSpace
(
goodsClassWhere
))
{
goodsClassWhere
+=
$" or (c.ProductId =
{
item
.
Key
}
and b.MinConsumePrice<=
{
nowPrice
}
) "
;
}
else
{
goodsClassWhere
+=
$" (c.ProductId =
{
item
.
Key
}
and b.MinConsumePrice<=
{
nowPrice
}
) "
;
}
}
goodsClassWhere
=
" and ("
+
goodsClassWhere
+
")"
;
decimal
allPrice
=
query
.
ProductList
.
Sum
(
x
=>
x
.
GoodsPrice
);
allWhere
=
$" and b.MinConsumePrice<=
{
allPrice
}
"
;
}
}
string
sql
=
@
$" SELECT a.ID,a.UserId,b.`Name`,b.CouponType,b.UseType,b.MinConsumePrice,b.DiscountsPrice,b.MaxDiscountsPrice,b.Describe,a.StartDate,a.EndDate from rb_discountcoupon as b
LEFT
JOIN
rb_discountcoupon_product
as
c
on
b
.
ID
=
c
.
DiscountCouponId
LEFT
JOIN
rb_member_discountcoupon
as
a
on
a
.
CouponId
=
b
.
ID
where
b
.
UseType
=
1
and
c
.
`
Status
`
=
0
{
where
}
{
goodsClassWhere
}
UNION
ALL
SELECT
a
.
ID
,
a
.
UserId
,
b
.
`
Name
`
,
b
.
CouponType
,
b
.
UseType
,
b
.
MinConsumePrice
,
b
.
DiscountsPrice
,
b
.
MaxDiscountsPrice
,
b
.
Describe
,
a
.
StartDate
,
a
.
EndDate
from
rb_discountcoupon
as
b
LEFT
JOIN
rb_discountcoupon_product
as
c
on
b
.
ID
=
c
.
DiscountCouponId
LEFT
JOIN
rb_member_discountcoupon
as
a
on
a
.
CouponId
=
b
.
ID
where
b
.
UseType
=
2
and
c
.
`
Status
`
=
0
{
where
}
{
goodsWhere
}
UNION
all
SELECT
a
.
ID
,
a
.
UserId
,
b
.
`
Name
`
,
b
.
CouponType
,
b
.
UseType
,
b
.
MinConsumePrice
,
b
.
DiscountsPrice
,
b
.
MaxDiscountsPrice
,
b
.
Describe
,
a
.
StartDate
,
a
.
EndDate
from
rb_discountcoupon
as
b
LEFT
JOIN
rb_member_discountcoupon
as
a
on
a
.
CouponId
=
b
.
ID
where
b
.
UseType
=
3
{
where
}
{
allWhere
}
";
return
Get
<
RB_DiscountCoupon_Extend
>(
sql
).
ToList
();
}
}
}
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
69019936
...
...
@@ -561,8 +561,8 @@ LEFT JOIN rb_member_user as c on b.UserId=c.Id
{
if
(
dmodel
.
OrderStatus
==
1
)
{
where
+=
$@" and a.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in
(1,2,4,3)"
;
payMemerNumWhere
+=
$@" and
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in
(1,2,4,3)"
;
where
+=
$@" and a.
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in
(1,2,4,3)"
;
payMemerNumWhere
+=
$@" and
{
nameof
(
RB_Goods_Order
.
OrderStatus
)}
in
(1,2,4,3)"
;
}
else
if
(
dmodel
.
OrderStatus
==
2
)
{
...
...
Mall.Repository/User/RB_ArticleRepository.cs
0 → 100644
View file @
69019936
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
namespace
Mall.Repository.User
{
/// <summary>
/// 文章表仓储层
/// </summary>
public
class
RB_ArticleRepository
:
RepositoryBase
<
RB_Article
>
{
/// <summary>
/// 文章分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Article_Extend
>
GetArticlePageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Article_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Article WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Article_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Article_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Article_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
Title
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Title
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Article_Extend
.
Title
),
query
.
Title
.
Trim
());
}
builder
.
Append
(
" ORDER BY SortNum "
);
return
GetPage
<
RB_Article_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取文章列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Article_Extend
>
GetArticleListRepository
(
RB_Article_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Article WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Article_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Article_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Article_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
Title
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
Title
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Article_Extend
.
Title
),
query
.
Title
.
Trim
());
}
builder
.
Append
(
" ORDER BY SortNum "
);
return
Get
<
RB_Article_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/User/RB_Member_CouponRepository.cs
View file @
69019936
...
...
@@ -55,13 +55,16 @@ namespace Mall.Repository.User
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
);
}
if
(
query
.
CouponId
>
0
)
{
if
(
query
.
CouponId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
CouponId
)}
=
{
query
.
CouponId
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
CouponId
)}
in (
{
query
.
CouponIds
}
)"
);
}
if
(
query
.
UseState
>=
0
)
{
if
(
query
.
UseState
>=
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
)}
=
{
query
.
UseState
}
"
);
}
}
...
...
@@ -69,6 +72,8 @@ namespace Mall.Repository.User
return
Get
<
RB_Member_DiscountCoupon_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// 会员优惠券
/// </summary>
...
...
Mall.Repository/User/RB_StoresRepository.cs
0 → 100644
View file @
69019936
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
namespace
Mall.Repository.User
{
/// <summary>
/// 门店表仓储层
/// </summary>
public
class
RB_StoresRepository
:
RepositoryBase
<
RB_Stores
>
{
/// <summary>
/// 门店分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Stores_Extend
>
GetStoresPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Stores_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Stores WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
Id
),
query
.
Id
);
}
builder
.
Append
(
" ORDER BY Id DESC "
);
return
GetPage
<
RB_Stores_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 门店分类列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Stores_Extend
>
GetStoresListRepository
(
RB_Stores_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Stores WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Stores_Extend
.
Id
),
query
.
Id
);
}
builder
.
Append
(
" ORDER BY Id DESC "
);
return
Get
<
RB_Stores_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
\ No newline at end of file
Mall.Repository/User/RB_Topic_TypeRepository.cs
0 → 100644
View file @
69019936
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
namespace
Mall.Repository.User
{
/// <summary>
/// 专题分类表仓储层
/// </summary>
public
class
RB_Topic_TypeRepository
:
RepositoryBase
<
RB_Topic_Type
>
{
/// <summary>
/// 专题分类分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Topic_Type_Extend
>
GetTopicTypePageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Topic_Type_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Topic_Type WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Type_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Type_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Type_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
TopicName
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
TopicName
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Topic_Type_Extend
.
TopicName
),
query
.
TopicName
.
Trim
());
}
builder
.
Append
(
" ORDER BY SortNum "
);
return
GetPage
<
RB_Topic_Type_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取专题分类列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Topic_Type_Extend
>
GetTopicTypeListRepository
(
RB_Topic_Type_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Topic_Type WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Type_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Type_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Topic_Type_Extend
.
Id
),
query
.
Id
);
}
if
(
query
.
TopicName
!=
null
&&
!
string
.
IsNullOrEmpty
(
query
.
TopicName
.
Trim
()))
{
builder
.
AppendFormat
(
" AND {0} LIKE '%{1}%' "
,
nameof
(
RB_Topic_Type_Extend
.
TopicName
),
query
.
TopicName
.
Trim
());
}
builder
.
Append
(
" ORDER BY SortNum "
);
return
Get
<
RB_Topic_Type_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.Repository/User/RB_VideoRepository.cs
0 → 100644
View file @
69019936
using
System
;
using
System.Collections.Generic
;
using
System.Text
;
using
Mall.Model.Entity.User
;
using
Mall.Model.Extend.User
;
using
System.Linq
;
namespace
Mall.Repository.User
{
/// <summary>
/// 视频表仓储层
/// </summary>
public
class
RB_VideoRepository
:
RepositoryBase
<
RB_Video
>
{
/// <summary>
/// 视频分页列表
/// </summary>
/// <param name="pageIndex">页码</param>
/// <param name="pageSize">每页显示条数</param>
/// <param name="rowCount">总条数</param>
/// <param name="query">查询条件</param>
/// <returns></returns>
public
List
<
RB_Video_Extend
>
GetVideoPageListRepository
(
int
pageIndex
,
int
pageSize
,
out
long
rowCount
,
RB_Video_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Video WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Video_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Video_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Video_Extend
.
Id
),
query
.
Id
);
}
builder
.
Append
(
" ORDER BY Id DESC "
);
return
GetPage
<
RB_Video_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
/// <summary>
/// 获取视频列表
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
public
List
<
RB_Video_Extend
>
GetVideoListRepository
(
RB_Video_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
AppendFormat
(
@" SELECT * FROM RB_Video WHERE 1=1 AND Status=0 "
);
if
(
query
.
TenantId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Video_Extend
.
TenantId
),
query
.
TenantId
);
}
if
(
query
.
MallBaseId
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Video_Extend
.
MallBaseId
),
query
.
MallBaseId
);
}
if
(
query
.
Id
>
0
)
{
builder
.
AppendFormat
(
" AND {0}={1} "
,
nameof
(
RB_Video_Extend
.
Id
),
query
.
Id
);
}
builder
.
Append
(
" ORDER BY Id DESC "
);
return
Get
<
RB_Video_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
}
Mall.WebApi/Controllers/AppletWeChat/PublishController.cs
View file @
69019936
...
...
@@ -97,7 +97,7 @@ namespace Mall.WebApi.Controllers.AppletWeChat
/// <summary>
///
获取项目预览二维码
///
发布小程序
/// </summary>
/// <returns></returns>
[
HttpPost
]
...
...
@@ -115,13 +115,25 @@ namespace Mall.WebApi.Controllers.AppletWeChat
try
{
string
URL
=
$"http://127.0.0.1:
{
developerKitsPort
}
/v2/upload?project=
{
Mall
.
Common
.
Plugin
.
StringHelper
.
UrlEncode
(
projectUrl
)}
&version=v1.0.0&desc=微信开发者工具HTTP上传&appid=
{
model
.
MiniAppId
}
"
;
if
(
string
.
IsNullOrWhiteSpace
(
query
.
Version
))
{
query
.
Version
=
"1.0.0"
;
}
int
version
=
Convert
.
ToInt32
(
query
.
Version
.
Replace
(
"."
,
""
));
version
+=
1
;
query
.
Version
=
version
.
ToString
().
Substring
(
0
,
version
.
ToString
().
Length
-
2
)
+
"."
+
version
.
ToString
().
Substring
(
version
.
ToString
().
Length
-
2
,
1
)
+
"."
+
version
.
ToString
().
Substring
(
version
.
ToString
().
Length
-
1
,
1
);
string
URL
=
$"http://127.0.0.1:
{
developerKitsPort
}
/v2/upload?project=
{
Mall
.
Common
.
Plugin
.
StringHelper
.
UrlEncode
(
projectUrl
)}
&version=V
{
query
.
Version
}
&desc=微信开发者工具HTTP上传&appid=
{
model
.
MiniAppId
}
"
;
string
result
=
Mall
.
Common
.
Plugin
.
HttpHelper
.
HttpGet
(
URL
,
Encoding
.
UTF8
,
""
);
JObject
parmsJob
=
JObject
.
Parse
(
result
);
if
(
parmsJob
.
ContainsKey
(
"code"
))
{
return
ApiResult
.
Failed
(
parmsJob
.
GetValue
(
"message"
).
ToString
());
}
//更新版本
appletWeChatModule
.
UpdateVersion
(
query
);
return
ApiResult
.
Success
(
"上传成功"
,
result
);
}
catch
(
Exception
ex
)
...
...
Mall.WebApi/Controllers/MarketingCenter/AppletCouponController.cs
0 → 100644
View file @
69019936
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Threading.Tasks
;
using
Mall.Common
;
using
Mall.Common.API
;
using
Mall.Common.Plugin
;
using
Mall.Model.Extend.MarketingCenter
;
using
Mall.Module.MarketingCenter
;
using
Mall.WebApi.Filter
;
using
Microsoft.AspNetCore.Cors
;
using
Microsoft.AspNetCore.Mvc
;
using
Newtonsoft.Json
;
using
Newtonsoft.Json.Linq
;
namespace
Mall.WebApi.Controllers.MarketingCenter
{
[
Route
(
"api/[controller]/[action]"
)]
[
ApiExceptionFilter
]
[
ApiController
]
[
EnableCors
(
"AllowCors"
)]
public
class
AppletCouponController
:
BaseController
{
private
CouponModule
couponModule
=
new
CouponModule
();
/// <summary>
/// 设置购物车数量
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetNoUseCouponList
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
JObject
prams
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_DiscountCoupon_Extend
>(
RequestParm
.
msg
.
ToString
());
//if (userInfo == null)
//{
// userInfo.TenantId = 1;
// userInfo.MallBaseId = 1;
// userInfo.UserId = 3;
//}
query
.
TenantId
=
userInfo
.
TenantId
;
query
.
MallBaseId
=
userInfo
.
MallBaseId
;
query
.
UserId
=
userInfo
.
UserId
;
var
list
=
couponModule
.
GetNoUseCouponList
(
query
);
var
result
=
list
.
Select
(
x
=>
new
{
x
.
ID
,
StartDate
=
x
.
StartDate
.
HasValue
?
x
.
StartDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
EndDate
=
x
.
EndDate
.
HasValue
?
x
.
EndDate
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
Name
,
x
.
Describe
,
x
.
MinConsumePrice
,
x
.
CouponType
,
x
.
MaxDiscountsPrice
,
x
.
UseType
});
return
ApiResult
.
Success
(
""
,
result
);
}
}
}
\ No newline at end of file
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
69019936
...
...
@@ -678,6 +678,23 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
/// <summary>
/// 获取订单类型枚举下拉
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderTypeEnumEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderTypeEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
#
endregion
#
region
会员购买
...
...
Mall.WebApi/Controllers/User/MContentController.cs
0 → 100644
View file @
69019936
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/User/TenantController.cs
View file @
69019936
...
...
@@ -403,7 +403,7 @@ namespace Mall.WebApi.Controllers.User
}
#
region
设置可跳转小程序
#
region
设置可跳转小程序
OR
是否开启直播
/// <summary>
/// 设置可跳转小程序
/// </summary>
...
...
@@ -434,7 +434,28 @@ namespace Mall.WebApi.Controllers.User
}
}
/// <summary>
/// 设置可跳转小程序
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
UpdateLivePlayerPlugin
()
{
var
parms
=
RequestParm
;
var
query
=
JsonConvert
.
DeserializeObject
<
RB_MiniProgram_Extend
>(
RequestParm
.
msg
.
ToString
());
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
TenantId
=
UserInfo
.
TenantId
;
bool
result
=
programModule
.
UpdateLivePlayerPlugin
(
query
);
if
(
result
)
{
return
ApiResult
.
Success
(
"小程序直播组件设置成功"
);
}
else
{
return
ApiResult
.
Failed
(
"小程序直播组件设置失败"
);
}
}
/// <summary>
/// 根据小程序编号获取小程序信息
...
...
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