Commit 356d6b0f by wangming

Merge branch '105' into 'master'

105

See merge request !20
2 parents af354fc7 7b6c853d
......@@ -19,9 +19,11 @@ public class TKzyInformation extends BaseModel {
private Date updateDt;
private Integer isFile;
private String content;
public TKzyInformation(Long id, String title, String author, String picUrl, String iconUrl, Integer isDelete, Date createDt, Date updateDt, 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.title = title;
this.author = author;
......@@ -30,6 +32,7 @@ public class TKzyInformation extends BaseModel {
this.isDelete = isDelete;
this.createDt = createDt;
this.updateDt = updateDt;
this.isFile = isFile;
this.content = content;
}
......@@ -101,6 +104,14 @@ public class TKzyInformation extends BaseModel {
this.updateDt = updateDt;
}
public Integer getIsFile() {
return isFile;
}
public void setIsFile(Integer isFile) {
this.isFile = isFile;
}
public String getContent() {
return content;
}
......
......@@ -624,6 +624,66 @@ public class TKzyInformationExample {
addCriterion("update_dt not between", value1, value2, "updateDt");
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 {
......
......@@ -91,7 +91,7 @@ public class InformationController extends BaseController {
@ResponseBody
@RequestMapping(path = "/saveInformation", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map saveInformation(@RequestParam(defaultValue = "-1") long id,@RequestParam String title,@RequestParam String author,@RequestParam String content,
@RequestParam String picUrl,@RequestParam String iconUrl,@RequestParam(defaultValue = "") String classIds
@RequestParam String picUrl,@RequestParam String iconUrl,@RequestParam(defaultValue = "") String classIds,Integer isFile
) {
try {
String [] ids = classIds.split(",");
......@@ -111,6 +111,7 @@ public class InformationController extends BaseController {
information.setPicUrl(picUrl);
information.setAuthor(author);
information.setContent(content);
information.setIsFile(isFile);
information.setIconUrl(iconUrl);
if(id != -1){ //修改
information.setId(id);
......
......@@ -11,6 +11,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="is_file" javaType="java.lang.Integer" jdbcType="INTEGER" />
</constructor>
</resultMap>
<resultMap id="ResultMapWithBLOBs" type="com.server.web.common.model.TKzyInformation">
......@@ -23,6 +24,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="is_file" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="content" javaType="java.lang.String" jdbcType="LONGVARCHAR" />
</constructor>
</resultMap>
......@@ -85,7 +87,7 @@
</where>
</sql>
<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 id="Blob_Column_List">
content
......@@ -141,10 +143,12 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.server.web.common.model.TKzyInformation" useGeneratedKeys="true">
insert into t_kzy_information (title, author, pic_url,
icon_url, is_delete, create_dt,
update_dt, content)
update_dt, is_file, 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=LONGVARCHAR})
#{updateDt,jdbcType=TIMESTAMP}, #{isFile,jdbcType=INTEGER}, #{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
......@@ -170,6 +174,9 @@
<if test="updateDt != null">
update_dt,
</if>
<if test="isFile != null">
is_file,
</if>
<if test="content != null">
content,
</if>
......@@ -196,6 +203,9 @@
<if test="updateDt != null">
#{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="isFile != null">
#{isFile,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARCHAR},
</if>
......@@ -234,6 +244,9 @@
<if test="record.updateDt != null">
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
</if>
<if test="record.isFile != null">
is_file = #{record.isFile,jdbcType=INTEGER},
</if>
<if test="record.content != null">
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
......@@ -252,6 +265,7 @@
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,jdbcType=TIMESTAMP},
update_dt = #{record.updateDt,jdbcType=TIMESTAMP},
is_file = #{record.isFile,jdbcType=INTEGER},
content = #{record.content,jdbcType=LONGVARCHAR}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
......@@ -266,7 +280,8 @@
icon_url = #{record.iconUrl,jdbcType=VARCHAR},
is_delete = #{record.isDelete,jdbcType=INTEGER},
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">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -295,6 +310,9 @@
<if test="updateDt != null">
update_dt = #{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="isFile != null">
is_file = #{isFile,jdbcType=INTEGER},
</if>
<if test="content != null">
content = #{content,jdbcType=LONGVARCHAR},
</if>
......@@ -310,6 +328,7 @@
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,jdbcType=TIMESTAMP},
update_dt = #{updateDt,jdbcType=TIMESTAMP},
is_file = #{isFile,jdbcType=INTEGER},
content = #{content,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
......@@ -321,7 +340,8 @@
icon_url = #{iconUrl,jdbcType=VARCHAR},
is_delete = #{isDelete,jdbcType=INTEGER},
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}
</update>
</mapper>
\ No newline at end of file
......@@ -216,7 +216,8 @@
c.author,
c.pic_url AS picUrl,
c.icon_url AS iconUrl,
date_format(c.create_dt,'%Y-%m-%d %H:%i:%S') createDt
date_format(c.create_dt,'%Y-%m-%d %H:%i:%S') createDt,
c.is_file AS isFile
FROM
t_kzy_information c
WHERE c.is_delete = 0
......@@ -233,7 +234,8 @@
c.author,
c.pic_url AS picUrl,
c.icon_url AS iconUrl,
c.content
c.content,
c.is_file AS isFile
FROM
t_kzy_information c
WHERE c.id = #{id,jdbcType=BIGINT}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!