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
a1c724c5
Commit
a1c724c5
authored
May 21, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
291c0201
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
2 deletions
+67
-2
xgg-admin/app/base/api/impl/module/saasApi.js
+11
-0
xgg-admin/app/base/service/impl/saas/channelSve.js
+35
-0
xgg-admin/app/base/service/impl/saas/saasbusinessSve.js
+9
-0
xgg-admin/app/base/service/impl/uc/userSve.js
+10
-0
xgg-admin/app/base/system.js
+2
-2
No files found.
xgg-admin/app/base/api/impl/module/saasApi.js
View file @
a1c724c5
...
...
@@ -6,6 +6,8 @@ class SaasAPI extends APIBase {
this
.
orderSve
=
system
.
getObject
(
"service.order.orderSve"
);
this
.
businessscopeSve
=
system
.
getObject
(
"service.common.businessscopeSve"
);
this
.
saasbusinessSve
=
system
.
getObject
(
"service.saas.saasbusinessSve"
);
this
.
channelSve
=
system
.
getObject
(
"service.saas.channelSve"
);
this
.
userSve
=
system
.
getObject
(
"service.uc.userSve"
);
this
.
restClient
=
system
.
getObject
(
"util.restClient"
);
}
async
openSaas
(
pobj
,
query
,
req
)
{
...
...
@@ -16,6 +18,15 @@ class SaasAPI extends APIBase {
}
return
rs
;
}
async
openSaasChannel
(
pobj
,
query
,
req
)
{
let
rs
=
await
this
.
channelSve
.
save
(
pobj
);
if
(
rs
.
status
===
0
&&
rs
.
data
&&
rs
.
data
.
id
)
{
// 更新用户
let
rs21
=
await
this
.
userSve
.
updatePlatformUserChannelIdBySaasId
({
saas_id
:
pobj
.
saas_id
,
channel_id
:
rs
.
data
.
id
});
console
.
log
(
rs21
);
}
return
rs
;
}
exam
()
{
return
""
;
...
...
xgg-admin/app/base/service/impl/saas/channelSve.js
0 → 100644
View file @
a1c724c5
const
system
=
require
(
"../../../system"
);
const
ServiceBase
=
require
(
"../../svems.base"
)
const
settings
=
require
(
"../../../../config/settings"
)
class
ChannelService
extends
ServiceBase
{
constructor
()
{
super
();
}
async
dics
(
params
)
{
var
rs
=
await
this
.
callms
(
"merchant"
,
"channelDics"
,
params
||
{});
return
rs
;
}
async
page
(
params
)
{
var
rs
=
await
this
.
callms
(
"merchant"
,
"channelPage"
,
params
);
return
rs
;
}
async
save
(
params
)
{
var
rs
=
await
this
.
callms
(
"merchant"
,
"channelSave"
,
params
);
return
rs
;
}
async
info
(
params
)
{
var
rs
=
await
this
.
callms
(
"merchant"
,
"channelInfo"
,
params
);
return
rs
;
}
async
mapByIds
(
params
)
{
var
rs
=
await
this
.
callms
(
"merchant"
,
"channelMapByIds"
,
params
);
return
rs
;
}
}
module
.
exports
=
ChannelService
;
\ No newline at end of file
xgg-admin/app/base/service/impl/saas/saasbusinessSve.js
View file @
a1c724c5
...
...
@@ -13,5 +13,13 @@ class SaasService extends ServiceBase {
}
}
async
openSaasBusiness
(
params
){
try
{
return
await
this
.
callms
(
"uc"
,
"openSaasBusiness"
,
params
);
}
catch
(
error
)
{
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
}
`
);
}
}
}
module
.
exports
=
SaasService
;
\ No newline at end of file
xgg-admin/app/base/service/impl/uc/userSve.js
View file @
a1c724c5
...
...
@@ -143,5 +143,14 @@ class UserService extends ServiceBase {
}
}
async
updatePlatformUserChannelIdBySaasId
(
params
)
{
try
{
return
await
this
.
callms
(
"uc"
,
"updatePlatformUserChannelIdBySaasId"
,
params
);
}
catch
(
error
)
{
console
.
log
(
error
);
return
system
.
getResult
(
null
,
`系统错误 错误信息
${
error
.
stack
}
`
);
}
}
}
module
.
exports
=
UserService
;
\ No newline at end of file
xgg-admin/app/base/system.js
View file @
a1c724c5
...
...
@@ -178,7 +178,7 @@ class System {
// common: "http://127.0.0.1:3102" + path,
// 商户服务
merchant
:
domain
+
":3101"
+
path
,
merchant
:
domain
2
+
":3101"
+
path
,
// merchant: "http://127.0.0.1:3101" + path,
// 订单服务
...
...
@@ -190,7 +190,7 @@ class System {
// invoice: domain + ":3105" + path,
// 用户中心
uc
:
domain
+
":3106"
+
path
,
uc
:
domain
2
+
":3106"
+
path
,
// uc: "http://127.0.0.1:3106" + path,
}
}
else
{
...
...
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