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
15996149
Commit
15996149
authored
May 20, 2020
by
王昆
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'xgg-saas-merchant' of gitlab.gongsibao.com:jiangyong/zhichan into xgg-saas-merchant
parents
6b3bcfa0
e301b893
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
40 additions
and
4 deletions
+40
-4
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
+1
-1
xgg-saas-merchant/app/base/controller/impl/saas/merchantCtl.js
+5
-0
xgg-saas-merchant/app/base/system.js
+2
-2
xgg-saas-merchant/app/base/wxapplet/impl/merchantApplet.js
+32
-1
No files found.
xgg-saas-merchant/app/base/controller/impl/saas/invoiceCtl.js
View file @
15996149
...
...
@@ -33,7 +33,7 @@ class InvoiceCtl extends CtlBase {
try
{
params
.
unInvoice
=
1
;
params
.
order_type
=
params
.
fee_type
;
params
.
trade_status_array
=
[
"00"
,
"02"
];
params
.
trade_status_array
=
[
"00"
];
this
.
doTimeCondition
(
params
,
[
"createBegin"
,
"createEnd"
]);
return
await
this
.
tradeSve
.
itemPage
(
params
);
}
catch
(
error
)
{
...
...
xgg-saas-merchant/app/base/controller/impl/saas/merchantCtl.js
View file @
15996149
...
...
@@ -114,5 +114,10 @@ class MerchantCtl extends CtlBase {
}
}
async
getFeeTypeWithCache
(
params
,
pobj2
,
req
){
let
res
=
await
this
.
merchantSve
.
getFeeTypeWithCache
(
params
);
return
system
.
getResult
({
type
:
res
});
}
}
module
.
exports
=
MerchantCtl
;
xgg-saas-merchant/app/base/system.js
View file @
15996149
...
...
@@ -194,10 +194,10 @@ class System {
merchant
:
dev
+
":3101"
+
path
,
// 订单服务
order
:
local
+
":3103"
+
path
,
order
:
dev
+
":3103"
+
path
,
// 发票服务
invoice
:
local
+
":3105"
+
path
,
invoice
:
dev
+
":3105"
+
path
,
// 用户服务
uc
:
dev
+
":3106"
+
path
,
...
...
xgg-saas-merchant/app/base/wxapplet/impl/merchantApplet.js
View file @
15996149
...
...
@@ -17,7 +17,7 @@ class MerchantApplet extends AppletBase {
this
.
businessmenSve
=
system
.
getObject
(
"service.saas.businessmenSve"
);
this
.
tradeSve
=
system
.
getObject
(
"service.trade.tradeSve"
);
this
.
saasInvoiceSve
=
system
.
getObject
(
"service.saas.invoiceSve"
);
this
.
redisClient
=
system
.
getObject
(
"util.redisClient"
);
}
async
test
(
o
,
obj
,
req
)
{
...
...
@@ -79,6 +79,12 @@ class MerchantApplet extends AppletBase {
// 保存订单信息
async
saveOrder
(
gobj
,
pobj
,
req
,
loginUser
)
{
try
{
let
verificationCodeRes
=
await
this
.
verificationCode
(
pobj
.
bank_mobile
,
pobj
.
msgCode
)
if
(
!
verificationCodeRes
){
return
this
.
returnFail
(
"短信验证码错误"
);
}
//TODO: 银行卡四要数验证
let
rs
=
await
this
.
buildOrder
(
pobj
);
if
(
rs
.
code
===
0
)
{
return
rs
;
...
...
@@ -346,6 +352,30 @@ class MerchantApplet extends AppletBase {
}
}
/**
* 获取验证码
* @param pobj1
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
getVerificationCode
(
pobj1
,
pobj2
,
req
){
let
code
=
await
this
.
redisClient
.
setWithEx
(
`merchantAppletMsg:
${
pobj1
.
mobile
}
`
,
"123456"
,
60
*
1
);
return
this
.
returnSuccess
(
"123456"
);
}
/**
* 驗證验证码
* @param pobj1
* @param pobj2
* @param req
* @returns {Promise<void>}
*/
async
verificationCode
(
mobile
,
code
){
let
value
=
await
this
.
redisClient
.
get
(
`merchantAppletMsg:
${
mobile
}
`
);
console
.
log
(
"小程序验证码"
+
value
);
return
value
==
code
?
true
:
false
;
}
}
module
.
exports
=
MerchantApplet
;
\ No newline at end of file
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