Commit 7b062b38 by 魏文甫

Merge branch 'wei_master' into '105'

Wei master

See merge request !43
2 parents dd68727c 78da7b97
...@@ -19,9 +19,11 @@ public class TKzyInformation extends BaseModel { ...@@ -19,9 +19,11 @@ public class TKzyInformation extends BaseModel {
private Date updateDt; private Date updateDt;
private byte[] content; private Integer isFile;
public TKzyInformation(Long id, String title, String author, String picUrl, String iconUrl, Integer isDelete, Date createDt, Date updateDt, byte[] content) { private String content;
public TKzyInformation(Long id, String title, String author, String picUrl, String iconUrl, Integer isDelete, Date createDt, Date updateDt, Integer isFile, String content) {
this.id = id; this.id = id;
this.title = title; this.title = title;
this.author = author; this.author = author;
...@@ -30,6 +32,7 @@ public class TKzyInformation extends BaseModel { ...@@ -30,6 +32,7 @@ public class TKzyInformation extends BaseModel {
this.isDelete = isDelete; this.isDelete = isDelete;
this.createDt = createDt; this.createDt = createDt;
this.updateDt = updateDt; this.updateDt = updateDt;
this.isFile = isFile;
this.content = content; this.content = content;
} }
...@@ -101,11 +104,19 @@ public class TKzyInformation extends BaseModel { ...@@ -101,11 +104,19 @@ public class TKzyInformation extends BaseModel {
this.updateDt = updateDt; this.updateDt = updateDt;
} }
public byte[] getContent() { public Integer getIsFile() {
return isFile;
}
public void setIsFile(Integer isFile) {
this.isFile = isFile;
}
public String getContent() {
return content; return content;
} }
public void setContent(byte[] content) { public void setContent(String content) {
this.content = content; this.content = content == null ? null : content.trim();
} }
} }
\ No newline at end of file
...@@ -624,6 +624,66 @@ public class TKzyInformationExample { ...@@ -624,6 +624,66 @@ public class TKzyInformationExample {
addCriterion("update_dt not between", value1, value2, "updateDt"); addCriterion("update_dt not between", value1, value2, "updateDt");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andIsFileIsNull() {
addCriterion("is_file is null");
return (Criteria) this;
}
public Criteria andIsFileIsNotNull() {
addCriterion("is_file is not null");
return (Criteria) this;
}
public Criteria andIsFileEqualTo(Integer value) {
addCriterion("is_file =", value, "isFile");
return (Criteria) this;
}
public Criteria andIsFileNotEqualTo(Integer value) {
addCriterion("is_file <>", value, "isFile");
return (Criteria) this;
}
public Criteria andIsFileGreaterThan(Integer value) {
addCriterion("is_file >", value, "isFile");
return (Criteria) this;
}
public Criteria andIsFileGreaterThanOrEqualTo(Integer value) {
addCriterion("is_file >=", value, "isFile");
return (Criteria) this;
}
public Criteria andIsFileLessThan(Integer value) {
addCriterion("is_file <", value, "isFile");
return (Criteria) this;
}
public Criteria andIsFileLessThanOrEqualTo(Integer value) {
addCriterion("is_file <=", value, "isFile");
return (Criteria) this;
}
public Criteria andIsFileIn(List<Integer> values) {
addCriterion("is_file in", values, "isFile");
return (Criteria) this;
}
public Criteria andIsFileNotIn(List<Integer> values) {
addCriterion("is_file not in", values, "isFile");
return (Criteria) this;
}
public Criteria andIsFileBetween(Integer value1, Integer value2) {
addCriterion("is_file between", value1, value2, "isFile");
return (Criteria) this;
}
public Criteria andIsFileNotBetween(Integer value1, Integer value2) {
addCriterion("is_file not between", value1, value2, "isFile");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
......
...@@ -83,18 +83,19 @@ public class InformationServiceImpl implements InformationService { ...@@ -83,18 +83,19 @@ public class InformationServiceImpl implements InformationService {
if (tKzyInformation == null) { if (tKzyInformation == null) {
return returnMap("0", "未查到该数据信息!", null); return returnMap("0", "未查到该数据信息!", null);
} }
tKzyInformation.getContent(); // tKzyInformation.getContent();
Map<String, Object> dataMap = new HashMap<String, Object>(); // Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", tKzyInformation.getId()); // dataMap.put("id", tKzyInformation.getId());
dataMap.put("title", tKzyInformation.getTitle()); // dataMap.put("title", tKzyInformation.getTitle());
dataMap.put("author", tKzyInformation.getAuthor()); // dataMap.put("author", tKzyInformation.getAuthor());
dataMap.put("picUrl", tKzyInformation.getPicUrl()); // dataMap.put("picUrl", tKzyInformation.getPicUrl());
dataMap.put("iconUrl", tKzyInformation.getIconUrl()); // dataMap.put("iconUrl", tKzyInformation.getIconUrl());
dataMap.put("isDelete", tKzyInformation.getIsDelete()); // dataMap.put("isDelete", tKzyInformation.getIsDelete());
dataMap.put("createDt", tKzyInformation.getCreateDt()); // dataMap.put("createDt", tKzyInformation.getCreateDt());
dataMap.put("updateDt", tKzyInformation.getUpdateDt()); // dataMap.put("updateDt", tKzyInformation.getUpdateDt());
dataMap.put("content", new String(tKzyInformation.getContent())); // dataMap.put("content", new String(tKzyInformation.getContent()));
return returnMap("1", "", dataMap); // dataMap.put("isFile", tKzyInformation.getIsFile());
return returnMap("1", "", tKzyInformation);
} }
@Override @Override
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<property name="exampleMethodVisibility" value="public"/> <property name="exampleMethodVisibility" value="public"/>
</javaClientGenerator> </javaClientGenerator>
<table tableName="t_base_banner" schema="sc"><generatedKey column="ID" sqlStatement="MySql" identity="true"/></table> <table tableName="t_kzy_information" schema="sc"><generatedKey column="ID" sqlStatement="MySql" identity="true"/></table>
</context> </context>
</generatorConfiguration> </generatorConfiguration>
\ No newline at end of file
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" /> <arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" /> <arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" /> <arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="is_file" javaType="java.lang.Integer" jdbcType="INTEGER" />
</constructor> </constructor>
</resultMap> </resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.server.web.common.model.TKzyInformation"> <resultMap id="ResultMapWithBLOBs" type="com.server.web.common.model.TKzyInformation">
...@@ -23,7 +24,8 @@ ...@@ -23,7 +24,8 @@
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" /> <arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" /> <arg column="create_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" /> <arg column="update_dt" javaType="java.util.Date" jdbcType="TIMESTAMP" />
<arg column="content" javaType="_byte[]" jdbcType="LONGVARBINARY" /> <arg column="is_file" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="content" javaType="java.lang.String" jdbcType="LONGVARCHAR" />
</constructor> </constructor>
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
...@@ -85,7 +87,7 @@ ...@@ -85,7 +87,7 @@
</where> </where>
</sql> </sql>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, title, author, pic_url, icon_url, is_delete, create_dt, update_dt id, title, author, pic_url, icon_url, is_delete, create_dt, update_dt, is_file
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
content content
...@@ -144,10 +146,12 @@ ...@@ -144,10 +146,12 @@
</selectKey> </selectKey>
insert into t_kzy_information (title, author, pic_url, insert into t_kzy_information (title, author, pic_url,
icon_url, is_delete, create_dt, icon_url, is_delete, create_dt,
update_dt, content) update_dt, is_file, content
)
values (#{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, values (#{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
#{iconUrl,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP}, #{iconUrl,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP},
#{updateDt,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARBINARY}) #{updateDt,jdbcType=TIMESTAMP}, #{isFile,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
</insert> </insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyInformation"> <insert id="insertSelective" parameterType="com.server.web.common.model.TKzyInformation">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
...@@ -176,6 +180,9 @@ ...@@ -176,6 +180,9 @@
<if test="updateDt != null"> <if test="updateDt != null">
update_dt, update_dt,
</if> </if>
<if test="isFile != null">
is_file,
</if>
<if test="content != null"> <if test="content != null">
content, content,
</if> </if>
...@@ -202,8 +209,11 @@ ...@@ -202,8 +209,11 @@
<if test="updateDt != null"> <if test="updateDt != null">
#{updateDt,jdbcType=TIMESTAMP}, #{updateDt,jdbcType=TIMESTAMP},
</if> </if>
<if test="isFile != null">
#{isFile,jdbcType=INTEGER},
</if>
<if test="content != null"> <if test="content != null">
#{content,jdbcType=LONGVARBINARY}, #{content,jdbcType=LONGVARCHAR},
</if> </if>
</trim> </trim>
</insert> </insert>
...@@ -240,8 +250,11 @@ ...@@ -240,8 +250,11 @@
<if test="record.updateDt != null"> <if test="record.updateDt != null">
update_dt = #{record.updateDt,jdbcType=TIMESTAMP}, update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
</if> </if>
<if test="record.isFile != null">
is_file = #{record.isFile,jdbcType=INTEGER},
</if>
<if test="record.content != null"> <if test="record.content != null">
content = #{record.content,jdbcType=LONGVARBINARY}, content = #{record.content,jdbcType=LONGVARCHAR},
</if> </if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -258,7 +271,8 @@ ...@@ -258,7 +271,8 @@
is_delete = #{record.isDelete,jdbcType=INTEGER}, is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}, create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP}, update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
content = #{record.content,jdbcType=LONGVARBINARY} is_file = #{record.isFile,jdbcType=INTEGER},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -272,7 +286,8 @@ ...@@ -272,7 +286,8 @@
icon_url = #{record.iconUrl,jdbcType=VARCHAR}, icon_url = #{record.iconUrl,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER}, is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP}, create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP} update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
is_file = #{record.isFile,jdbcType=INTEGER}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -301,8 +316,11 @@ ...@@ -301,8 +316,11 @@
<if test="updateDt != null"> <if test="updateDt != null">
update_dt = #{updateDt,jdbcType=TIMESTAMP}, update_dt = #{updateDt,jdbcType=TIMESTAMP},
</if> </if>
<if test="isFile != null">
is_file = #{isFile,jdbcType=INTEGER},
</if>
<if test="content != null"> <if test="content != null">
content = #{content,jdbcType=LONGVARBINARY}, content = #{content,jdbcType=LONGVARCHAR},
</if> </if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
...@@ -316,7 +334,8 @@ ...@@ -316,7 +334,8 @@
is_delete = #{isDelete,jdbcType=INTEGER}, is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP}, create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP}, update_dt = #{updateDt,jdbcType=TIMESTAMP},
content = #{content,jdbcType=LONGVARBINARY} is_file = #{isFile,jdbcType=INTEGER},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyInformation"> <update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyInformation">
...@@ -327,7 +346,8 @@ ...@@ -327,7 +346,8 @@
icon_url = #{iconUrl,jdbcType=VARCHAR}, icon_url = #{iconUrl,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER}, is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP}, create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP} update_dt = #{updateDt,jdbcType=TIMESTAMP},
is_file = #{isFile,jdbcType=INTEGER}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
SELECT SELECT
i.id, i.id,
i.title, i.title,
i.icon_url AS iconUrl i.icon_url AS iconUrl,
i.is_file AS isFile
FROM FROM
t_kzy_relation_class rc t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
...@@ -42,7 +43,8 @@ ...@@ -42,7 +43,8 @@
i.title, i.title,
i.icon_url AS iconUrl, i.icon_url AS iconUrl,
i.create_dt AS createDt, i.create_dt AS createDt,
1 AS classType 1 AS classType,
i.is_file AS isFile
FROM FROM
t_kzy_relation_class rc t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!