Commit dc23bfcc by XiaHou

万科文档下载

parent 8f4946ac
package com.macro.mall.mapper;
import com.macro.mall.model.VankeFile;
import com.macro.mall.model.VankeFileExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface VankeFileMapper {
long countByExample(VankeFileExample example);
int deleteByExample(VankeFileExample example);
int deleteByPrimaryKey(Long id);
int insert(VankeFile record);
int insertSelective(VankeFile record);
List<VankeFile> selectByExample(VankeFileExample example);
VankeFile selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") VankeFile record, @Param("example") VankeFileExample example);
int updateByExample(@Param("record") VankeFile record, @Param("example") VankeFileExample example);
int updateByPrimaryKeySelective(VankeFile record);
int updateByPrimaryKey(VankeFile record);
}
\ No newline at end of file
package com.macro.mall.mapper;
import com.macro.mall.model.VankeFileTimes;
import com.macro.mall.model.VankeFileTimesExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface VankeFileTimesMapper {
long countByExample(VankeFileTimesExample example);
int deleteByExample(VankeFileTimesExample example);
int deleteByPrimaryKey(Long id);
int insert(VankeFileTimes record);
int insertSelective(VankeFileTimes record);
List<VankeFileTimes> selectByExample(VankeFileTimesExample example);
VankeFileTimes selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") VankeFileTimes record, @Param("example") VankeFileTimesExample example);
int updateByExample(@Param("record") VankeFileTimes record, @Param("example") VankeFileTimesExample example);
int updateByPrimaryKeySelective(VankeFileTimes record);
int updateByPrimaryKey(VankeFileTimes record);
}
\ No newline at end of file
package com.macro.mall.mapper;
import com.macro.mall.model.VankeFileType;
import com.macro.mall.model.VankeFileTypeExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface VankeFileTypeMapper {
long countByExample(VankeFileTypeExample example);
int deleteByExample(VankeFileTypeExample example);
int deleteByPrimaryKey(Long id);
int insert(VankeFileType record);
int insertSelective(VankeFileType record);
List<VankeFileType> selectByExample(VankeFileTypeExample example);
VankeFileType selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") VankeFileType record, @Param("example") VankeFileTypeExample example);
int updateByExample(@Param("record") VankeFileType record, @Param("example") VankeFileTypeExample example);
int updateByPrimaryKeySelective(VankeFileType record);
int updateByPrimaryKey(VankeFileType record);
}
\ No newline at end of file
package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class VankeFile implements Serializable {
@ApiModelProperty(value = "id")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "下载量")
private Integer times;
@ApiModelProperty(value = "主图")
private String mainPic;
@ApiModelProperty(value = "文档名称")
private String name;
@ApiModelProperty(value = "文档类型id")
private Long typeId;
@ApiModelProperty(value = "文件上传名")
private String fileName;
@ApiModelProperty(value = "文件上传路径")
private String filePath;
@ApiModelProperty(value = "1未删除 0已删除")
private Integer deleteStatus;
@ApiModelProperty(value = "1启用 0禁用")
private Integer status;
@ApiModelProperty(value = "创建人")
private Long createBy;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getTimes() {
return times;
}
public void setTimes(Integer times) {
this.times = times;
}
public String getMainPic() {
return mainPic;
}
public void setMainPic(String mainPic) {
this.mainPic = mainPic;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Long getTypeId() {
return typeId;
}
public void setTypeId(Long typeId) {
this.typeId = typeId;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public Integer getDeleteStatus() {
return deleteStatus;
}
public void setDeleteStatus(Integer deleteStatus) {
this.deleteStatus = deleteStatus;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getCreateBy() {
return createBy;
}
public void setCreateBy(Long createBy) {
this.createBy = createBy;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", times=").append(times);
sb.append(", mainPic=").append(mainPic);
sb.append(", name=").append(name);
sb.append(", typeId=").append(typeId);
sb.append(", fileName=").append(fileName);
sb.append(", filePath=").append(filePath);
sb.append(", deleteStatus=").append(deleteStatus);
sb.append(", status=").append(status);
sb.append(", createBy=").append(createBy);
sb.append(", createtime=").append(createtime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class VankeFileTimes implements Serializable {
@ApiModelProperty(value = "id")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "下载次数")
private Integer times;
@ApiModelProperty(value = "文件id")
private Long fileId;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getTimes() {
return times;
}
public void setTimes(Integer times) {
this.times = times;
}
public Long getFileId() {
return fileId;
}
public void setFileId(Long fileId) {
this.fileId = fileId;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", times=").append(times);
sb.append(", fileId=").append(fileId);
sb.append(", createtime=").append(createtime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
package com.macro.mall.model;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
import org.springframework.format.annotation.DateTimeFormat;
@Entity
public class VankeFileType implements Serializable {
@ApiModelProperty(value = "id")
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
private Long id;
@ApiModelProperty(value = "分类名称")
private String name;
@ApiModelProperty(value = "1未删除 0已删除")
private Integer deleteStatus;
@ApiModelProperty(value = "1启用 0禁用")
private Integer status;
@ApiModelProperty(value = "创建人")
private Long createBy;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createtime;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getDeleteStatus() {
return deleteStatus;
}
public void setDeleteStatus(Integer deleteStatus) {
this.deleteStatus = deleteStatus;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getCreateBy() {
return createBy;
}
public void setCreateBy(Long createBy) {
this.createBy = createBy;
}
public Date getCreatetime() {
return createtime;
}
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", deleteStatus=").append(deleteStatus);
sb.append(", status=").append(status);
sb.append(", createBy=").append(createBy);
sb.append(", createtime=").append(createtime);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.macro.mall.mapper.VankeFileTimesMapper">
<resultMap id="BaseResultMap" type="com.macro.mall.model.VankeFileTimes">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="times" jdbcType="INTEGER" property="times" />
<result column="file_id" jdbcType="BIGINT" property="fileId" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, times, file_id, createtime
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.VankeFileTimesExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from vanke_file_times
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from vanke_file_times
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from vanke_file_times
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.macro.mall.model.VankeFileTimesExample">
delete from vanke_file_times
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.macro.mall.model.VankeFileTimes">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_file_times (times, file_id, createtime
)
values (#{times,jdbcType=INTEGER}, #{fileId,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.VankeFileTimes">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_file_times
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="times != null">
times,
</if>
<if test="fileId != null">
file_id,
</if>
<if test="createtime != null">
createtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="times != null">
#{times,jdbcType=INTEGER},
</if>
<if test="fileId != null">
#{fileId,jdbcType=BIGINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.VankeFileTimesExample" resultType="java.lang.Long">
select count(*) from vanke_file_times
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update vanke_file_times
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.times != null">
times = #{record.times,jdbcType=INTEGER},
</if>
<if test="record.fileId != null">
file_id = #{record.fileId,jdbcType=BIGINT},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update vanke_file_times
set id = #{record.id,jdbcType=BIGINT},
times = #{record.times,jdbcType=INTEGER},
file_id = #{record.fileId,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.VankeFileTimes">
update vanke_file_times
<set>
<if test="times != null">
times = #{times,jdbcType=INTEGER},
</if>
<if test="fileId != null">
file_id = #{fileId,jdbcType=BIGINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.VankeFileTimes">
update vanke_file_times
set times = #{times,jdbcType=INTEGER},
file_id = #{fileId,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.macro.mall.mapper.VankeFileTypeMapper">
<resultMap id="BaseResultMap" type="com.macro.mall.model.VankeFileType">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_by" jdbcType="BIGINT" property="createBy" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, delete_status, status, create_by, createtime
</sql>
<select id="selectByExample" parameterType="com.macro.mall.model.VankeFileTypeExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from vanke_file_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from vanke_file_type
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from vanke_file_type
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.macro.mall.model.VankeFileTypeExample">
delete from vanke_file_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.macro.mall.model.VankeFileType">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_file_type (name, delete_status, status,
create_by, createtime)
values (#{name,jdbcType=VARCHAR}, #{deleteStatus,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createBy,jdbcType=BIGINT}, #{createtime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.VankeFileType">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into vanke_file_type
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
name,
</if>
<if test="deleteStatus != null">
delete_status,
</if>
<if test="status != null">
status,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="createtime != null">
createtime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="deleteStatus != null">
#{deleteStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createBy != null">
#{createBy,jdbcType=BIGINT},
</if>
<if test="createtime != null">
#{createtime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.macro.mall.model.VankeFileTypeExample" resultType="java.lang.Long">
select count(*) from vanke_file_type
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update vanke_file_type
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.deleteStatus != null">
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.createBy != null">
create_by = #{record.createBy,jdbcType=BIGINT},
</if>
<if test="record.createtime != null">
createtime = #{record.createtime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update vanke_file_type
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
delete_status = #{record.deleteStatus,jdbcType=INTEGER},
status = #{record.status,jdbcType=INTEGER},
create_by = #{record.createBy,jdbcType=BIGINT},
createtime = #{record.createtime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.macro.mall.model.VankeFileType">
update vanke_file_type
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="deleteStatus != null">
delete_status = #{deleteStatus,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=BIGINT},
</if>
<if test="createtime != null">
createtime = #{createtime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.macro.mall.model.VankeFileType">
update vanke_file_type
set name = #{name,jdbcType=VARCHAR},
delete_status = #{deleteStatus,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_by = #{createBy,jdbcType=BIGINT},
createtime = #{createtime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment