Commit 435db14c by wangming

banner

1 parent d28acf33
......@@ -19,9 +19,9 @@ public class TKzyInformation extends BaseModel {
private Date updateDt;
private byte[] content;
private String content;
public TKzyInformation(Long id, String title, String author, String picUrl, String iconUrl, Integer isDelete, Date createDt, Date updateDt, byte[] content) {
public TKzyInformation(Long id, String title, String author, String picUrl, String iconUrl, Integer isDelete, Date createDt, Date updateDt, String content) {
this.id = id;
this.title = title;
this.author = author;
......@@ -101,11 +101,11 @@ public class TKzyInformation extends BaseModel {
this.updateDt = updateDt;
}
public byte[] getContent() {
public String getContent() {
return content;
}
public void setContent(byte[] content) {
this.content = content;
public void setContent(String content) {
this.content = content == null ? null : content.trim();
}
}
\ No newline at end of file
......@@ -110,7 +110,7 @@ public class InformationController extends BaseController {
information.setTitle(title);
information.setPicUrl(picUrl);
information.setAuthor(author);
information.setContent(content.getBytes());
information.setContent(content);
information.setIconUrl(iconUrl);
if(id != -1){ //修改
information.setId(id);
......
......@@ -86,7 +86,7 @@
<!--<table tableName="t_kzy_information" schema="kzy_db_test">-->
<!--<generatedKey column="ID" sqlStatement="JDBC" identity="true"/>-->
<!--</table>-->
<table tableName="t_kzy_relation_class" schema="kzy_db_test">
<table tableName="t_kzy_information" schema="kzy_db_test">
<generatedKey column="ID" sqlStatement="JDBC" identity="true"/>
</table>
<!--<table tableName="t_kzy_user" schema="kzy_db_test">-->
......
......@@ -23,7 +23,7 @@
<arg column="is_delete" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="create_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="content" javaType="java.lang.String" jdbcType="LONGVARCHAR" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
......@@ -144,7 +144,7 @@
update_dt, content)
values (#{title,jdbcType=VARCHAR}, #{author,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR},
#{iconUrl,jdbcType=VARCHAR}, #{isDelete,jdbcType=INTEGER}, #{createDt,jdbcType=TIMESTAMP},
#{updateDt,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARBINARY})
#{updateDt,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVARCHAR})
</insert>
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.server.web.common.model.TKzyInformation" useGeneratedKeys="true">
insert into t_kzy_information
......@@ -197,7 +197,7 @@
#{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARBINARY},
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
......@@ -235,7 +235,7 @@
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARBINARY},
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -252,7 +252,7 @@
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
content = #{record.content,jdbcType=LONGVARBINARY}
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -296,7 +296,7 @@
update_dt = #{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARBINARY},
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
......@@ -310,7 +310,7 @@
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP},
content = #{content,jdbcType=LONGVARBINARY}
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyInformation">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!