This commit is contained in:
杜建超 2020-12-04 14:23:13 +08:00
parent 2e7e969c5f
commit a3901bed96
7 changed files with 897 additions and 2 deletions

View File

@ -0,0 +1,33 @@
package com.lz.modules.sys.dao;
/**
* <p>
* 流转表 服务类
* </p>
*
* @author quyixiao
* @since 2020-12-04
*/
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.sys.entity.Print;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface PrintMapper extends BaseMapper<Print> {
Print selectPrintById(@Param("id") Long id);
Long insertPrint(Print print);
int updatePrintById(Print print);
int updateCoverPrintById(Print print);
int deletePrintById(@Param("id") Long id);
}

View File

@ -0,0 +1,26 @@
package com.lz.modules.sys.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lz.modules.sys.entity.Resource;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface ResourceMapper extends BaseMapper<Resource> {
Resource selectResourceById(@Param("id") Long id);
Long insertResource(Resource resource);
int updateResourceById(Resource resource);
int updateCoverResourceById(Resource resource);
int deleteResourceById(@Param("id") Long id);
}

View File

@ -0,0 +1,234 @@
package com.lz.modules.sys.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* <p>
* </p>*流转表
* @author quyixiao
* @since 2020-12-04
*/
@Data
@TableName("lz_print")
@ApiModel(value = "流转表")
public class Print implements java.io.Serializable {
//
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//是否删除状态1删除0有效
@ApiModelProperty(value = "是否删除状态1删除0有效", name = "isDelete")
private Integer isDelete;
//创建时间
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
private Date gmtCreate;
//最后修改时间
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
private Date gmtModified;
//打印详情的url
@ApiModelProperty(value = "打印详情的url", name = "url")
private String url;
//备注
@ApiModelProperty(value = "备注", name = "remark")
private String remark;
//打印批次号
@ApiModelProperty(value = "打印批次号", name = "batchNo")
private String batchNo;
//0未打印1打印成功2打印失败
@ApiModelProperty(value = "0未打印1打印成功2打印失败", name = "status")
private Integer status;
//生成图片上传阿里云url
@ApiModelProperty(value = "生成图片上传阿里云url", name = "imageUrl")
private String imageUrl;
//0不生成图片1生成图片
@ApiModelProperty(value = "0不生成图片1生成图片", name = "isImage")
private Integer isImage;
//0不打印1 打印
@ApiModelProperty(value = "0不打印1 打印", name = "isPrint")
private Integer isPrint;
/**
*
* @return
*/
public Long getId() {
return id;
}
/**
*
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 是否删除状态1删除0有效
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
* 是否删除状态1删除0有效
* @param isDelete
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
* 创建时间
* @return
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
* 创建时间
* @param gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
* 最后修改时间
* @return
*/
public Date getGmtModified() {
return gmtModified;
}
/**
* 最后修改时间
* @param gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* 打印详情的url
* @return
*/
public String getUrl() {
return url;
}
/**
* 打印详情的url
* @param url
*/
public void setUrl(String url) {
this.url = url;
}
/**
* 备注
* @return
*/
public String getRemark() {
return remark;
}
/**
* 备注
* @param remark
*/
public void setRemark(String remark) {
this.remark = remark;
}
/**
* 打印批次号
* @return
*/
public String getBatchNo() {
return batchNo;
}
/**
* 打印批次号
* @param batchNo
*/
public void setBatchNo(String batchNo) {
this.batchNo = batchNo;
}
/**
* 0未打印1打印成功2打印失败
* @return
*/
public Integer getStatus() {
return status;
}
/**
* 0未打印1打印成功2打印失败
* @param status
*/
public void setStatus(Integer status) {
this.status = status;
}
/**
* 生成图片上传阿里云url
* @return
*/
public String getImageUrl() {
return imageUrl;
}
/**
* 生成图片上传阿里云url
* @param imageUrl
*/
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
/**
* 0不生成图片1生成图片
* @return
*/
public Integer getIsImage() {
return isImage;
}
/**
* 0不生成图片1生成图片
* @param isImage
*/
public void setIsImage(Integer isImage) {
this.isImage = isImage;
}
/**
* 0不打印1 打印
* @return
*/
public Integer getIsPrint() {
return isPrint;
}
/**
* 0不打印1 打印
* @param isPrint
*/
public void setIsPrint(Integer isPrint) {
this.isPrint = isPrint;
}
@Override
public String toString() {
return "Print{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",url=" + url +
",remark=" + remark +
",batchNo=" + batchNo +
",status=" + status +
",imageUrl=" + imageUrl +
",isImage=" + isImage +
",isPrint=" + isPrint +
"}";
}
}

