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
f88c9060
Commit
f88c9060
authored
Jun 29, 2020
by
吴春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
ddf81696
401ac165
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
161 additions
and
50 deletions
+161
-50
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+55
-1
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+42
-0
MallController.cs
Mall.WebApi/Controllers/Mall/MallController.cs
+50
-49
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+14
-0
No files found.
Mall.Module.Product/OrderModule.cs
View file @
f88c9060
...
...
@@ -2932,7 +2932,52 @@ namespace Mall.Module.Product
}
}
/// <summary>
/// 初始化返佣
/// </summary>
/// <param name="orderId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
bool
SetAppletOrderCommissionInitialize
(
int
orderId
,
int
userId
=
0
)
{
var
demodel
=
goods_OrderRepository
.
GetEntity
<
RB_Goods_Order_Extend
>(
orderId
);
if
(
demodel
==
null
)
{
return
false
;
}
userId
=
demodel
.
UserId
??
0
;
var
umodel
=
member_UserRepository
.
GetEntity
(
userId
);
if
(
umodel
==
null
)
{
return
false
;
}
var
detList
=
goods_OrderDetailRepository
.
GetOrderDetailList
(
new
RB_Goods_OrderDetail_Extend
()
{
OrderId
=
orderId
});
demodel
.
DetailList
=
detList
;
string
GoodsIds
=
""
;
if
(
demodel
.
DetailList
.
Any
())
{
GoodsIds
=
string
.
Join
(
","
,
demodel
.
DetailList
.
Select
(
x
=>
x
.
GoodsId
));
var
gList
=
goodsRepository
.
GetList
(
new
RB_Goods_Extend
()
{
GoodsIds
=
GoodsIds
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
foreach
(
var
item
in
demodel
.
DetailList
)
{
var
gmodel
=
gList
.
Where
(
x
=>
x
.
Id
==
item
.
GoodsId
).
FirstOrDefault
();
if
(
gmodel
==
null
||
gmodel
.
GoodsStatus
!=
1
)
{
return
false
;
}
item
.
SeparateDistribution
=
gmodel
.
SeparateDistribution
;
item
.
SeparateDistributionType
=
gmodel
.
SeparateDistributionType
;
item
.
SeparateDistributionMoneyType
=
gmodel
.
SeparateDistributionMoneyType
;
item
.
IntegralPresent
=
gmodel
.
IntegralPresent
;
item
.
IntegralPresentType
=
gmodel
.
IntegralPresentType
;
}
}
InsertOrderCommission
(
demodel
,
umodel
,
GoodsIds
,
orderId
);
return
true
;
}
/// <summary>
/// 插入返佣
...
...
@@ -3166,6 +3211,14 @@ namespace Mall.Module.Product
}
if
(
OneUserId
>
0
)
{
#
region
临时处理
if
(
TwoUserId
>
0
&&
TwoUserId
<
20
)
{
TwoUserId
=
0
;
}
if
(
ThreeUserId
>
0
&&
ThreeUserId
<
20
)
{
ThreeUserId
=
0
;
}
#
endregion
if
(
OneUserId
>
0
)
{
OneDistributorGrade
=
distributor_InfoRepository
.
GetList
(
new
RB_Distributor_Info_Extend
()
{
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
,
UserId
=
OneUserId
})?.
FirstOrDefault
()?.
GradeId
??
0
;
...
...
@@ -3428,9 +3481,9 @@ namespace Mall.Module.Product
//gocList 合并用户金额
if
(
basicModel
.
IsCommissionResidue
==
1
)
{
gocfulList
=
new
List
<
RB_Goods_OrderCommission
>();
if
(
gocList
.
Count
()
!=
gocList
.
Select
(
x
=>
x
.
UserId
).
Distinct
().
Count
())
{
gocfulList
=
new
List
<
RB_Goods_OrderCommission
>();
//说明有用户可以合并
var
userIdList
=
gocList
.
Select
(
x
=>
x
.
UserId
).
Distinct
().
ToList
();
foreach
(
var
qitem
in
userIdList
)
...
...
@@ -3450,6 +3503,7 @@ namespace Mall.Module.Product
{
foreach
(
var
qitem
in
gocfulList
)
{
qitem
.
Commission
=
(
qitem
.
Commission
??
0
)
*
(
item
.
Number
??
0
);
goods_OrderCommissionRepository
.
Insert
(
qitem
,
trans
);
}
}
...
...
Mall.Module.Product/ProductModule.cs
View file @
f88c9060
...
...
@@ -3205,6 +3205,48 @@ namespace Mall.Module.Product
return
list
;
}
/// <summary>
/// 首页查询使用
/// </summary>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="count"></param>
/// <param name="demodel"></param>
/// <returns></returns>
public
List
<
RB_Goods_Extend
>
GetProductGoodsPageList_V2
(
int
pageIndex
,
int
pageSize
,
out
long
count
,
RB_Goods_Extend
demodel
)
{
if
(!
string
.
IsNullOrEmpty
(
demodel
.
CategoryIds
)
&&
!
demodel
.
CategoryIds
.
Contains
(
','
))
{
//获取该分类下所有子集分类
var
cmodel
=
goods_CategoryRepository
.
GetEntity
(
demodel
.
CategoryIds
);
//goods_CategoryRepository.GetList(new RB_Goods_Category_Extend() { TenantId });
}
var
list
=
goodsRepository
.
GetPageList
(
pageIndex
,
pageSize
,
out
count
,
demodel
);
if
(
list
.
Any
())
{
//查询分类
string
ids
=
string
.
Join
(
","
,
list
.
Select
(
x
=>
x
.
Id
));
var
clist
=
goods_CategoryRepository
.
GetList
(
new
RB_Goods_Category_Extend
()
{
GoodsIds
=
ids
,
TenantId
=
demodel
.
TenantId
,
MallBaseId
=
demodel
.
MallBaseId
});
var
olist
=
goods_OrderRepository
.
GetGoodsOrderNum
(
ids
);
foreach
(
var
item
in
list
)
{
item
.
CategoryList
=
clist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
ToList
();
//轮播图
item
.
CoverImage
=
""
;
if
(!
string
.
IsNullOrEmpty
(
item
.
CarouselImage
)
&&
item
.
CarouselImage
!=
"[]"
)
{
List
<
string
>
CarouselIdList
=
JsonConvert
.
DeserializeObject
<
List
<
string
>>(
item
.
CarouselImage
);
//封面图
item
.
CoverImage
=
CarouselIdList
[
0
];
//轮播图
}
item
.
GoodsBuyNum
=
olist
.
Where
(
x
=>
x
.
GoodsId
==
item
.
Id
).
FirstOrDefault
()?.
OrderNum
??
0
;
}
}
return
list
;
}
/// <summary>
/// 获取后台商品代理分页列表
/// </summary>
...
...
Mall.WebApi/Controllers/Mall/MallController.cs
View file @
f88c9060
...
...
@@ -214,55 +214,7 @@ namespace Mall.WebApi.Controllers.MallBase
key
=
qitem
.
TagLink
==
"/pages/live/index"
?
"live"
:
""
,
}),
};
//授权页面热区
var
hotspotCancel
=
new
object
();
var
hotspotLogin
=
new
object
();
if
(
miniProgram
.
AuthDataList
!=
null
&&
miniProgram
.
AuthDataList
.
Count
>
0
&&
miniProgram
.
AuthDataList
.
Count
==
2
)
{
var
first
=
miniProgram
.
AuthDataList
[
0
];
var
second
=
miniProgram
.
AuthDataList
[
1
];
if
(
first
.
open_type
==
"login"
)
{
hotspotLogin
=
first
;
hotspotCancel
=
second
;
}
else
{
hotspotLogin
=
second
;
hotspotCancel
=
first
;
}
}
else
{
hotspotLogin
=
new
AuthItem
()
{
width
=
224
,
height
=
80
,
left
=
340
,
top
=
566
,
defaultX
=
340
,
defaultY
=
566
,
link
=
""
,
open_type
=
"login"
};
hotspotCancel
=
new
AuthItem
()
{
width
=
224
,
height
=
80
,
left
=
84
,
top
=
566
,
defaultX
=
84
,
defaultY
=
566
,
link
=
""
,
open_type
=
"cancel"
};
}
auth_page
=
new
{
pic_url
=
miniProgram
.
AuthUrl
,
hotspot
=
hotspotLogin
,
hotspot_cancel
=
hotspotCancel
};
var
selfHomePage
=
miniprogramPageTemplModule
.
GetMiniprogramPageTemplModule
(
new
RB_Miniprogram_Page_Templ_Extend
()
{
...
...
@@ -385,7 +337,56 @@ namespace Mall.WebApi.Controllers.MallBase
option
=
new
List
<
object
>(),
setting
,
};
//授权页面热区
var
hotspotCancel
=
new
object
();
var
hotspotLogin
=
new
object
();
if
(
miniProgram
.
AuthDataList
!=
null
&&
miniProgram
.
AuthDataList
.
Count
>
0
&&
miniProgram
.
AuthDataList
.
Count
==
2
)
{
var
first
=
miniProgram
.
AuthDataList
[
0
];
var
second
=
miniProgram
.
AuthDataList
[
1
];
if
(
first
.
open_type
==
"login"
)
{
hotspotLogin
=
first
;
hotspotCancel
=
second
;
}
else
{
hotspotLogin
=
second
;
hotspotCancel
=
first
;
}
}
else
{
hotspotLogin
=
new
AuthItem
()
{
width
=
224
,
height
=
80
,
left
=
340
,
top
=
566
,
defaultX
=
340
,
defaultY
=
566
,
link
=
""
,
open_type
=
"login"
};
hotspotCancel
=
new
AuthItem
()
{
width
=
224
,
height
=
80
,
left
=
84
,
top
=
566
,
defaultX
=
84
,
defaultY
=
566
,
link
=
""
,
open_type
=
"cancel"
};
}
auth_page
=
new
{
pic_url
=
miniProgram
.
AuthUrl
,
hotspot
=
hotspotLogin
,
hotspot_cancel
=
hotspotCancel
};
var
miniPageList
=
programPageModule
.
GetMiniprogram_Page_ListExtModule
(
new
RB_MiniProgram_Page_Extend
()
{
MallBaseId
=
RequestParm
.
MallBaseId
});
var
objResult
=
new
{
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
f88c9060
...
...
@@ -480,6 +480,20 @@ namespace Mall.WebApi.Controllers.MallBase
return
orderModule
.
SetAppletGoodsOrderInfo
(
demodel
);
}
/// <summary>
/// 返佣初始化
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetAppletOrderCommissionInitialize
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderId
=
parms
.
GetInt
(
"OrderId"
,
0
);
bool
flag
=
orderModule
.
SetAppletOrderCommissionInitialize
(
OrderId
);
return
ApiResult
.
Success
(
""
,
flag
);
}
/// <summary>
/// 设置订单其他付款
/// </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