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
d56d3832
Commit
d56d3832
authored
Jun 17, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
fa655567
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
65 additions
and
7 deletions
+65
-7
xgg-saas-platform/app/base/controller/impl/saas/orderCtl.js
+33
-4
xgg-saas-platform/app/base/service/impl/saas/orderSve.js
+25
-0
xgg-saas-platform/app/base/system.js
+1
-1
xgg-saas-platform/app/config/settings.js
+6
-2
No files found.
xgg-saas-platform/app/base/controller/impl/saas/orderCtl.js
View file @
d56d3832
...
@@ -31,10 +31,41 @@ class ChannelCtl extends CtlBase {
...
@@ -31,10 +31,41 @@ class ChannelCtl extends CtlBase {
}
}
}
}
/**
* fn:订单列表
* @param params
* @param pobj2
* @param req
* @returns {Promise<{msg: string, data: (*|null), bizmsg: string, status: number}|{msg: string, data, bizmsg: (*|string), status: number}|*>}
*/
async
page
(
params
,
pobj2
,
req
)
{
async
page
(
params
,
pobj2
,
req
)
{
try
{
try
{
return
await
this
.
orderSve
.
page
(
params
);
let
listRes
=
await
this
.
orderSve
.
page
(
params
);
}
catch
(
error
)
{
if
(
listRes
.
status
!=
0
)
{
return
system
.
getResult
(
null
,
`系统错误`
);
}
let
source_nos
=
[];
for
(
let
item
of
listRes
.
data
.
rows
)
{
source_nos
.
push
(
item
.
id
);
}
if
(
source_nos
.
length
==
0
){
return
system
.
getResult
(
null
,
`暂无数据`
);
}
let
res
=
await
this
.
orderSve
.
queryOrderStatusBySourceNo
({
source_nos
:
source_nos
});
if
(
res
.
status
!=
0
){
return
res
;
}
let
StatusMap
=
res
.
data
;
for
(
let
item
of
listRes
.
data
.
rows
){
if
(
StatusMap
[
item
.
id
]){
item
.
handle_name
=
StatusMap
[
item
.
id
][
'name'
]
||
"处理中"
;
}
else
{
item
.
handle_name
=
"待分配"
;
}
}
return
listRes
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
...
@@ -58,8 +89,6 @@ class ChannelCtl extends CtlBase {
...
@@ -58,8 +89,6 @@ class ChannelCtl extends CtlBase {
}
}
}
}
/**
/**
* fn:查询产品
* fn:查询产品
* @param pobj
* @param pobj
...
...
xgg-saas-platform/app/base/service/impl/saas/orderSve.js
View file @
d56d3832
...
@@ -148,5 +148,29 @@ class OrderService extends ServiceBase {
...
@@ -148,5 +148,29 @@ class OrderService extends ServiceBase {
let
rs
=
await
this
.
callms
(
"order"
,
"saasorderbusinessmenPage"
,
params
);
let
rs
=
await
this
.
callms
(
"order"
,
"saasorderbusinessmenPage"
,
params
);
return
rs
;
return
rs
;
}
}
/**
* fn:根据订单来源查询状态
* @param params
* @returns {Promise<{msg: string, data, bizmsg: *|string, status: number}|any|undefined>}
*/
async
queryOrderStatusBySourceNo
(
params
){
try
{
let
res
=
await
axios
({
method
:
'post'
,
url
:
settings
.
deliverSysApi
().
queryOrderStatusBySourceNo
,
data
:
params
});
console
.
log
(
res
.
data
);
if
(
res
.
status
==
200
&&
res
.
data
&&
res
.
data
.
status
==
0
&&
res
.
data
.
data
)
{
return
res
.
data
;
}
console
.
log
(
`xgg-saas-platform->orderSve->queryOrderStatusBySourceNo 请求结果`
+
JSON
.
stringify
(
res
));
return
system
.
getResult
(
null
,
`系统错误`
);
}
catch
(
e
)
{
console
.
log
(
e
);
return
system
.
getResult
(
null
,
`系统错误`
);
}
}
}
}
module
.
exports
=
OrderService
;
module
.
exports
=
OrderService
;
\ No newline at end of file
xgg-saas-platform/app/base/system.js
View file @
d56d3832
...
@@ -198,7 +198,7 @@ class System {
...
@@ -198,7 +198,7 @@ class System {
merchant
:
dev
+
":3101"
+
path
,
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
// 订单服务
order
:
dev
+
":3103"
+
path
,
order
:
local
+
":3103"
+
path
,
// 发票服务
// 发票服务
invoice
:
dev
+
":3105"
+
path
,
invoice
:
dev
+
":3105"
+
path
,
...
...
xgg-saas-platform/app/config/settings.js
View file @
d56d3832
...
@@ -127,8 +127,10 @@ var settings = {
...
@@ -127,8 +127,10 @@ var settings = {
deliverSysApi
:
function
()
{
deliverSysApi
:
function
()
{
let
domain
=
""
,
orderDomain
=
""
;
let
domain
=
""
,
orderDomain
=
""
;
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
orderDomain
=
"http://39.107.234.14:3012"
;
// orderDomain= "http://39.107.234.14:3012";
// orderDomain= "http://127.0.0.1:3012";
orderDomain
=
"http://127.0.0.1:3012"
;
domain
=
"http://39.107.234.14:3002"
;
domain
=
"http://39.107.234.14:3002"
;
// domain = "http://127.0.0.1:3112";
// domain = "http://127.0.0.1:3112";
}
else
{
}
else
{
...
@@ -138,6 +140,8 @@ var settings = {
...
@@ -138,6 +140,8 @@ var settings = {
return
{
return
{
// 推送订单s
// 推送订单s
orderPushApi
:
orderDomain
+
"/web/order/orderCtl/addSourceOrder"
,
orderPushApi
:
orderDomain
+
"/web/order/orderCtl/addSourceOrder"
,
// 根据订单来源查询状态
queryOrderStatusBySourceNo
:
orderDomain
+
"/web/order/orderCtl/queryOrderStatusBySourceNo"
,
//发票是试算
//发票是试算
calcInvoice
:
domain
+
"/web/invoice/invoiceCtl/calcInvoice"
,
calcInvoice
:
domain
+
"/web/invoice/invoiceCtl/calcInvoice"
,
//推送发票申请
//推送发票申请
...
...
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