View File

@ -0,0 +1,361 @@
package com.lz.modules.sys.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
@Data
@TableName("lz_resource")
@ApiModel(value = "资源配置及业务配置表针对一些会变更的配置如白名单配置、客服电话等或者是某些数据量很少的业务数据如首页bannel、 /* comment truncated */ /*首页广告位等数据*/")
public class Resource implements java.io.Serializable {
//主键自增id
@TableId(value = "id", type = IdType.AUTO)
private Long id;
//是否删除状态1删除0有效
@ApiModelProperty(value = "是否删除状态1删除0有效", name = "isDelete")
private Integer isDelete;
//创建时间
@ApiModelProperty(value = "创建时间", name = "gmtCreate")
private Date gmtCreate;
//最后修改时间
@ApiModelProperty(value = "最后修改时间", name = "gmtModified")
private Date gmtModified;
//创建人
@ApiModelProperty(value = "创建人", name = "creator")
private String creator;
//最后修改人
@ApiModelProperty(value = "最后修改人", name = "modifier")
private String modifier;
//配置类型S:系统配置,B:业务配置
@ApiModelProperty(value = "配置类型S:系统配置,B:业务配置", name = "dataType")
private String dataType;
//配置类型即配置的KEY用于定位配置所有字母大写多个字母中间用下划线_分割用户白名单类型USER_WHITE_LIST
@ApiModelProperty(value = "配置类型即配置的KEY用于定位配置所有字母大写多个字母中间用下划线“_”分割用户白名单类型USER_WHITE_LIST", name = "type")
private String type;
//类型可针对某一类型的配置做分类
@ApiModelProperty(value = "类型,可针对某一类型的配置做分类", name = "secType")
private String secType;
//配置类型描述如针对TYPE=USER_WHITE_LIST该值可描述为用户白名单列表
@ApiModelProperty(value = "配置类型描述如针对TYPE=USER_WHITE_LIST该值可描述为用户白名单列表", name = "typeDesc")
private String typeDesc;
//名称
@ApiModelProperty(value = "名称", name = "name")
private String name;
//
@ApiModelProperty(value = "", name = "value")
private String value;
//描述
@ApiModelProperty(value = "描述", name = "description")
private String description;
//扩展值1
@ApiModelProperty(value = "扩展值1", name = "value1")
private String value1;
//扩展值2
@ApiModelProperty(value = "扩展值2", name = "value2")
private String value2;
//扩展值3
@ApiModelProperty(value = "扩展值3", name = "value3")
private String value3;
//扩展值4
@ApiModelProperty(value = "扩展值4", name = "value4")
private String value4;
//排序
@ApiModelProperty(value = "排序", name = "sort")
private Long sort;
/**
* 主键自增id
* @return
*/
public Long getId() {
return id;
}
/**
* 主键自增id
* @param id
*/
public void setId(Long id) {
this.id = id;
}
/**
* 是否删除状态1删除0有效
* @return
*/
public Integer getIsDelete() {
return isDelete;
}
/**
* 是否删除状态1删除0有效
* @param isDelete
*/
public void setIsDelete(Integer isDelete) {
this.isDelete = isDelete;
}
/**
* 创建时间
* @return
*/
public Date getGmtCreate() {
return gmtCreate;
}
/**
* 创建时间
* @param gmtCreate
*/
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
/**
* 最后修改时间
* @return
*/
public Date getGmtModified() {
return gmtModified;
}
/**
* 最后修改时间
* @param gmtModified
*/
public void setGmtModified(Date gmtModified) {
this.gmtModified = gmtModified;
}
/**
* 创建人
* @return
*/
public String getCreator() {
return creator;
}
/**
* 创建人
* @param creator
*/
public void setCreator(String creator) {
this.creator = creator;
}
/**
* 最后修改人
* @return
*/
public String getModifier() {
return modifier;
}
/**
* 最后修改人
* @param modifier
*/
public void setModifier(String modifier) {
this.modifier = modifier;
}
/**
* 配置类型S:系统配置,B:业务配置
* @return
*/
public String getDataType() {
return dataType;
}
/**
* 配置类型S:系统配置,B:业务配置
* @param dataType
*/
public void setDataType(String dataType) {
this.dataType = dataType;
}
/**
* 配置类型即配置的KEY用于定位配置所有字母大写多个字母中间用下划线_分割用户白名单类型USER_WHITE_LIST
* @return
*/
public String getType() {
return type;
}
/**
* 配置类型即配置的KEY用于定位配置所有字母大写多个字母中间用下划线_分割用户白名单类型USER_WHITE_LIST
* @param type
*/
public void setType(String type) {
this.type = type;
}
/**
* 类型可针对某一类型的配置做分类
* @return
*/
public String getSecType() {
return secType;
}
/**
* 类型可针对某一类型的配置做分类
* @param secType
*/
public void setSecType(String secType) {
this.secType = secType;
}
/**
* 配置类型描述如针对TYPE=USER_WHITE_LIST该值可描述为用户白名单列表
* @return
*/
public String getTypeDesc() {
return typeDesc;
}
/**
* 配置类型描述如针对TYPE=USER_WHITE_LIST该值可描述为用户白名单列表
* @param typeDesc
*/
public void setTypeDesc(String typeDesc) {
this.typeDesc = typeDesc;
}
/**
* 名称
* @return
*/
public String getName() {
return name;
}
/**
* 名称
* @param name
*/
public void setName(String name) {
this.name = name;
}
/**
*
* @return
*/
public String getValue() {
return value;
}
/**
*
* @param value
*/
public void setValue(String value) {
this.value = value;
}
/**
* 描述
* @return
*/
public String getDescription() {
return description;
}
/**
* 描述
* @param description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* 扩展值1
* @return
*/
public String getValue1() {
return value1;
}
/**
* 扩展值1
* @param value1
*/
public void setValue1(String value1) {
this.value1 = value1;
}
/**
* 扩展值2
* @return
*/
public String getValue2() {
return value2;
}
/**
* 扩展值2
* @param value2
*/
public void setValue2(String value2) {
this.value2 = value2;
}
/**
* 扩展值3
* @return
*/
public String getValue3() {
return value3;
}
/**
* 扩展值3
* @param value3
*/
public void setValue3(String value3) {
this.value3 = value3;
}
/**
* 扩展值4
* @return
*/
public String getValue4() {
return value4;
}
/**
* 扩展值4
* @param value4
*/
public void setValue4(String value4) {
this.value4 = value4;
}
/**
* 排序
* @return
*/
public Long getSort() {
return sort;
}
/**
* 排序
* @param sort
*/
public void setSort(Long sort) {
this.sort = sort;
}
@Override
public String toString() {
return "Resource{" +
",id=" + id +
",isDelete=" + isDelete +
",gmtCreate=" + gmtCreate +
",gmtModified=" + gmtModified +
",creator=" + creator +
",modifier=" + modifier +
",dataType=" + dataType +
",type=" + type +
",secType=" + secType +
",typeDesc=" + typeDesc +
",name=" + name +
",value=" + value +
",description=" + description +
",value1=" + value1 +
",value2=" + value2 +
",value3=" + value3 +
",value4=" + value4 +
",sort=" + sort +
"}";
}
}

