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
727c6330
Commit
727c6330
authored
May 15, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
4f39765f
7409b012
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
2426 additions
and
18 deletions
+2426
-18
RB_Goods_Order.cs
Mall.Model/Entity/Product/RB_Goods_Order.cs
+8
-0
RB_DiscountCoupon_Extend.cs
....Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
+4
-0
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+1021
-1
RB_Goods_ExpressRelevance_Extend.cs
....Model/Extend/Product/RB_Goods_ExpressRelevance_Extend.cs
+4
-1
RB_Goods_OrderDetail_Extend.cs
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
+28
-0
RB_Goods_Order_Extend.cs
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
+5
-0
RB_Member_DiscountCoupon_Extend.cs
Mall.Model/Extend/User/RB_Member_DiscountCoupon_Extend.cs
+4
-0
MiniprogramPageTemplModule.cs
Mall.Module.MarketingCenter/MiniprogramPageTemplModule.cs
+35
-0
MiniprogramTemplateModule.cs
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
+31
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+1039
-3
RB_DiscountCouponRepository.cs
...Repository/MarketingCenter/RB_DiscountCouponRepository.cs
+4
-0
RB_Miniprogram_Page_TemplRepository.cs
...ry/MarketingCenter/RB_Miniprogram_Page_TemplRepository.cs
+11
-0
RB_GoodsRepository.cs
Mall.Repository/Product/RB_GoodsRepository.cs
+24
-0
RB_Goods_ExpressRelevanceRepository.cs
...Repository/Product/RB_Goods_ExpressRelevanceRepository.cs
+4
-0
RB_Member_CouponRepository.cs
Mall.Repository/User/RB_Member_CouponRepository.cs
+38
-0
TemplateController.cs
....WebApi/Controllers/MarketingCenter/TemplateController.cs
+44
-7
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+73
-4
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+49
-2
No files found.
Mall.Model/Entity/Product/RB_Goods_Order.cs
View file @
727c6330
...
@@ -268,6 +268,14 @@ namespace Mall.Model.Entity.Product
...
@@ -268,6 +268,14 @@ namespace Mall.Model.Entity.Product
/// </summary>
/// </summary>
public
DateTime
?
ReceivingTime
{
get
;
set
;
}
public
DateTime
?
ReceivingTime
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 完成时间
/// </summary>
public
DateTime
?
FinishTime
{
get
;
set
;
}
/// <summary>
/// 取消时间
/// </summary>
public
DateTime
?
CancelTime
{
get
;
set
;
}
/// <summary>
/// 是否申请取消订单 1是 2否
/// 是否申请取消订单 1是 2否
/// </summary>
/// </summary>
public
int
?
IsApplyForCancel
{
get
;
set
;
}
public
int
?
IsApplyForCancel
{
get
;
set
;
}
...
...
Mall.Model/Extend/MarketingCenter/RB_DiscountCoupon_Extend.cs
View file @
727c6330
...
@@ -27,6 +27,10 @@ namespace Mall.Model.Extend.MarketingCenter
...
@@ -27,6 +27,10 @@ namespace Mall.Model.Extend.MarketingCenter
/// 发放数量
/// 发放数量
/// </summary>
/// </summary>
public
int
GrantNum
{
get
;
set
;
}
public
int
GrantNum
{
get
;
set
;
}
/// <summary>
/// 优惠卷ids
/// </summary>
public
string
CouponIds
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 会员等级
/// 会员等级
...
...
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
727c6330
This diff is collapsed.
Click to expand it.
Mall.Model/Extend/Product/RB_Goods_ExpressRelevance_Extend.cs
View file @
727c6330
...
@@ -13,6 +13,9 @@ namespace Mall.Model.Extend.Product
...
@@ -13,6 +13,9 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_ExpressRelevance_Extend
:
RB_Goods_ExpressRelevance
public
class
RB_Goods_ExpressRelevance_Extend
:
RB_Goods_ExpressRelevance
{
{
/// <summary>
/// 订单ids
/// </summary>
public
string
OrderIds
{
get
;
set
;
}
}
}
}
}
Mall.Model/Extend/Product/RB_Goods_OrderDetail_Extend.cs
View file @
727c6330
...
@@ -25,5 +25,33 @@ namespace Mall.Model.Extend.Product
...
@@ -25,5 +25,33 @@ namespace Mall.Model.Extend.Product
/// 明细ids
/// 明细ids
/// </summary>
/// </summary>
public
string
OrderDetailIds
{
get
;
set
;
}
public
string
OrderDetailIds
{
get
;
set
;
}
/// <summary>
/// 是否已发货
/// </summary>
public
int
?
IsBindExpress
{
get
;
set
;
}
/// <summary>
/// 商品分类ids
/// </summary>
public
List
<
int
>
CategoryIdList
{
get
;
set
;
}
/// <summary>
/// 剩余库存
/// </summary>
public
int
InventoryNum
{
get
;
set
;
}
/// <summary>
/// 规格价格列表id
/// </summary>
public
int
SpeciPriceId
{
get
;
set
;
}
/// <summary>
/// 是否开启单独返佣 1是 2否
/// </summary>
public
int
?
SeparateDistribution
{
get
;
set
;
}
/// <summary>
/// 分销类型 1普通 2详细
/// </summary>
public
int
?
SeparateDistributionType
{
get
;
set
;
}
/// <summary>
/// 分销佣金类型 1百分比 2固定值
/// </summary>
public
int
?
SeparateDistributionMoneyType
{
get
;
set
;
}
}
}
}
}
Mall.Model/Extend/Product/RB_Goods_Order_Extend.cs
View file @
727c6330
...
@@ -13,6 +13,11 @@ namespace Mall.Model.Extend.Product
...
@@ -13,6 +13,11 @@ namespace Mall.Model.Extend.Product
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
public
class
RB_Goods_Order_Extend
:
RB_Goods_Order
{
{
public
int
?
IsFormShoppingCart
{
get
;
set
;
}
/// <summary>
/// 收货地址id
/// </summary>
public
int
?
ShoppingAddressId
{
get
;
set
;
}
/// <summary>
/// <summary>
/// 商品id
/// 商品id
/// </summary>
/// </summary>
...
...
Mall.Model/Extend/User/RB_Member_DiscountCoupon_Extend.cs
View file @
727c6330
...
@@ -53,5 +53,9 @@ namespace Mall.Model.Extend.User
...
@@ -53,5 +53,9 @@ namespace Mall.Model.Extend.User
/// 下单结束时间
/// 下单结束时间
/// </summary>
/// </summary>
public
DateTime
?
EndDate
{
get
;
set
;
}
public
DateTime
?
EndDate
{
get
;
set
;
}
/// <summary>
/// 优惠卷ids
/// </summary>
public
string
CouponIds
{
get
;
set
;
}
}
}
}
}
Mall.Module.MarketingCenter/MiniprogramPageTemplModule.cs
View file @
727c6330
...
@@ -138,6 +138,41 @@ namespace Mall.Module.MarketingCenter
...
@@ -138,6 +138,41 @@ namespace Mall.Module.MarketingCenter
return
flag
;
return
flag
;
}
}
/// <summary>
/// 更新模板禁用、启用
/// </summary>
/// <param name="Id"></param>
/// <param name="IsUse"></param>
/// <returns></returns>
public
bool
SetMiniprogramPageTemplIsUseModule
(
object
Id
,
int
IsUse
)
{
bool
flag
=
false
;
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
IsUse
),
IsUse
}
};
flag
=
pageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Id
),
Id
));
return
flag
;
}
/// <summary>
/// 更新模板是否设为首页
/// </summary>
/// <param name="Id"></param>
/// <param name="IsHome"></param>
/// <returns></returns>
public
bool
SetMiniprogramPageTemplIsHomeModule
(
object
Id
,
int
IsHome
)
{
bool
flag
=
false
;
flag
=
pageRepository
.
UpdateIsHomeRepository
();
Dictionary
<
string
,
object
>
fileds
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
IsHome
),
IsHome
}
};
flag
=
pageRepository
.
Update
(
fileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Page_Templ_Extend
.
Id
),
Id
));
return
flag
;
}
/// <summary>
/// <summary>
/// 更新自定义页面状态
/// 更新自定义页面状态
/// </summary>
/// </summary>
...
...
Mall.Module.MarketingCenter/MiniprogramTemplateModule.cs
View file @
727c6330
...
@@ -88,6 +88,37 @@ namespace Mall.Module.MarketingCenter
...
@@ -88,6 +88,37 @@ namespace Mall.Module.MarketingCenter
{
{
extModel
=
new
RB_Miniprogram_Template_Extend
();
extModel
=
new
RB_Miniprogram_Template_Extend
();
}
}
if
(
extModel
.
TemplateData
!=
null
&&
!
string
.
IsNullOrEmpty
(
extModel
.
TemplateData
))
{
extModel
.
ComponentDataList
=
JsonHelper
.
DeserializeObject
<
List
<
ComponentItem
>>(
extModel
.
TemplateData
);
if
(
extModel
.
ComponentDataList
!=
null
&&
extModel
.
ComponentDataList
.
Count
>
0
)
{
foreach
(
var
item
in
extModel
.
ComponentDataList
)
{
switch
(
item
.
Id
)
{
case
"search"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
searchItem
>(
item
.
data
.
ToString
());
break
;
case
"nav"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
navItem
>(
item
.
data
.
ToString
());
break
;
case
"banner"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
bannerItem
>(
item
.
data
.
ToString
());
break
;
case
"notice"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
noticeItem
>(
item
.
data
.
ToString
());
break
;
case
"link"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
linkItem
>(
item
.
data
.
ToString
());
break
;
case
"rubik"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
rubikItem
>(
item
.
data
.
ToString
());
break
;
case
"video"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
videoItem
>(
item
.
data
.
ToString
());
break
;
case
"goods"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
goodsItem
>(
item
.
data
.
ToString
());
break
;
case
"store"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
storeItem
>(
item
.
data
.
ToString
());
break
;
case
"copyright"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
copyrightItem
>(
item
.
data
.
ToString
());
break
;
case
"check-in"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
checkinItem
>(
item
.
data
.
ToString
());
break
;
case
"user-info"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
userinfoItem
>(
item
.
data
.
ToString
());
break
;
case
"user-order"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
userorderItem
>(
item
.
data
.
ToString
());
break
;
case
"map"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
mapItem
>(
item
.
data
.
ToString
());
break
;
case
"mp-link"
:
item
.
data
=
JsonHelper
.
DeserializeObject
<
mplinkItem
>(
item
.
data
.
ToString
());
break
;
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
;
}
}
}
}
return
extModel
;
return
extModel
;
}
}
...
...
Mall.Module.Product/OrderModule.cs
View file @
727c6330
This diff is collapsed.
Click to expand it.
Mall.Repository/MarketingCenter/RB_DiscountCouponRepository.cs
View file @
727c6330
...
@@ -71,6 +71,10 @@ namespace Mall.Repository.MarketingCenter
...
@@ -71,6 +71,10 @@ namespace Mall.Repository.MarketingCenter
{
{
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
Name
)}
like '%
{
query
.
Name
}
%'"
);
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
Name
)}
like '%
{
query
.
Name
}
%'"
);
}
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
builder
.
Append
(
$" AND
{
nameof
(
RB_DiscountCoupon_Extend
.
ID
)}
in(
{
query
.
CouponIds
}
)"
);
}
}
}
return
Get
<
RB_DiscountCoupon_Extend
>(
builder
.
ToString
()).
ToList
();
return
Get
<
RB_DiscountCoupon_Extend
>(
builder
.
ToString
()).
ToList
();
}
}
...
...
Mall.Repository/MarketingCenter/RB_Miniprogram_Page_TemplRepository.cs
View file @
727c6330
...
@@ -42,6 +42,17 @@ namespace Mall.Repository.MarketingCenter
...
@@ -42,6 +42,17 @@ namespace Mall.Repository.MarketingCenter
return
GetPage
<
RB_Miniprogram_Page_Templ_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
return
GetPage
<
RB_Miniprogram_Page_Templ_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
builder
.
ToString
()).
ToList
();
}
}
/// <summary>
/// 设置不为首页
/// </summary>
/// <returns></returns>
public
bool
UpdateIsHomeRepository
()
{
StringBuilder
builder
=
new
StringBuilder
();
builder
.
Append
(
" UPDATE RB_Miniprogram_Page_Templ SET IsHome=0 "
);
return
base
.
Execute
(
builder
.
ToString
())>
0
;
}
/// <summary>
/// <summary>
/// 小程序自定义页面列表
/// 小程序自定义页面列表
...
...
Mall.Repository/Product/RB_GoodsRepository.cs
View file @
727c6330
...
@@ -273,5 +273,29 @@ inner join rb_goods_category c on g.Id=c.GoodsId
...
@@ -273,5 +273,29 @@ inner join rb_goods_category c on g.Id=c.GoodsId
where
{
where
}
group by g.Id order by col.Id desc"
;
where
{
where
}
group by g.Id order by col.Id desc"
;
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
return
GetPage
<
RB_Goods_Extend
>(
pageIndex
,
pageSize
,
out
rowCount
,
sql
).
ToList
();
}
}
public
List
<
RB_Goods_Extend
>
GetGoodsInventoryNumList
(
RB_Goods_Extend
dmodel
)
{
string
where
=
$" 1=1 and g.
{
nameof
(
RB_Goods_Extend
.
Status
)}
=0"
;
if
(
dmodel
.
TenantId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
TenantId
)}
=
{
dmodel
.
TenantId
}
"
;
}
if
(
dmodel
.
MallBaseId
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
MallBaseId
)}
=
{
dmodel
.
MallBaseId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
GoodsIds
))
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
Id
)}
in(
{
dmodel
.
GoodsIds
}
)"
;
}
if
(
dmodel
.
GoodsStatus
>
0
)
{
where
+=
$@" and g.
{
nameof
(
RB_Goods_Extend
.
GoodsStatus
)}
=
{
dmodel
.
GoodsStatus
}
"
;
}
string
sql
=
$@"select g.Id,g. from RB_Goods g where
{
where
}
group by g.Id asc"
;
return
Get
<
RB_Goods_Extend
>(
sql
).
ToList
();
}
}
}
}
}
Mall.Repository/Product/RB_Goods_ExpressRelevanceRepository.cs
View file @
727c6330
...
@@ -34,6 +34,10 @@ namespace Mall.Repository.Product
...
@@ -34,6 +34,10 @@ namespace Mall.Repository.Product
{
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderId
)}
=
{
dmodel
.
OrderId
}
"
;
}
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
OrderIds
))
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
if
(
dmodel
.
OrderDetailId
>
0
)
if
(
dmodel
.
OrderDetailId
>
0
)
{
{
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
where
+=
$@" and
{
nameof
(
RB_Goods_ExpressRelevance
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
...
...
Mall.Repository/User/RB_Member_CouponRepository.cs
View file @
727c6330
...
@@ -30,6 +30,44 @@ namespace Mall.Repository.User
...
@@ -30,6 +30,44 @@ namespace Mall.Repository.User
/// </summary>
/// </summary>
public
string
OrderTableName
{
get
{
return
nameof
(
RB_Goods_Order
);
}
}
public
string
OrderTableName
{
get
{
return
nameof
(
RB_Goods_Order
);
}
}
/// <summary>
/// 会员优惠券
/// </summary>
/// <returns></returns>
public
List
<
RB_Member_DiscountCoupon_Extend
>
GetList
(
RB_Member_DiscountCoupon_Extend
query
)
{
StringBuilder
builder
=
new
StringBuilder
();
if
(
query
!=
null
)
{
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
TenantId
)}
=
{
query
.
TenantId
}
"
);
}
if
(
query
.
TenantId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
MallBaseId
)}
=
{
query
.
MallBaseId
}
"
);
}
if
(
query
.
PlatformType
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
PlatformType
)}
=
{
query
.
PlatformType
}
"
);
}
if
(
query
.
UserId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UserId
)}
=
{
query
.
UserId
}
"
);
}
if
(
query
.
CouponId
>
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
CouponId
)}
=
{
query
.
CouponId
}
"
);
}
if
(!
string
.
IsNullOrEmpty
(
query
.
CouponIds
))
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
CouponId
)}
in (
{
query
.
CouponIds
}
)"
);
}
if
(
query
.
UseState
>=
0
)
{
builder
.
Append
(
$" AND a.
{
nameof
(
RB_Member_DiscountCoupon_Extend
.
UseState
)}
=
{
query
.
UseState
}
"
);
}
}
string
sql
=
@
$" select * FROM
{
TableName
}
AS a where 1=1
{
builder
.
ToString
()}
"
;
return
Get
<
RB_Member_DiscountCoupon_Extend
>(
sql
).
ToList
();
}
/// <summary>
/// <summary>
/// 会员优惠券
/// 会员优惠券
...
...
Mall.WebApi/Controllers/MarketingCenter/TemplateController.cs
View file @
727c6330
...
@@ -50,7 +50,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -50,7 +50,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
Status
=
0
;
extModel
.
Status
=
0
;
var
flag
=
templateModule
.
SetMiniprogramTemplateModule
(
extModel
);
var
flag
=
templateModule
.
SetMiniprogramTemplateModule
(
extModel
);
return
flag
?
ApiResult
.
Success
(
data
:
extModel
.
Id
)
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
(
data
:
extModel
.
Id
)
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// <summary>
...
@@ -61,8 +61,18 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -61,8 +61,18 @@ namespace Mall.WebApi.Controllers.MarketingCenter
{
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
);
var
Id
=
parms
.
GetInt
(
"Id"
);
var
result
=
templateModule
.
GetMiniprogramTemplateModule
(
Id
);
var
extModel
=
templateModule
.
GetMiniprogramTemplateModule
(
Id
);
return
ApiResult
.
Success
(
data
:
result
);
if
(
extModel
!=
null
&&
extModel
.
Id
>
0
)
{
var
obj
=
new
{
extModel
.
Id
,
extModel
.
TemplateName
,
extModel
.
ComponentDataList
,
};
return
ApiResult
.
Success
(
data
:
obj
);
}
return
ApiResult
.
Failed
(
message
:
"参数错误"
);
}
}
/// <summary>
/// <summary>
...
@@ -87,7 +97,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -87,7 +97,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
{
{
var
parms
=
RequestParm
;
var
parms
=
RequestParm
;
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
ResultPageModel
pagelist
=
JsonConvert
.
DeserializeObject
<
ResultPageModel
>(
parms
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Miniprogram_Template_Extend
>(
parms
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Miniprogram_Template_Extend
>(
parms
.
msg
.
ToString
());
query
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
query
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
...
@@ -130,7 +140,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -130,7 +140,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Miniprogram_Page_Templ_Extend
>(
parms
.
msg
.
ToString
());
var
query
=
JsonConvert
.
DeserializeObject
<
RB_Miniprogram_Page_Templ_Extend
>(
parms
.
msg
.
ToString
());
query
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
query
.
TenantId
=
Convert
.
ToInt32
(
parms
.
uid
);
query
.
MallBaseId
=
parms
.
MallBaseId
;
query
.
MallBaseId
=
parms
.
MallBaseId
;
var
list
=
miniprogramPageTemplModule
.
GetMiniprogramPageTemplListModule
(
query
);
var
list
=
miniprogramPageTemplModule
.
GetMiniprogramPageTemplListModule
(
query
);
return
ApiResult
.
Success
(
""
,
list
);
return
ApiResult
.
Success
(
""
,
list
);
}
}
...
@@ -146,7 +156,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -146,7 +156,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
query
.
TenantId
=
Convert
.
ToInt32
(
RequestParm
.
uid
);
query
.
TenantId
=
Convert
.
ToInt32
(
RequestParm
.
uid
);
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
query
.
MallBaseId
=
RequestParm
.
MallBaseId
;
bool
isGetHome
=
parms
.
GetBoolValue
(
"isGetHome"
);
bool
isGetHome
=
parms
.
GetBoolValue
(
"isGetHome"
);
var
extModel
=
miniprogramPageTemplModule
.
GetMiniprogramPageTemplModule
(
query
,
isGetHome
:
isGetHome
);
var
extModel
=
miniprogramPageTemplModule
.
GetMiniprogramPageTemplModule
(
query
,
isGetHome
:
isGetHome
);
return
ApiResult
.
Success
(
""
,
extModel
);
return
ApiResult
.
Success
(
""
,
extModel
);
}
}
...
@@ -159,7 +169,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -159,7 +169,7 @@ namespace Mall.WebApi.Controllers.MarketingCenter
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Miniprogram_Page_Templ_Extend
>(
RequestParm
.
msg
.
ToString
());
var
extModel
=
JsonConvert
.
DeserializeObject
<
RB_Miniprogram_Page_Templ_Extend
>(
RequestParm
.
msg
.
ToString
());
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
TenantId
=
RequestParm
.
TenantId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
extModel
.
MallBaseId
=
RequestParm
.
MallBaseId
;
Int32
.
TryParse
(
RequestParm
.
uid
,
out
int
Uid
);
Int32
.
TryParse
(
RequestParm
.
uid
,
out
int
Uid
);
extModel
.
CreateBy
=
Uid
;
extModel
.
CreateBy
=
Uid
;
extModel
.
CreateDate
=
DateTime
.
Now
;
extModel
.
CreateDate
=
DateTime
.
Now
;
...
@@ -181,6 +191,33 @@ namespace Mall.WebApi.Controllers.MarketingCenter
...
@@ -181,6 +191,33 @@ namespace Mall.WebApi.Controllers.MarketingCenter
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
}
/// <summary>
/// 更新模板禁用、启用
/// </summary>
/// <returns></returns>
public
ApiResult
SetMiniprogramPageTemplIsUse
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
IsUse
=
parms
.
GetInt
(
"IsUse"
,
0
);
var
flag
=
miniprogramPageTemplModule
.
SetMiniprogramPageTemplIsUseModule
(
Id
,
IsUse
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// 更新模板是否设为首页
/// </summary>
/// <returns></returns>
public
ApiResult
SetMiniprogramPageTemplIsHome
()
{
JObject
parms
=
JObject
.
Parse
(
RequestParm
.
msg
.
ToString
());
var
Id
=
parms
.
GetInt
(
"Id"
,
0
);
var
IsHome
=
parms
.
GetInt
(
"IsHome"
,
1
);
var
flag
=
miniprogramPageTemplModule
.
SetMiniprogramPageTemplIsHomeModule
(
Id
,
IsHome
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
();
}
/// <summary>
/// <summary>
/// 更新自定义页面状态
/// 更新自定义页面状态
/// </summary>
/// </summary>
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
727c6330
...
@@ -181,6 +181,40 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -181,6 +181,40 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
GetAppletGoodsSettlementInfo
(
demodel
);
return
orderModule
.
GetAppletGoodsSettlementInfo
(
demodel
);
}
}
/// <summary>
/// 结算页面修改快递,获取快递费用
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetAppletGoodsSettlementExpress
()
{
var
req
=
RequestParm
;
var
userInfo
=
AppletUserInfo
;
RB_Goods_Order_Extend
demodel
=
JsonConvert
.
DeserializeObject
<
RB_Goods_Order_Extend
>(
req
.
msg
.
ToString
());
if
((
demodel
.
ShoppingAddressId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递收货地址id"
);
}
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
}
foreach
(
var
item
in
demodel
.
DetailList
)
{
if
((
item
.
GoodsId
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品id"
);
}
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
UserId
=
userInfo
.
UserId
;
return
orderModule
.
GetAppletGoodsSettlementExpress
(
demodel
);
}
/// <summary>
/// <summary>
/// 下单
/// 下单
/// </summary>
/// </summary>
...
@@ -196,10 +230,23 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -196,10 +230,23 @@ namespace Mall.WebApi.Controllers.MallBase
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"请传递收件人手机号码"
);
return
ApiResult
.
ParamIsNull
(
"请传递收件人手机号码"
);
}
}
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
{
if
(
demodel
.
DeliveryMethod
!=
Common
.
Enum
.
Goods
.
OrderDeliveryMethodEnum
.
VerificationShop
)
if
((
demodel
.
District
??
0
)
<=
0
)
{
{
if
((
demodel
.
District
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"收货地址有误"
);
return
ApiResult
.
ParamIsNull
(
"收货地址有误"
);
}
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
ShippingAddress
))
{
return
ApiResult
.
ParamIsNull
(
"收货详细地址不能为空"
);
}
}
else
{
if
(
string
.
IsNullOrEmpty
(
demodel
.
Consignee
))
{
return
ApiResult
.
ParamIsNull
(
"收件人不能为空"
);
}
if
(
string
.
IsNullOrEmpty
(
demodel
.
Mobile
))
{
return
ApiResult
.
ParamIsNull
(
"收件人手机不能为空"
);
}
}
}
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
if
(
demodel
.
DetailList
==
null
||
!
demodel
.
DetailList
.
Any
())
{
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
return
ApiResult
.
ParamIsNull
(
"请传递商品信息"
);
...
@@ -211,10 +258,32 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -211,10 +258,32 @@ namespace Mall.WebApi.Controllers.MallBase
if
((
item
.
Number
??
0
)
<=
0
)
{
if
((
item
.
Number
??
0
)
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
return
ApiResult
.
ParamIsNull
(
"请传递商品数量"
);
}
}
if
(
string
.
IsNullOrEmpty
(
item
.
Specification
))
{
return
ApiResult
.
ParamIsNull
(
"请传递规格名"
);
}
}
}
demodel
.
BuyerMessage
??=
""
;
//买家留言
demodel
.
OrderSource
??=
UserSourceEnum
.
WeiXin
;
#
region
赋默认值
demodel
.
TenantId
=
userInfo
.
TenantId
;
demodel
.
MallBaseId
=
userInfo
.
MallBaseId
;
demodel
.
OrderStatus
=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
NonPayment
;
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
Fee
??=
0
;
demodel
.
FreightMoney
??=
0
;
demodel
.
HistoryOrderStatus
??=
0
;
demodel
.
IsApplyForCancel
??=
2
;
demodel
.
IsOrderCommission
??=
2
;
demodel
.
MerchantsNo
??=
""
;
demodel
.
Recycled
??=
2
;
demodel
.
Refund
??=
0
;
demodel
.
Status
=
0
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
demodel
.
UserId
=
userInfo
.
UserId
;
#
endregion
return
ApiResult
.
Success
();
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
}
#
endregion
#
endregion
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
727c6330
...
@@ -70,7 +70,8 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -70,7 +70,8 @@ namespace Mall.WebApi.Controllers.MallBase
y
.
Specification
,
y
.
Specification
,
y
.
ProductCode
,
y
.
ProductCode
,
y
.
Final_Price
,
y
.
Final_Price
,
y
.
Number
y
.
Number
,
y
.
IsBindExpress
}),
}),
x
.
Consignee
,
x
.
Consignee
,
x
.
Mobile
,
x
.
Mobile
,
...
@@ -83,6 +84,7 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -83,6 +84,7 @@ namespace Mall.WebApi.Controllers.MallBase
PaymentTime
=
x
.
PaymentTime
.
HasValue
?
x
.
PaymentTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
PaymentTime
=
x
.
PaymentTime
.
HasValue
?
x
.
PaymentTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
DeliveryTime
=
x
.
DeliveryTime
.
HasValue
?
x
.
DeliveryTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
DeliveryTime
=
x
.
DeliveryTime
.
HasValue
?
x
.
DeliveryTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
ReceivingTime
=
x
.
ReceivingTime
.
HasValue
?
x
.
ReceivingTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
ReceivingTime
=
x
.
ReceivingTime
.
HasValue
?
x
.
ReceivingTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
FinishTime
=
x
.
FinishTime
.
HasValue
?
x
.
FinishTime
.
Value
.
ToString
(
"yyyy-MM-dd HH:mm:ss"
)
:
""
,
x
.
Country
,
x
.
Country
,
x
.
Province
,
x
.
Province
,
x
.
City
,
x
.
City
,
...
@@ -234,6 +236,51 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -234,6 +236,51 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
/// <summary>
/// 获取商品订单类型枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderTypeEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderTypeEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// 获取商品订单配送类型
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderDeliveryMethodEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderDeliveryMethodEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// 获取商品订单状态枚举
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetOrderStatusEnumList
()
{
var
list
=
EnumHelper
.
GetEnumList
(
typeof
(
OrderStatusEnum
));
return
ApiResult
.
Success
(
""
,
list
.
Select
(
x
=>
new
{
Name
=
x
.
Key
,
Id
=
Convert
.
ToInt32
(
x
.
Value
)
}));
}
/// <summary>
/// <summary>
/// 下单
/// 下单
/// </summary>
/// </summary>
...
@@ -297,7 +344,7 @@ namespace Mall.WebApi.Controllers.MallBase
...
@@ -297,7 +344,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
}
}
var
omodel
=
orderModule
.
GetOrderInfo
(
demodel
.
OrderId
??
0
);
var
omodel
=
orderModule
.
GetOrderInfo
(
demodel
.
OrderId
??
0
);
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
)
{
if
(
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitSendGoods
&&
omodel
.
OrderStatus
!=
OrderStatusEnum
.
WaitReceiving
)
{
return
ApiResult
.
ParamIsNull
(
"状态不对"
);
return
ApiResult
.
ParamIsNull
(
"状态不对"
);
}
}
...
...
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