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
2da45be7
Commit
2da45be7
authored
Apr 09, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
d008e4e2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
329 additions
and
34 deletions
+329
-34
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
+77
-0
xgg-saas-merchant/app/base/controller/impl/saas/merchantCtl.js
+0
-31
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
+1
-0
xgg-saas-merchant/app/base/system.js
+2
-3
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 @
2da45be7
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"
);
}
// 注册订单列表
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
}
`
);
}
}
}
module
.
exports
=
InvoiceCtl
;
\ No newline at end of file
xgg-saas-merchant/app/base/controller/impl/saas/merchantCtl.js
View file @
2da45be7
...
...
@@ -4,7 +4,6 @@ class MerchantCtl extends CtlBase {
constructor
()
{
super
();
this
.
merchantSve
=
system
.
getObject
(
"service.saas.merchantSve"
);
this
.
merchantuserSve
=
system
.
getObject
(
"service.uc.merchantuserSve"
);
}
async
dics
(
params
,
pobj2
,
req
)
{
...
...
@@ -68,34 +67,5 @@ class MerchantCtl extends CtlBase {
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
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
}
`
);
}
}
}
module
.
exports
=
MerchantCtl
;
\ No newline at end of file
xgg-saas-merchant/app/base/service/impl/trade/tradeSve.js
View file @
2da45be7
...
...
@@ -89,6 +89,7 @@ class TradeService extends ServiceBase {
item_count
:
itemList
.
length
,
acc_type
:
params
.
acc_type
,
order_file
:
params
.
fileUrl
,
order_type
:
"10"
,
// 付款凭证信息
pay_voucher
:
""
,
pay_bank_account
:
main
.
bank_account
,
...
...
xgg-saas-merchant/app/base/system.js
View file @
2da45be7
...
...
@@ -181,7 +181,7 @@ class System {
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
order
:
dev
+
":3103"
+
path
,
order
:
local
+
":3103"
+
path
,
// 发票服务
invoice
:
dev
+
":3105"
+
path
,
...
...
@@ -190,10 +190,9 @@ class System {
uc
:
dev
+
":3106"
+
path
,
// 交易
trade
:
dev
+
":3107"
+
path
,
trade
:
local
+
":3107"
+
path
,
}
}
else
{
var
odomain
=
"http://123.57.217.203"
return
{
common
:
"xggsvecommon-service"
+
path
,
merchant
:
"xggsvemerchant-service"
+
path
,
...
...
xgg-saas-merchant/app/front/entry/public/apidoc/saas/invoice.md
0 → 100644
View file @
2da45be7
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