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
050aea2a
Commit
050aea2a
authored
May 20, 2020
by
孙亚楠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d
parent
444b026c
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
19 deletions
+33
-19
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
+10
-3
xggsve-order/app/base/db/models/order/obusinessmen.js
+2
-2
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
+1
-1
xggsve-order/app/base/service/impl/order/oorderSve.js
+7
-3
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
+12
-9
xggsve-order/app/base/service/impl/saas/saasorderSve.js
+1
-1
No files found.
xggsve-order/app/base/db/impl/order/obusinessmenDao.js
View file @
050aea2a
...
@@ -124,9 +124,16 @@ class ObusinessmenDao extends Dao {
...
@@ -124,9 +124,16 @@ class ObusinessmenDao extends Dao {
* 提送发票
* 提送发票
* @param {*} id
* @param {*} id
*/
*/
async
queryObusinessmenInfo
(
id
){
async
queryObusinessmenInfo
(
params
){
let
sql
=
`SELECT t1.source_no,t1.saas_deliver_api ,t1.product_id,t1.merchant_id,t2.* FROM o_order t1 INNER JOIN o_businessmen t2 ON t1.id = t2.order_id WHERE t1.id = :id `
;
let
sql
=
[
`SELECT t1.source_no,t1.saas_deliver_api ,t1.product_id,t1.merchant_id,t2.* FROM o_order t1 INNER JOIN o_businessmen t2 ON t1.id = t2.order_id WHERE 1=1 `
];
let
list
=
await
this
.
customQuery
(
sql
,
{
id
:
id
})
||
[];
if
(
params
.
id
){
sql
.
push
(
` and t1.id = :id`
);
}
if
(
params
.
saas_id
){
sql
.
push
(
` and t2.saas_id = :saas_id`
);
sql
.
push
(
` and t1.saas_id = :saas_id`
);
}
let
list
=
await
this
.
customQuery
(
sql
.
join
(
" "
),
params
)
||
[];
if
(
list
.
length
==
0
)
{
if
(
list
.
length
==
0
)
{
return
{};
return
{};
}
}
...
...
xggsve-order/app/base/db/models/order/obusinessmen.js
View file @
050aea2a
...
@@ -59,8 +59,8 @@ module.exports = function (db, DataTypes) {
...
@@ -59,8 +59,8 @@ module.exports = function (db, DataTypes) {
deliver_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'deliver_id'
,
allowNull
:
true
,
comment
:
"交付商id"
},
deliver_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'deliver_id'
,
allowNull
:
true
,
comment
:
"交付商id"
},
delier_user_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'delier_user_id'
,
allowNull
:
true
,
comment
:
"交付商用户id"
},
delier_user_id
:
{
type
:
DataTypes
.
STRING
,
field
:
'delier_user_id'
,
allowNull
:
true
,
comment
:
"交付商用户id"
},
deliver_user_path
:
{
type
:
DataTypes
.
STRING
,
field
:
'deliver_user_path'
,
allowNull
:
true
,
comment
:
"交付商组织机构path"
},
deliver_user_path
:
{
type
:
DataTypes
.
STRING
,
field
:
'deliver_user_path'
,
allowNull
:
true
,
comment
:
"交付商组织机构path"
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
created_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'created_at'
,
allowNull
:
false
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
,
defaultValue
:
DataTypes
.
NOW
},
updated_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'updated_at'
,
allowNull
:
false
},
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
deleted_at
:
{
type
:
DataTypes
.
DATE
,
field
:
'deleted_at'
,
allowNull
:
true
}
},
},
{
{
...
...
xggsve-order/app/base/service/impl/order/obusinessmenSve.js
View file @
050aea2a
...
@@ -50,7 +50,7 @@ class ObusinessmenService extends ServiceBase {
...
@@ -50,7 +50,7 @@ class ObusinessmenService extends ServiceBase {
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 订单ID不能为空`
);
}
}
try
{
try
{
let
businessmenBean
=
await
this
.
dao
.
queryObusinessmenInfo
(
this
.
trim
(
params
.
id
)
);
let
businessmenBean
=
await
this
.
dao
.
queryObusinessmenInfo
(
params
);
return
system
.
getResult
(
businessmenBean
);
return
system
.
getResult
(
businessmenBean
);
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
...
...
xggsve-order/app/base/service/impl/order/oorderSve.js
View file @
050aea2a
...
@@ -57,8 +57,7 @@ class OorderService extends ServiceBase {
...
@@ -57,8 +57,7 @@ class OorderService extends ServiceBase {
merchant_id
:
""
,
merchant_id
:
""
,
channel_order_no
:
""
,
channel_order_no
:
""
,
busi_type
:
1
,
busi_type
:
1
,
busi_id
:
""
,
busi_id
:
""
price
:
0
,
};
};
order
.
product_id
=
Number
(
params
.
product_id
);
order
.
product_id
=
Number
(
params
.
product_id
);
order
.
source_id
=
Number
(
params
.
source_id
);
order
.
source_id
=
Number
(
params
.
source_id
);
...
@@ -70,6 +69,7 @@ class OorderService extends ServiceBase {
...
@@ -70,6 +69,7 @@ class OorderService extends ServiceBase {
order
.
service_items
=
this
.
trim
(
params
.
service_items
);
order
.
service_items
=
this
.
trim
(
params
.
service_items
);
order
.
ali_deliver_api
=
this
.
trim
(
params
.
ali_deliver_api
)
||
""
;
order
.
ali_deliver_api
=
this
.
trim
(
params
.
ali_deliver_api
)
||
""
;
order
.
saas_id
=
this
.
trim
(
params
.
saas_id
)
||
""
;
order
.
saas_id
=
this
.
trim
(
params
.
saas_id
)
||
""
;
order
.
price
=
params
.
price
||
0
try
{
try
{
// 验证订单是否存在
// 验证订单是否存在
let
exists
=
await
this
.
dao
.
findOne
({
source_id
:
order
.
source_id
,
source_no
:
order
.
source_no
});
let
exists
=
await
this
.
dao
.
findOne
({
source_id
:
order
.
source_id
,
source_no
:
order
.
source_no
});
...
@@ -823,7 +823,11 @@ class OorderService extends ServiceBase {
...
@@ -823,7 +823,11 @@ class OorderService extends ServiceBase {
params
.
currentPage
=
Number
(
params
.
currentPage
||
1
);
params
.
currentPage
=
Number
(
params
.
currentPage
||
1
);
params
.
pageSize
=
Number
(
params
.
pageSize
||
10
);
params
.
pageSize
=
Number
(
params
.
pageSize
||
10
);
params
.
startRow
=
(
params
.
currentPage
-
1
)
*
params
.
pageSize
;
params
.
startRow
=
(
params
.
currentPage
-
1
)
*
params
.
pageSize
;
params
.
source_id
=
"1003"
;
if
(
params
.
source_id
){
params
.
source_id
=
params
.
source_id
;
}
else
{
params
.
source_id
=
"1002"
;
}
try
{
try
{
let
countRes
=
await
this
.
dao
.
aliCountOrder
(
params
);
let
countRes
=
await
this
.
dao
.
aliCountOrder
(
params
);
if
(
countRes
.
count
==
0
){
if
(
countRes
.
count
==
0
){
...
...
xggsve-order/app/base/service/impl/order/oorderstatusSve.js
View file @
050aea2a
...
@@ -168,8 +168,8 @@ class OorderstatusService extends ServiceBase {
...
@@ -168,8 +168,8 @@ class OorderstatusService extends ServiceBase {
_oorderinforegProperty
.
legal_mobile
=
this
.
trim
(
params
.
legal_mobile
);
_oorderinforegProperty
.
legal_mobile
=
this
.
trim
(
params
.
legal_mobile
);
_oorderinforegProperty
.
names
=
this
.
trim
(
params
.
names
);
_oorderinforegProperty
.
names
=
this
.
trim
(
params
.
names
);
_oorderinforegProperty
.
capital
=
this
.
trim
(
params
.
capital
);
_oorderinforegProperty
.
capital
=
this
.
trim
(
params
.
capital
);
_oorderinforegProperty
.
domicile_id
=
this
.
trim
(
params
.
domicile_id
);
_oorderinforegProperty
.
domicile_id
=
this
.
trim
(
params
.
domicile_id
)
||
""
;
_oorderinforegProperty
.
domicile_name
=
this
.
trim
(
params
.
domicile_name
);
_oorderinforegProperty
.
domicile_name
=
this
.
trim
(
params
.
domicile_name
)
||
""
;
_oorderinforegProperty
.
business_scope_id
=
this
.
trim
(
params
.
business_scope_id
);
_oorderinforegProperty
.
business_scope_id
=
this
.
trim
(
params
.
business_scope_id
);
_oorderinforegProperty
.
business_type
=
this
.
trim
(
params
.
business_type
);
_oorderinforegProperty
.
business_type
=
this
.
trim
(
params
.
business_type
);
_oorderinforegProperty
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
_oorderinforegProperty
.
business_scope
=
this
.
trim
(
params
.
business_scope
);
...
@@ -220,12 +220,12 @@ class OorderstatusService extends ServiceBase {
...
@@ -220,12 +220,12 @@ class OorderstatusService extends ServiceBase {
if
(
!
params
.
capital
)
{
if
(
!
params
.
capital
)
{
return
system
.
getResult
(
null
,
`参数错误 注册资本不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 注册资本不能为空`
);
}
}
if
(
!
params
.
domicile_id
)
{
//
if (!params.domicile_id) {
return
system
.
getResult
(
null
,
`参数错误 注册地id不能为空`
);
//
return system.getResult(null, `参数错误 注册地id不能为空`);
}
//
}
if
(
!
params
.
domicile_name
)
{
//
if (!params.domicile_name) {
return
system
.
getResult
(
null
,
`参数错误 注册地名称不能为空`
);
//
return system.getResult(null, `参数错误 注册地名称不能为空`);
}
//
}
if
(
!
params
.
business_scope_id
)
{
if
(
!
params
.
business_scope_id
)
{
return
system
.
getResult
(
null
,
`参数错误 经营范围id不能为空`
);
return
system
.
getResult
(
null
,
`参数错误 经营范围id不能为空`
);
}
}
...
@@ -613,7 +613,9 @@ class OorderstatusService extends ServiceBase {
...
@@ -613,7 +613,9 @@ class OorderstatusService extends ServiceBase {
let
_order
=
params
.
_order
;
let
_order
=
params
.
_order
;
let
_orderInfo
=
await
this
.
oorderinforegDao
.
findById
(
_order
.
id
);
let
_orderInfo
=
await
this
.
oorderinforegDao
.
findById
(
_order
.
id
);
if
(
!
_orderInfo
.
saas_id
||
!
_order
.
saas_id
){
return
system
.
getResult
(
null
,
`系统错误,请联系系统管理员`
);
}
let
_obusinessmenProperty
=
{};
let
_obusinessmenProperty
=
{};
_obusinessmenProperty
.
name
=
this
.
trim
(
params
.
name
);
_obusinessmenProperty
.
name
=
this
.
trim
(
params
.
name
);
_obusinessmenProperty
.
credit_code
=
this
.
trim
(
params
.
credit_code
);
_obusinessmenProperty
.
credit_code
=
this
.
trim
(
params
.
credit_code
);
...
@@ -632,6 +634,7 @@ class OorderstatusService extends ServiceBase {
...
@@ -632,6 +634,7 @@ class OorderstatusService extends ServiceBase {
_obusinessmenProperty
.
delier_user_id
=
this
.
trim
(
params
.
delier_user_id
);
_obusinessmenProperty
.
delier_user_id
=
this
.
trim
(
params
.
delier_user_id
);
_obusinessmenProperty
.
deliver_user_path
=
this
.
trim
(
params
.
deliver_user_path
);
_obusinessmenProperty
.
deliver_user_path
=
this
.
trim
(
params
.
deliver_user_path
);
_obusinessmenProperty
.
company_id
=
this
.
trim
(
params
.
company_id
);
_obusinessmenProperty
.
company_id
=
this
.
trim
(
params
.
company_id
);
_obusinessmenProperty
.
saas_id
=
_orderInfo
.
saas_id
||
""
;
let
orderProperty
=
{};
let
orderProperty
=
{};
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
id
=
_order
.
id
;
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
orderProperty
.
status
=
this
.
trim
(
params
.
status
);
...
...
xggsve-order/app/base/service/impl/saas/saasorderSve.js
View file @
050aea2a
...
@@ -300,7 +300,7 @@ class SaasOrderService extends ServiceBase {
...
@@ -300,7 +300,7 @@ class SaasOrderService extends ServiceBase {
page
.
rows
=
await
this
.
dao
.
listByCondition
(
params
);
page
.
rows
=
await
this
.
dao
.
listByCondition
(
params
);
if
(
page
.
rows
)
{
if
(
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
for
(
var
row
of
page
.
rows
)
{
this
.
handleDate
(
row
,
[
"created_at"
],
null
,
-
8
);
this
.
handleDate
(
row
,
[
"created_at"
],
null
);
}
}
await
this
.
setBminfo
(
page
.
rows
);
await
this
.
setBminfo
(
page
.
rows
);
...
...
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