View File

@ -0,0 +1,103 @@
<?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.lz.modules.sys.dao.PrintMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.sys.entity.Print">
<id column="id" property="id"/>
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="url" property="url"/>
<result column="remark" property="remark"/>
<result column="batch_no" property="batchNo"/>
<result column="status" property="status"/>
<result column="image_url" property="imageUrl"/>
<result column="is_image" property="isImage"/>
<result column="is_print" property="isPrint"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, url AS url, remark AS remark, batch_no AS batchNo, status AS status, image_url AS imageUrl, is_image AS isImage, is_print AS isPrint
</sql>
<select id="selectPrintById" resultType="Print" >
select * from lz_print where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertPrint" parameterType="Print" useGeneratedKeys="true" keyProperty="id" >
insert into lz_print(
<if test="url != null">url, </if>
<if test="remark != null">remark, </if>
<if test="batchNo != null">batch_no, </if>
<if test="status != null">status, </if>
<if test="imageUrl != null">image_url, </if>
<if test="isImage != null">is_image, </if>
<if test="isPrint != null">is_print, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="url != null">#{ url}, </if>
<if test="remark != null">#{ remark}, </if>
<if test="batchNo != null">#{ batchNo}, </if>
<if test="status != null">#{ status}, </if>
<if test="imageUrl != null">#{ imageUrl}, </if>
<if test="isImage != null">#{ isImage}, </if>
<if test="isPrint != null">#{ isPrint}, </if>
0,
now(),
now()
)
</insert>
<update id="updatePrintById" parameterType="Print" >
update
lz_print
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="url != null">url = #{url},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="batchNo != null">batch_no = #{batchNo},</if>
<if test="status != null">status = #{status},</if>
<if test="imageUrl != null">image_url = #{imageUrl},</if>
<if test="isImage != null">is_image = #{isImage},</if>
<if test="isPrint != null">is_print = #{isPrint}</if>
</trim>
,gmt_modified = now()
where id = #{id}
</update>
<update id="updateCoverPrintById" parameterType="Print" >
update
lz_print
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
url = #{url},
remark = #{remark},
batch_no = #{batchNo},
status = #{status},
image_url = #{imageUrl},
is_image = #{isImage},
is_print = #{isPrint}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deletePrintById" parameterType="java.lang.Long">
update lz_print set is_delete = 1 where id=#{id} limit 1
</update>
</mapper>

View File

@ -0,0 +1,138 @@
<?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.lz.modules.sys.dao.ResourceMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.lz.modules.sys.entity.Resource">
<id column="id" property="id"/>
<result column="is_delete" property="isDelete"/>
<result column="gmt_create" property="gmtCreate"/>
<result column="gmt_modified" property="gmtModified"/>
<result column="creator" property="creator"/>
<result column="modifier" property="modifier"/>
<result column="data_type" property="dataType"/>
<result column="type" property="type"/>
<result column="sec_type" property="secType"/>
<result column="type_desc" property="typeDesc"/>
<result column="name" property="name"/>
<result column="value" property="value"/>
<result column="description" property="description"/>
<result column="value_1" property="value1"/>
<result column="value_2" property="value2"/>
<result column="value_3" property="value3"/>
<result column="value_4" property="value4"/>
<result column="sort" property="sort"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, creator AS creator, modifier AS modifier, data_type AS dataType, type AS type, sec_type AS secType, type_desc AS typeDesc, name AS name, value AS value, description AS description, value_1 AS value1, value_2 AS value2, value_3 AS value3, value_4 AS value4, sort AS sort
</sql>
<select id="selectResourceById" resultType="Resource" >
select * from lz_resource where id=#{id} and is_delete = 0 limit 1
</select>
<insert id="insertResource" parameterType="Resource" useGeneratedKeys="true" keyProperty="id" >
insert into lz_resource(
<if test="creator != null">creator, </if>
<if test="modifier != null">modifier, </if>
<if test="dataType != null">data_type, </if>
<if test="type != null">type, </if>
<if test="secType != null">sec_type, </if>
<if test="typeDesc != null">type_desc, </if>
<if test="name != null">name, </if>
<if test="value != null">value, </if>
<if test="description != null">description, </if>
<if test="value1 != null">value_1, </if>
<if test="value2 != null">value_2, </if>
<if test="value3 != null">value_3, </if>
<if test="value4 != null">value_4, </if>
<if test="sort != null">sort, </if>
is_delete,
gmt_create,
gmt_modified
)values(
<if test="creator != null">#{ creator}, </if>
<if test="modifier != null">#{ modifier}, </if>
<if test="dataType != null">#{ dataType}, </if>
<if test="type != null">#{ type}, </if>
<if test="secType != null">#{ secType}, </if>
<if test="typeDesc != null">#{ typeDesc}, </if>
<if test="name != null">#{ name}, </if>
<if test="value != null">#{ value}, </if>
<if test="description != null">#{ description}, </if>
<if test="value1 != null">#{ value1}, </if>
<if test="value2 != null">#{ value2}, </if>
<if test="value3 != null">#{ value3}, </if>
<if test="value4 != null">#{ value4}, </if>
<if test="sort != null">#{ sort}, </if>
0,
now(),
now()
)
</insert>
<update id="updateResourceById" parameterType="Resource" >
update
lz_resource
<trim prefix="set" suffixOverrides=",">
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="gmtCreate != null">gmt_create = #{gmtCreate},</if>
<if test="creator != null">creator = #{creator},</if>
<if test="modifier != null">modifier = #{modifier},</if>
<if test="dataType != null">data_type = #{dataType},</if>
<if test="type != null">type = #{type},</if>
<if test="secType != null">sec_type = #{secType},</if>
<if test="typeDesc != null">type_desc = #{typeDesc},</if>
<if test="name != null">name = #{name},</if>
<if test="value != null">value = #{value},</if>
<if test="description != null">description = #{description},</if>
<if test="value1 != null">value_1 = #{value1},</if>
<if test="value2 != null">value_2 = #{value2},</if>
<if test="value3 != null">value_3 = #{value3},</if>
<if test="value4 != null">value_4 = #{value4},</if>
<if test="sort != null">sort = #{sort}</if>
</trim>
,gmt_modified = now()
where id = #{id}
</update>
<update id="updateCoverResourceById" parameterType="Resource" >
update
lz_resource
set
is_delete = #{isDelete},
gmt_create = #{gmtCreate},
creator = #{creator},
modifier = #{modifier},
data_type = #{dataType},
type = #{type},
sec_type = #{secType},
type_desc = #{typeDesc},
name = #{name},
value = #{value},
description = #{description},
value_1 = #{value1},
value_2 = #{value2},
value_3 = #{value3},
value_4 = #{value4},
sort = #{sort}
,gmt_modified = now()
where id = #{id}
</update>
<update id="deleteResourceById" parameterType="java.lang.Long">
update lz_resource set is_delete = 1 where id=#{id} limit 1
</update>
</mapper>

View File

@ -84,8 +84,8 @@ public class MysqlMain {
List<TablesBean> list = new ArrayList<TablesBean>();
list.add(new TablesBean("lz_result_score"));
list.add(new TablesBean("lz_result_detail"));
list.add(new TablesBean("lz_resource"));
list.add(new TablesBean("lz_print"));
List<TablesBean> list2 = new ArrayList<TablesBean>();
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();