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
5474977b
Commit
5474977b
authored
Sep 09, 2020
by
liudong1993
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0b36ea56
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
180 additions
and
1 deletion
+180
-1
GuideCarModule.cs
Mall.Module.Product/GuideCarModule.cs
+53
-0
OrderModule.cs
Mall.Module.Product/OrderModule.cs
+52
-1
GuideCarController.cs
Mall.WebApi/Controllers/Product/GuideCarController.cs
+43
-0
OrderController.cs
Mall.WebApi/Controllers/Product/OrderController.cs
+32
-0
No files found.
Mall.Module.Product/GuideCarModule.cs
View file @
5474977b
...
...
@@ -783,6 +783,20 @@ namespace Mall.Module.Product
{
nameof
(
RB_Goods
.
ShelvesDate
),
demodel
.
ShelvesDate
},
{
nameof
(
RB_Goods
.
DownDate
),
demodel
.
DownDate
},
{
nameof
(
RB_Goods
.
SendArea
),
demodel
.
SendArea
},
{
nameof
(
RB_Goods
.
SiteId
),
demodel
.
SiteId
},
{
nameof
(
RB_Goods
.
GuideId
),
demodel
.
GuideId
},
{
nameof
(
RB_Goods
.
CarId
),
demodel
.
CarId
},
{
nameof
(
RB_Goods
.
CarColorId
),
demodel
.
CarColorId
},
{
nameof
(
RB_Goods
.
CarNumber
),
demodel
.
CarNumber
},
{
nameof
(
RB_Goods
.
CarBuyYear
),
demodel
.
CarBuyYear
},
{
nameof
(
RB_Goods
.
CarType
),
demodel
.
CarType
},
{
nameof
(
RB_Goods
.
UseDay
),
demodel
.
UseDay
},
{
nameof
(
RB_Goods
.
LineName
),
demodel
.
LineName
},
{
nameof
(
RB_Goods
.
LineDescription
),
demodel
.
LineDescription
},
{
nameof
(
RB_Goods
.
IsSpell
),
demodel
.
IsSpell
},
{
nameof
(
RB_Goods
.
RideNum
),
demodel
.
RideNum
},
{
nameof
(
RB_Goods
.
AdvanceDay
),
demodel
.
AdvanceDay
},
{
nameof
(
RB_Goods
.
VideoType
),
demodel
.
VideoType
},
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
...
...
@@ -1153,6 +1167,45 @@ namespace Mall.Module.Product
return
goodsRepository
.
Update
(
keyValues
,
wheres
);
}
/// <summary>
/// 设置商品上下架
/// </summary>
/// <param name="goodsIds"></param>
/// <param name="Type"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
SetGoodsBatchStatusInfo
(
string
goodsIds
,
int
Type
,
int
tenantId
,
int
mallBaseId
)
{
var
list
=
goodsRepository
.
GetSingleListForCar
(
new
RB_Goods_Extend
()
{
GoodsIds
=
goodsIds
});
foreach
(
var
goodsModel
in
list
)
{
Dictionary
<
string
,
object
>
keyValues
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods
.
GoodsStatus
),
Type
},
{
nameof
(
RB_Goods
.
UpdateDate
),
DateTime
.
Now
}
};
List
<
WhereHelper
>
wheres
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods
.
Id
),
FiledValue
=
goodsModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods
.
TenantId
),
FiledValue
=
tenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
goodsRepository
.
Update
(
keyValues
,
wheres
);
}
return
true
;
}
#
endregion
#
region
小程序商品
...
...
Mall.Module.Product/OrderModule.cs
View file @
5474977b
...
...
@@ -9988,7 +9988,58 @@ namespace Mall.Module.Product
return
flag
;
}
/// <summary>
/// 修改司导订单保险费用
/// </summary>
/// <param name="orderDetailId"></param>
/// <param name="insuranceCostMoney"></param>
/// <param name="tenantId"></param>
/// <param name="mallBaseId"></param>
/// <returns></returns>
public
bool
SetOrderInsuranceCostMoney
(
int
orderDetailId
,
decimal
insuranceCostMoney
,
int
tenantId
,
int
mallBaseId
)
{
var
orderModel
=
goods_OrderDetailRepository
.
GetEntity
(
orderDetailId
);
if
(
orderModel
==
null
)
{
return
false
;
}
Dictionary
<
string
,
object
>
keyValues1
=
new
Dictionary
<
string
,
object
>()
{
{
nameof
(
RB_Goods_OrderDetail
.
InsuranceCostMoney
),
insuranceCostMoney
}
};
List
<
WhereHelper
>
wheres1
=
new
List
<
WhereHelper
>()
{
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
Id
),
FiledValue
=
orderModel
.
Id
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
TenantId
),
FiledValue
=
tenantId
,
OperatorEnum
=
OperatorEnum
.
Equal
},
new
WhereHelper
(){
FiledName
=
nameof
(
RB_Goods_OrderDetail
.
MallBaseId
),
FiledValue
=
mallBaseId
,
OperatorEnum
=
OperatorEnum
.
Equal
}
};
var
flag
=
goods_OrderDetailRepository
.
Update
(
keyValues1
,
wheres1
);
if
(
flag
)
{
//记录日志
Task
.
Run
(()
=>
goods_LogRepository
.
Insert
(
new
RB_Goods_Log
()
{
Content
=
"修改订单商品:"
+
orderModel
.
GoodsName
+
"司导保险成本:"
+
insuranceCostMoney
+
";历史:价格:"
+
(
orderModel
.
InsuranceCostMoney
??
0
).
ToString
(),
CreateDate
=
DateTime
.
Now
,
Id
=
0
,
MallBaseId
=
mallBaseId
,
SourceId
=
orderModel
.
OrderId
,
TenantId
=
tenantId
,
Type
=
1
}));
}
return
flag
;
}
/// <summary>
/// 修改商品订单运费成本价
...
...
Mall.WebApi/Controllers/Product/GuideCarController.cs
View file @
5474977b
...
...
@@ -80,6 +80,22 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 获取提前预约天数
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
GetGuideCarInfoForAdvanceDay
()
{
var
req
=
RequestParm
;
var
model
=
guideCarModule
.
GetGuideCarInfo
(
req
.
TenantId
,
req
.
MallBaseId
);
return
ApiResult
.
Success
(
""
,
new
{
model
.
AdvanceDay
,
model
.
CancelHour
});
}
#
endregion
#
region
商品管理
...
...
@@ -858,6 +874,33 @@ namespace Mall.WebApi.Controllers.MallBase
return
ApiResult
.
Failed
();
}
}
/// <summary>
/// 批量上下架商品
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetGoodsBatchStatusInfo
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
string
GoodsIds
=
parms
.
GetStringValue
(
"GoodsIds"
);
int
Type
=
parms
.
GetInt
(
"Type"
,
1
);
//类型 1上架 2下架
if
(
string
.
IsNullOrEmpty
(
GoodsIds
))
{
return
ApiResult
.
ParamIsNull
();
}
bool
flag
=
guideCarModule
.
SetGoodsBatchStatusInfo
(
GoodsIds
,
Type
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
#
region
站点配置
...
...
Mall.WebApi/Controllers/Product/OrderController.cs
View file @
5474977b
...
...
@@ -1049,6 +1049,38 @@ namespace Mall.WebApi.Controllers.MallBase
}
}
/// <summary>
/// 修改订单保险成本
/// </summary>
/// <returns></returns>
[
HttpPost
]
public
ApiResult
SetOrderInsuranceCostMoney
()
{
var
req
=
RequestParm
;
JObject
parms
=
JObject
.
Parse
(
req
.
msg
.
ToString
());
int
OrderDetailId
=
parms
.
GetInt
(
"OrderDetailId"
,
0
);
decimal
InsuranceCostMoney
=
parms
.
GetDecimal
(
"InsuranceCostMoney"
);
if
(
OrderDetailId
<=
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递订单明细id"
);
}
if
(
InsuranceCostMoney
<
0
)
{
return
ApiResult
.
ParamIsNull
(
"请传递司导保险成本"
);
}
bool
flag
=
orderModule
.
SetOrderInsuranceCostMoney
(
OrderDetailId
,
InsuranceCostMoney
,
req
.
TenantId
,
req
.
MallBaseId
);
if
(
flag
)
{
return
ApiResult
.
Success
();
}
else
{
return
ApiResult
.
Failed
();
}
}
#
endregion
#
region
修改运费成本以及商品成本、供应商
...
...
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