init project v1.0.0
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#aliyun:
|
||||
# oss:
|
||||
# access-key: 你的密钥
|
||||
# accessKeySecret: 你的密钥
|
||||
# endpoint: 你的端点
|
||||
# bucketName: 你的名称
|
||||
# domain: 你的说明
|
||||
|
||||
qiniu:
|
||||
oss:
|
||||
access-key: tpi8mObnfzZi4ggBX8Bw7zydjoTQ0WeML3RkPKsX
|
||||
accessKeySecret: HZBXmSyUTy-haYp0KbBTtsil-GoKjVS2kDKT8Yow
|
||||
endpoint: http://pkqtmn0p1.bkt.clouddn.com
|
||||
bucketName: public-oss
|
||||
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:mysql://${zlt.datasource.ip}:3306/file_center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
|
||||
username: ${zlt.datasource.username}
|
||||
password: ${zlt.datasource.password}
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
|
||||
redis:
|
||||
host: ${zlt.redis.host}
|
||||
port: ${zlt.redis.port}
|
||||
timeout: ${zlt.redis.timeout}
|
||||
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath:/mapper/*Mapper.xml
|
||||
#实体扫描,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: com.central.file.model
|
||||
global-config:
|
||||
db-config:
|
||||
id-type: INPUT
|
||||
zlt:
|
||||
swagger:
|
||||
enabled: true
|
||||
title: 文件中心
|
||||
description: 文件中心接口文档
|
||||
version: 1.0
|
||||
base-package: com.central.file.controller
|
||||
@@ -0,0 +1,14 @@
|
||||
server:
|
||||
port: 5000
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: file-center
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: common.yml
|
||||
discovery:
|
||||
server-addr: ${zlt.nacos.server-addr}
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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.central.file.mapper.FileMapper">
|
||||
|
||||
<sql id="where">
|
||||
<where>
|
||||
<if test="f.name != null and f.name != ''">
|
||||
and t.name like concat('%', #{f.name}, '%')
|
||||
</if>
|
||||
<if test="f.beginTime != null and f.beginTime != ''">
|
||||
and t.create_time >= #{f.beginTime}
|
||||
</if>
|
||||
<if test="f.endTime != null and f.endTime != ''">
|
||||
and t.create_time <= #{f.endTime}
|
||||
</if>
|
||||
<if test="f.searchKey != null and f.searchKey != ''">
|
||||
and t.name like concat('%', #{f.searchKey}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<select id="findList" resultType="com.central.file.model.FileInfo">
|
||||
select * from file_info t
|
||||
<include refid="where" />
|
||||
order by t.create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user