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
461010d4
Commit
461010d4
authored
Jun 30, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
0271d767
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
14 deletions
+24
-14
engine-fee/app/base/api/impl/op/action.js
+6
-8
engine-fee/app/base/db/impl/account/accountDao.js
+1
-1
engine-fee/app/base/db/impl/account/accounttradeDao.js
+1
-1
engine-fee/app/base/service/impl/account/accountSve.js
+13
-1
engine-fee/app/base/utils/dictionary.js
+1
-1
engine-fee/app/config/localsettings.js
+1
-1
engine-fee/app/config/settings.js
+1
-1
No files found.
engine-fee/app/base/api/impl/op/action.js
View file @
461010d4
...
@@ -25,17 +25,12 @@ class ActionAPI extends APIBase {
...
@@ -25,17 +25,12 @@ class ActionAPI extends APIBase {
}
catch
(
error
)
{
}
catch
(
error
)
{
console
.
log
(
error
);
console
.
log
(
error
);
}
}
return
result
;
return
result
;
}
}
async
handleRequest
(
action_process
,
action_type
,
action_body
)
{
async
handleRequest
(
action_process
,
action_type
,
action_body
)
{
var
opResult
=
null
;
var
opResult
=
null
;
switch
(
action_type
)
{
switch
(
action_type
)
{
// 测试
case
"test"
:
opResult
=
await
this
.
accountSve
.
test
(
action_body
);
break
;
// 创建账户
// 创建账户
case
"accountCreate"
:
case
"accountCreate"
:
opResult
=
await
this
.
accountSve
.
createAccount
(
action_body
);
opResult
=
await
this
.
accountSve
.
createAccount
(
action_body
);
...
@@ -44,6 +39,10 @@ class ActionAPI extends APIBase {
...
@@ -44,6 +39,10 @@ class ActionAPI extends APIBase {
case
"accountInfo"
:
case
"accountInfo"
:
opResult
=
await
this
.
accountSve
.
accountInfo
(
action_body
);
opResult
=
await
this
.
accountSve
.
accountInfo
(
action_body
);
break
;
break
;
// 账户余额查询
case
"accountBulkInfo"
:
opResult
=
await
this
.
accountSve
.
accountBulkInfo
(
action_body
);
break
;
// 账户充值
// 账户充值
case
"accountRecharge"
:
case
"accountRecharge"
:
opResult
=
await
this
.
accountSve
.
accountRecharge
(
action_body
);
opResult
=
await
this
.
accountSve
.
accountRecharge
(
action_body
);
...
@@ -58,9 +57,8 @@ class ActionAPI extends APIBase {
...
@@ -58,9 +57,8 @@ class ActionAPI extends APIBase {
case
"accountTradePage"
:
case
"accountTradePage"
:
opResult
=
await
this
.
accountSve
.
accountTradePage
(
action_body
);
opResult
=
await
this
.
accountSve
.
accountTradePage
(
action_body
);
break
;
break
;
// 账户交易
case
"tradeMapByIds"
:
case
"test4"
:
opResult
=
await
this
.
accountSve
.
tradeMapByIds
(
action_body
);
opResult
=
await
this
.
accountSve
.
test
(
action_body
);
break
;
break
;
default
:
default
:
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
opResult
=
system
.
getResult
(
null
,
"action_type参数错误"
);
...
...
engine-fee/app/base/db/impl/account/accountDao.js
View file @
461010d4
...
@@ -41,7 +41,7 @@ class AccountDao extends Dao {
...
@@ -41,7 +41,7 @@ class AccountDao extends Dao {
if
(
!
ids
||
ids
.
length
==
0
)
{
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
return
result
;
}
}
var
list
=
await
this
.
findL
istByIds
(
ids
,
attrs
);
var
list
=
await
this
.
l
istByIds
(
ids
,
attrs
);
if
(
!
list
||
list
.
length
==
0
)
{
if
(
!
list
||
list
.
length
==
0
)
{
return
result
;
return
result
;
}
}
...
...
engine-fee/app/base/db/impl/account/accounttradeDao.js
View file @
461010d4
...
@@ -26,7 +26,7 @@ class AccountTradeDao extends Dao {
...
@@ -26,7 +26,7 @@ class AccountTradeDao extends Dao {
if
(
!
ids
||
ids
.
length
==
0
)
{
if
(
!
ids
||
ids
.
length
==
0
)
{
return
result
;
return
result
;
}
}
var
list
=
await
this
.
findL
istByIds
(
ids
,
attrs
);
var
list
=
await
this
.
l
istByIds
(
ids
,
attrs
);
if
(
!
list
||
list
.
length
==
0
)
{
if
(
!
list
||
list
.
length
==
0
)
{
return
result
;
return
result
;
}
}
...
...
engine-fee/app/base/service/impl/account/accountSve.js
View file @
461010d4
...
@@ -11,6 +11,7 @@ class AccountService extends ServiceBase {
...
@@ -11,6 +11,7 @@ class AccountService extends ServiceBase {
async
createAccount
(
params
)
{
async
createAccount
(
params
)
{
let
app_id
=
this
.
trim
(
params
.
app_id
);
let
app_id
=
this
.
trim
(
params
.
app_id
);
let
app_data_id
=
this
.
trim
(
params
.
app_data_id
);
let
app_data_id
=
this
.
trim
(
params
.
app_data_id
);
let
balance
=
Number
(
params
.
balance
||
0
);
let
apps
=
this
.
dictionary
.
getDict
(
"APP"
,
"app_id"
)
||
{};
let
apps
=
this
.
dictionary
.
getDict
(
"APP"
,
"app_id"
)
||
{};
if
(
!
apps
[
app_id
])
{
if
(
!
apps
[
app_id
])
{
...
@@ -29,7 +30,7 @@ class AccountService extends ServiceBase {
...
@@ -29,7 +30,7 @@ class AccountService extends ServiceBase {
autoIncrement
:
true
,
autoIncrement
:
true
,
app_id
:
app_id
,
app_id
:
app_id
,
app_data_id
:
app_data_id
,
app_data_id
:
app_data_id
,
balance
:
0
,
balance
:
balance
,
});
});
return
system
.
getResultSuccess
({
account_id
:
account
.
id
});
return
system
.
getResultSuccess
({
account_id
:
account
.
id
});
}
}
...
@@ -39,6 +40,12 @@ class AccountService extends ServiceBase {
...
@@ -39,6 +40,12 @@ class AccountService extends ServiceBase {
return
system
.
getResultSuccess
(
account
);
return
system
.
getResultSuccess
(
account
);
}
}
async
accountBulkInfo
(
params
)
{
let
ids
=
params
.
account_ids
||
[];
let
map
=
await
this
.
dao
.
mapByIds
(
ids
,
params
.
attrs
);
return
system
.
getResultSuccess
(
map
);
}
async
accountRecharge
(
params
)
{
async
accountRecharge
(
params
)
{
let
p
=
{
trade_type
:
2
};
let
p
=
{
trade_type
:
2
};
p
.
account_id
=
params
.
account_id
;
p
.
account_id
=
params
.
account_id
;
...
@@ -160,6 +167,11 @@ class AccountService extends ServiceBase {
...
@@ -160,6 +167,11 @@ class AccountService extends ServiceBase {
async
test
(
params
)
{
async
test
(
params
)
{
return
system
.
getResultSuccess
(
"test"
);
return
system
.
getResultSuccess
(
"test"
);
}
}
async
tradeMapByIds
(
params
)
{
let
map
=
await
this
.
accounttradeDao
.
mapByIds
(
params
.
ids
,
params
.
attrs
);
return
system
.
getResultSuccess
(
map
);
}
}
}
module
.
exports
=
AccountService
;
module
.
exports
=
AccountService
;
...
...
engine-fee/app/base/utils/dictionary.js
View file @
461010d4
...
@@ -4,7 +4,7 @@ class Dictionary {
...
@@ -4,7 +4,7 @@ class Dictionary {
constructor
()
{
constructor
()
{
// 交易字典
// 交易字典
this
.
APP
=
{
this
.
APP
=
{
app_id
:
{
"100001"
:
"电子
平台
"
,
"10000x"
:
"xxxxxxxxxx"
},
app_id
:
{
"100001"
:
"电子
签约平台-订单账户
"
,
"10000x"
:
"xxxxxxxxxx"
},
};
};
this
.
ACCOUNT_TRADE
=
{
this
.
ACCOUNT_TRADE
=
{
trade_type
:
{
1
:
"交易"
,
2
:
"充值"
,
3
:
"退款"
}
trade_type
:
{
1
:
"交易"
,
2
:
"充值"
,
3
:
"退款"
}
...
...
engine-fee/app/config/localsettings.js
View file @
461010d4
...
@@ -6,7 +6,7 @@ var settings={
...
@@ -6,7 +6,7 @@ var settings={
db
:
10
,
db
:
10
,
},
},
database
:{
database
:{
dbname
:
"
bpo_
fee"
,
dbname
:
"
engine-
fee"
,
user
:
"write"
,
user
:
"write"
,
password
:
"write"
,
password
:
"write"
,
config
:
{
config
:
{
...
...
engine-fee/app/config/settings.js
View file @
461010d4
...
@@ -21,7 +21,7 @@ var settings = {
...
@@ -21,7 +21,7 @@ var settings = {
cacheprefix
:
"sjb"
,
cacheprefix
:
"sjb"
,
usertimeout
:
3600
,
//单位秒
usertimeout
:
3600
,
//单位秒
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
basepath
:
path
.
normalize
(
path
.
join
(
__dirname
,
'../..'
)),
port
:
process
.
env
.
NODE_PORT
||
3
300
,
port
:
process
.
env
.
NODE_PORT
||
3
572
,
defaultPassWord
:
"987456"
,
defaultPassWord
:
"987456"
,
paasUrl
:
function
()
{
paasUrl
:
function
()
{
if
(
this
.
env
==
"dev"
)
{
if
(
this
.
env
==
"dev"
)
{
...
...
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