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
453a538f
Commit
453a538f
authored
Apr 09, 2020
by
zhaoxiqing
Browse files
Options
Browse Files
Download
Plain Diff
gsb
parents
b762da0f
2da45be7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
368 additions
and
48 deletions
+368
-48
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
+85
-0
xgg-saas-merchant/app/base/controller/impl/saas/merchantCtl.js
+0
-37
xgg-saas-merchant/app/base/service/impl/saas/invoiceSve.js
+28
-0
xgg-saas-merchant/app/base/service/impl/saas/merchantSve.js
+0
-5
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
+1
-0
xgg-saas-merchant/app/base/system.js
+5
-6
xgg-saas-merchant/app/front/entry/public/apidoc/saas/invoice.md
+249
-0
No files found.
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
0 → 100644
View file @
453a538f
var
system
=
require
(
"../../../system"
)
const
CtlBase
=
require
(
"../../ctlms.base"
);
class
InvoiceCtl
extends
CtlBase
{
constructor
()
{
super
();
this
.
orderSve
=
system
.
getObject
(
"service.saas.orderSve"
);
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
this
.
merchantSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
this
.
invoiceSve
=
system
.
getObject
(
"service.saas.invoiceSve"
);
}
// 注册订单列表
async
orderPage
(
params
,
pobj2
,
req
)
{
try
{
params
.
unInvoice
=
1
;
params
.
handle_statuses
=
[
'20'
,
'30'
];
this
.
doTimeCondition
(
params
,
[
"createBegin"
,
"createEnd"
]);
return
await
this
.
orderSve
.
page
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 平台交易列表
async
platformPage
(
params
,
pobj2
,
req
)
{
try
{
params
.
unInvoice
=
1
;
params
.
order_type
=
"10"
;
params
.
trade_status
=
"00"
;
this
.
doTimeCondition
(
params
,
[
"createBegin"
,
"createEnd"
]);
return
await
this
.
tradeSve
.
itemPage
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 商户交易列表
async
merchantPage
(
params
,
pobj2
,
req
)
{
try
{
params
.
unInvoice
=
1
;
params
.
order_type
=
"20"
;
params
.
trade_status
=
"00"
;
this
.
doTimeCondition
(
params
,
[
"createBegin"
,
"createEnd"
]);
return
await
this
.
tradeSve
.
itemPage
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 商户抬头信息
async
apply
(
params
,
pobj2
,
req
)
{
try
{
return
await
this
.
orderSve
.
page
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 商户交付信息
async
apply
(
params
,
pobj2
,
req
)
{
try
{
return
await
this
.
orderSve
.
page
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
// 发票申请
async
apply
(
params
,
pobj2
,
req
)
{
try
{
return
await
this
.
orderSve
.
page
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
//发票列表
async
saasinvoicePage
(
params
,
pobj2
,
req
)
{
try
{
let
rs
=
await
this
.
invoiceSve
.
saasinvoicePage
(
params
);
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
module
.
exports
=
InvoiceCtl
;
xgg-saas-merchant/app/base/controller/impl/saas/merchantCtl.js
View file @
453a538f
...
@@ -4,7 +4,6 @@ class MerchantCtl extends CtlBase {
...
@@ -4,7 +4,6 @@ class MerchantCtl extends CtlBase {
constructor
()
{
constructor
()
{
super
();
super
();
this
.
merchantSve
=
system
.
getObject
(
"service.saas.merchantSve"
);
this
.
merchantSve
=
system
.
getObject
(
"service.saas.merchantSve"
);
this
.
merchantuserSve
=
system
.
getObject
(
"service.uc.merchantuserSve"
);
}
}
async
dics
(
params
,
pobj2
,
req
)
{
async
dics
(
params
,
pobj2
,
req
)
{
...
@@ -69,42 +68,6 @@ class MerchantCtl extends CtlBase {
...
@@ -69,42 +68,6 @@ class MerchantCtl extends CtlBase {
}
}
}
}
async
userInfo
(
params
,
pobj2
,
req
)
{
try
{
let
rs
=
await
this
.
merchantuserSve
.
info
(
params
);
await
this
.
merchantSve
.
setMerchant
([
rs
.
data
]);
return
system
.
getResultSuccess
(
rs
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
userSave
(
params
,
pobj2
,
req
)
{
try
{
return
await
this
.
merchantuserSve
.
save
(
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
userPage
(
params
,
pobj2
,
req
)
{
try
{
let
rs
=
await
this
.
merchantuserSve
.
page
(
params
);
await
this
.
merchantSve
.
setMerchant
(
rs
.
data
.
rows
);
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
async
saasinvoicePage
(
params
,
pobj2
,
req
)
{
try
{
let
rs
=
await
this
.
merchantSve
.
saasinvoicePage
(
params
);
return
rs
;
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
}
module
.
exports
=
MerchantCtl
;
module
.
exports
=
MerchantCtl
;
xgg-saas-merchant/app/base/service/impl/saas/invoiceSve.js
0 → 100644
View file @
453a538f
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../svems.base"
)
const
settings
=
require
(
"../../../../config/settings"
)
class
InvoiceService
extends
ServiceBase
{
constructor
()
{
super
();
}
async
saasinvoicePage
(
params
){
var
rs
=
await
this
.
callms
(
"invoice"
,
"saasinvoicePage"
,
params
);
if
(
rs
&&
rs
.
data
&&
rs
.
data
.
rows
)
{
this
.
transOrderField
(
rs
.
data
.
rows
);
}
return
rs
;
}
transOrderField
(
rows
)
{
if
(
!
rows
||
rows
.
length
==
0
)
{
return
;
}
for
(
let
row
of
rows
)
{
row
.
price
=
system
.
f2y
(
row
.
price
);
}
}
}
module
.
exports
=
InvoiceService
;
xgg-saas-merchant/app/base/service/impl/saas/merchantSve.js
View file @
453a538f
...
@@ -169,10 +169,5 @@ class MerchantService extends ServiceBase {
...
@@ -169,10 +169,5 @@ class MerchantService extends ServiceBase {
}
}
}
}
async
saasinvoicePage
(
params
){
var
rs
=
await
this
.
callms
(
"invoice"
,
"saasinvoicePage"
,
params
);
return
rs
;
}
}
}
module
.
exports
=
MerchantService
;
module
.
exports
=
MerchantService
;
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
View file @
453a538f
...
@@ -89,6 +89,7 @@ class TradeService extends ServiceBase {
...
@@ -89,6 +89,7 @@ class TradeService extends ServiceBase {
item_count
:
itemList
.
length
,
item_count
:
itemList
.
length
,
acc_type
:
params
.
acc_type
,
acc_type
:
params
.
acc_type
,
order_file
:
params
.
fileUrl
,
order_file
:
params
.
fileUrl
,
order_type
:
"10"
,
// 付款凭证信息
// 付款凭证信息
pay_voucher
:
""
,
pay_voucher
:
""
,
pay_bank_account
:
main
.
bank_account
,
pay_bank_account
:
main
.
bank_account
,
...
...
xgg-saas-merchant/app/base/system.js
View file @
453a538f
...
@@ -171,8 +171,8 @@ class System {
...
@@ -171,8 +171,8 @@ class System {
var
path
=
"/api/op/action/springboard"
;
var
path
=
"/api/op/action/springboard"
;
if
(
settings
.
env
==
"dev"
)
{
if
(
settings
.
env
==
"dev"
)
{
// var domain = "http://192.168.18.237";
// var domain = "http://192.168.18.237";
let
dev
=
"http://127.0.0.1"
;
let
local
=
"http://127.0.0.1"
;
//
let dev = "http://39.107.234.14";
let
dev
=
"http://39.107.234.14"
;
return
{
return
{
// 公共服务
// 公共服务
common
:
dev
+
":3102"
+
path
,
common
:
dev
+
":3102"
+
path
,
...
@@ -181,19 +181,18 @@ class System {
...
@@ -181,19 +181,18 @@ class System {
merchant
:
dev
+
":3101"
+
path
,
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
// 订单服务
order
:
dev
+
":3103"
+
path
,
order
:
local
+
":3103"
+
path
,
// 发票服务
// 发票服务
invoice
:
dev
+
":3105"
+
path
,
invoice
:
local
+
":3105"
+
path
,
// 用户服务
// 用户服务
uc
:
dev
+
":3106"
+
path
,
uc
:
dev
+
":3106"
+
path
,
// 交易
// 交易
trade
:
dev
+
":3107"
+
path
,
trade
:
local
+
":3107"
+
path
,
}
}
}
else
{
}
else
{
var
odomain
=
"http://123.57.217.203"
return
{
return
{
common
:
"xggsvecommon-service"
+
path
,
common
:
"xggsvecommon-service"
+
path
,
merchant
:
"xggsvemerchant-service"
+
path
,
merchant
:
"xggsvemerchant-service"
+
path
,
...
...
xgg-saas-merchant/app/front/entry/public/apidoc/saas/invoice.md
0 → 100644
View file @
453a538f
This diff is collapsed.
Click to expand it.
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