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
29588d1c
Commit
29588d1c
authored
May 06, 2021
by
linboxuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lin add submitService/editService,delete getWay pushlog select
parent
ff8d3ead
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
12 deletions
+49
-12
center-app/app/base/api/impl/auth/accessAuth.js
+11
-0
center-app/app/base/db/models/dbapp/app.js
+13
-12
center-app/app/base/service/impl/utilsSve/utilsappSve.js
+25
-0
No files found.
center-app/app/base/api/impl/auth/accessAuth.js
View file @
29588d1c
...
...
@@ -123,5 +123,15 @@ class AccessAuthAPI extends APIBase {
var
result
=
await
this
.
utilsappSve
.
getAllService
(
pobj
,
qobj
,
req
);
return
result
;
}
async
submitService
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
utilsappSve
.
submitService
(
pobj
,
qobj
,
req
);
return
result
;
}
async
editService
(
pobj
,
qobj
,
req
)
{
var
result
=
await
this
.
utilsappSve
.
editService
(
pobj
,
qobj
,
req
);
return
result
;
}
}
module
.
exports
=
AccessAuthAPI
;
\ No newline at end of file
center-app/app/base/db/models/dbapp/app.js
View file @
29588d1c
...
...
@@ -12,6 +12,7 @@ module.exports = (db, DataTypes) => {
contact_name
:
DataTypes
.
STRING
(
50
),
//联系人
contact_mobile
:
DataTypes
.
STRING
(
50
),
//联系电话
contact_email
:
DataTypes
.
STRING
(
50
),
//联系人邮箱
desc
:
DataTypes
.
STRING
(
256
),
//联系人邮箱
is_enabled
:
{
//状态 0禁用 1启用
type
:
DataTypes
.
BOOLEAN
,
defaultValue
:
true
,
...
...
@@ -29,18 +30,17 @@ module.exports = (db, DataTypes) => {
values
:
Object
.
keys
(
uiconfig
.
config
.
pdict
.
delivery_type
)
},
},
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
timestamps
:
true
,
updatedAt
:
false
,
tableName
:
'p_app'
,
validate
:
{
paranoid
:
false
,
//假的删除
underscored
:
true
,
version
:
true
,
freezeTableName
:
true
,
timestamps
:
true
,
tableName
:
'p_app'
,
validate
:
{
},
indexes
:
[
},
indexes
:
[
]
});
]
});
}
\ No newline at end of file
center-app/app/base/service/impl/utilsSve/utilsappSve.js
View file @
29588d1c
...
...
@@ -91,5 +91,30 @@ class UtilsAppSve extends AppServiceBase {
let
result
=
await
this
.
appDao
.
model
.
findAndCountAll
(
tmpWhere
)
return
system
.
getResultSuccess
(
result
);
}
/**
* 创建渠道
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
*/
async
submitService
(
pobj
,
qobj
,
req
)
{
if
(
pobj
.
actionBody
)
{
let
result
=
await
this
.
appDao
.
model
.
create
(
pobj
.
actionBody
)
return
system
.
getResultSuccess
(
result
);
}
return
;
}
/**
* 修改渠道
* @returns {Promise<{msg: *, data: (*|null), status: number}>}
*/
async
editService
(
pobj
,
qobj
,
req
)
{
if
(
pobj
.
actionBody
)
{
console
.
log
(
pobj
.
actionBody
);
let
result
=
await
this
.
appDao
.
update
(
pobj
.
actionBody
)
return
system
.
getResultSuccess
(
result
);
}
return
;
}
}
module
.
exports
=
UtilsAppSve
;
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