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 {
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.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,11 +104,19 @@ public class TKzyInformation extends BaseModel {
this.updateDt = updateDt;
}
public byte[] getContent() {
public Integer getIsFile() {
return isFile;
}
public void setIsFile(Integer isFile) {
this.isFile = isFile;
}
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
......@@ -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 {
......
......@@ -83,18 +83,19 @@ public class InformationServiceImpl implements InformationService {
if (tKzyInformation == null) {
return returnMap("0", "未查到该数据信息!", null);
}
tKzyInformation.getContent();
Map<String, Object> dataMap = new HashMap<String, Object>();
dataMap.put("id", tKzyInformation.getId());
dataMap.put("title", tKzyInformation.getTitle());
dataMap.put("author", tKzyInformation.getAuthor());
dataMap.put("picUrl", tKzyInformation.getPicUrl());
dataMap.put("iconUrl", tKzyInformation.getIconUrl());
dataMap.put("isDelete", tKzyInformation.getIsDelete());
dataMap.put("createDt", tKzyInformation.getCreateDt());
dataMap.put("updateDt", tKzyInformation.getUpdateDt());
dataMap.put("content", new String(tKzyInformation.getContent()));
return returnMap("1", "", dataMap);
// tKzyInformation.getContent();
// Map<String, Object> dataMap = new HashMap<String, Object>();
// dataMap.put("id", tKzyInformation.getId());
// dataMap.put("title", tKzyInformation.getTitle());
// dataMap.put("author", tKzyInformation.getAuthor());
// dataMap.put("picUrl", tKzyInformation.getPicUrl());
// dataMap.put("iconUrl", tKzyInformation.getIconUrl());
// dataMap.put("isDelete", tKzyInformation.getIsDelete());
// dataMap.put("createDt", tKzyInformation.getCreateDt());
// dataMap.put("updateDt", tKzyInformation.getUpdateDt());
// dataMap.put("content", new String(tKzyInformation.getContent()));
// dataMap.put("isFile", tKzyInformation.getIsFile());
return returnMap("1", "", tKzyInformation);
}
@Override
......
......@@ -63,7 +63,7 @@
<property name="exampleMethodVisibility" value="public"/>
</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>
</generatorConfiguration>
\ No newline at end of file
......@@ -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,7 +24,8 @@
<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="is_file" javaType="java.lang.Integer" jdbcType="INTEGER" />
<arg column="content" javaType="java.lang.String" jdbcType="LONGVARCHAR" />
</constructor>
</resultMap>
<sql id="Example_Where_Clause">
......@@ -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
......@@ -144,10 +146,12 @@
</selectKey>
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=LONGVARBINARY})
#{updateDt,jdbcType=TIMESTAMP}, #{isFile,jdbcType=INTEGER}, #{content,jdbcType=LONGVARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.server.web.common.model.TKzyInformation">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
......@@ -176,6 +180,9 @@
<if test="updateDt != null">
update_dt,
</if>
<if test="isFile != null">
is_file,
</if>
<if test="content != null">
content,
</if>
......@@ -202,8 +209,11 @@
<if test="updateDt != null">
#{updateDt,jdbcType=TIMESTAMP},
</if>
<if test="isFile != null">
#{isFile,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=LONGVARBINARY},
#{content,jdbcType=LONGVARCHAR},
</if>
</trim>
</insert>
......@@ -240,8 +250,11 @@
<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=LONGVARBINARY},
content = #{record.content,jdbcType=LONGVARCHAR},
</if>
</set>
<if test="_parameter != null">
......@@ -258,7 +271,8 @@
is_delete = #{record.isDelete,jdbcType=INTEGER},
create_dt = #{record.createDt,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">
<include refid="Update_By_Example_Where_Clause" />
</if>
......@@ -272,7 +286,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>
......@@ -301,8 +316,11 @@
<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=LONGVARBINARY},
content = #{content,jdbcType=LONGVARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
......@@ -316,7 +334,8 @@
is_delete = #{isDelete,jdbcType=INTEGER},
create_dt = #{createDt,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}
</update>
<update id="updateByPrimaryKey" parameterType="com.server.web.common.model.TKzyInformation">
......@@ -327,7 +346,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
......@@ -21,7 +21,8 @@
SELECT
i.id,
i.title,
i.icon_url AS iconUrl
i.icon_url AS iconUrl,
i.is_file AS isFile
FROM
t_kzy_relation_class rc
LEFT JOIN t_kzy_information i ON rc.relation_id = i.id
......@@ -42,7 +43,8 @@
i.title,
i.icon_url AS iconUrl,
i.create_dt AS createDt,
1 AS classType
1 AS classType,
i.is_file AS isFile
FROM
t_kzy_relation_class rc
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!