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
d11ee0d9
Commit
d11ee0d9
authored
Aug 07, 2020
by
黄奎
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/Kui2/mall.oytour.com
parents
531f05c2
a36ffcac
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
6 deletions
+98
-6
RB_FreeShipping.cs
Mall.Model/Entity/BaseSetUp/RB_FreeShipping.cs
+5
-0
RB_Goods_Log.cs
Mall.Model/Entity/Product/RB_Goods_Log.cs
+1
-1
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+53
-0
ProductModule.cs
Mall.Module.Product/ProductModule.cs
+1
-0
RB_Goods_OrderIntroductionRepository.cs
...epository/Product/RB_Goods_OrderIntroductionRepository.cs
+4
-0
MallBaseController.cs
Mall.WebApi/Controllers/MallBase/MallBaseController.cs
+2
-1
AppletOrderController.cs
Mall.WebApi/Controllers/Product/AppletOrderController.cs
+1
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+24
-0
SupplierController.cs
Mall.WebApi/Controllers/User/SupplierController.cs
+7
-4
No files found.
Mall.Model/Entity/BaseSetUp/RB_FreeShipping.cs
View file @
d11ee0d9
...
...
@@ -51,6 +51,11 @@ namespace Mall.Model.Entity.BaseSetUp
/// </summary>
public
string
Name
{
get
;
set
;
}
/// <summary>
/// 跳转链接
/// </summary>
public
string
FreeShippingUrl
{
get
;
set
;
}
/// <summary>
/// 是否启用全局包邮
/// </summary>
...
...
Mall.Model/Entity/Product/RB_Goods_Log.cs
View file @
d11ee0d9
...
...
@@ -31,7 +31,7 @@ namespace Mall.Model.Entity.Product
set
;
}
/// <summary>
/// 来源类型 1订单 2商品
/// 来源类型 1订单 2商品
3推荐返佣
/// </summary>
public
int
?
Type
{
...
...
Mall.Module.Product/OrderModule.cs
View file @
d11ee0d9
...
...
@@ -1643,6 +1643,7 @@ namespace Mall.Module.Product
}
#
region
处理全局包邮
List
<
RB_FreeShipping_Extend
>
freeShippingList
=
new
List
<
RB_FreeShipping_Extend
>();
var
SatisfiedGoodsListAll
=
new
List
<
FreeShippingGoodsDetail
>();
if
(
YFCategoryList
.
Any
())
{
YFCategoryList
=
YFCategoryList
.
Distinct
().
ToList
();
string
categoryIds
=
string
.
Join
(
","
,
YFCategoryList
);
...
...
@@ -1796,6 +1797,7 @@ namespace Mall.Module.Product
SatisfiedGoodsList
.
AddRange
(
SatisfiedGoodsList2
);
}
}
SatisfiedGoodsListAll
.
AddRange
(
SatisfiedGoodsList2
);
}
//看着商品是否包含在这里面
...
...
@@ -1804,6 +1806,11 @@ namespace Mall.Module.Product
FreeShippingDescription
=
SatisfiedGoodsList
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
&&
x
.
SpecificationKey
==
item
.
SpecificationSort
).
FirstOrDefault
().
Name
;
}
}
if
(
FreeShipping_Use
==
false
)
{
FreeShippingDescription
=
SatisfiedGoodsListAll
.
Where
(
x
=>
x
.
GoodsId
==
item
.
GoodsId
&&
x
.
SpecificationKey
==
item
.
SpecificationSort
).
FirstOrDefault
()?.
Name
??
""
;
}
}
}
}
...
...
@@ -9266,6 +9273,52 @@ namespace Mall.Module.Product
return
RList
;
}
/// <summary>
/// 设置推荐供应商返佣
/// </summary>
/// <param name="orderDetailId"></param>
/// <param name="commission"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
SetRecommendOrdersCommission
(
int
orderDetailId
,
decimal
commission
,
int
tenantId
,
int
mallBaseId
,
int
empId
)
{
var
introductionModel
=
goods_OrderIntroductionRepository
.
GetList
(
new
RB_Goods_OrderIntroduction_Extend
()
{
OrderDetailId
=
orderDetailId
,
TenantId
=
tenantId
,
MallBaseId
=
mallBaseId
}).
FirstOrDefault
();
if
(
introductionModel
==
null
)
{
return
false
;
}
if
(
introductionModel
.
CommissionState
!=
1
)
{
return
false
;
}
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_OrderIntroduction
.
Commission
),
commission
},
{
nameof
(
RB_Goods_OrderIntroduction
.
Remark
),(
introductionModel
.
Remark
??
""
)+
" "
+
"修改返佣:由"
+
(
introductionModel
.
Commission
??
0
)
+
"=>"
+
commission
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderIntroduction
.
Id
),
FiledValue
=
introductionModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
bool
flag
=
goods_OrderIntroductionRepository
.
Update
(
keyValues
,
wheres
);
if
(
flag
)
{
//记录日志
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
{
Content
=
empId
+
" 修改推荐供应商返佣:由"
+
(
introductionModel
.
Commission
??
0
)
+
"=>"
+
commission
,
CreateDate
=
DateTime
.
Now
,
Id
=
0
,
MallBaseId
=
mallBaseId
,
SourceId
=
introductionModel
.
Id
,
TenantId
=
tenantId
,
Type
=
3
});
return
true
;
}
else
{
return
false
;
}
}
#
endregion
#
region
供应商订单商品信息
...
...
Mall.Module.Product/ProductModule.cs
View file @
d11ee0d9
...
...
@@ -1989,6 +1989,7 @@ namespace Mall.Module.Product
freeShippingName
=
model
.
FreeShippingModel
.
Name
,
fullMoneyPinkage
=
model
.
FreeShippingModel
.
FullMoneyPinkage
??
0
,
fullNumPinkage
=
model
.
FreeShippingModel
.
FullNumPinkage
??
0
,
freeShippingUrl
=
model
.
FreeShippingModel
.
FreeShippingUrl
,
cats
=
model
.
CategoryList
.
Select
(
x
=>
new
{
x
.
CategoryId
,
...
...
Mall.Repository/Product/RB_Goods_OrderIntroductionRepository.cs
View file @
d11ee0d9
...
...
@@ -43,6 +43,10 @@ namespace Mall.Repository.Product
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderIntroduction
.
OrderId
)}
in(
{
dmodel
.
OrderIds
}
)"
;
}
if
(
dmodel
.
OrderDetailId
>
0
)
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderIntroduction
.
OrderDetailId
)}
=
{
dmodel
.
OrderDetailId
}
"
;
}
if
(!
string
.
IsNullOrEmpty
(
dmodel
.
IntroductionIds
))
{
where
+=
$@" and oc.
{
nameof
(
RB_Goods_OrderIntroduction
.
Id
)}
in(
{
dmodel
.
IntroductionIds
}
)"
;
...
...
Mall.WebApi/Controllers/MallBase/MallBaseController.cs
View file @
d11ee0d9
...
...
@@ -997,7 +997,8 @@ namespace Mall.WebApi.Controllers.MallBase
x
.
FullNumPinkage
,
x
.
CategoryList
,
x
.
IsEnable
,
x
.
Name
x
.
Name
,
x
.
FreeShippingUrl
});
return
ApiResult
.
Success
(
""
,
pagelist
);
}
...
...
Mall.WebApi/Controllers/Product/AppletOrderController.cs
View file @
d11ee0d9
...
...
@@ -67,6 +67,7 @@ namespace Mall.WebApi.Controllers.MallBase
FreeShippingName
=
x
.
FreeShippingModel
.
Name
,
FreeShippingFullMoneyPinkage
=
x
.
FreeShippingModel
.
FullMoneyPinkage
??
0
,
FreeShippingFullNumPinkage
=
x
.
FreeShippingModel
.
FullNumPinkage
??
0
,
x
.
FreeShippingModel
.
FreeShippingUrl
,
});
List
<
object
>
robj
=
new
List
<
object
>()
{
new
{
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
d11ee0d9
...
...
@@ -1768,6 +1768,30 @@ namespace Mall.WebApi.Controllers.MallBase
}
/// <summary>
/// 设置推荐分销
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetRecommendOrdersCommission
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderDetailId
=
parms
.
GetInt
(
"OrderDetailId"
,
0
);
decimal
Commission
=
parms
.
GetDecimal
(
"Commission"
);
if
(
OrderDetailId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单明细id"
);
}
bool
flag
=
orderModule
.
SetRecommendOrdersCommission
(
OrderDetailId
,
Commission
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
#
region
推荐供应商
...
...
Mall.WebApi/Controllers/User/SupplierController.cs
View file @
d11ee0d9
...
...
@@ -315,14 +315,15 @@ namespace Mall.WebApi.Controllers.User
{
FinanceType
=
1
,
Final_Price
=
orderGoodsItem
.
Final_Price
,
Number
=
1
,
Number
=
orderGoodsItem
.
Number
,
FreightMoney
=
orderGoodsItem
.
FreightMoney
,
GoodsName
=
orderGoodsItem
.
GoodsName
,
OrderNo
=
orderGoodsItem
.
OrderNo
,
Id
=
orderGoodsItem
.
Id
Id
=
orderGoodsItem
.
Id
,
CostMoney
=
orderGoodsItem
.
CostMoney
,
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
};
result
.
Add
(
newOrderGoods
);
}
}
else
if
(
demodel
.
IsSelectAll
==
0
||
demodel
.
IsSelectAll
==
2
)
...
...
@@ -340,7 +341,9 @@ namespace Mall.WebApi.Controllers.User
FreightMoney
=
orderGoodsItem
.
FreightMoney
,
GoodsName
=
orderGoodsItem
.
GoodsName
,
OrderNo
=
orderGoodsItem
.
OrderNo
,
Id
=
orderGoodsItem
.
Id
Id
=
orderGoodsItem
.
Id
,
CostMoney
=
orderGoodsItem
.
CostMoney
,
FreightCostMoney
=
orderGoodsItem
.
FreightCostMoney
};
result
.
Add
(
newOrderGoods
);
}
...
...
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