Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
foreign
/
customer-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bc2aa9eb
authored
Dec 01, 2021
by
Sixong.Zhu
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
u
parent
1d0f22a4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
19 deletions
service/order.ts
service/order.ts
View file @
bc2aa9eb
import
Chat
from
"@/customer-service/xim"
;
import
{
UniplatSdkExtender
}
from
"uniplat-sdk"
;
import
{
OperationType
,
OrderStatus
,
OrderTableListItem
,
orderTableListItemPredict
,
SrcPlatform
}
from
"../model"
;
class
OrderService
{
public
generalOrder
=
'general_order_info'
;
public
generalOrderPaymentModel
=
'general_order_payment_info'
;
import
{
OperationType
,
OrderStatus
,
OrderTableListItem
,
orderTableListItemPredict
,
SrcPlatform
,
}
from
"../model"
;
class
OrderService
{
public
generalOrder
=
"general_order_info"
;
public
generalOrderPaymentModel
=
"general_order_payment_info"
;
private
handler
=
new
UniplatSdkExtender
();
...
...
@@ -15,33 +20,45 @@ class OrderService {
createdType
:
OperationType
;
})
{
const
sdk
=
Chat
.
getSdk
();
return
sdk
.
model
(
this
.
generalOrder
).
action
(
'addOrder'
).
addInputs_parameter
({
return
sdk
.
model
(
this
.
generalOrder
)
.
action
(
"addOrder"
)
.
addInputs_parameter
({
ProductId
:
params
.
productId
,
SrcPlatform
:
params
.
srcPlatform
,
CreatedType
:
params
.
createdType
}).
execute
();
CreatedType
:
params
.
createdType
,
})
.
execute
();
}
public
updateOrderStatus
(
id
:
number
|
string
,
v
:
number
,
status
:
OrderStatus
)
{
return
Chat
.
getSdk
().
model
(
this
.
generalOrder
).
action
(
'editStatus'
)
public
updateOrderStatus
(
id
:
number
|
string
,
v
:
number
,
status
:
OrderStatus
)
{
return
Chat
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
action
(
"editStatus"
)
.
addInputs_parameter
({
Status
:
status
,
userType
:
OperationType
.
User
userType
:
OperationType
.
User
,
})
.
updateInitialParams
({
selected_list
:
[{
v
,
id
:
+
id
}]
})
.
execute
()
.
execute
()
;
}
public
getOrders
(
index
:
number
)
{
return
Chat
.
getSdk
().
model
(
this
.
generalOrder
)
.
list
(
'userOrderList'
)
return
Chat
.
getSdk
()
.
model
(
this
.
generalOrder
)
.
list
(
"userOrderList"
)
.
query
({
item_size
:
100
,
pageIndex
:
index
})
.
then
(
r
=>
this
.
handler
.
buildRows
<
OrderTableListItem
>
(
r
.
pageData
.
rows
,
orderTableListItemPredict
));
.
then
((
r
)
=>
this
.
handler
.
buildRows
<
OrderTableListItem
>
(
r
.
pageData
.
rows
,
orderTableListItemPredict
)
);
}
}
export
const
orderService
=
new
OrderService
();
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