Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
c7af92fe
提交
c7af92fe
编写于
7月 14, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
zhouweidong@lab.ibiz5.com 部署微服务应用
上级
25236e73
变更
7
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
1649 行增加
和
56 行删除
+1649
-56
sys-app-service-base.ts
app_web/src/service/sys-app/sys-app-service-base.ts
+191
-8
sys-auth-log-service-base.ts
...web/src/service/sys-auth-log/sys-auth-log-service-base.ts
+191
-8
sys-permission-service-base.ts
...src/service/sys-permission/sys-permission-service-base.ts
+192
-8
sys-role-permission-service-base.ts
...e/sys-role-permission/sys-role-permission-service-base.ts
+345
-8
sys-role-service-base.ts
app_web/src/service/sys-role/sys-role-service-base.ts
+193
-8
sys-user-role-service-base.ts
...b/src/service/sys-user-role/sys-user-role-service-base.ts
+345
-8
sys-user-service-base.ts
app_web/src/service/sys-user/sys-user-service-base.ts
+192
-8
未找到文件。
app_web/src/service/sys-app/sys-app-service-base.ts
浏览文件 @
c7af92fe
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 应用服务对象基类
*
* @export
* @class SysAppServiceBase
* @extends {EntityServie}
*/
export
default
class
SysAppServiceBase
extends
EntityService
{
/**
* Creates an instance of SysAppServiceBase.
*
* @param {*} [opts={}]
* @memberof SysAppServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysAppServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysapp'
;
this
.
APPDEKEY
=
'id'
;
this
.
APPDENAME
=
'sysapps'
;
this
.
APPDETEXT
=
'label'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysapps/
${
context
.
sysapp
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/
${
context
.
sysapp
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysapps/getdraft`
,
isloading
);
res
.
data
.
sysapp
=
data
.
sysapp
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysapps/
${
context
.
sysapp
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysapps/fetchdefault`
,
tempData
,
isloading
);
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAppServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysapps/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-auth-log/sys-auth-log-service-base.ts
浏览文件 @
c7af92fe
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 认证日志服务对象基类
*
* @export
* @class SysAuthLogServiceBase
* @extends {EntityServie}
*/
export
default
class
SysAuthLogServiceBase
extends
EntityService
{
/**
* Creates an instance of SysAuthLogServiceBase.
*
* @param {*} [opts={}]
* @memberof SysAuthLogServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysAuthLogServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysauthlog'
;
this
.
APPDEKEY
=
'logid'
;
this
.
APPDENAME
=
'sysauthlogs'
;
this
.
APPDETEXT
=
'username'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs`
,
data
,
isloading
);
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/
${
context
.
sysauthlog
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysauthlogs/getdraft`
,
isloading
);
res
.
data
.
sysauthlog
=
data
.
sysauthlog
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysauthlogs/
${
context
.
sysauthlog
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysauthlogs/fetchdefault`
,
tempData
,
isloading
);
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysAuthLogServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysauthlogs/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-permission/sys-permission-service-base.ts
浏览文件 @
c7af92fe
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 权限/资源服务对象基类
*
* @export
* @class SysPermissionServiceBase
* @extends {EntityServie}
*/
export
default
class
SysPermissionServiceBase
extends
EntityService
{
/**
* Creates an instance of SysPermissionServiceBase.
*
* @param {*} [opts={}]
* @memberof SysPermissionServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysPermissionServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'syspermission'
;
this
.
APPDEKEY
=
'permissionid'
;
this
.
APPDENAME
=
'syspermissions'
;
this
.
APPDETEXT
=
'permissionname'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/syspermissions/
${
context
.
syspermission
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/
${
context
.
syspermission
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/syspermissions/getdraft`
,
isloading
);
res
.
data
.
syspermission
=
data
.
syspermission
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/syspermissions/
${
context
.
syspermission
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/syspermissions/fetchdefault`
,
tempData
,
isloading
);
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysPermissionServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/syspermissions/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-role-permission/sys-role-permission-service-base.ts
浏览文件 @
c7af92fe
此差异已折叠。
点击以展开。
app_web/src/service/sys-role/sys-role-service-base.ts
浏览文件 @
c7af92fe
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 系统角色服务对象基类
*
* @export
* @class SysRoleServiceBase
* @extends {EntityServie}
*/
export
default
class
SysRoleServiceBase
extends
EntityService
{
/**
* Creates an instance of SysRoleServiceBase.
*
* @param {*} [opts={}]
* @memberof SysRoleServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysRoleServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysrole'
;
this
.
APPDEKEY
=
'roleid'
;
this
.
APPDENAME
=
'sysroles'
;
this
.
APPDETEXT
=
'rolename'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysrolepermissions'
,
JSON
.
stringify
(
res
.
data
.
sysrolepermissions
));
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysroles/
${
context
.
sysrole
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysroles/
${
context
.
sysrole
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/
${
context
.
sysrole
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysroles/getdraft`
,
isloading
);
res
.
data
.
sysrole
=
data
.
sysrole
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysroles/
${
context
.
sysrole
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysroles/fetchdefault`
,
tempData
,
isloading
);
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysRoleServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysroles/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
app_web/src/service/sys-user-role/sys-user-role-service-base.ts
浏览文件 @
c7af92fe
此差异已折叠。
点击以展开。
app_web/src/service/sys-user/sys-user-service-base.ts
浏览文件 @
c7af92fe
!!!!
模版产生代码错误
:
----
Tip
:
If
the
parameter
value
expression
on
the
caller
side
is
known
to
be
legally
null
/
missing
,
you
may
want
to
specify
a
default
value
for
it
with
the
"!"
operator
,
like
paramValue
!
defaultValue
.
----
----
FTL
stack
trace
(
"~"
means
nesting
-
related
):
-
Failed
at
:
@
service_block
item
=
item
singleAppMet
...
[
in
template
"TEMPLCODE_zh_CN"
at
line
570
,
column
5
]
----
\ No newline at end of file
import
{
Http
,
Util
}
from
'@/utils'
;
import
EntityService
from
'../entity-service'
;
/**
* 系统用户服务对象基类
*
* @export
* @class SysUserServiceBase
* @extends {EntityServie}
*/
export
default
class
SysUserServiceBase
extends
EntityService
{
/**
* Creates an instance of SysUserServiceBase.
*
* @param {*} [opts={}]
* @memberof SysUserServiceBase
*/
constructor
(
opts
:
any
=
{})
{
super
(
opts
);
}
/**
* 初始化基础数据
*
* @memberof SysUserServiceBase
*/
public
initBasicData
(){
this
.
APPLYDEKEY
=
'sysuser'
;
this
.
APPDEKEY
=
'userid'
;
this
.
APPDENAME
=
'sysusers'
;
this
.
APPDETEXT
=
'personname'
;
this
.
APPNAME
=
'web'
;
this
.
SYSTEMNAME
=
'ibzuaa'
;
}
// 实体接口
/**
* Select接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Select
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
/select`
,
isloading
);
}
/**
* Create接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Create
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
if
(
!
data
.
srffrontuf
||
data
.
srffrontuf
!==
"1"
){
data
[
this
.
APPDEKEY
]
=
null
;
}
if
(
data
.
srffrontuf
){
delete
data
.
srffrontuf
;
}
let
tempContext
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
context
));
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers`
,
data
,
isloading
);
this
.
tempStorage
.
setItem
(
tempContext
.
srfsessionkey
+
'_sysuserroles'
,
JSON
.
stringify
(
res
.
data
.
sysuserroles
));
return
res
;
}
/**
* Update接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Update
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
put
(
`/sysusers/
${
context
.
sysuser
}
`
,
data
,
isloading
);
return
res
;
}
/**
* Remove接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Remove
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
delete
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
}
/**
* Get接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Get
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/
${
context
.
sysuser
}
`
,
isloading
);
return
res
;
}
/**
* GetDraft接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
GetDraft
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
res
:
any
=
await
Http
.
getInstance
().
get
(
`/sysusers/getdraft`
,
isloading
);
res
.
data
.
sysuser
=
data
.
sysuser
;
return
res
;
}
/**
* CheckKey接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
CheckKey
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/checkkey`
,
data
,
isloading
);
}
/**
* Save接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
Save
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
masterData
:
any
=
{};
Object
.
assign
(
data
,
masterData
);
let
res
:
any
=
await
Http
.
getInstance
().
post
(
`/sysusers/
${
context
.
sysuser
}
/save`
,
data
,
isloading
);
return
res
;
}
/**
* FetchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
FetchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
get
(
`/sysusers/fetchdefault`
,
tempData
,
isloading
);
}
/**
* searchDefault接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof SysUserServiceBase
*/
public
async
searchDefault
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
let
tempData
:
any
=
JSON
.
parse
(
JSON
.
stringify
(
data
));
return
Http
.
getInstance
().
post
(
`/sysusers/searchdefault`
,
tempData
,
isloading
);
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录