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
32b53617
Commit
32b53617
authored
Jun 03, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gbs
parent
e702cf52
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
22 deletions
+26
-22
xggsve-merchant/app/base/db/impl/channel/saaschannelDao.js
+0
-8
xggsve-merchant/app/base/db/impl/main/saasmainDao.js
+11
-6
xggsve-merchant/app/base/db/impl/merchant/saasmerchantDao.js
+11
-6
xggsve-merchant/app/base/service/impl/main/saasmainSve.js
+2
-1
xggsve-merchant/app/base/service/impl/merchant/saasmerchantSve.js
+2
-1
No files found.
xggsve-merchant/app/base/db/impl/channel/saaschannelDao.js
View file @
32b53617
...
@@ -28,14 +28,6 @@ class SaasChannelDao extends Dao {
...
@@ -28,14 +28,6 @@ class SaasChannelDao extends Dao {
return
result
;
return
result
;
}
}
async
bySaasId
(
saasId
,
attrs
)
{
attrs
=
attrs
||
"*"
;
let
sql
=
`SELECT
${
attrs
}
FROM
${
this
.
model
.
tableName
}
WHERE saas_id = :saasId `
;
return
await
this
.
customQuery
(
sql
,
{
saasId
:
saasId
});
}
async
findDics
(
params
){
async
findDics
(
params
){
let
sql
=
[];
let
sql
=
[];
sql
.
push
(
"select * from saas_channel where 1=1"
);
sql
.
push
(
"select * from saas_channel where 1=1"
);
...
...
xggsve-merchant/app/base/db/impl/main/saasmainDao.js
View file @
32b53617
...
@@ -28,12 +28,17 @@ class SaasMainDao extends Dao {
...
@@ -28,12 +28,17 @@ class SaasMainDao extends Dao {
return
result
;
return
result
;
}
}
async
bySaasId
(
saasId
,
attrs
)
{
async
dics
(
params
)
{
attrs
=
attrs
||
"*"
;
let
sql
=
[];
let
sql
=
`SELECT
${
attrs
}
FROM
${
this
.
model
.
tableName
}
WHERE saas_id = :saasId `
;
sql
.
push
(
"SELECT"
);
return
await
this
.
customQuery
(
sql
,
{
sql
.
push
(
params
.
attrs
||
"*"
);
saasId
:
saasId
sql
.
push
(
"FROM"
);
});
sql
.
push
(
this
.
model
.
tableName
);
sql
.
push
(
"WHERE 1 = 1"
);
if
(
params
.
saas_id
)
{
sql
.
push
(
"AND saas_id = :saas_id"
);
}
return
await
this
.
customQuery
(
sql
,
params
);
}
}
}
}
module
.
exports
=
SaasMainDao
;
module
.
exports
=
SaasMainDao
;
xggsve-merchant/app/base/db/impl/merchant/saasmerchantDao.js
View file @
32b53617
...
@@ -57,12 +57,17 @@ class SaasMerchantDao extends Dao {
...
@@ -57,12 +57,17 @@ class SaasMerchantDao extends Dao {
return
result
;
return
result
;
}
}
async
bySaasId
(
saasId
,
attrs
)
{
async
dics
(
params
)
{
attrs
=
attrs
||
"*"
;
let
sql
=
[];
let
sql
=
`SELECT
${
attrs
}
FROM
${
this
.
model
.
tableName
}
WHERE saas_id = :saasId `
;
sql
.
push
(
"SELECT"
);
return
await
this
.
customQuery
(
sql
,
{
sql
.
push
(
params
.
attrs
||
"*"
);
saasId
:
saasId
sql
.
push
(
"FROM"
);
});
sql
.
push
(
this
.
model
.
tableName
);
sql
.
push
(
"WHERE 1 = 1"
);
if
(
params
.
saas_id
)
{
sql
.
push
(
"AND saas_id = :saas_id"
);
}
return
await
this
.
customQuery
(
sql
,
params
);
}
}
async
byChannelId
(
channelId
,
attrs
)
{
async
byChannelId
(
channelId
,
attrs
)
{
...
...
xggsve-merchant/app/base/service/impl/main/saasmainSve.js
View file @
32b53617
...
@@ -12,7 +12,8 @@ class SaasMainService extends ServiceBase {
...
@@ -12,7 +12,8 @@ class SaasMainService extends ServiceBase {
if
(
!
saas_id
)
{
if
(
!
saas_id
)
{
return
system
.
getResultSuccess
([]);
return
system
.
getResultSuccess
([]);
}
}
let
list
=
await
this
.
dao
.
bySaasId
(
Number
(
params
.
saas_id
),
"id, name"
);
params
.
attrs
=
"id, name"
;
let
list
=
await
this
.
dao
.
dics
(
params
);
return
system
.
getResultSuccess
(
list
);
return
system
.
getResultSuccess
(
list
);
}
}
...
...
xggsve-merchant/app/base/service/impl/merchant/saasmerchantSve.js
View file @
32b53617
...
@@ -38,7 +38,8 @@ class SaasMerchantService extends ServiceBase {
...
@@ -38,7 +38,8 @@ class SaasMerchantService extends ServiceBase {
if
(
!
saas_id
)
{
if
(
!
saas_id
)
{
return
system
.
getResultSuccess
([]);
return
system
.
getResultSuccess
([]);
}
}
let
list
=
await
this
.
dao
.
bySaasId
(
Number
(
params
.
saas_id
),
"id, name, short_name"
);
params
.
attrs
=
"id, name, short_name"
;
let
list
=
await
this
.
dao
.
dics
(
params
);
return
system
.
getResultSuccess
(
list
);
return
system
.
getResultSuccess
(
list
);
}
}
...
...
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