Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
3f82079a
提交
3f82079a
编写于
4月 17, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
5a305e7e
变更
12
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
72 行增加
和
88 行删除
+72
-88
app-index-view-base.vue
...web/src/pages/dict/app-index-view/app-index-view-base.vue
+2
-0
ibzdict-edit-view-base.vue
...c/pages/dict/ibzdict-edit-view/ibzdict-edit-view-base.vue
+2
-0
ibzdict-grid-view-base.vue
...c/pages/dict/ibzdict-grid-view/ibzdict-grid-view-base.vue
+2
-0
ibzdict-item-edit-view-base.vue
...ct/ibzdict-item-edit-view/ibzdict-item-edit-view-base.vue
+2
-0
ibzdict-item-grid-view-base.vue
...ct/ibzdict-item-grid-view/ibzdict-item-grid-view-base.vue
+2
-0
control-service.ts
app_web/src/widgets/control-service.ts
+1
-13
main-grid-base.vue
app_web/src/widgets/ibzdict/main-grid/main-grid-base.vue
+1
-1
main-grid-service.ts
app_web/src/widgets/ibzdict/main-grid/main-grid-service.ts
+3
-3
main-grid-base.vue
app_web/src/widgets/ibzdictitem/main-grid/main-grid-base.vue
+1
-1
main-grid-service.ts
...eb/src/widgets/ibzdictitem/main-grid/main-grid-service.ts
+3
-3
IBZDictItemServiceImpl.java
...bizlab/core/dict/service/impl/IBZDictItemServiceImpl.java
+43
-16
IBZDictServiceImpl.java
...cn/ibizlab/core/dict/service/impl/IBZDictServiceImpl.java
+10
-51
未找到文件。
app_web/src/pages/dict/app-index-view/app-index-view-base.vue
浏览文件 @
3f82079a
...
@@ -157,6 +157,7 @@ export default class AppIndexViewBase extends Vue {
...
@@ -157,6 +157,7 @@ export default class AppIndexViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
...
@@ -249,6 +250,7 @@ export default class AppIndexViewBase extends Vue {
...
@@ -249,6 +250,7 @@ export default class AppIndexViewBase extends Vue {
* @memberof AppIndexViewBase
* @memberof AppIndexViewBase
*/
*/
private
parseViewParam
():
void
{
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-edit-view/ibzdict-edit-view-base.vue
浏览文件 @
3f82079a
...
@@ -239,6 +239,7 @@ export default class IBZDictEditViewBase extends Vue {
...
@@ -239,6 +239,7 @@ export default class IBZDictEditViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
...
@@ -385,6 +386,7 @@ export default class IBZDictEditViewBase extends Vue {
...
@@ -385,6 +386,7 @@ export default class IBZDictEditViewBase extends Vue {
* @memberof IBZDictEditViewBase
* @memberof IBZDictEditViewBase
*/
*/
private
parseViewParam
():
void
{
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-grid-view/ibzdict-grid-view-base.vue
浏览文件 @
3f82079a
...
@@ -261,6 +261,7 @@ export default class IBZDictGridViewBase extends Vue {
...
@@ -261,6 +261,7 @@ export default class IBZDictGridViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
...
@@ -411,6 +412,7 @@ export default class IBZDictGridViewBase extends Vue {
...
@@ -411,6 +412,7 @@ export default class IBZDictGridViewBase extends Vue {
* @memberof IBZDictGridViewBase
* @memberof IBZDictGridViewBase
*/
*/
private
parseViewParam
():
void
{
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-item-edit-view/ibzdict-item-edit-view-base.vue
浏览文件 @
3f82079a
...
@@ -239,6 +239,7 @@ export default class IBZDictItemEditViewBase extends Vue {
...
@@ -239,6 +239,7 @@ export default class IBZDictItemEditViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
...
@@ -385,6 +386,7 @@ export default class IBZDictItemEditViewBase extends Vue {
...
@@ -385,6 +386,7 @@ export default class IBZDictItemEditViewBase extends Vue {
* @memberof IBZDictItemEditViewBase
* @memberof IBZDictItemEditViewBase
*/
*/
private
parseViewParam
():
void
{
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/pages/dict/ibzdict-item-grid-view/ibzdict-item-grid-view-base.vue
浏览文件 @
3f82079a
...
@@ -261,6 +261,7 @@ export default class IBZDictItemGridViewBase extends Vue {
...
@@ -261,6 +261,7 @@ export default class IBZDictItemGridViewBase extends Vue {
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
@
Watch
(
'viewparam'
,{
immediate
:
true
,
deep
:
true
})
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
onParamData
(
newVal
:
any
,
oldVal
:
any
)
{
if
(
newVal
){
if
(
newVal
){
this
.
viewparams
=
{};
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
Object
.
assign
(
this
.
viewparams
,
JSON
.
parse
(
this
.
viewparam
));
}
}
...
@@ -411,6 +412,7 @@ export default class IBZDictItemGridViewBase extends Vue {
...
@@ -411,6 +412,7 @@ export default class IBZDictItemGridViewBase extends Vue {
* @memberof IBZDictItemGridViewBase
* @memberof IBZDictItemGridViewBase
*/
*/
private
parseViewParam
():
void
{
private
parseViewParam
():
void
{
this
.
context
=
{};
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
if
(
!
this
.
viewDefaultUsage
&&
this
.
viewdata
&&
!
Object
.
is
(
this
.
viewdata
,
''
))
{
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
Object
.
assign
(
this
.
context
,
JSON
.
parse
(
this
.
viewdata
));
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
if
(
this
.
context
&&
this
.
context
.
srfparentdename
){
...
...
app_web/src/widgets/control-service.ts
浏览文件 @
3f82079a
...
@@ -172,19 +172,7 @@ export default class ControlService {
...
@@ -172,19 +172,7 @@ export default class ControlService {
// }
// }
item
[
dataitem
.
name
]
=
val
;
item
[
dataitem
.
name
]
=
val
;
});
});
if
(
isCreate
)
{
item
.
srfuf
=
data
.
srfuf
?
data
.
srfuf
:
(
isCreate
?
"0"
:
"1"
);
if
(
!
item
.
srfuf
){
Object
.
assign
(
item
,
{
srfuf
:
'0'
});
}
}
else
{
if
(
!
item
.
srfuf
){
Object
.
assign
(
item
,
{
srfuf
:
'1'
});
}
}
return
item
;
return
item
;
}
}
...
...
app_web/src/widgets/ibzdict/main-grid/main-grid-base.vue
浏览文件 @
3f82079a
...
@@ -646,7 +646,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -646,7 +646,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
let
dataInfo
=
''
;
let
dataInfo
=
''
;
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
srfmajortext
;
let
srfmajortext
=
record
.
dictname
;
if
(
index
<
5
)
{
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
dataInfo
+=
'、'
;
...
...
app_web/src/widgets/ibzdict/main-grid/main-grid-service.ts
浏览文件 @
3f82079a
...
@@ -251,8 +251,6 @@ export default class MainService extends ControlService {
...
@@ -251,8 +251,6 @@ export default class MainService extends ControlService {
@
Errorlog
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
//仿真主键数据
data
.
dictid
=
Util
.
createUUID
();
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
@@ -265,8 +263,10 @@ export default class MainService extends ControlService {
...
@@ -265,8 +263,10 @@ export default class MainService extends ControlService {
//处理返回数据,补充判断标识
//处理返回数据,补充判断标识
if
(
response
.
data
){
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
ibzdict
=
Util
.
createUUID
();
}
}
this
.
handleResponse
(
action
,
response
);
this
.
handleResponse
(
action
,
response
,
true
);
this
.
mergeDefaults
(
response
);
this
.
mergeDefaults
(
response
);
resolve
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
...
...
app_web/src/widgets/ibzdictitem/main-grid/main-grid-base.vue
浏览文件 @
3f82079a
...
@@ -716,7 +716,7 @@ export default class MainBase extends Vue implements ControlInterface {
...
@@ -716,7 +716,7 @@ export default class MainBase extends Vue implements ControlInterface {
}
}
let
dataInfo
=
''
;
let
dataInfo
=
''
;
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
_datas
.
forEach
((
record
:
any
,
index
:
number
)
=>
{
let
srfmajortext
=
record
.
srfmajortext
;
let
srfmajortext
=
record
.
itemname
;
if
(
index
<
5
)
{
if
(
index
<
5
)
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
if
(
!
Object
.
is
(
dataInfo
,
''
))
{
dataInfo
+=
'、'
;
dataInfo
+=
'、'
;
...
...
app_web/src/widgets/ibzdictitem/main-grid/main-grid-service.ts
浏览文件 @
3f82079a
...
@@ -251,8 +251,6 @@ export default class MainService extends ControlService {
...
@@ -251,8 +251,6 @@ export default class MainService extends ControlService {
@
Errorlog
@
Errorlog
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
public
loadDraft
(
action
:
string
,
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
const
{
data
:
Data
,
context
:
Context
}
=
this
.
handleRequestData
(
action
,
context
,
data
,
true
);
//仿真主键数据
data
.
itemid
=
Util
.
createUUID
();
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
return
new
Promise
((
resolve
:
any
,
reject
:
any
)
=>
{
let
result
:
Promise
<
any
>
;
let
result
:
Promise
<
any
>
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
const
_appEntityService
:
any
=
this
.
appEntityService
;
...
@@ -265,8 +263,10 @@ export default class MainService extends ControlService {
...
@@ -265,8 +263,10 @@ export default class MainService extends ControlService {
//处理返回数据,补充判断标识
//处理返回数据,补充判断标识
if
(
response
.
data
){
if
(
response
.
data
){
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
Object
.
assign
(
response
.
data
,{
srfuf
:
'0'
});
//仿真主键数据
response
.
data
.
ibzdictitem
=
Util
.
createUUID
();
}
}
this
.
handleResponse
(
action
,
response
);
this
.
handleResponse
(
action
,
response
,
true
);
this
.
mergeDefaults
(
response
);
this
.
mergeDefaults
(
response
);
resolve
(
response
);
resolve
(
response
);
}).
catch
(
response
=>
{
}).
catch
(
response
=>
{
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/IBZDictItemServiceImpl.java
浏览文件 @
3f82079a
...
@@ -91,9 +91,8 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
...
@@ -91,9 +91,8 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
boolean
ret
=
removeById
(
key
);
if
(!
removeById
(
key
))
return
false
;
if
(!
ret
)
return
ret
;
return
true
;
return
ret
;
}
}
@Override
@Override
...
@@ -104,10 +103,10 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
...
@@ -104,10 +103,10 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
IBZDictItem
et
)
{
public
boolean
create
(
IBZDictItem
et
)
{
boolean
ret
=
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
));
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
ret
)
return
ret
;
return
false
;
CachedBeanCopier
.
copy
(
get
(
et
.
getItemid
()),
et
);
CachedBeanCopier
.
copy
(
get
(
et
.
getItemid
()),
et
);
return
ret
;
return
true
;
}
}
@Override
@Override
...
@@ -118,13 +117,10 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
...
@@ -118,13 +117,10 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
IBZDictItem
et
)
{
public
boolean
update
(
IBZDictItem
et
)
{
boolean
ret
=
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictitemid"
,
et
.
getItemid
()));
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictitemid"
,
et
.
getItemid
())))
if
(!
ret
)
return
ret
;
return
false
;
IBZDictItem
newet
=
get
(
et
.
getItemid
());
CachedBeanCopier
.
copy
(
get
(
et
.
getItemid
()),
et
);
return
true
;
CachedBeanCopier
.
copy
(
newet
,
et
);
return
ret
;
}
}
@Override
@Override
...
@@ -133,13 +129,44 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
...
@@ -133,13 +129,44 @@ public class IBZDictItemServiceImpl extends ServiceImpl<IBZDictItemMapper, IBZDi
}
}
List
<
IBZDictItem
>
selectByDictid
(
String
dictid
)
{
@Override
public
List
<
IBZDictItem
>
selectByDictid
(
String
dictid
)
{
return
baseMapper
.
selectByDictid
(
dictid
);
return
baseMapper
.
selectByDictid
(
dictid
);
}
}
void
saveByDictid
(
String
dictid
,
List
<
IBZDictItem
>)
;
@Override
public
void
saveByDictid
(
String
dictid
,
List
<
IBZDictItem
>
list
)
{
if
(
list
==
null
)
return
;
Set
<
String
>
delIds
=
new
HashSet
<
String
>();
List
<
IBZDictItem
>
_update
=
new
ArrayList
<
IBZDictItem
>();
List
<
IBZDictItem
>
_create
=
new
ArrayList
<
IBZDictItem
>();
for
(
IBZDictItem
before:
selectByDictid
(
dictid
)){
delIds
.
add
(
before
.
getItemid
());
}
for
(
IBZDictItem
sub:
list
)
{
sub
.
setDictid
(
dictid
);
if
(
ObjectUtils
.
isEmpty
(
sub
.
getItemid
()))
sub
.
setItemid
((
String
)
sub
.
getDefaultKey
(
true
));
if
(
delIds
.
contains
(
sub
.
getItemid
()))
{
delIds
.
remove
(
sub
.
getItemid
());
_update
.
add
(
sub
);
}
else
_create
.
add
(
sub
);
}
if
(
_update
.
size
()>
0
)
this
.
updateBatch
(
_update
,
500
);
if
(
_create
.
size
()>
0
)
this
.
createBatch
(
_create
,
500
);
if
(
delIds
.
size
()>
0
)
this
.
removeBatch
(
delIds
,
500
);
}
void
removeByDictid
(
String
dictid
)
;
@Override
public
void
removeByDictid
(
String
dictid
)
{
this
.
remove
(
new
QueryWrapper
<
IBZDictItem
>().
eq
(
"ibzdictid"
,
dictid
));
}
/**
/**
...
...
ibzdict-core/src/main/java/cn/ibizlab/core/dict/service/impl/IBZDictServiceImpl.java
浏览文件 @
3f82079a
...
@@ -60,18 +60,10 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
...
@@ -60,18 +60,10 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
create
(
IBZDict
et
)
{
public
boolean
create
(
IBZDict
et
)
{
boolean
ret
=
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
));
if
(!
this
.
retBool
(
this
.
baseMapper
.
insert
(
et
)))
if
(!
ret
)
return
ret
;
return
false
;
//嵌套[字典项目]
if
(!
ObjectUtils
.
isEmpty
(
et
.
getItems
())){
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
sub
.
setDictid
(
et
.
getDictid
());
}
ibzdictitemService
.
createBatch
(
et
.
getItems
(),
500
)
;
}
CachedBeanCopier
.
copy
(
get
(
et
.
getDictid
()),
et
);
CachedBeanCopier
.
copy
(
get
(
et
.
getDictid
()),
et
);
return
ret
;
return
true
;
}
}
@Override
@Override
...
@@ -92,34 +84,10 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
...
@@ -92,34 +84,10 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
update
(
IBZDict
et
)
{
public
boolean
update
(
IBZDict
et
)
{
boolean
ret
=
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictid"
,
et
.
getDictid
()));
if
(!
update
(
et
,(
Wrapper
)
et
.
getUpdateWrapper
(
true
).
eq
(
"ibzdictid"
,
et
.
getDictid
())))
if
(!
ret
)
return
ret
;
return
false
;
//嵌套[字典项目]
CachedBeanCopier
.
copy
(
get
(
et
.
getDictid
()),
et
);
Set
_items
=
new
HashSet
();
return
true
;
if
(!
ObjectUtils
.
isEmpty
(
et
.
getItems
())){
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
sub
.
setDictid
(
et
.
getDictid
());
if
(
ObjectUtils
.
isEmpty
(
sub
.
getItemid
()))
sub
.
setItemid
((
String
)
sub
.
getDefaultKey
(
true
));
_items
.
add
(
sub
.
getItemid
());
}
ibzdictitemService
.
saveBatch
(
et
.
getItems
(),
500
)
;
}
IBZDict
newet
=
get
(
et
.
getDictid
());
//删除多余的嵌套[字典项目]
if
(
_items
.
size
()>
0
&&(!
ObjectUtils
.
isEmpty
(
et
.
getItems
()))){
List
<
String
>
ids
=
new
ArrayList
<
String
>();
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
if
(!
_items
.
contains
(
sub
.
getItemid
()))
ids
.
add
(
sub
.
getItemid
());
}
if
(
ids
.
size
()>
0
)
ibzdictitemService
.
removeBatch
(
ids
,
500
)
;
}
CachedBeanCopier
.
copy
(
newet
,
et
);
return
ret
;
}
}
@Override
@Override
...
@@ -130,18 +98,9 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
...
@@ -130,18 +98,9 @@ public class IBZDictServiceImpl extends ServiceImpl<IBZDictMapper, IBZDict> impl
@Override
@Override
@Transactional
@Transactional
public
boolean
remove
(
String
key
)
{
public
boolean
remove
(
String
key
)
{
IBZDict
et
=
get
(
key
);
ibzdictitemService
.
ByDictid
(
key
)
;
//嵌套[字典项目]
if
(!
removeById
(
key
))
return
false
;
if
(!
ObjectUtils
.
isEmpty
(
et
.
getItems
())){
return
true
;
List
<
String
>
ids
=
new
ArrayList
<
String
>();
for
(
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
sub:
et
.
getItems
())
{
ids
.
add
(
sub
.
getItemid
());
}
ibzdictitemService
.
removeBatch
(
ids
,
500
)
;
}
boolean
ret
=
removeById
(
key
);
if
(!
ret
)
return
ret
;
return
ret
;
}
}
@Override
@Override
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录