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
808e1239
Commit
808e1239
authored
Oct 22, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
into sdzq-ld
parents
432c1b82
ee2a4388
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
402 additions
and
91 deletions
+402
-91
WeiXinHelper.cs
Mall.Common/Plugin/WeiXinHelper.cs
+1
-1
RB_Miniprogram_Bottomnav.cs
Mall.Model/Entity/User/RB_Miniprogram_Bottomnav.cs
+5
-0
OrderStatistics_Query.cs
Mall.Model/Query/OrderStatistics_Query.cs
+15
-2
StatisticsModule.cs
Mall.Module.MarketingCenter/StatisticsModule.cs
+24
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+50
-37
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+2
-2
MiniProgramModule.cs
Mall.Module.User/MiniProgramModule.cs
+1
-0
RB_Share_FriendRepository.cs
Mall.Repository/MarketingCenter/RB_Share_FriendRepository.cs
+2
-1
RB_Goods_OrderRepository.cs
Mall.Repository/Product/RB_Goods_OrderRepository.cs
+146
-18
LiveHouseController.cs
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
+121
-9
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+31
-11
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+4
-10
No files found.
Mall.Common/Plugin/WeiXinHelper.cs
View file @
808e1239
...
...
@@ -56,7 +56,7 @@ namespace Mall.Common.Plugin
}
catch
(
Exception
ex
)
{
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
"GetWeChatOpenId:result="
+
result
);
Common
.
Plugin
.
LogHelper
.
Write
(
ex
,
string
.
Format
(
"GetWeChatOpenId:result={0}&&Code={1}"
,
result
,
Code
)
);
}
return
openid
;
}
...
...
Mall.Model/Entity/User/RB_Miniprogram_Bottomnav.cs
View file @
808e1239
...
...
@@ -106,5 +106,10 @@ namespace Mall.Model.Entity.User
/// 排序
/// </summary>
public
int
TagSort
{
get
;
set
;
}
/// <summary>
/// 标签模式(0-全部,1-电商,2-教育)
/// </summary>
public
int
TagType
{
get
;
set
;
}
}
}
Mall.Model/Query/OrderStatistics_Query.cs
View file @
808e1239
...
...
@@ -14,7 +14,7 @@ namespace Mall.Model.Query
[
DB
(
ConnectionName
=
"DefaultConnection"
)]
public
class
OrderStatistics_Query
{
public
string
Ids
{
get
;
set
;
}
public
int
Id
{
get
;
set
;
}
public
int
OrderId
{
get
;
set
;
}
...
...
@@ -323,7 +323,10 @@ namespace Mall.Model.Query
/// </summary>
public
decimal
ServiceCharge
{
get
;
set
;
}
/// <summary>
/// 订单手续费
/// </summary>
public
decimal
ReturnServiceCharge
{
get
;
set
;
}
/// <summary>
/// 保险收入
/// </summary>
...
...
@@ -346,5 +349,15 @@ namespace Mall.Model.Query
/// </summary>
public
int
OrderClassify
{
get
;
set
;
}
/// <summary>
/// 订单来源(平台) 枚举
/// </summary>
public
Common
.
Enum
.
User
.
UserSourceEnum
?
OrderSource
{
get
;
set
;
}
}
}
Mall.Module.MarketingCenter/StatisticsModule.cs
View file @
808e1239
...
...
@@ -185,6 +185,30 @@ namespace Mall.Module.MarketingCenter
return
list
;
}
/// <summary>
/// 售后订单
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
OrderStatistics_Query
>
GetFXAllAftersaleOrderProfitLossList
(
OrderStatistics_Query
dmodel
)
{
var
list
=
orderRepository
.
GetFXAllAftersaleOrderProfitLossList
(
dmodel
);
return
list
;
}
/// <summary>
/// 取消订单
/// </summary>
/// <param name="dmodel"></param>
/// <returns></returns>
public
List
<
OrderStatistics_Query
>
GetFXAllCancelOrderProfitLossList
(
OrderStatistics_Query
dmodel
)
{
var
list
=
orderRepository
.
GetFXAllCancelOrderProfitLossList
(
dmodel
);
return
list
;
}
public
List
<
RB_Goods_OrderCommission_Extend
>
GetByOrderDetailId
(
RB_Goods_OrderCommission_Extend
model
)
{
...
...
Mall.Module.Product/OrderModule.cs
View file @
808e1239
...
...
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
using
Mall.AOP.CustomerAttribute
;
using
Mall.Common
;
using
Mall.Common.API
;
using
Mall.Common.Enum
;
...
...
@@ -9050,9 +9051,10 @@ namespace Mall.Module.Product
/// </summary>
/// <param name="demodel"></param>
/// <returns></returns>
public
string
SetOrderSendGoods
(
RB_Goods_OrderExpress_Extend
demodel
)
[
TransactionCallHandler
]
public
virtual
bool
SetOrderSendGoods
(
RB_Goods_OrderExpress_Extend
demodel
,
out
string
message
)
{
var
trans
=
goods_OrderExpressRepository
.
DbTransaction
;
message
=
""
;
try
{
if
(
demodel
.
Id
>
0
)
...
...
@@ -9060,14 +9062,17 @@ namespace Mall.Module.Product
var
omodel
=
goods_OrderRepository
.
GetEntity
(
demodel
.
OrderId
);
if
(
omodel
==
null
)
{
return
"订单不存在"
;
message
=
"订单不存在"
;
return
false
;
}
if
(
omodel
.
OrderStatus
>=
Common
.
Enum
.
Goods
.
OrderStatusEnum
.
Received
)
{
return
"已收货无法修改物流信息"
;
message
=
"已收货无法修改物流信息"
;
return
false
;
}
//修改物流信息
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_OrderExpress
.
ExpressId
),
demodel
.
ExpressId
},
{
nameof
(
RB_Goods_OrderExpress
.
Type
),
demodel
.
Type
},
{
nameof
(
RB_Goods_OrderExpress
.
PostCode
),
demodel
.
PostCode
},
...
...
@@ -9075,24 +9080,28 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods_OrderExpress
.
Remark
),
demodel
.
Remark
},
{
nameof
(
RB_Goods_OrderExpress
.
UpdateDate
),
demodel
.
UpdateDate
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_OrderExpress
.
Id
),
FiledValue
=
demodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
demodel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_OrderExpress
.
TenantId
),
FiledValue
=
demodel
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
demodel
.
TenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_OrderExpress
.
MallBaseId
),
FiledValue
=
demodel
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
demodel
.
MallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
};
bool
flag
=
goods_OrderExpressRepository
.
Update
(
keyValues
,
wheres
,
trans
);
bool
flag
=
goods_OrderExpressRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
...
...
@@ -9104,17 +9113,18 @@ namespace Mall.Module.Product
SourceId
=
demodel
.
OrderId
,
TenantId
=
demodel
.
TenantId
,
Type
=
1
}
,
trans
);
});
}
goods_OrderExpressRepository
.
DBSession
.
Commit
()
;
return
flag
?
""
:
"保存失败"
;
message
=
flag
?
""
:
"保存失败"
;
return
flag
;
}
else
{
var
dlist
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderId
=
demodel
.
OrderId
});
if
(
demodel
.
OrderDetailIdList
.
Where
(
x
=>
!
dlist
.
Select
(
y
=>
y
.
Id
).
Contains
(
x
)).
Any
())
{
return
"传递的订单明细Id有误,请核实后再试"
;
message
=
"传递的订单明细Id有误,请核实后再试"
;
return
false
;
}
//验证商品是否已创建快递信息
var
erlist
=
goods_ExpressRelevanceRepository
.
GetList
(
new
RB_Goods_ExpressRelevance_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
OrderId
=
demodel
.
OrderId
});
...
...
@@ -9122,10 +9132,11 @@ namespace Mall.Module.Product
{
if
(
erlist
.
Where
(
x
=>
x
.
OrderDetailId
==
item
).
Any
())
{
return
"传递的订单明细Id:"
+
item
+
",已绑定物流信息无法再次绑定"
;
message
=
"传递的订单明细Id:"
+
item
+
",已绑定物流信息无法再次绑定"
;
return
false
;
}
}
int
Id
=
goods_OrderExpressRepository
.
Insert
(
demodel
,
trans
);
int
Id
=
goods_OrderExpressRepository
.
Insert
(
demodel
);
if
(
Id
>
0
)
{
foreach
(
var
item
in
demodel
.
OrderDetailIdList
)
...
...
@@ -9140,7 +9151,7 @@ namespace Mall.Module.Product
OrderId
=
demodel
.
OrderId
,
TenantId
=
demodel
.
TenantId
,
UpdateDate
=
demodel
.
UpdateDate
}
,
trans
);
});
}
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
{
...
...
@@ -9151,22 +9162,25 @@ namespace Mall.Module.Product
SourceId
=
demodel
.
OrderId
,
TenantId
=
demodel
.
TenantId
,
Type
=
1
}
,
trans
);
});
//判断商品是否已全部绑定快递, 是的话需要更新商品状态为已发货
if
(
erlist
.
Select
(
x
=>
x
.
OrderDetailId
).
Distinct
().
Count
()
+
demodel
.
OrderDetailIdList
.
Distinct
().
Count
()
==
dlist
.
Count
())
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_Order
.
OrderStatus
),
OrderStatusEnum
.
WaitReceiving
},
{
nameof
(
RB_Goods_Order
.
DeliveryTime
),
DateTime
.
Now
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
()
{
FiledName
=
nameof
(
RB_Goods_Order
.
OrderId
),
FiledValue
=
demodel
.
OrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
FiledValue
=
demodel
.
OrderId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
oflag
=
goods_OrderRepository
.
Update
(
keyValues
,
wheres
,
trans
);
bool
oflag
=
goods_OrderRepository
.
Update
(
keyValues
,
wheres
);
if
(
oflag
)
{
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
...
...
@@ -9178,7 +9192,7 @@ namespace Mall.Module.Product
SourceId
=
demodel
.
OrderId
,
TenantId
=
demodel
.
TenantId
,
Type
=
1
}
,
trans
);
});
}
var
omodel
=
goods_OrderRepository
.
GetEntity
(
demodel
.
OrderId
);
...
...
@@ -9211,17 +9225,16 @@ namespace Mall.Module.Product
}
}
}
goods_OrderExpressRepository
.
DBSession
.
Commit
()
;
return
Id
>
0
?
""
:
"保存失败"
;
message
=
Id
>
0
?
""
:
"保存失败"
;
return
Id
>
0
;
}
}
catch
(
Exception
ex
)
{
LogHelper
.
Write
(
ex
,
""
);
goods_OrderExpressRepository
.
DBSession
.
Rollback
()
;
return
"保存失败"
;
LogHelper
.
Write
(
ex
,
"
SetOrderSendGoods
"
);
message
=
"保存失败"
;
return
false
;
}
}
/// <summary>
...
...
Mall.Module.Product/ProductModule.cs
View file @
808e1239
...
...
@@ -5078,7 +5078,7 @@ namespace Mall.Module.Product
{
PageId
=
thirdItem
.
Id
+
100000
,
PageName
=
thirdItem
.
Name
,
PageUrl
=
"/pages/goods/list?
cat_id
="
+
thirdItem
.
Id
,
PageUrl
=
"/pages/goods/list?
CategoryIds
="
+
thirdItem
.
Id
,
PageType
=
Common
.
Enum
.
MallBase
.
PageTypeEnum
.
DiyPage
,
IsParameter
=
0
,
TipText
=
""
,
...
...
@@ -5115,7 +5115,7 @@ namespace Mall.Module.Product
{
PageId
=
secondItem
.
Id
+
100000
,
PageName
=
secondItem
.
Name
,
PageUrl
=
"/pages/goods/list?
cat_id
="
+
secondItem
.
Id
,
PageUrl
=
"/pages/goods/list?
CategoryIds
="
+
secondItem
.
Id
,
PageType
=
Common
.
Enum
.
MallBase
.
PageTypeEnum
.
DiyPage
,
IsParameter
=
0
,
TipText
=
""
,
...
...
Mall.Module.User/MiniProgramModule.cs
View file @
808e1239
...
...
@@ -400,6 +400,7 @@ namespace Mall.Module.User
{
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
CheckedColor
),
item
.
CheckedColor
},
{
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
TagLink
),
item
.
TagLink
},
{
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
TagSort
),
item
.
TagSort
},
{
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
TagType
),
item
.
TagType
},
};
flag
=
bottomnavRepository
.
Update
(
tagfileds
,
new
WhereHelper
(
nameof
(
RB_Miniprogram_Bottomnav_Extend
.
TagId
),
item
.
TagId
));
}
...
...
Mall.Repository/MarketingCenter/RB_Share_FriendRepository.cs
View file @
808e1239
...
...
@@ -35,7 +35,8 @@ WHERE 1=1 AND A.Status=0
if
(
IsUse
)
{
builder
.
AppendFormat
(
" AND A.{0}=1 "
,
nameof
(
RB_Share_Friend_Extend
.
IsUse
));
orderBy
=
" ORDER BY A.IsTop DESC,A.SortNum ASC,A.CreateDate DESC "
;
// A.IsTop DESC,A.SortNum ASC,
orderBy
=
" ORDER BY A.CreateDate DESC "
;
}
else
{
...
...
Mall.Repository/Product/RB_Goods_OrderRepository.cs
View file @
808e1239
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/AppletWeChat/LiveHouseController.cs
View file @
808e1239
This diff is collapsed.
Click to expand it.
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
808e1239
...
...
@@ -304,6 +304,36 @@ namespace Mall.WebApi.Controllers.MallBase
#
region
底部导航
if
(
miniProgram
!=
null
&&
miniProgram
.
MallBaseId
>
0
)
{
object
navList
=
null
;
//开启校园
if
(
isOpenSchool
==
1
)
{
navList
=
miniProgram
.
BottomTagList
.
Where
(
qitem
=>
qitem
.
TagType
!=
1
).
Select
(
qitem
=>
new
{
active_color
=
qitem
.
CheckedColor
,
active_icon
=
qitem
.
CheckedIcon
,
color
=
qitem
.
DefaultColor
,
text
=
qitem
.
TagName
,
icon
=
qitem
.
DefaultIcon
,
url
=
qitem
.
TagLink
,
open_type
=
"redirect"
,
key
=
qitem
.
TagLink
==
"/pages/live/index"
?
"live"
:
""
,
});
}
else
{
navList
=
miniProgram
.
BottomTagList
.
Where
(
qitem
=>
qitem
.
TagType
!=
2
).
Select
(
qitem
=>
new
{
active_color
=
qitem
.
CheckedColor
,
active_icon
=
qitem
.
CheckedIcon
,
color
=
qitem
.
DefaultColor
,
text
=
qitem
.
TagName
,
icon
=
qitem
.
DefaultIcon
,
url
=
qitem
.
TagLink
,
open_type
=
"redirect"
,
key
=
qitem
.
TagLink
==
"/pages/live/index"
?
"live"
:
""
,
});
}
//底部导航
navbar
=
new
{
...
...
@@ -316,17 +346,7 @@ namespace Mall.WebApi.Controllers.MallBase
//导航底部是否开启阴影效果(0-未开启,1-开启)
shadow
=
miniProgram
.
BottomNavIsShadow
,
//导航栏
navs
=
miniProgram
.
BottomTagList
.
Select
(
qitem
=>
new
{
active_color
=
qitem
.
CheckedColor
,
active_icon
=
qitem
.
CheckedIcon
,
color
=
qitem
.
DefaultColor
,
text
=
qitem
.
TagName
,
icon
=
qitem
.
DefaultIcon
,
url
=
qitem
.
TagLink
,
open_type
=
"redirect"
,
key
=
qitem
.
TagLink
==
"/pages/live/index"
?
"live"
:
""
,
}),
navs
=
navList
,
};
}
#
endregion
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
808e1239
...
...
@@ -19,6 +19,7 @@ using Mall.Common.Enum.Goods;
using
Microsoft.AspNetCore.Http
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Configuration.Json
;
using
Mall.AOP
;
namespace
Mall.WebApi.Controllers.MallBase
{
...
...
@@ -41,7 +42,7 @@ namespace Mall.WebApi.Controllers.MallBase
}
private
readonly
OrderModule
orderModule
=
new
OrderModule
();
private
readonly
OrderModule
orderModule
=
AOPHelper
.
CreateAOPObject
<
OrderModule
>
();
private
readonly
MiniProgramMsgModule
miniProgramMsgModule
=
new
MiniProgramMsgModule
();
#
region
订单列表
...
...
@@ -773,15 +774,8 @@ namespace Mall.WebApi.Controllers.MallBase
demodel
.
CreateDate
=
DateTime
.
Now
;
demodel
.
UpdateDate
=
DateTime
.
Now
;
string
msg
=
orderModule
.
SetOrderSendGoods
(
demodel
);
if
(
msg
==
""
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
(
msg
);
}
var
flag
=
orderModule
.
SetOrderSendGoods
(
demodel
,
out
string
msg
);
return
flag
?
ApiResult
.
Success
()
:
ApiResult
.
Failed
(
msg
);
}
/// <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