Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
wangming
/
kzy-oss
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 435db14c
authored
Mar 16, 2020
by
wangming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
banner
1 parent
d28acf33
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
14 deletions
src/main/java/com/server/web/common/model/TKzyInformation.java
src/main/java/com/server/web/controller/InformationController.java
src/main/resources/generatorConfig.xml
src/main/resources/mybatis/mapper/TKzyInformationMapper.xml
src/main/java/com/server/web/common/model/TKzyInformation.java
View file @
435db14
...
@@ -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
src/main/java/com/server/web/controller/InformationController.java
View file @
435db14
...
@@ -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
);
...
...
src/main/resources/generatorConfig.xml
View file @
435db14
...
@@ -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">-->
...
...
src/main/resources/mybatis/mapper/TKzyInformationMapper.xml
View file @
435db14
...
@@ -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=LONGVAR
BINARY
})
#{updateDt,jdbcType=TIMESTAMP}, #{content,jdbcType=LONGVAR
CHAR
})
</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=LONGVAR
BINARY
},
#{content,jdbcType=LONGVAR
CHAR
},
</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=LONGVAR
BINARY
},
content = #{record.content,jdbcType=LONGVAR
CHAR
},
</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=LONGVAR
BINARY
}
content = #{record.content,jdbcType=LONGVAR
CHAR
}
<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=LONGVAR
BINARY
},
content = #{content,jdbcType=LONGVAR
CHAR
},
</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=LONGVAR
BINARY
}
content = #{content,jdbcType=LONGVAR
CHAR
}
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"
>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment