Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzdict
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzdict
提交
511345b2
提交
511345b2
编写于
4月 25, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
b63e0188
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
16 行增加
和
55 行删除
+16
-55
IBZDict.java
...re/src/main/java/cn/ibizlab/core/dict/domain/IBZDict.java
+1
-1
h2_table.xml
ibzdict-core/src/main/resources/liquibase/h2_table.xml
+2
-2
IBZDictMapper.xml
.../src/main/resources/mapper/dict/ibzdict/IBZDictMapper.xml
+4
-43
DTOBase.java
...ct-util/src/main/java/cn/ibizlab/util/domain/DTOBase.java
+7
-7
EntityBase.java
...util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
+2
-2
未找到文件。
ibzdict-core/src/main/java/cn/ibizlab/core/dict/domain/IBZDict.java
浏览文件 @
511345b2
...
...
@@ -105,7 +105,7 @@ public class IBZDict extends EntityMP implements Serializable {
*/
public
void
setItems
(
List
<
cn
.
ibizlab
.
core
.
dict
.
domain
.
IBZDictItem
>
items
){
this
.
items
=
items
;
this
.
modify
(
"
items
"
,(
items
!=
null
)?
items:
(
new
ArrayList
()));
this
.
modify
(
"
cfg
"
,(
items
!=
null
)?
items:
(
new
ArrayList
()));
}
/**
...
...
ibzdict-core/src/main/resources/liquibase/h2_table.xml
浏览文件 @
511345b2
...
...
@@ -24,7 +24,7 @@
</createTable>
</changeSet>
<!--输出实体[IBZDICTITEM]数据结构 -->
<changeSet
author=
"a_A_5ae9eb39a"
id=
"tab-ibzdictitem-7
0
-2"
>
<changeSet
author=
"a_A_5ae9eb39a"
id=
"tab-ibzdictitem-7
1
-2"
>
<createTable
tableName=
"IBZDICTITEM"
>
<column
name=
"IBZDICTITEMID"
remarks=
""
type=
"VARCHAR(100)"
>
<constraints
primaryKey=
"true"
primaryKeyName=
"PK_IBZDICTITEM_IBZDICTITEMID"
/>
...
...
@@ -58,7 +58,7 @@
<!--输出实体[IBZDICT]外键关系 -->
<!--输出实体[IBZDICTITEM]外键关系 -->
<changeSet
author=
"a_A_5ae9eb39a"
id=
"fk-ibzdictitem-7
0
-3"
>
<changeSet
author=
"a_A_5ae9eb39a"
id=
"fk-ibzdictitem-7
1
-3"
>
<addForeignKeyConstraint
baseColumnNames=
"DICTID"
baseTableName=
"IBZDICTITEM"
constraintName=
"DER1N_IBZDICTITEM_IBZDICT_DICT"
deferrable=
"false"
initiallyDeferred=
"false"
onDelete=
"RESTRICT"
onUpdate=
"RESTRICT"
referencedColumnNames=
"IBZDICTID"
referencedTableName=
"IBZDICT"
validate=
"true"
/>
</changeSet>
...
...
ibzdict-core/src/main/resources/mapper/dict/ibzdict/IBZDictMapper.xml
浏览文件 @
511345b2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"cn.ibizlab.core.dict.mapper.IBZDictMapper"
>
<!--该方法用于重写mybatis中selectById方法,以实现查询逻辑属性-->
<select
id=
"selectById"
resultMap=
"IBZDictResultMap"
databaseId=
"mysql"
>
<![CDATA[select t1.* from (SELECT t1.`CFG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1 ) t1 where ibzdictid=#{id}]]>
</select>
<!--通过mybatis将查询结果注入到entity中,通过配置autoMapping="true"由mybatis自动处理映射关系 -->
<resultMap
id=
"IBZDictResultMap"
type=
"cn.ibizlab.core.dict.domain.IBZDict"
autoMapping=
"true"
>
<id
property=
"dictid"
column=
"ibzdictid"
/>
<!--主键字段映射-->
<result
property=
"dictname"
column=
"ibzdictname"
/>
</resultMap>
<!--数据集合[Default]-->
<select
id=
"searchDefault"
parameterType=
"cn.ibizlab.core.dict.filter.IBZDictSearchContext"
resultMap=
"IBZDictResultMap"
>
select t1.* from (
<include
refid=
"Default"
/>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
<if
test=
"ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere"
>
${ew.sqlSegment}
</if>
</select>
<!--数据查询[Default]-->
<sql
id=
"Default"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1
WHERE t1.ENABLE = 1
]]>
</sql>
<!--数据查询[View]-->
<sql
id=
"View"
databaseId=
"mysql"
>
<![CDATA[ SELECT t1.`CFG`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`ENABLE`, t1.`IBZDICTID`, t1.`IBZDICTNAME`, t1.`UPDATEDATE`, t1.`UPDATEMAN` FROM `IBZDICT` t1
WHERE t1.ENABLE = 1
]]>
</sql>
</mapper>
!!!!模版产生代码错误:----
FTL stack trace ("~" means nesting-related):
- Failed at: #if defield.isKeyDEField() != true
&&
... [in template "CODETEMPL_zh_CN" at line 49, column 13]
----
\ No newline at end of file
ibzdict-util/src/main/java/cn/ibizlab/util/domain/DTOBase.java
浏览文件 @
511345b2
...
...
@@ -34,23 +34,23 @@ public class DTOBase implements Serializable {
}
@JsonIgnore
private
Map
<
String
,
Object
>
extensions
=
new
HashMap
<
String
,
Object
>();
private
Map
<
String
,
Object
>
extension
param
s
=
new
HashMap
<
String
,
Object
>();
public
Map
<
String
,
Object
>
getExtensions
()
{
return
extensions
;
public
Map
<
String
,
Object
>
getExtension
param
s
()
{
return
extension
param
s
;
}
public
void
setExtension
s
(
Map
<
String
,
Object
>
extension
s
)
{
this
.
extension
s
=
extension
s
;
public
void
setExtension
params
(
Map
<
String
,
Object
>
extensionparam
s
)
{
this
.
extension
params
=
extensionparam
s
;
}
@JsonAnyGetter
public
Map
<
String
,
Object
>
any
()
{
return
extensions
;
return
extension
param
s
;
}
@JsonAnySetter
public
void
set
(
String
name
,
Object
value
)
{
extensions
.
put
(
name
.
toLowerCase
(),
value
);
extension
param
s
.
put
(
name
.
toLowerCase
(),
value
);
}
}
ibzdict-util/src/main/java/cn/ibizlab/util/domain/EntityBase.java
浏览文件 @
511345b2
...
...
@@ -64,8 +64,8 @@ public class EntityBase implements Serializable {
return
extensionparams
;
}
public
void
setExtensionparams
(
Map
<
String
,
Object
>
extensions
)
{
this
.
extensionparams
=
extensions
;
public
void
setExtensionparams
(
Map
<
String
,
Object
>
extension
param
s
)
{
this
.
extensionparams
=
extension
param
s
;
}
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录