first commit
78
src/main/resources/application-dev.yml
Normal file
@@ -0,0 +1,78 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
# url: jdbc:mysql://82.157.238.238:3309/e_book?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
url: jdbc:mysql://59.110.212.44:3306/e_book?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&allowMultiQueries=true
|
||||
username: root
|
||||
password: HSXY1234hsxy
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 60000
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
#login-username: admin
|
||||
#login-password: admin
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
tomcat:
|
||||
initSQL: SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci
|
||||
|
||||
rabbitmq:
|
||||
host: 127.0.0.1
|
||||
port: 15672
|
||||
username: guest
|
||||
password: guest
|
||||
virtualHost: /
|
||||
|
||||
|
||||
# redis:
|
||||
# host: 82.157.238.238
|
||||
# port: 6379
|
||||
# password: redis970104
|
||||
|
||||
aliyun:
|
||||
oss:
|
||||
file:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
keyid: LTAI5tRDbidmtFSoxQ2rgFd2
|
||||
keysecret: 08XmfSoaC980DiAK4swQEvb6MwKedG
|
||||
bucketname: peanut9377
|
||||
sms:
|
||||
accessKeyId: LTAI5tRDbidmtFSoxQ2rgFd2
|
||||
accessKeySecret: 08XmfSoaC980DiAK4swQEvb6MwKedG
|
||||
singName: 水晶球
|
||||
templateCode: SMS_216832090
|
||||
|
||||
|
||||
##多数据源的配置
|
||||
#dynamic:
|
||||
# datasource:
|
||||
# slave1:
|
||||
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=renren_security
|
||||
# username: sa
|
||||
# password: 123456
|
||||
# slave2:
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/renren_security
|
||||
# username: renren
|
||||
# password: 123456
|
||||
69
src/main/resources/application-prod.yml
Normal file
@@ -0,0 +1,69 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://59.110.212.44:3306/e_book?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: root
|
||||
password: HSXY1234hsxy
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 60000
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
#login-username: admin
|
||||
#login-password: admin
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
rabbitmq:
|
||||
host: 59.110.212.44
|
||||
port: 5672
|
||||
username: admin
|
||||
password: 751019
|
||||
virtualHost: /
|
||||
|
||||
aliyun:
|
||||
oss:
|
||||
file:
|
||||
endpoint: oss-cn-beijing.aliyuncs.com
|
||||
keyid: LTAIiSMeo8ztauV5
|
||||
keysecret: pVIYAOIFSUGg61lYfE8cjg2ZNpnLJA
|
||||
bucketname: ehh-private-01
|
||||
sms:
|
||||
accessKeyId: LTAI5tJbbw5fY97pnw635yq3
|
||||
accessKeySecret: LTXQ9v3OYVwNVbDWWfVpbbcVDKErKi
|
||||
singName: 疯子读书
|
||||
|
||||
templateCode: SMS_248840040
|
||||
|
||||
##多数据源的配置
|
||||
#dynamic:
|
||||
# datasource:
|
||||
# slave1:
|
||||
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=renren_security
|
||||
# username: sa
|
||||
# password: 123456
|
||||
# slave2:
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/renren_security
|
||||
# username: renren
|
||||
# password: 123456
|
||||
49
src/main/resources/application-test.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
spring:
|
||||
datasource:
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
druid:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
url: jdbc:mysql://localhost:3306/renren_fast?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
|
||||
username: renren
|
||||
password: 123456
|
||||
initial-size: 10
|
||||
max-active: 100
|
||||
min-idle: 10
|
||||
max-wait: 60000
|
||||
pool-prepared-statements: true
|
||||
max-pool-prepared-statement-per-connection-size: 20
|
||||
time-between-eviction-runs-millis: 60000
|
||||
min-evictable-idle-time-millis: 300000
|
||||
#Oracle需要打开注释
|
||||
#validation-query: SELECT 1 FROM DUAL
|
||||
test-while-idle: true
|
||||
test-on-borrow: false
|
||||
test-on-return: false
|
||||
stat-view-servlet:
|
||||
enabled: true
|
||||
url-pattern: /druid/*
|
||||
#login-username: admin
|
||||
#login-password: admin
|
||||
filter:
|
||||
stat:
|
||||
log-slow-sql: true
|
||||
slow-sql-millis: 1000
|
||||
merge-sql: false
|
||||
wall:
|
||||
config:
|
||||
multi-statement-allow: true
|
||||
|
||||
|
||||
##多数据源的配置
|
||||
#dynamic:
|
||||
# datasource:
|
||||
# slave1:
|
||||
# driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
|
||||
# url: jdbc:sqlserver://localhost:1433;DatabaseName=renren_security
|
||||
# username: sa
|
||||
# password: 123456
|
||||
# slave2:
|
||||
# driver-class-name: org.postgresql.Driver
|
||||
# url: jdbc:postgresql://localhost:5432/renren_security
|
||||
# username: renren
|
||||
# password: 123456
|
||||
3
src/main/resources/application.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
wx.open.app_id=
|
||||
wx.open.app_secret=
|
||||
wx.open.redirect_url=http://59.110.212.44:9100/api/ucenter/wx/callback
|
||||
86
src/main/resources/application.yml
Normal file
@@ -0,0 +1,86 @@
|
||||
# Tomcat
|
||||
server:
|
||||
tomcat:
|
||||
uri-encoding: UTF-8
|
||||
max-threads: 1000
|
||||
min-spare-threads: 30
|
||||
port: 9100
|
||||
connection-timeout: 6000000ms
|
||||
servlet:
|
||||
context-path: /pb
|
||||
|
||||
spring:
|
||||
# 环境 dev|test|prod
|
||||
profiles:
|
||||
active: prod
|
||||
# jackson时间格式化
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
servlet:
|
||||
multipart:
|
||||
max-file-size: 100MB
|
||||
max-request-size: 100MB
|
||||
enabled: true
|
||||
redis:
|
||||
open: false # 是否开启redis缓存 true开启 false关闭
|
||||
database: 0
|
||||
host: 59.110.212.44
|
||||
port: 6379
|
||||
password: Jgll2015 # 密码(默认为空)
|
||||
timeout: 6000000ms # 连接超时时长(毫秒)
|
||||
jedis:
|
||||
pool:
|
||||
max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
|
||||
max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
|
||||
max-idle: 10 # 连接池中的最大空闲连接
|
||||
min-idle: 5 # 连接池中的最小空闲连接
|
||||
mvc:
|
||||
throw-exception-if-no-handler-found: true
|
||||
pathmatch:
|
||||
matching-strategy: ANT_PATH_MATCHER
|
||||
# resources:
|
||||
# add-mappings: false
|
||||
output:
|
||||
ansi:
|
||||
enabled: always
|
||||
|
||||
task:
|
||||
execution:
|
||||
pool:
|
||||
core-size: 5
|
||||
max-size: 50
|
||||
|
||||
#mybatis
|
||||
mybatis-plus:
|
||||
mapper-locations: classpath*:/mapper/**/*.xml
|
||||
#实体扫描,多个package用逗号或者分号分隔
|
||||
typeAliasesPackage: io.renren.modules.*.entity
|
||||
global-config:
|
||||
#数据库相关配置
|
||||
db-config:
|
||||
#主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID";
|
||||
id-type: AUTO
|
||||
logic-delete-value: -1
|
||||
logic-not-delete-value: 0
|
||||
banner: false
|
||||
#原生配置
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: false
|
||||
call-setters-on-nulls: true
|
||||
jdbc-type-for-null: 'null'
|
||||
|
||||
|
||||
renren:
|
||||
redis:
|
||||
open: false
|
||||
shiro:
|
||||
redis: false
|
||||
# APP模块,是通过jwt认证的,如果要使用APP模块,则需要修改【加密秘钥】
|
||||
jwt:
|
||||
# 加密秘钥
|
||||
secret: f4e2e52034348f86b67cde581c0f9eb5[www.renren.io]
|
||||
# token有效时长,7天,单位秒
|
||||
expire: 604800
|
||||
header: token
|
||||
5
src/main/resources/banner.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
====================================================================================================================
|
||||
|
||||
欢迎使用众妙之门花生享阅
|
||||
|
||||
====================================================================================================================
|
||||
BIN
src/main/resources/lib/aspose-words-22.10-jdk16.jar
Normal file
26
src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<logger name="org.springframework.web" level="INFO"/>
|
||||
<logger name="org.springboot.sample" level="TRACE" />
|
||||
|
||||
<!-- 开发、测试环境 -->
|
||||
<springProfile name="dev,test">
|
||||
<logger name="org.springframework.web" level="INFO"/>
|
||||
<logger name="org.springboot.sample" level="INFO" />
|
||||
<logger name="com.peanut" level="DEBUG" />
|
||||
</springProfile>
|
||||
|
||||
<!-- 生产环境 -->
|
||||
<!-- <springProfile name="prod">-->
|
||||
<!-- <logger name="org.springframework.web" level="ERROR"/>-->
|
||||
<!-- <logger name="org.springboot.sample" level="ERROR" />-->
|
||||
<!-- <logger name="com.peanut" level="ERROR" />-->
|
||||
<!-- </springProfile>-->
|
||||
<springProfile name="prod">
|
||||
<logger name="org.springframework.web" level="INFO"/>
|
||||
<logger name="org.springboot.sample" level="INFO" />
|
||||
<logger name="com.peanut" level="DEBUG" />
|
||||
</springProfile>
|
||||
|
||||
</configuration>
|
||||
7
src/main/resources/mapper/app/UserDao.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.peanut.modules.app.dao.UserDao">
|
||||
|
||||
|
||||
</mapper>
|
||||
25
src/main/resources/mapper/book/ActivityDao.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?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.peanut.modules.book.dao.ActivityDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.ActivityEntity" id="activityMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="activityName" column="activity_name" />
|
||||
<result property="activityType" column="activity_type" />
|
||||
<result property="activityManner" column="activity_manner" />
|
||||
<result property="activityContent" column="activity_content" />
|
||||
<result property="point" column="point" />
|
||||
<result property="validity" column="validity" />
|
||||
<result property="beginTime" column="begin_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="activityUrl" column="activity_url" />
|
||||
<result property="currentState" column="current_state" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
22
src/main/resources/mapper/book/AuthorDao.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?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.peanut.modules.book.dao.AuthorDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.AuthorEntity" id="authorMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="authorName" column="author_name"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="age" column="age"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="tel" column="tel"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
19
src/main/resources/mapper/book/BookBrowseRecordsDao.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.peanut.modules.book.dao.BookBrowseRecordsDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookBrowseRecordsEntity" id="bookBrowseRecordsMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="bookName" column="book_name"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
18
src/main/resources/mapper/book/BookBuyConfigDao.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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.peanut.modules.book.dao.BookBuyConfigDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookBuyConfigEntity" id="bookBuyConfigMap">
|
||||
<result property="priceTypeId" column="price_type_id"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="qudao" column="qudao"/>
|
||||
<result property="realMoney" column="real_money"/>
|
||||
<result property="money" column="money"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="month" column="month"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
23
src/main/resources/mapper/book/BookChapterContentDao.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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.peanut.modules.book.dao.BookChapterContentDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookChapterContentEntity" id="bookChapterContentMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="bookChatperId" column="book_chatper_id"/>
|
||||
<result property="number" column="number"/>
|
||||
<result property="level" column="level"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="voices" column="voices"/>
|
||||
<result property="otherContent" column="other_content"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
20
src/main/resources/mapper/book/BookChapterDao.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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.peanut.modules.book.dao.BookChapterDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookChapterEntity" id="bookChapterMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="chapter" column="chapter"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="voices" column="voices"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
60
src/main/resources/mapper/book/BookDao.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?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.peanut.modules.book.dao.BookDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookEntity" id="bookMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="authorId" column="author_id"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="content" column="content"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="salePrice" column="sale_price"/>
|
||||
<result property="istop" column="istop"/>
|
||||
<result property="isSale" column="is_sale"/>
|
||||
<result property="isVip" column="isVip"/>
|
||||
<result property="freeChapterCount" column="free_chapter_count"/>
|
||||
<result property="publisherId" column="publisher_id"/>
|
||||
<result property="images" column="images"/>
|
||||
<result property="imagesList" column="images_list"/>
|
||||
<result property="pid" column="pid"/>
|
||||
<result property="chapterStatus" column="chapter_status"/>
|
||||
<result property="contentStatus" column="content_status"/>
|
||||
<result property="voicesStatus" column="voices_status"/>
|
||||
<result property="level" column="level"/>
|
||||
<result property="state" column="state"/>
|
||||
<result property="novel" column="novel"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryBookInOther" resultType="com.peanut.modules.book.entity.BookEntity">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
book
|
||||
WHERE
|
||||
FIND_IN_SET(
|
||||
( SELECT id FROM publisher WHERE
|
||||
<if test="publisherName != null and publisherName != ''">
|
||||
publisher_name LIKE concat('%', #{ publisherName } , '%')
|
||||
</if>
|
||||
),
|
||||
publisher_id)
|
||||
and
|
||||
FIND_IN_SET(
|
||||
( SELECT id FROM author WHERE
|
||||
<if test="authorName != null and authorName != ''">
|
||||
author_name LIKE concat('%', #{ authorName } , '%')
|
||||
</if>
|
||||
),
|
||||
publisher_id)
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
31
src/main/resources/mapper/book/BookReadRateDao.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?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.peanut.modules.book.dao.BookReadRateDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookReadRateEntity" id="bookReadRateMap">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="bookId" column="book_id" />
|
||||
<result property="chapterId" column="chapter_id" />
|
||||
<result property="chapterName" column="chapter_name" />
|
||||
<result property="contentId" column="content_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="domDep" column="del_dep" />
|
||||
<result property="domValue" column="del_value" />
|
||||
<result property="domVmCount" column="del_vm_count" />
|
||||
<result property="domId" column="dom_id" />
|
||||
<result property="bottomGap" column="bottom_gap" />
|
||||
<result property="heightGap" column="height_gap" />
|
||||
<result property="leftGap" column="left_gap" />
|
||||
<result property="rightGap" column="right_gap" />
|
||||
<result property="topGap" column="top_gap" />
|
||||
<result property="widthGap" column="width_gap" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
19
src/main/resources/mapper/book/BookShelfDao.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.peanut.modules.book.dao.BookShelfDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BookShelfEntity" id="bookShelfMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="bookName" column="book_name"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
73
src/main/resources/mapper/book/BuyOrderDao.xml
Normal file
@@ -0,0 +1,73 @@
|
||||
<?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.peanut.modules.book.dao.BuyOrderDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BuyOrderEntity" id="buyOrderMap">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="orderSn" column="order_sn" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="shippingUser" column="shipping_user" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="district" column="district" />
|
||||
<result property="address" column="address" />
|
||||
<result property="paymentMethod" column="payment_method" />
|
||||
<result property="orderMoney" column="order_money" />
|
||||
<result property="districtMoney" column="district_money" />
|
||||
<result property="realMoney" column="real_money" />
|
||||
<result property="shippingMoney" column="shipping_money" />
|
||||
<result property="shippingCompName" column="shipping_comp_name" />
|
||||
<result property="shippingSn" column="shipping_sn" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="shippingTime" column="shipping_time" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="successTime" column="success_time" />
|
||||
<result property="couponId" column="coupon_id" />
|
||||
<result property="couponName" column="coupon_name" />
|
||||
<result property="userPhone" column="user_phone" />
|
||||
<result property="orderType" column="order_type" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="expNo" column="exp_no" />
|
||||
<result property="isSend" column="is_send" />
|
||||
<result property="addressId" column="address_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="paymentDate" column="payment_date" />
|
||||
|
||||
|
||||
<collection property="products" ofType="com.peanut.modules.book.entity.BuyOrderDetailEntity">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="productPrice" column="product_price" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="remark" column="remark" />
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<!-- <resultMap id="OrderDetailResult" type="com.peanut.modules.book.entity.BuyOrderDetailEntity">-->
|
||||
|
||||
<!-- </resultMap>-->
|
||||
|
||||
<select id="queryListByOrderIds" resultType="com.peanut.modules.book.entity.BuyOrderEntity">
|
||||
select
|
||||
*,
|
||||
buy_order_detail.order_id,
|
||||
buy_order_detail.product_name,
|
||||
buy_order_detail.quantity,
|
||||
buy_order_detail.product_price,
|
||||
buy_order_detail.weight,
|
||||
buy_order_detail.remark
|
||||
from buy_order
|
||||
left join buy_order_detail on buy_order.order_id = buy_order_detail.order_id
|
||||
where buy_order.order_id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
and del_flag = 0
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
43
src/main/resources/mapper/book/BuyOrderDetailDao.xml
Normal file
@@ -0,0 +1,43 @@
|
||||
<?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.peanut.modules.book.dao.BuyOrderDetailDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.BuyOrderDetailEntity" id="buyOrderDetailMap">
|
||||
<result property="allOrderId" column="all_order_id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="quantity" column="quantity" />
|
||||
<result property="productPrice" column="product_price" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="productType" column="product_type" />
|
||||
<result property="creatTime" column="creat_time" />
|
||||
<result property="shippingSn" column="shipping_sn" />
|
||||
<result property="orderStatus" column="order_status" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="addressId" column="address_id" />
|
||||
<result property="fmsHtml" column="fms_html" />
|
||||
<result property="shipperCode" column="shipper_code" />
|
||||
<result property="shipperName" column="shipper_name" />
|
||||
<result property="isPrint" column="is_print" />
|
||||
<result property="productUrl" column="product_url" />
|
||||
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="queryListByOrderIds" resultType="com.peanut.modules.book.entity.BuyOrderDetailEntity">
|
||||
select
|
||||
*
|
||||
from buy_order_detail
|
||||
where buy_order_detail.order_id in
|
||||
<foreach collection="array" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
16
src/main/resources/mapper/book/CityDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.book.dao.CityDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.CityEntity" id="cityMap">
|
||||
<result property="cityId" column="city_id"/>
|
||||
<result property="provId" column="prov_id"/>
|
||||
<result property="cityName" column="city_name"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
<result property="regionCode" column="region_code"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
16
src/main/resources/mapper/book/CountyDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.book.dao.CountyDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.CountyEntity" id="countyMap">
|
||||
<result property="countyId" column="county_id"/>
|
||||
<result property="cityId" column="city_id"/>
|
||||
<result property="countyName" column="county_name"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
<result property="regionCode" column="region_code"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
28
src/main/resources/mapper/book/CouponDao.xml
Normal file
@@ -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.peanut.modules.book.dao.CouponDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.CouponEntity" id="couponMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponType" column="coupon_type" />
|
||||
<result property="couponName" column="coupon_name" />
|
||||
<result property="couponAmount" column="coupon_amount" />
|
||||
<result property="couponUrl" column="coupon_url" />
|
||||
<result property="limitedCollar" column="limited_collar" />
|
||||
<result property="validity" column="validity" />
|
||||
<result property="takeEffectType" column="take_effect_type" />
|
||||
<result property="takeEffectDate" column="take_effect_date" />
|
||||
<result property="expirationDate" column="expiration_date" />
|
||||
<result property="totalCirculation" column="total_circulation" />
|
||||
<result property="currentState" column="current_state" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="couponProType" column="coupon_pro_type" />
|
||||
<result property="useLevel" column="use_level" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
23
src/main/resources/mapper/book/CouponHistoryDao.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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.peanut.modules.book.dao.CouponHistoryDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.CouponHistoryEntity" id="couponHistoryMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="memberId" column="member_id"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="couponCode" column="coupon_code"/>
|
||||
<result property="memberNickname" column="member_nickname"/>
|
||||
<result property="getType" column="get_type"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="useStatus" column="use_status"/>
|
||||
<result property="useTime" column="use_time"/>
|
||||
<result property="orderSn" column="order_sn"/>
|
||||
<result property="couponProType" column="coupon_pro_type" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.book.dao.CouponProductCategoryRelationDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.CouponProductCategoryRelationEntity" id="couponProductCategoryRelationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="productCategoryId" column="product_category_id"/>
|
||||
<result property="productCategoryName" column="product_category_name"/>
|
||||
<result property="parentCategoryName" column="parent_category_name"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
16
src/main/resources/mapper/book/CouponProductRelationDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.book.dao.CouponProductRelationDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.CouponProductRelationEntity" id="couponProductRelationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="couponId" column="coupon_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="productName" column="product_name"/>
|
||||
<result property="productSn" column="product_sn"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
42
src/main/resources/mapper/book/FMSCommodityDao.xml
Normal file
@@ -0,0 +1,42 @@
|
||||
<?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.peanut.modules.book.dao.FMSCommodityDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
|
||||
<resultMap id="CommodityResult" type="com.peanut.modules.book.entity.FMSCommodity">
|
||||
<result property="id" column="id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsQuantity" column="goods_quantity" />
|
||||
<result property="goodsPrice" column="goods_price" />
|
||||
<result property="goodsWeight" column="goods_weight" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="fmsOrderId" column="fms_order_id" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="fmsCommodityVo">
|
||||
(
|
||||
goods_name,
|
||||
goods_quantity,
|
||||
goods_price,
|
||||
goods_weight,
|
||||
goods_desc,
|
||||
fms_order_id
|
||||
)
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
insert into fms_commodity
|
||||
<include refid="fmsCommodityVo"/>
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{item.goodsName},#{item.goodsQuantity},#{item.goodsPrice},#{item.goodsWeight},#{item.goodsDesc},#{item.fmsOrderId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
61
src/main/resources/mapper/book/FMSOrderDao.xml
Normal file
@@ -0,0 +1,61 @@
|
||||
<?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.peanut.modules.book.dao.FMSOrderDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.FMSOrderEntity" id="buyOrderMap">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="shipperCode" column="shipper_code" />
|
||||
<result property="receiverName" column="receiver_name" />
|
||||
<result property="receiverMobile" column="receiver_mobile" />
|
||||
<result property="receiverProvinceName" column="receiver_province_name" />
|
||||
<result property="receiverCityName" column="receiver_city_name" />
|
||||
<result property="receiverExpAreaName" column="receiverExp_area_name" />
|
||||
<result property="receiverAddress" column="receiver_address" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<collection property="commodityList" javaType="java.util.List" resultMap="CommodityResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="CommodityResult" type="com.peanut.modules.book.entity.FMSCommodity">
|
||||
<result property="id" column="id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsQuantity" column="goods_quantity" />
|
||||
<result property="goodsPrice" column="goods_price" />
|
||||
<result property="goodsWeight" column="goods_weight" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="fmsOrderId" column="fms_order_id" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="fmsVo">
|
||||
(
|
||||
order_code,
|
||||
shipper_code,
|
||||
receiver_name,
|
||||
receiver_mobile,
|
||||
receiver_province_name,
|
||||
receiver_city_name,
|
||||
receiverExp_area_name,
|
||||
receiver_address,
|
||||
remark,
|
||||
order_id
|
||||
)
|
||||
</sql>
|
||||
|
||||
|
||||
<insert id="batchInsert">
|
||||
insert into fms_order
|
||||
<include refid="fmsVo"/>
|
||||
values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(
|
||||
#{item.orderCode},#{item.shipperCode},#{item.receiverName},#{item.receiverMobile},#{item.receiverProvinceName},
|
||||
#{item.receiverCityName},#{item.receiverExpAreaName},#{item.receiverAddress},#{item.remark},#{item.orderId}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
16
src/main/resources/mapper/book/FMSOrderDetailDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.book.dao.FMSOrderDetailDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.FMSOrderDetailEntity" id="fmsOrderMap">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="detailId" column="detail_id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
29
src/main/resources/mapper/book/MyUserDao.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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.peanut.modules.book.dao.MyUserDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.MyUserEntity" id="userMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="age" column="age"/>
|
||||
<result property="sex" column="sex"/>
|
||||
<result property="avatar" column="avatar"/>
|
||||
<result property="nickname" column="nickname"/>
|
||||
<result property="tel" column="tel"/>
|
||||
<result property="password" column="password"/>
|
||||
<result property="vip" column="vip"/>
|
||||
<result property="vipStartTime" column="vip_start_time"/>
|
||||
<result property="vipValidtime" column="vip_validtime"/>
|
||||
<result property="peanutCoin" column="peanut_coin"/>
|
||||
<result property="readTime" column="read_time"/>
|
||||
<result property="lastLoginTime" column="last_login_time"/>
|
||||
<result property="yljkOid" column="yljk_oid"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
30
src/main/resources/mapper/book/OrderCartDao.xml
Normal file
@@ -0,0 +1,30 @@
|
||||
<?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.peanut.modules.book.dao.OrderCartDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.OrderCartEntity" id="orderCartMap">
|
||||
<result property="cartId" column="cart_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<result property="productAmount" column="product_amount"/>
|
||||
<result property="price" column="price"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getDeteleOrderCart" resultType="com.peanut.modules.book.entity.OrderCartEntity">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`order_cart`
|
||||
WHERE
|
||||
product_id = #{productId}
|
||||
AND user_id = #{userId}
|
||||
AND del_flag = -1
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
20
src/main/resources/mapper/book/PayPaymentOrderDao.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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.peanut.modules.book.dao.PayPaymentOrderDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.PayPaymentOrderEntity" id="payPaymentOrderMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="rechargeAmount" column="recharge_amount"/>
|
||||
<result property="rechargeChannel" column="recharge_channel"/>
|
||||
<result property="orderId" column="order_id"/>
|
||||
<result property="realAmount" column="real_amount"/>
|
||||
<result property="rechargeStatus" column="recharge_status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="successTime" column="success_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
45
src/main/resources/mapper/book/PayZfbOrderDao.xml
Normal file
@@ -0,0 +1,45 @@
|
||||
<?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.peanut.modules.book.dao.PayZfbOrderDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.PayZfbOrderEntity" id="payZfbOrderMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="customerid" column="customerId"/>
|
||||
<result property="outTradeNo" column="out_trade_no"/>
|
||||
<result property="tradeNo" column="trade_no"/>
|
||||
<result property="notifyTime" column="notify_time"/>
|
||||
<result property="notifyType" column="notify_type"/>
|
||||
<result property="notifyId" column="notify_id"/>
|
||||
<result property="appId" column="app_id"/>
|
||||
<result property="authAppId" column="auth_app_id"/>
|
||||
<result property="charset" column="charset"/>
|
||||
<result property="version" column="version"/>
|
||||
<result property="signType" column="sign_type"/>
|
||||
<result property="sign" column="sign"/>
|
||||
<result property="outBizNo" column="out_biz_no"/>
|
||||
<result property="buyerId" column="buyer_id"/>
|
||||
<result property="buyerLogonId" column="buyer_logon_id"/>
|
||||
<result property="sellerId" column="seller_id"/>
|
||||
<result property="sellerEmail" column="seller_email"/>
|
||||
<result property="tradeStatus" column="trade_status"/>
|
||||
<result property="totalAmount" column="total_amount"/>
|
||||
<result property="receiptAmount" column="receipt_amount"/>
|
||||
<result property="invoiceAmount" column="invoice_amount"/>
|
||||
<result property="buyerPayAmount" column="buyer_pay_amount"/>
|
||||
<result property="pointAmount" column="point_amount"/>
|
||||
<result property="refundFee" column="refund_fee"/>
|
||||
<result property="subject" column="subject"/>
|
||||
<result property="body" column="body"/>
|
||||
<result property="gmtCreate" column="gmt_create"/>
|
||||
<result property="gmtPayment" column="gmt_payment"/>
|
||||
<result property="gmtRefund" column="gmt_refund"/>
|
||||
<result property="gmtClose" column="gmt_close"/>
|
||||
<result property="fundBillList" column="fund_bill_list"/>
|
||||
<result property="voucherDetailList" column="voucher_detail_list"/>
|
||||
<result property="relevanceoid" column="relevanceOid"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
15
src/main/resources/mapper/book/ProvinceDao.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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.peanut.modules.book.dao.ProvinceDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.ProvinceEntity" id="provinceMap">
|
||||
<result property="provId" column="prov_id"/>
|
||||
<result property="provName" column="prov_name"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
<result property="regionCode" column="region_code"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
18
src/main/resources/mapper/book/PublisherDao.xml
Normal file
@@ -0,0 +1,18 @@
|
||||
<?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.peanut.modules.book.dao.PublisherDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.PublisherEntity" id="publisherMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="publisherName" column="publisher_name"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="tel" column="tel"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
19
src/main/resources/mapper/book/SeckillProdRelationDao.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.peanut.modules.book.dao.SeckillProdRelationDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.SeckillProdRelationEntity" id="seckillProdRelationMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="promotionId" column="promotion_id"/>
|
||||
<result property="promotionSeckillId" column="promotion_seckill_id"/>
|
||||
<result property="prodId" column="prod_id"/>
|
||||
<result property="seckillPrice" column="seckill_price"/>
|
||||
<result property="seckillCount" column="seckill_count"/>
|
||||
<result property="seckillLimit" column="seckill_limit"/>
|
||||
<result property="seckillSort" column="seckill_sort"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
19
src/main/resources/mapper/book/ShopCategoryDao.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.peanut.modules.book.dao.ShopCategoryDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.ShopCategoryEntity" id="shopCategoryMap">
|
||||
<result property="catId" column="cat_id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="parentCid" column="parent_cid"/>
|
||||
<result property="catLevel" column="cat_level"/>
|
||||
<result property="showStatus" column="show_status"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="icon" column="icon"/>
|
||||
<result property="productUnit" column="product_unit"/>
|
||||
<result property="productCount" column="product_count"/>
|
||||
</resultMap>
|
||||
|
||||
</mapper>
|
||||
49
src/main/resources/mapper/book/ShopProductDao.xml
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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.peanut.modules.book.dao.ShopProductDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.ShopProductEntity" id="shopProductMap">
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="price" column="price" />
|
||||
<result property="weight" column="weight" />
|
||||
<result property="publishStatus" column="publish_status" />
|
||||
<result property="productDetails" column="product_details" />
|
||||
<result property="productPid" column="product_pid" />
|
||||
<result property="productType" column="product_type" />
|
||||
<result property="productStock" column="product_stock" />
|
||||
<result property="productImages" column="product_images" />
|
||||
<result property="productImageList" column="product_image_list" />
|
||||
<result property="productSalesVolume" column="product_sales_volume" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="sort" column="sort" />
|
||||
<result property="author" column="author" />
|
||||
<result property="publisher" column=" publisher" />
|
||||
<result property="pubDate" column="pub_date" />
|
||||
<result property="format" column="format" />
|
||||
<result property="pageNum" column="page_num" />
|
||||
<result property="quality" column="quality" />
|
||||
<result property="sumSales" column="sum_sales" />
|
||||
<result property="goodsType" column="goods_type" />
|
||||
<result property="goodsTypeCode" column="goods_type_code" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="appGetCategoryList" resultType="com.peanut.modules.book.entity.ShopProductEntity">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
`shop_product` a
|
||||
LEFT JOIN shop_category b ON a.product_pid = b.cat_id
|
||||
WHERE
|
||||
<if test="catId != null and catId != ''">
|
||||
b.cat_id = #{catId}
|
||||
</if>
|
||||
order by a.sort desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
16
src/main/resources/mapper/book/ShopSeckillDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.book.dao.ShopSeckillDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.ShopSeckillEntity" id="shopSeckillMap">
|
||||
<result property="seckillId" column="seckill_id"/>
|
||||
<result property="nam" column="nam"/>
|
||||
<result property="startTime" column="start_time"/>
|
||||
<result property="endTime" column="end_time"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
19
src/main/resources/mapper/book/TransactionDetailsDao.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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.peanut.modules.book.dao.TransactionDetailsDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.TransactionDetailsEntity" id="transactionDetailsMap">
|
||||
<result property="transactionId" column="transaction_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="orderType" column="order_type"/>
|
||||
<result property="changeAmount" column="change_amount"/>
|
||||
<result property="relationId" column="relation_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="userBalance" column="user_balance"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
23
src/main/resources/mapper/book/UserAddressDao.xml
Normal file
@@ -0,0 +1,23 @@
|
||||
<?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.peanut.modules.book.dao.UserAddressDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.UserAddressEntity" id="userAddressMap">
|
||||
<result property="addressid" column="addressId"/>
|
||||
<result property="userid" column="userId"/>
|
||||
<result property="username" column="userName"/>
|
||||
<result property="userphone" column="userPhone"/>
|
||||
<result property="areaidpath" column="areaIdPath"/>
|
||||
<result property="areaid" column="areaId"/>
|
||||
<result property="useraddress" column="userAddress"/>
|
||||
<result property="areaidpathtext" column="areaIdPathText"/>
|
||||
<result property="isdefault" column="isDefault"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
20
src/main/resources/mapper/book/UserEbookBuyDao.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?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.peanut.modules.book.dao.UserEbookBuyDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.UserEbookBuyEntity" id="userEbookBuyMap">
|
||||
<result property="buyId" column="buy_id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="bookId" column="book_id"/>
|
||||
<result property="bookName" column="book_name"/>
|
||||
<result property="payType" column="pay_type"/>
|
||||
<result property="payTime" column="pay_time"/>
|
||||
<result property="payStatus" column="pay_status"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="author" column="author"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
14
src/main/resources/mapper/job/ScheduleJobDao.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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.peanut.modules.job.dao.ScheduleJobDao">
|
||||
|
||||
<!-- 批量更新状态 -->
|
||||
<update id="updateBatch">
|
||||
update schedule_job set status = #{status} where job_id in
|
||||
<foreach item="jobId" collection="list" open="(" separator="," close=")">
|
||||
#{jobId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
6
src/main/resources/mapper/job/ScheduleJobLogDao.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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.peanut.modules.job.dao.ScheduleJobLogDao">
|
||||
|
||||
</mapper>
|
||||
7
src/main/resources/mapper/oss/SysOssDao.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?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.peanut.modules.oss.dao.SysOssDao">
|
||||
|
||||
|
||||
</mapper>
|
||||
15
src/main/resources/mapper/sys/SysConfigDao.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<?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.peanut.modules.sys.dao.SysConfigDao">
|
||||
|
||||
<!-- 根据key,更新value -->
|
||||
<update id="updateValueByKey" parameterType="map">
|
||||
update sys_config set param_value = #{paramValue} where param_key = #{paramKey}
|
||||
</update>
|
||||
|
||||
<!-- 根据key,查询value -->
|
||||
<select id="queryByKey" parameterType="string" resultType="com.peanut.modules.sys.entity.SysConfigEntity">
|
||||
select * from sys_config where param_key = #{paramKey}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
21
src/main/resources/mapper/sys/SysDictDataDao.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?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.peanut.modules.book.dao.SysDictDataDao">
|
||||
|
||||
<!-- 可根据自己的需求,是否要使用 -->
|
||||
<resultMap type="com.peanut.modules.book.entity.SysDictDataEntity" id="sysDictDataMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="dictType" column="dict_type"/>
|
||||
<result property="dictLabel" column="dict_label"/>
|
||||
<result property="dictValue" column="dict_value"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="creator" column="creator"/>
|
||||
<result property="createDate" column="create_date"/>
|
||||
<result property="updater" column="updater"/>
|
||||
<result property="updateDate" column="update_date"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
6
src/main/resources/mapper/sys/SysLogDao.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?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.peanut.modules.sys.dao.SysLogDao">
|
||||
|
||||
</mapper>
|
||||
14
src/main/resources/mapper/sys/SysMenuDao.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?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.peanut.modules.sys.dao.SysMenuDao">
|
||||
|
||||
<select id="queryListParentId" resultType="com.peanut.modules.sys.entity.SysMenuEntity">
|
||||
select * from sys_menu where parent_id = #{parentId} order by order_num asc
|
||||
</select>
|
||||
|
||||
<select id="queryNotButtonList" resultType="com.peanut.modules.sys.entity.SysMenuEntity">
|
||||
select * from sys_menu where type != 2 order by order_num asc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
10
src/main/resources/mapper/sys/SysRoleDao.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<?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.peanut.modules.sys.dao.SysRoleDao">
|
||||
|
||||
<!-- 查询用户创建的角色ID列表 -->
|
||||
<select id="queryRoleIdList" resultType="long">
|
||||
select role_id from sys_role where create_user_id = #{createUserId}
|
||||
</select>
|
||||
</mapper>
|
||||
17
src/main/resources/mapper/sys/SysRoleMenuDao.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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.peanut.modules.sys.dao.SysRoleMenuDao">
|
||||
|
||||
<select id="queryMenuIdList" resultType="long">
|
||||
select menu_id from sys_role_menu where role_id = #{value}
|
||||
</select>
|
||||
|
||||
<delete id="deleteBatch">
|
||||
delete from sys_role_menu where role_id in
|
||||
<foreach item="roleId" collection="array" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
24
src/main/resources/mapper/sys/SysUserDao.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<?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.peanut.modules.sys.dao.SysUserDao">
|
||||
<!-- 查询用户的所有权限 -->
|
||||
<select id="queryAllPerms" resultType="string">
|
||||
select m.perms from sys_user_role ur
|
||||
LEFT JOIN sys_role_menu rm on ur.role_id = rm.role_id
|
||||
LEFT JOIN sys_menu m on rm.menu_id = m.menu_id
|
||||
where ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<!-- 查询用户的所有菜单ID -->
|
||||
<select id="queryAllMenuId" resultType="long">
|
||||
select distinct rm.menu_id from sys_user_role ur
|
||||
LEFT JOIN sys_role_menu rm on ur.role_id = rm.role_id
|
||||
where ur.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<select id="queryByUserName" resultType="com.peanut.modules.sys.entity.SysUserEntity">
|
||||
select * from sys_user where username = #{username}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
16
src/main/resources/mapper/sys/SysUserRoleDao.xml
Normal file
@@ -0,0 +1,16 @@
|
||||
<?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.peanut.modules.sys.dao.SysUserRoleDao">
|
||||
|
||||
<delete id="deleteBatch">
|
||||
delete from sys_user_role where role_id in
|
||||
<foreach item="roleId" collection="array" open="(" separator="," close=")">
|
||||
#{roleId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="queryRoleIdList" resultType="long">
|
||||
select role_id from sys_user_role where user_id = #{value}
|
||||
</select>
|
||||
</mapper>
|
||||
9
src/main/resources/mapper/sys/SysUserTokenDao.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?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.peanut.modules.sys.dao.SysUserTokenDao">
|
||||
|
||||
<select id="queryByToken" resultType="com.peanut.modules.sys.entity.SysUserTokenEntity">
|
||||
select * from sys_user_token where token = #{value}
|
||||
</select>
|
||||
</mapper>
|
||||
BIN
src/main/resources/static/favicon.ico
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
1
src/main/resources/static/swagger/css/print.css
Normal file
1
src/main/resources/static/swagger/css/reset.css
Normal file
@@ -0,0 +1 @@
|
||||
a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
|
||||
1
src/main/resources/static/swagger/css/screen.css
Normal file
1
src/main/resources/static/swagger/css/style.css
Normal file
@@ -0,0 +1 @@
|
||||
.swagger-section #header a#logo{font-size:1.5em;font-weight:700;text-decoration:none;padding:20px 0 20px 40px}#text-head{font-size:80px;font-family:Roboto,sans-serif;color:#fff;float:right;margin-right:20%}.navbar-fixed-top .navbar-brand,.navbar-fixed-top .navbar-nav,.navbar-header{height:auto}.navbar-inverse{background-color:#000;border-color:#000}#navbar-brand{margin-left:20%}.navtext{font-size:10px}.h1,h1{font-size:60px}.navbar-default .navbar-header .navbar-brand{color:#a2dfee}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a{color:#393939;font-family:Arvo,serif;font-size:1.5em}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2 a:hover{color:#000}.swagger-section .swagger-ui-wrap ul#resources li.resource div.heading h2{color:#525252;padding-left:0;display:block;clear:none;float:left;font-family:Arvo,serif;font-weight:700}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#0a0a0a}.container1{width:1500px;margin:auto;margin-top:0;background-repeat:no-repeat;background-position:-40px -20px;margin-bottom:210px}.container-inner{width:1200px;margin:auto;background-color:hsla(192,8%,88%,.75);padding-bottom:40px;padding-top:40px;border-radius:15px}.header-content{padding:0;width:1000px}.title1{font-size:80px;font-family:Vollkorn,serif;color:#404040;text-align:center;padding-top:40px;padding-bottom:100px}#icon{margin-top:-18px}.subtext{font-size:25px;font-style:italic;color:#08b;text-align:right;padding-right:250px}.bg-primary{background-color:#00468b}.navbar-default .nav>li>a,.navbar-default .nav>li>a:focus,.navbar-default .nav>li>a:focus:hover,.navbar-default .nav>li>a:hover{color:#08b}.text-faded{font-size:25px;font-family:Vollkorn,serif}.section-heading{font-family:Vollkorn,serif;font-size:45px;padding-bottom:10px}hr{border-color:#00468b;padding-bottom:10px}.description{margin-top:20px;padding-bottom:200px}.description li{font-family:Vollkorn,serif;font-size:25px;color:#525252;margin-left:28%;padding-top:5px}.gap{margin-top:200px}.troubleshootingtext{color:hsla(0,0%,100%,.7);padding-left:30%}.troubleshootingtext li{list-style-type:circle;font-size:25px;padding-bottom:5px}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.block.response_body.json:hover{cursor:pointer}.backdrop{color:blue}#myModal{height:100%}.modal-backdrop{bottom:0;position:fixed}.curl{padding:10px;font-family:Anonymous Pro,Menlo,Consolas,Bitstream Vera Sans Mono,Courier New,monospace;font-size:.9em;max-height:400px;margin-top:5px;overflow-y:auto;background-color:#fcf6db;border:1px solid #e5e0c6;border-radius:4px}.curl_title{font-size:1.1em;margin:0;padding:15px 0 5px;font-family:Open Sans,Helvetica Neue,Arial,sans-serif;font-weight:500;line-height:1.1}.footer{display:none}.swagger-section .swagger-ui-wrap h2{padding:0}h2{margin:0;margin-bottom:5px}.markdown p,.swagger-section .swagger-ui-wrap .code{font-size:15px;font-family:Arvo,serif}.swagger-section .swagger-ui-wrap b{font-family:Arvo,serif}#signin:hover{cursor:pointer}.dropdown-menu{padding:15px}.navbar-right .dropdown-menu{left:0;right:auto}#signinbutton{width:100%;height:32px;font-size:13px;font-weight:700;color:#08b}.navbar-default .nav>li .details{color:#000;text-transform:none;font-size:15px;font-weight:400;font-family:Open Sans,sans-serif;font-style:italic;line-height:20px;top:-2px}.navbar-default .nav>li .details:hover{color:#000}#signout{width:100%;height:32px;font-size:13px;font-weight:700;color:#08b}
|
||||
BIN
src/main/resources/static/swagger/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 445 B |
BIN
src/main/resources/static/swagger/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/main/resources/static/swagger/fonts/DroidSans-Bold.ttf
Normal file
BIN
src/main/resources/static/swagger/fonts/DroidSans.ttf
Normal file
BIN
src/main/resources/static/swagger/images/collapse.gif
Normal file
|
After Width: | Height: | Size: 69 B |
BIN
src/main/resources/static/swagger/images/expand.gif
Normal file
|
After Width: | Height: | Size: 73 B |
BIN
src/main/resources/static/swagger/images/explorer_icons.png
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
src/main/resources/static/swagger/images/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 445 B |
BIN
src/main/resources/static/swagger/images/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
src/main/resources/static/swagger/images/favicon.ico
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
src/main/resources/static/swagger/images/logo_small.png
Normal file
|
After Width: | Height: | Size: 455 B |
BIN
src/main/resources/static/swagger/images/pet_store_api.png
Normal file
|
After Width: | Height: | Size: 631 B |
BIN
src/main/resources/static/swagger/images/throbber.gif
Normal file
|
After Width: | Height: | Size: 9.0 KiB |
BIN
src/main/resources/static/swagger/images/wordnik_api.png
Normal file
|
After Width: | Height: | Size: 670 B |
107
src/main/resources/static/swagger/index.html
Normal file
@@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="x-ua-compatible" content="IE=edge">
|
||||
<title>接口文档 - 人人开源</title>
|
||||
<link rel="icon" type="image/png" href="/favicon.ico" />
|
||||
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
|
||||
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
|
||||
|
||||
<script src='lib/object-assign-pollyfill.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
|
||||
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
|
||||
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
|
||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
||||
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
|
||||
<script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
|
||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
||||
<script src='lib/marked.js' type='text/javascript'></script>
|
||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||
|
||||
<!-- Some basic translations -->
|
||||
<script src='lang/translator.js' type='text/javascript'></script>
|
||||
<script src='lang/zh-cn.js' type='text/javascript'></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
var url = window.location.search.match(/url=([^&]+)/);
|
||||
if (url && url.length > 1) {
|
||||
url = decodeURIComponent(url[1]);
|
||||
} else {
|
||||
//url = "http://petstore.swagger.io/v2/swagger.json";
|
||||
url = "../index.yaml";
|
||||
}
|
||||
|
||||
hljs.configure({
|
||||
highlightSizeThreshold: 5000
|
||||
});
|
||||
|
||||
// Pre load translate...
|
||||
if(window.SwaggerTranslator) {
|
||||
window.SwaggerTranslator.translate();
|
||||
}
|
||||
window.swaggerUi = new SwaggerUi({
|
||||
url: url,
|
||||
dom_id: "swagger-ui-container",
|
||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
|
||||
onComplete: function(swaggerApi, swaggerUi){
|
||||
if(typeof initOAuth == "function") {
|
||||
initOAuth({
|
||||
clientId: "your-client-id",
|
||||
clientSecret: "your-client-secret-if-required",
|
||||
realm: "your-realms",
|
||||
appName: "your-app-name",
|
||||
scopeSeparator: " ",
|
||||
additionalQueryStringParams: {}
|
||||
});
|
||||
}
|
||||
|
||||
if(window.SwaggerTranslator) {
|
||||
window.SwaggerTranslator.translate();
|
||||
}
|
||||
},
|
||||
onFailure: function(data) {
|
||||
log("Unable to Load SwaggerUI");
|
||||
},
|
||||
docExpansion: "none",
|
||||
jsonEditor: false,
|
||||
defaultModelRendering: 'schema',
|
||||
showRequestHeaders: false,
|
||||
showOperationIds: false
|
||||
});
|
||||
|
||||
window.swaggerUi.load();
|
||||
|
||||
function log() {
|
||||
if ('console' in window) {
|
||||
console.log.apply(console, arguments);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body class="swagger-section">
|
||||
<div id='header'>
|
||||
<div class="swagger-ui-wrap">
|
||||
<a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a>
|
||||
<form id='api_selector'>
|
||||
<div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
|
||||
<div id='auth_container'></div>
|
||||
<div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate> </div>
|
||||
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
|
||||
</body>
|
||||
</html>
|
||||
1664
src/main/resources/static/swagger/index.yaml
Normal file
56
src/main/resources/static/swagger/lang/en.js
Normal file
@@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"Warning: Deprecated",
|
||||
"Implementation Notes":"Implementation Notes",
|
||||
"Response Class":"Response Class",
|
||||
"Status":"Status",
|
||||
"Parameters":"Parameters",
|
||||
"Parameter":"Parameter",
|
||||
"Value":"Value",
|
||||
"Description":"Description",
|
||||
"Parameter Type":"Parameter Type",
|
||||
"Data Type":"Data Type",
|
||||
"Response Messages":"Response Messages",
|
||||
"HTTP Status Code":"HTTP Status Code",
|
||||
"Reason":"Reason",
|
||||
"Response Model":"Response Model",
|
||||
"Request URL":"Request URL",
|
||||
"Response Body":"Response Body",
|
||||
"Response Code":"Response Code",
|
||||
"Response Headers":"Response Headers",
|
||||
"Hide Response":"Hide Response",
|
||||
"Headers":"Headers",
|
||||
"Try it out!":"Try it out!",
|
||||
"Show/Hide":"Show/Hide",
|
||||
"List Operations":"List Operations",
|
||||
"Expand Operations":"Expand Operations",
|
||||
"Raw":"Raw",
|
||||
"can't parse JSON. Raw result":"can't parse JSON. Raw result",
|
||||
"Example Value":"Example Value",
|
||||
"Model Schema":"Model Schema",
|
||||
"Model":"Model",
|
||||
"Click to set as parameter value":"Click to set as parameter value",
|
||||
"apply":"apply",
|
||||
"Username":"Username",
|
||||
"Password":"Password",
|
||||
"Terms of service":"Terms of service",
|
||||
"Created by":"Created by",
|
||||
"See more at":"See more at",
|
||||
"Contact the developer":"Contact the developer",
|
||||
"api version":"api version",
|
||||
"Response Content Type":"Response Content Type",
|
||||
"Parameter content type:":"Parameter content type:",
|
||||
"fetching resource":"fetching resource",
|
||||
"fetching resource list":"fetching resource list",
|
||||
"Explore":"Explore",
|
||||
"Show Swagger Petstore Example Apis":"Show Swagger Petstore Example Apis",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"Can't read from server. It may not have the appropriate access-control-origin settings.",
|
||||
"Please specify the protocol for":"Please specify the protocol for",
|
||||
"Can't read swagger JSON from":"Can't read swagger JSON from",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"Finished Loading Resource Information. Rendering Swagger UI",
|
||||
"Unable to read api":"Unable to read api",
|
||||
"from path":"from path",
|
||||
"server returned":"server returned"
|
||||
});
|
||||
39
src/main/resources/static/swagger/lang/translator.js
Normal file
@@ -0,0 +1,39 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Translator for documentation pages.
|
||||
*
|
||||
* To enable translation you should include one of language-files in your index.html
|
||||
* after <script src='lang/translator.js' type='text/javascript'></script>.
|
||||
* For example - <script src='lang/ru.js' type='text/javascript'></script>
|
||||
*
|
||||
* If you wish to translate some new texts you should do two things:
|
||||
* 1. Add a new phrase pair ("New Phrase": "New Translation") into your language file (for example lang/ru.js). It will be great if you add it in other language files too.
|
||||
* 2. Mark that text it templates this way <anyHtmlTag data-sw-translate>New Phrase</anyHtmlTag> or <anyHtmlTag data-sw-translate value='New Phrase'/>.
|
||||
* The main thing here is attribute data-sw-translate. Only inner html, title-attribute and value-attribute are going to translate.
|
||||
*
|
||||
*/
|
||||
window.SwaggerTranslator = {
|
||||
|
||||
_words:[],
|
||||
|
||||
translate: function(sel) {
|
||||
var $this = this;
|
||||
sel = sel || '[data-sw-translate]';
|
||||
|
||||
$(sel).each(function() {
|
||||
$(this).html($this._tryTranslate($(this).html()));
|
||||
|
||||
$(this).val($this._tryTranslate($(this).val()));
|
||||
$(this).attr('title', $this._tryTranslate($(this).attr('title')));
|
||||
});
|
||||
},
|
||||
|
||||
_tryTranslate: function(word) {
|
||||
return this._words[$.trim(word)] !== undefined ? this._words[$.trim(word)] : word;
|
||||
},
|
||||
|
||||
learn: function(wordsMap) {
|
||||
this._words = wordsMap;
|
||||
}
|
||||
};
|
||||
56
src/main/resources/static/swagger/lang/zh-cn.js
Normal file
@@ -0,0 +1,56 @@
|
||||
'use strict';
|
||||
|
||||
/* jshint quotmark: double */
|
||||
window.SwaggerTranslator.learn({
|
||||
"Warning: Deprecated":"警告:已过时",
|
||||
"Implementation Notes":"接口备注",
|
||||
"Response Class":"响应类",
|
||||
"Status":"状态",
|
||||
"Parameters":"参数",
|
||||
"Parameter":"参数",
|
||||
"Value":"值",
|
||||
"Description":"描述",
|
||||
"Parameter Type":"参数类型",
|
||||
"Data Type":"数据类型",
|
||||
"Response Messages":"响应消息",
|
||||
"HTTP Status Code":"HTTP状态码",
|
||||
"Reason":"原因",
|
||||
"Response Model":"响应模型",
|
||||
"Request URL":"请求URL",
|
||||
"Response Body":"响应体",
|
||||
"Response Code":"响应码",
|
||||
"Response Headers":"响应头",
|
||||
"Hide Response":"隐藏响应",
|
||||
"Headers":"头",
|
||||
"Try it out!":"试一下!",
|
||||
"Show/Hide":"显示/隐藏",
|
||||
"List Operations":"显示操作",
|
||||
"Expand Operations":"展开操作",
|
||||
"Raw":"原始",
|
||||
"can't parse JSON. Raw result":"无法解析JSON. 原始结果",
|
||||
"Example Value":"示例",
|
||||
"Click to set as parameter value":"点击设置参数",
|
||||
"Model Schema":"模型架构",
|
||||
"Model":"模型",
|
||||
"apply":"应用",
|
||||
"Username":"用户名",
|
||||
"Password":"密码",
|
||||
"Terms of service":"服务条款",
|
||||
"Created by":"创建者",
|
||||
"See more at":"查看更多:",
|
||||
"Contact the developer":"联系开发者",
|
||||
"api version":"api版本",
|
||||
"Response Content Type":"响应类型",
|
||||
"Parameter content type:":"参数类型:",
|
||||
"fetching resource":"正在获取资源",
|
||||
"fetching resource list":"正在获取资源列表",
|
||||
"Explore":"浏览",
|
||||
"Show Swagger Petstore Example Apis":"显示 Swagger Petstore 示例 Apis",
|
||||
"Can't read from server. It may not have the appropriate access-control-origin settings.":"无法从服务器读取。可能没有正确设置access-control-origin。",
|
||||
"Please specify the protocol for":"请指定协议:",
|
||||
"Can't read swagger JSON from":"无法读取swagger JSON于",
|
||||
"Finished Loading Resource Information. Rendering Swagger UI":"已加载资源信息。正在渲染Swagger UI",
|
||||
"Unable to read api":"无法读取api",
|
||||
"from path":"从路径",
|
||||
"server returned":"服务器返回"
|
||||
});
|
||||
1
src/main/resources/static/swagger/lib/backbone-min.js
vendored
Normal file
1
src/main/resources/static/swagger/lib/es5-shim.js
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";!function(){var h,l;h=hljs.configure,hljs.configure=function(l){var i=l.highlightSizeThreshold;hljs.highlightSizeThreshold=i===+i?i:null,h.call(this,l)},l=hljs.highlightBlock,hljs.highlightBlock=function(h){var i=h.innerHTML,g=hljs.highlightSizeThreshold;(null==g||g>i.length)&&l.call(hljs,h)}}();
|
||||
3
src/main/resources/static/swagger/lib/jquery-1.8.0.min.js
vendored
Normal file
1
src/main/resources/static/swagger/lib/jquery.ba-bbq.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(e,t){function n(e){return"string"==typeof e}function r(e){var t=g.call(arguments,1);return function(){return e.apply(this,t.concat(g.call(arguments)))}}function o(e){return e.replace(/^[^#]*#?(.*)$/,"$1")}function a(e){return e.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}function i(r,o,a,i,c){var u,s,p,h,d;return i!==f?(p=a.match(r?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/),d=p[3]||"",2===c&&n(i)?s=i.replace(r?R:E,""):(h=l(p[2]),i=n(i)?l[r?A:w](i):i,s=2===c?i:1===c?e.extend({},i,h):e.extend({},h,i),s=b(s),r&&(s=s.replace(m,y))),u=p[1]+(r?"#":s||!p[1]?"?":"")+s+d):u=o(a!==f?a:t[S][q]),u}function c(e,t,r){return t===f||"boolean"==typeof t?(r=t,t=b[e?A:w]()):t=n(t)?t.replace(e?R:E,""):t,l(t,r)}function u(t,r,o,a){return n(o)||"object"==typeof o||(a=o,o=r,r=f),this.each(function(){var n=e(this),i=r||v()[(this.nodeName||"").toLowerCase()]||"",c=i&&n.attr(i)||"";n.attr(i,b[t](c,o,a))})}var f,s,l,p,h,d,v,m,g=Array.prototype.slice,y=decodeURIComponent,b=e.param,$=e.bbq=e.bbq||{},x=e.event.special,j="hashchange",w="querystring",A="fragment",N="elemUrlAttr",S="location",q="href",C="src",E=/^.*\?|#.*$/g,R=/^.*\#/,U={};b[w]=r(i,0,a),b[A]=s=r(i,1,o),s.noEscape=function(t){t=t||"";var n=e.map(t.split(""),encodeURIComponent);m=new RegExp(n.join("|"),"g")},s.noEscape(",/"),e.deparam=l=function(t,n){var r={},o={"true":!0,"false":!1,"null":null};return e.each(t.replace(/\+/g," ").split("&"),function(t,a){var i,c=a.split("="),u=y(c[0]),s=r,l=0,p=u.split("]["),h=p.length-1;if(/\[/.test(p[0])&&/\]$/.test(p[h])?(p[h]=p[h].replace(/\]$/,""),p=p.shift().split("[").concat(p),h=p.length-1):h=0,2===c.length)if(i=y(c[1]),n&&(i=i&&!isNaN(i)?+i:"undefined"===i?f:o[i]!==f?o[i]:i),h)for(;l<=h;l++)u=""===p[l]?s.length:p[l],s=s[u]=l<h?s[u]||(p[l+1]&&isNaN(p[l+1])?{}:[]):i;else e.isArray(r[u])?r[u].push(i):r[u]!==f?r[u]=[r[u],i]:r[u]=i;else u&&(r[u]=n?f:"")}),r},l[w]=r(c,0),l[A]=p=r(c,1),e[N]||(e[N]=function(t){return e.extend(U,t)})({a:q,base:q,iframe:C,img:C,input:C,form:"action",link:q,script:C}),v=e[N],e.fn[w]=r(u,w),e.fn[A]=r(u,A),$.pushState=h=function(e,r){n(e)&&/^#/.test(e)&&r===f&&(r=2);var o=e!==f,a=s(t[S][q],o?e:{},o?r:2);t[S][q]=a+(/#/.test(a)?"":"#")},$.getState=d=function(e,t){return e===f||"boolean"==typeof e?p(e):p(t)[e]},$.removeState=function(t){var n={};t!==f&&(n=d(),e.each(e.isArray(t)?t:arguments,function(e,t){delete n[t]})),h(n,2)},x[j]=e.extend(x[j],{add:function(t){function n(e){var t=e[A]=s();e.getState=function(e,n){return e===f||"boolean"==typeof e?l(t,e):l(t,n)[e]},r.apply(this,arguments)}var r;return e.isFunction(t)?(r=t,n):(r=t.handler,void(t.handler=n))}})}(jQuery,this),function(e,t,n){function r(e){return e=e||t[i][u],e.replace(/^[^#]*#?(.*)$/,"$1")}var o,a=e.event.special,i="location",c="hashchange",u="href",f=e.browser,s=document.documentMode,l=f.msie&&(s===n||s<8),p="on"+c in t&&!l;e[c+"Delay"]=100,a[c]=e.extend(a[c],{setup:function(){return!p&&void e(o.start)},teardown:function(){return!p&&void e(o.stop)}}),o=function(){function n(){f=s=function(e){return e},l&&(a=e('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow,s=function(){return r(a.document[i][u])},(f=function(e,t){if(e!==t){var n=a.document;n.open().close(),n[i].hash="#"+e}})(r()))}var o,a,f,s,p={};return p.start=function(){if(!o){var a=r();f||n(),function l(){var n=r(),p=s(a);n!==a?(f(a=n,p),e(t).trigger(c)):p!==a&&(t[i][u]=t[i][u].replace(/#.*/,"")+"#"+p),o=setTimeout(l,e[c+"Delay"])}()}},p.stop=function(){a||(o&&clearTimeout(o),o=0)},p}()}(jQuery,this);
|
||||
1
src/main/resources/static/swagger/lib/jquery.slideto.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(i){i.fn.slideto=function(o){return o=i.extend({slide_duration:"slow",highlight_duration:3e3,highlight:!0,highlight_color:"#FFFF99"},o),this.each(function(){obj=i(this),i("body").animate({scrollTop:obj.offset().top},o.slide_duration,function(){o.highlight&&i.ui.version&&obj.effect("highlight",{color:o.highlight_color},o.highlight_duration)})})}}(jQuery);
|
||||
1
src/main/resources/static/swagger/lib/jquery.wiggle.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
jQuery.fn.wiggle=function(e){var a={speed:50,wiggles:3,travel:5,callback:null},e=jQuery.extend(a,e);return this.each(function(){var a=this,l=(jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative"),0);for(i=1;i<=e.wiggles;i++)jQuery(this).animate({left:"-="+e.travel},e.speed).animate({left:"+="+2*e.travel},2*e.speed).animate({left:"-="+e.travel},e.speed,function(){l++,jQuery(a).parent().hasClass("wiggle-wrap")&&jQuery(a).parent().replaceWith(a),l==e.wiggles&&jQuery.isFunction(e.callback)&&e.callback()})})};
|
||||
2
src/main/resources/static/swagger/lib/js-yaml.min.js
vendored
Normal file
5
src/main/resources/static/swagger/lib/jsoneditor.min.js
vendored
Normal file
2
src/main/resources/static/swagger/lib/lodash.min.js
vendored
Normal file
1
src/main/resources/static/swagger/lib/marked.js
Normal file
@@ -0,0 +1 @@
|
||||
"function"!=typeof Object.assign&&!function(){Object.assign=function(n){"use strict";if(void 0===n||null===n)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(n),o=1;o<arguments.length;o++){var r=arguments[o];if(void 0!==r&&null!==r)for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t}}();
|
||||
4
src/main/resources/static/swagger/lib/sanitize-html.min.js
vendored
Normal file
1
src/main/resources/static/swagger/lib/swagger-oauth.js
Normal file
20
src/main/resources/static/swagger/o2c.html
Normal file
@@ -0,0 +1,20 @@
|
||||
<script>
|
||||
var qp = null;
|
||||
if(/code|token|error/.test(window.location.hash)) {
|
||||
qp = location.hash.substring(1);
|
||||
}
|
||||
else {
|
||||
qp = location.search.substring(1);
|
||||
}
|
||||
qp = qp ? JSON.parse('{"' + qp.replace(/&/g, '","').replace(/=/g,'":"') + '"}',
|
||||
function(key, value) {
|
||||
return key===""?value:decodeURIComponent(value) }
|
||||
):{}
|
||||
|
||||
if (window.opener.swaggerUiAuth.tokenUrl)
|
||||
window.opener.processOAuthCode(qp);
|
||||
else
|
||||
window.opener.onOAuthComplete(qp);
|
||||
|
||||
window.close();
|
||||
</script>
|
||||
53
src/main/resources/static/swagger/oauth2-redirect.html
Normal file
@@ -0,0 +1,53 @@
|
||||
<!doctype html>
|
||||
<html lang="en-US">
|
||||
<body onload="run()">
|
||||
</body>
|
||||
</html>
|
||||
<script>
|
||||
'use strict';
|
||||
function run () {
|
||||
var oauth2 = window.opener.swaggerUIRedirectOauth2;
|
||||
var sentState = oauth2.state;
|
||||
var redirectUrl = oauth2.redirectUrl;
|
||||
var isValid, qp, arr;
|
||||
|
||||
qp = (window.location.hash || location.search).substring(1);
|
||||
|
||||
arr = qp.split("&")
|
||||
arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
|
||||
qp = qp ? JSON.parse('{' + arr.join() + '}',
|
||||
function (key, value) {
|
||||
return key === "" ? value : decodeURIComponent(value)
|
||||
}
|
||||
) : {}
|
||||
|
||||
isValid = qp.state === sentState
|
||||
|
||||
if (oauth2.auth.schema.get("flow") === "accessCode" && !oauth2.auth.code) {
|
||||
if (!isValid) {
|
||||
oauth2.errCb({
|
||||
authId: oauth2.auth.name,
|
||||
source: "auth",
|
||||
level: "warning",
|
||||
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
|
||||
});
|
||||
}
|
||||
|
||||
if (qp.code) {
|
||||
delete oauth2.state;
|
||||
oauth2.auth.code = qp.code;
|
||||
oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
|
||||
} else {
|
||||
oauth2.errCb({
|
||||
authId: oauth2.auth.name,
|
||||
source: "auth",
|
||||
level: "error",
|
||||
message: "Authorization failed: no accessCode received from the server"
|
||||
});
|
||||
}
|
||||
} else {
|
||||
oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
|
||||
}
|
||||
window.close();
|
||||
}
|
||||
</script>
|
||||
105
src/main/resources/static/swagger/swagger-ui-bundle.js
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AAitFA;;;;;;AAoIA;AAy2FA;AA8iCA;AA6lJA;AA8vIA;AA8iFA;AAi4GA;AA8jFA;AAu0FA;AA89CA;AAy9CA;AA+qCA;AAs0EA;;;;;AAw/CA;AA8zJA;;;;;;;;;;;;;;AAyoFA;AA+lIA;AA4oJA;AAqvHA;AAsvGA;AA2iEA;AAy5DA;AA65DA;AAAA;;;;;;AAk8GA;AA2nHA;;;;;AAkoDA;AAgsFA;AA6kDA;AAq3CA;AA4wFA;AAk3CA;AA8iFA;;;;;;;;;AA2qEA;AA2zIA;AAu7FA;AAmrFA;AAwiHA","sourceRoot":""}
|
||||