Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
0ec1346b
Commit
0ec1346b
authored
Mar 09, 2020
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
5df50104
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
16 deletions
+37
-16
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
+17
-6
center-channel/app/front/entry/public/apidoc/platform/order.md
+7
-3
center-channel/app/front/entry/public/apidoc/platform/product.md
+9
-7
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
+4
-0
No files found.
center-channel/app/base/service/impl/utilsSve/utilsOrderSve.js
View file @
0ec1346b
...
...
@@ -22,11 +22,19 @@ class UtilsOrderService extends AppServiceBase {
if
(
!
price_list
)
{
return
system
.
getResult
(
null
,
"产品价格列表信息有误,100040"
);
}
var
product
_price
=
price_list
.
filter
(
f
=>
f
.
pay_code
==
actionBody
.
payCode
);
if
(
!
product_price
||
product_price
.
length
==
0
)
{
var
product
Index
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
payCode
&&
f
.
is_show
==
1
);
if
(
productIndex
<
0
)
{
return
system
.
getResult
(
null
,
"支付价格payCode信息有误,100050"
);
}
var
totalSum
=
Number
(
product_price
[
0
].
price
)
*
Number
(
actionBody
.
quantity
);
var
totalSum
=
Number
(
price_list
[
productIndex
].
price
)
*
Number
(
actionBody
.
quantity
);
var
additions
=
null
;
var
additionsIndex
=
-
1
;
if
(
actionBody
.
additions
&&
actionBody
.
additions
.
payCode
)
{
additionsIndex
=
price_list
.
findIndex
(
f
=>
f
.
pay_code
==
actionBody
.
additions
.
payCode
&&
f
.
is_show
==
0
);
if
(
additionsIndex
>=
0
)
{
totalSum
=
totalSum
+
Number
(
price_list
[
additionsIndex
].
price
)
*
Number
(
actionBody
.
additions
.
quantity
);
}
}
var
buyTotalSum
=
Number
(
actionBody
.
totalSum
||
0
);
var
buyPayTotalSum
=
Number
(
actionBody
.
payTotalSum
||
0
);
if
(
buyTotalSum
==
0
)
{
...
...
@@ -35,10 +43,13 @@ class UtilsOrderService extends AppServiceBase {
if
(
buyPayTotalSum
==
0
)
{
actionBody
.
payTotalSum
=
totalSum
;
}
if
(
Number
(
actionBody
.
totalSum
||
0
)
<
totalSum
)
{
if
(
buyTotalSum
<
totalSum
)
{
return
system
.
getResult
(
null
,
"订单金额有误,100060"
);
}
pobj
.
actionBody
.
product_info
.
price_item
=
product_price
[
0
];
pobj
.
actionBody
.
product_info
.
price_item
=
price_list
[
productIndex
];
if
(
additionsIndex
>=
0
)
{
pobj
.
actionBody
.
product_info
.
price_additions_item
=
price_list
[
additionsIndex
];
}
return
system
.
getResultSuccess
();
}
/**
...
...
@@ -429,7 +440,7 @@ class UtilsOrderService extends AppServiceBase {
channel_nickname
:
opResult
.
data
.
order_info
.
channelUserId
};
// this.utilsPushSve.pushInfo(opResult.data, "pushBusiness",0);
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushOrder"
,
0
);
this
.
utilsPushSve
.
pushInfo
(
opResult
.
data
,
"pushOrder"
,
0
);
}
opResult
.
data
=
null
;
return
opResult
;
...
...
center-channel/app/front/entry/public/apidoc/platform/order.md
View file @
0ec1346b
...
...
@@ -20,10 +20,14 @@
{
"channelItemCode"
:
"zzsbzc"
,
// Y 产品的渠道编码
"channelItemAppendName"
:
""
,
// Y 填写的商标名称
"payCode"
:
"zzsbzc-
2
"
,
// Y 支付价格code
"payCode"
:
"zzsbzc-
1
"
,
// Y 支付价格code
"quantity"
:
1
,
// Y 购买数量
"totalSum"
:
300
,
// Y 订单总金额---(商标自助注册计算格式:小于10项为产品价格×10,大于10项的为产品价格×小项数量)
"payTotalSum"
:
300
,
// Y 订单付款总金额
"additions"
:{
// N 附加购买项目
"payCode"
:
"zzsbzc-2"
,
// Y 支付价格code
"quantity"
:
2
// Y 购买数量
},
"totalSum"
:
360
,
// Y 订单总金额---(商标自助注册计算格式:小于10项为产品价格,大于10项的小项数量在additions参数中进行传递)
"payTotalSum"
:
360
,
// Y 订单付款总金额
"notes"
:
"订单备注信息"
,
// N 订单备注
"orderContact"
:{
// Y 订单联系人信息
"contacts"
:
"宋毅"
,
// Y 联系人
...
...
center-channel/app/front/entry/public/apidoc/platform/product.md
View file @
0ec1346b
...
...
@@ -150,6 +150,7 @@
"service_charge"
:
30
,
"public_expense"
:
270
,
"is_default"
:
1
,
//是否默认,1默认,0不是默认
"is_show"
:
1
,
//是否显示在页面进行下单(1是,0不是,0为下单时附加的购买项目)
"price_type"
:
"mj"
,
"price_type_name"
:
"每件"
,
"sort"
:
1
,
...
...
@@ -159,15 +160,16 @@
},
{
"pay_code"
:
"zzsbzc-2"
,
//支付价格code
"price"
:
58
0
,
"supply_price"
:
54
0
,
"service_charge"
:
4
0
,
"public_expense"
:
54
0
,
"price"
:
3
0
,
"supply_price"
:
3
0
,
"service_charge"
:
3
0
,
"public_expense"
:
3
0
,
"is_default"
:
0
,
"price_type"
:
"mj"
,
"price_type_name"
:
"每件"
,
"is_show"
:
0
,
"price_type"
:
"mx"
,
"price_type_name"
:
"项"
,
"sort"
:
2
,
"price_desc"
:
"
2件(20小项)
"
,
"price_desc"
:
"
每个小项的价格
"
,
"min_qty"
:
null
,
"max_qty"
:
null
}
...
...
center-channel/app/front/entry/public/apidoc/platform/tmOrder.md
View file @
0ec1346b
...
...
@@ -243,6 +243,10 @@
```
javascript
{
"orderNo"
:
"TM26202002271337mkgN"
,
// Y 订单号
"additions"
:{
// N 附加购买项目
"payCode"
:
"zzsbzc-2"
,
// Y 支付价格code
"quantity"
:
2
// Y 购买数量
},
"nclones"
:
[
{
"code"
:
"02"
,
//大类编码
...
...
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