提交 511345b2 编写于 作者: ibizdev's avatar ibizdev

ibizdev提交

上级 b63e0188
...@@ -105,7 +105,7 @@ public class IBZDict extends EntityMP implements Serializable { ...@@ -105,7 +105,7 @@ public class IBZDict extends EntityMP implements Serializable {
*/ */
public void setItems(List<cn.ibizlab.core.dict.domain.IBZDictItem> items){ public void setItems(List<cn.ibizlab.core.dict.domain.IBZDictItem> items){
this.items = items ; this.items = items ;
this.modify("items",(items!=null)?items:(new ArrayList())); this.modify("cfg",(items!=null)?items:(new ArrayList()));
} }
/** /**
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</createTable> </createTable>
</changeSet> </changeSet>
<!--输出实体[IBZDICTITEM]数据结构 --> <!--输出实体[IBZDICTITEM]数据结构 -->
<changeSet author="a_A_5ae9eb39a" id="tab-ibzdictitem-70-2"> <changeSet author="a_A_5ae9eb39a" id="tab-ibzdictitem-71-2">
<createTable tableName="IBZDICTITEM"> <createTable tableName="IBZDICTITEM">
<column name="IBZDICTITEMID" remarks="" type="VARCHAR(100)"> <column name="IBZDICTITEMID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_IBZDICTITEM_IBZDICTITEMID"/> <constraints primaryKey="true" primaryKeyName="PK_IBZDICTITEM_IBZDICTITEMID"/>
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
<!--输出实体[IBZDICT]外键关系 --> <!--输出实体[IBZDICT]外键关系 -->
<!--输出实体[IBZDICTITEM]外键关系 --> <!--输出实体[IBZDICTITEM]外键关系 -->
<changeSet author="a_A_5ae9eb39a" id="fk-ibzdictitem-70-3"> <changeSet author="a_A_5ae9eb39a" id="fk-ibzdictitem-71-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"/> <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> </changeSet>
......
<?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"> FTL stack trace ("~" means nesting-related):
- Failed at: #if defield.isKeyDEField() != true &&... [in template "CODETEMPL_zh_CN" at line 49, column 13]
<mapper namespace="cn.ibizlab.core.dict.mapper.IBZDictMapper"> ----
\ No newline at end of file
<!--该方法用于重写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>
...@@ -34,23 +34,23 @@ public class DTOBase implements Serializable { ...@@ -34,23 +34,23 @@ public class DTOBase implements Serializable {
} }
@JsonIgnore @JsonIgnore
private Map<String,Object> extensions=new HashMap<String,Object>(); private Map<String,Object> extensionparams=new HashMap<String,Object>();
public Map<String, Object> getExtensions() { public Map<String, Object> getExtensionparams() {
return extensions; return extensionparams;
} }
public void setExtensions(Map<String, Object> extensions) { public void setExtensionparams(Map<String, Object> extensionparams) {
this.extensions = extensions; this.extensionparams = extensionparams;
} }
@JsonAnyGetter @JsonAnyGetter
public Map<String , Object> any() { public Map<String , Object> any() {
return extensions; return extensionparams;
} }
@JsonAnySetter @JsonAnySetter
public void set(String name, Object value) { public void set(String name, Object value) {
extensions.put(name.toLowerCase(), value); extensionparams.put(name.toLowerCase(), value);
} }
} }
...@@ -64,8 +64,8 @@ public class EntityBase implements Serializable { ...@@ -64,8 +64,8 @@ public class EntityBase implements Serializable {
return extensionparams; return extensionparams;
} }
public void setExtensionparams(Map<String, Object> extensions) { public void setExtensionparams(Map<String, Object> extensionparams) {
this.extensionparams = extensions; this.extensionparams = extensionparams;
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册