Commit 435db14c by wangming

banner

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