first commit

This commit is contained in:
GYJ
2024-12-02 10:29:28 +08:00
commit 03cd33b658
485 changed files with 63600 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/duanju?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=CTT
username: root
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

View File

@@ -0,0 +1,82 @@
logging:
file:
name: logs/duanju.log
# Tomcat
server:
tomcat:
uri-encoding: UTF-8
max-threads: 1000
min-spare-threads: 30
connection-timeout: 5000ms
port: 8100
servlet:
context-path: /sqx_fast
spring:
main:
allow-circular-references: true
allow-bean-definition-overriding: true
# 环境 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: 10240MB
max-request-size: 10240MB
enabled: true
redis:
open: false # 是否开启redis缓存 true开启 false关闭
database: 0
host: localhost
port: 6379
password: root # 密码(默认为空)
timeout: 6000ms # 连接超时时长(毫秒)
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
#mybatis
mybatis-plus:
mapper-locations: classpath*:/mapper/**/*.xml
#实体扫描多个package用逗号或者分号分隔
typeAliasesPackage: com.sqx.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'
sqx:
redis:
open: false
shiro:
redis: false
# APP模块是通过jwt认证的如果要使用APP模块则需要修改【加密秘钥】
jwt:
# 加密秘钥
secret: f4e2e52034348f86b67cde581c0f9eb5
# token有效时长7天单位秒
expire: 604800
header: token

View File

@@ -0,0 +1,23 @@
////////////////////////////////////////////////////////////////////
// _ooOoo_ //
// o8888888o //
// 88" . "88 //
// (| ^_^ |) //
// O\ = /O //
// ____/`---'\____ //
// .' \\| |// `. //
// / \\||| : |||// \ //
// / _||||| -:- |||||- \ //
// | | \\\ - /// | | //
// | \_| ''\---/'' | | //
// \ .-\__ `-` ___/-. / //
// ___`. .' /--.--\ `. . ___ //
// ."" '< `.___\_<|>_/___.' >'"". //
// | | : `- \`.;`\ _ /`;.`/ - ` : | | //
// \ \ `-. \_ __\ /__ _/ .-` / / //
// ========`-.____`-.___\_____/___.-`____.-'======== //
// `=---=' //
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
// 佛祖保佑 永不宕机 永无BUG //
////////////////////////////////////////////////////////////////////

View File

@@ -0,0 +1,12 @@
<?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.sqx.modules.app.dao.AppDao">
<select id="selectNewApp" resultType="com.sqx.modules.app.entity.App">
select * from app order by version desc
</select>
</mapper>

View 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.sqx.modules.app.dao.MsgDao">
<select id="findByPhone" resultType="com.sqx.modules.app.entity.Msg">
select * from msg where phone=#{phone}
</select>
<select id="findByPhoneAndCode" resultType="com.sqx.modules.app.entity.Msg">
select * from msg where phone=#{phone} and code=#{msg}
</select>
</mapper>

View File

@@ -0,0 +1,338 @@
<?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.sqx.modules.app.dao.UserDao">
<select id="selectUserPage" resultType="com.sqx.modules.app.entity.UserEntity">
select u.*,v.is_vip as member,v.end_time as endTime,v.vip_type as vipType,
s.username as sysUserName
from tb_user u
left join user_vip v on v.user_id=u.user_id
left join sys_user s on s.qd_code=u.qd_code
where s.sys_user_id is null
<if test="vipType!=null">
and v.vip_type = #{vipType}
</if>
<if test="search!=null and search!=''">
and (u.user_id=#{search} or u.phone = #{search} or u.user_name =#{search} )
</if>
<if test="sysUserName!=null and sysUserName!=''">
and s.username like concat('%',#{sysUserName},'%')
</if>
<if test="userName!=null and userName!=''">
and u.user_name like concat('%',#{userName},'%')
</if>
<if test="sex!=null and sex!=0">
and u.sex=#{sex}
</if>
<if test="platform!=null and platform!=''">
and u.platform=#{platform}
</if>
<if test="sysPhone!=null and sysPhone!=''">
and u.sys_phone=#{sysPhone}
</if>
<if test="status!=null and status!=0">
and u.status=#{status}
</if>
<if test="member!=null and member!=-1 and member!=1">
and v.is_vip=#{member}
</if>
<if test="member!=null and member==1">
and (v.is_vip=1 or v.is_vip is null)
</if>
<if test="inviterCode!=null and inviterCode!=''">
and u.inviter_code like concat("%",#{inviterCode},"%")
</if>
<if test="invitationCode!=null and invitationCode!=''">
and u.invitation_code like concat("%",#{invitationCode},"%")
</if>
<if test="qdCode!=null and qdCode!=''">
and u.qd_code =#{qdCode}
</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
and date_format(u.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
</if>
<if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
and date_format(u.create_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
and date_format(u.create_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
order by create_time desc
</select>
<select id="userListExcel" resultType="com.sqx.modules.app.entity.UserEntity">
select * from tb_user u
<where>
<if test="userEntity.phone!=null and userEntity.phone!=''">
and u.phone like concat("%",#{userEntity.phone},"%")
</if>
<if test="userEntity.userName!=null and userEntity.userName!=''">
and u.user_name like concat("%",#{userEntity.userName},"%")
</if>
<if test="userEntity.invitationCode!=null and userEntity.invitationCode!=''">
and u.invitation_code like concat("%",#{userEntity.invitationCode},"%")
</if>
<if test="userEntity.inviterCode!=null and userEntity.inviterCode!=''">
and u.inviter_code like concat("%",#{userEntity.inviterCode},"%")
</if>
<if test="userEntity.platform!=null and userEntity.platform!=''">
and u.platform = #{userEntity.platform}
</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
and date_format(u.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
</if>
<if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
and date_format(u.create_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
and date_format(u.create_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</where>
</select>
<select id="queryInviterCount" resultType="int">
select count(*) from tb_user
where inviter_code=#{inviterCode}
</select>
<select id="queryUserCount" resultType="int">
select count(*)from tb_user where 1=1
<if test="type==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
</if>
<if test="type==2">
and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
</if>
<if test="type==3">
and date_format(create_time,'%Y')=date_format(#{date},'%Y')
</if>
<if test="platform!=null">
and platform=#{platform}
</if>
<if test="qdCode!=null">
and qd_code=#{qdCode}
</if>
</select>
<select id="queryPayMoney" resultType="Double">
select sum(p.money) from pay_details p
left join tb_user u on u.user_id=p.user_id
where p.`state`=1
<if test="type==1">
and date_format(p.create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
</if>
<if test="type==2">
and date_format(p.create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
</if>
<if test="type==3">
and date_format(p.create_time,'%Y')=date_format(#{date},'%Y')
</if>
<if test="qdCode!=null">
and u.qd_code=#{qdCode}
</if>
</select>
<select id="queryCourseOrder" resultType="com.sqx.modules.app.response.CourseOrderResponse">
select * from (
select c.course_id as courseId,sum(o.pay_money) as 'coursemoney' ,count(*) as 'coursenum',any_value(c.title) as 'coursename'
from orders o
left join course c on o.course_id=c.course_id
where o.status=1 and o.orders_type=1
<if test="sysUserId!=null">
and sys_user_id=#{sysUserId}
</if>
<if test="type==1">
and date_format(o.create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
</if>
<if test="type==2">
and date_format(o.create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
</if>
<if test="type==3">
and date_format(o.create_time,'%Y')=date_format(#{date},'%Y')
</if>
group by c.course_id
) a
order by a.coursenum desc
</select>
<select id="userMessage" resultType="int">
select count(*) from tb_user t
left join user_vip v on t.user_id=v.user_id where v.is_vip=2
<if test="type==1">
and date_format(t.create_time,'%Y-%m-%d')=date_format(#{date},'%Y-%m-%d')
</if>
<if test="type==2">
and date_format(t.create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
</if>
<if test="type==3">
and date_format(t.create_time,'%Y')=date_format(#{date},'%Y')
</if>
<if test="qdCode!=null">
and t.qd_code=#{qdCode}
</if>
<if test="vipType!=null">
and v.vip_type=#{vipType}
</if>
</select>
<insert id="insertUser" parameterType="com.sqx.modules.app.entity.UserEntity" useGeneratedKeys="true" keyProperty="userId">
INSERT INTO tb_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null != userName and '' != userName">
user_name,
</if>
<if test="null != phone and '' != phone">
phone,
</if>
<if test="null != avatar and '' != avatar">
avatar,
</if>
<if test="null != sex and '' != sex">
sex,
</if>
<if test="null != openId and '' != openId">
open_id,
</if>
<if test="null != wxOpenId and '' != wxOpenId">
wx_open_id,
</if>
<if test="null != password and '' != password">
password,
</if>
<if test="null != createTime and '' != createTime">
create_time,
</if>
<if test="null != updateTime and '' != updateTime">
update_time,
</if>
<if test="null != appleId and '' != appleId">
apple_id,
</if>
<if test="null != sysPhone and '' != sysPhone">
sys_phone,
</if>
<if test="null != status and '' != status">
status,
</if>
<if test="null != platform and '' != platform">
platform,
</if>
<if test="null != jifen and '' != jifen">
jifen,
</if>
<if test="null != invitationCode and '' != invitationCode">
invitation_code,
</if>
<if test="null != inviterCode and '' != inviterCode">
inviter_code,
</if>
<if test="null != clientid and '' != clientid">
clientid,
</if>
<if test="null != zhiFuBaoName and '' != zhiFuBaoName">
zhi_fu_bao_name,
</if>
<if test="null != zhiFuBao and '' != zhiFuBao">
zhi_fu_bao,
</if>
<if test="null != wxId and '' != wxId">
wx_id
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != userName and '' != userName">
#{userName},
</if>
<if test="null != phone and '' != phone">
#{phone},
</if>
<if test="null != avatar and '' != avatar">
#{avatar},
</if>
<if test="null != sex and '' != sex">
#{sex},
</if>
<if test="null != openId and '' != openId">
#{openId},
</if>
<if test="null != wxOpenId and '' != wxOpenId">
#{wxOpenId},
</if>
<if test="null != password and '' != password">
#{password},
</if>
<if test="null != createTime and '' != createTime">
#{createTime},
</if>
<if test="null != updateTime and '' != updateTime">
#{updateTime},
</if>
<if test="null != appleId and '' != appleId">
#{appleId},
</if>
<if test="null != sysPhone and '' != sysPhone">
#{sysPhone},
</if>
<if test="null != status and '' != status">
#{status},
</if>
<if test="null != platform and '' != platform">
#{platform},
</if>
<if test="null != jifen and '' != jifen">
#{jifen},
</if>
<if test="null != invitationCode and '' != invitationCode">
#{invitationCode},
</if>
<if test="null != inviterCode and '' != inviterCode">
#{inviterCode},
</if>
<if test="null != clientid and '' != clientid">
#{clientid},
</if>
<if test="null != zhiFuBaoName and '' != zhiFuBaoName">
#{zhiFuBaoName},
</if>
<if test="null != zhiFuBao and '' != zhiFuBao">
#{zhiFuBao},
</if>
<if test="null != wxId and '' != wxId">
#{wxId}
</if>
</trim>
</insert>
<select id="selectInviteUserList" resultType="com.sqx.modules.app.entity.UserEntity">
select *,(select count(*) from tb_user u1 where u1.inviter_code=u.invitation_code) as counts,
(select ifnull(sum(money),0.00) from invite i where i.user_id=u.user_id) as money
from tb_user u
where 1=1
<if test="userName!=null and userName!=''">
and user_name like concat('%',#{userName},'%')
</if>
<if test="phone!=null and phone!=''">
and phone like concat('%',#{phone},'%')
</if>
order by money desc,counts desc
</select>
<select id="selectUserOnLineCount" resultType="Integer">
select count(*) from tb_user where now()&lt;=DATE_ADD(on_line_time, INTERVAL 10 MINUTE )
<if test="qdCode!=null">
and qd_code=#{qdCode}
</if>
</select>
<update id="updateUserClientIdIsNull">
update tb_user
set clientid=''
where clientid = #{clientid}
</update>
</mapper>

View 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.sqx.modules.app.dao.UserMoneyDao">
<update id="updateMayMoney">
update user_money set
<if test="type==1">
money=money+#{money}
</if>
<if test="type==2">
money=money-#{money}
</if>
where user_id=#{userId}
</update>
<update id="updateSysMoney">
update user_money set
<if test="type==1">
money=money+#{money}
</if>
<if test="type==2">
money=money-#{money}
</if>
where sys_user_id=#{sysUserId}
</update>
</mapper>

View File

@@ -0,0 +1,8 @@
<?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.sqx.modules.app.dao.UserMoneyDetailsDao">
<select id="monthIncome" resultType="Double">
select sum(money) from user_money_details where user_id=#{userId} and classify=4 and type=2 and state=2 and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
</select>
</mapper>

View File

@@ -0,0 +1,11 @@
<?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.sqx.modules.app.dao.UserVipDao">
<update id="updateUserVipByEndTime">
update user_vip set is_vip=1 where is_vip=2 and date_format(end_time,'%Y-%m-%d %H:%i:%S')&lt;=date_format(now(),'%Y-%m-%d %H:%i:%S')
</update>
</mapper>

View 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.sqx.modules.banner.dao.ActivityDao">
<select id="selectByState" resultType="com.sqx.modules.banner.entity.Activity">
select * from activity where state=#{state} order by id desc
</select>
</mapper>

View File

@@ -0,0 +1,27 @@
<?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.sqx.modules.banner.dao.BannerDao">
<select id="selectList" resultType="com.sqx.modules.banner.entity.Banner">
select * from banner
where classify=#{classify} and `state`=1
order by `sort` desc
</select>
<select id="selectLists" resultType="com.sqx.modules.banner.entity.Banner">
select * from banner
where classify=#{classify}
order by `sort` desc
</select>
<select id="selectBannerPage" resultType="com.sqx.modules.banner.entity.Banner">
select * from banner
where classify=#{classify}
order by `sort` desc
</select>
</mapper>

View 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.sqx.modules.common.dao.CommonInfoDao">
<select id="findByCondition" resultType="com.sqx.modules.common.entity.CommonInfo">
select * from common_info where condition_from=#{condition}
</select>
<select id="findOne" resultType="com.sqx.modules.common.entity.CommonInfo">
select * from common_info where `type`=#{type}
</select>
</mapper>

View File

@@ -0,0 +1,26 @@
<?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.sqx.modules.course.dao.CourseClassificationDao">
<select id="selectCourseClassificationPage" resultType="com.sqx.modules.course.entity.CourseClassification">
select * from course_classification where 1=1 and is_delete=0
<if test ='null != classificationName'>
and classification_name LIKE CONCAT('%', #{classificationName}, '%')
</if>
order by sort
</select>
<select id="selectCourseClassificationList" resultType="com.sqx.modules.course.entity.CourseClassification">
select * from course_classification where 1=1 and is_delete=0
<if test ='null != classificationName'>
and classification_name LIKE CONCAT('%', #{classificationName}, '%')
</if>
order by sort
</select>
<update id="updateDelete">
update course_classification set is_delete=1 where classification_id=#{id}
</update>
<select id="queryClassification" resultType="com.sqx.modules.course.response.ClassificationResponse">
select classification_id ,classification_name from course_classification where is_delete=0;
</select>
</mapper>

View File

@@ -0,0 +1,51 @@
<?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.sqx.modules.course.dao.CourseCollectDao">
<select id="selectCourseByCollect" resultType="com.sqx.modules.course.entity.Course">
SELECT
MAX( u.update_time ) AS produceEndTime,
c.*,
(
SELECT
d.course_details_name
FROM
course_collect cc
LEFT JOIN course_details d ON cc.course_details_id = d.course_details_id
WHERE
d.course_id = u.course_id
AND cc.classify = 3 and cc.user_id=#{userId}
ORDER BY
cc.update_time DESC
LIMIT 1
) AS courseDetailsName,
(
SELECT
d.course_details_id
FROM
course_collect cc
LEFT JOIN course_details d ON cc.course_details_id = d.course_details_id
WHERE
d.course_id = u.course_id
AND cc.classify = 3 and cc.user_id=#{userId}
ORDER BY
cc.update_time DESC
LIMIT 1
) AS courseDetailsId,
( SELECT count(*) FROM course_details d WHERE d.course_id = c.course_id ) AS courseDetailsCount
FROM
course_collect u
LEFT JOIN course c ON u.course_id = c.course_id
WHERE
u.user_id = #{userId}
AND c.course_id IS NOT NULL
AND u.classify = #{classify}
GROUP BY
u.course_id
ORDER BY
produceEndTime DESC
</select>
</mapper>

View File

@@ -0,0 +1,40 @@
<?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.sqx.modules.course.dao.CourseCommentDao">
<update id="updateCourseComment">
<if test='1 == type'>
update course_comment set goods_num=goods_num+1 where course_comment_id=#{courseCommentId}
</if>
<if test='0 == type'>
update course_comment set goods_num=goods_num-1 where course_comment_id=#{courseCommentId}
</if>
</update>
<!--
查询该短剧的所有评论
返回结果 用户名称 用户图像 评论时间 评论内容 点赞数量
-->
<select id="selectCourseComment" resultType="com.sqx.modules.course.entity.CourseComment">
select c.course_comment_id,c.content,c.create_time,c.goods_num,
u.user_name as userName,u.avatar,c.user_id,
(select count(*) from comment_good g where g.course_comment_id=c.course_comment_id and user_id=#{userId}) as isGood
from course_comment c ,tb_user u where u.user_id=c.user_id
and c.course_id =#{courseId}
order by c.create_time desc
</select>
<!--
删除评论点赞的关联关系
-->
<delete id="deleteCommentGood">
delete from comment_good where course_comment_id=#{courseCommentId}
</delete>
<select id="selectCourseCommentByUserId" resultType="Map">
select cc.course_comment_id as courseCommentId,cc.goods_num as goodsNum,cc.content,cc.create_time,c.title,c.title_img as titleImg from course_comment cc
left join course c on c.course_id=cc.course_id
where cc.user_id=#{userId}
order by create_time desc
</select>
</mapper>

View File

@@ -0,0 +1,281 @@
<?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.sqx.modules.course.dao.CourseDao">
<update id="updateDelete">
update course
set is_delete=1
where course_id = #{id}
</update>
<select id="selectCourse" resultType="Map">
SELECT
c.classify_id as classifyId,
c.course_id as courseId,
c.course_label as courseLabel,
c.create_time createTime,
c.details,
c.img,
c.banner_img as bannerImg,
c.status,
c.is_delete as isDelete,
c.msg_type msgType,
c.msg_url as msgUrl,
c.pay_num as payNum,
c.price,
c.is_over as isOver,
c.title,
c.is_price as isPrice,
c.title_img as titleImg,
c.update_time as updateTime,
cc.classification_name as classificationName,
c.course_type as courseType,
c.banner_id as bannerId,
b.name as bannerName,
c.view_counts as viewCounts,
c.dy_img_id as dyImgId,
c.dy_course_id as dyCourseId,
c.wx_course_id as wxCourseId,
c.wx_show as wxShow,
c.dy_show as dyShow,
c.sort,
(select sum(good_num) from course_details d where d.course_id=c.course_id ) as goodNum,
(select count(*) from course_details d where d.course_id=c.course_id ) as courseDetailsCount,
<if test="userId!=null">
(
SELECT
cc.course_details_id
FROM
course_collect cc
WHERE
cc.course_id = c.course_id
AND cc.classify = 3
and cc.user_id = #{userId}
ORDER BY
cc.update_time desc
LIMIT 1
) AS courseDetailsId,
</if>
<if test="userId==null">
null AS courseDetailsName,
null AS courseDetailsId,
</if>
(select count(*) from course_collect d where d.course_id=c.course_id
and date_format(create_time,'%Y-%m-%d')>=date_format(#{startTime},'%Y-%m-%d') and
date_format(create_time,'%Y-%m-%d')&lt;=date_format(#{endTime},'%Y-%m-%d') ) as weekGoodNum,
(select count(*) from course_details cd where c.course_id=cd.course_id and cd.good=1 ) as isRecommend
FROM
course AS c
LEFT JOIN course_classification AS cc ON c.classify_id = cc.classification_id
left join banner as b on b.id=c.banner_id
WHERE
1 = 1
AND c.is_delete = 0
<if test='null != wxShow and wxShow==1'>
and c.wx_show = #{wxShow}
</if>
<if test='null != wxShow and wxShow==2'>
and (c.wx_show = #{wxShow} or c.wx_show is null)
</if>
<if test='null != dyShow and dyShow==1'>
and c.dy_show = #{dyShow}
</if>
<if test='null != dyShow and dyShow==2'>
and (c.dy_show = #{dyShow} or c.dy_show is null)
</if>
<if test='null != title'>
and c.title LIKE CONCAT('%', #{title}, '%')
</if>
<if test='null!= classifyId and classifyId!=0'>
and c.classify_id = #{classifyId}
</if>
<if test='null!= bannerId and bannerId!=0'>
and c.banner_id = #{bannerId}
</if>
<if test="classifyId==0">
and c.is_recommend=1
</if>
<if test="over!=null">
and c.is_over=#{over}
</if>
<if test="isRecommend!=null and isRecommend!=-1">
and c.course_id in (select course_id from course_details where good=1)
</if>
<if test="status!=null and status!=0">
and c.status=#{status}
</if>
<if test="isPrice!=null">
and c.is_price=#{isPrice}
</if>
<if test="wxCourse!=null">
and c.wx_course_id is not null
</if>
<if test="dyCourse!=null">
and c.dy_status=4
</if>
<if test="sort==null">
order by c.sort asc
</if>
<if test="sort!=null and sort==1">
order by goodNum desc
</if>
<if test="sort!=null and sort==2">
order by weekGoodNum desc
</if>
</select>
<select id="selectCourseAdmin" resultType="Map">
SELECT
c.classify_id as classifyId,
c.course_id as courseId,
c.course_label as courseLabel,
c.course_label_ids as courseLabelIds,
c.create_time createTime,
c.details,
c.img,
c.banner_img as bannerImg,
c.status,
c.is_delete as isDelete,
c.msg_type msgType,
c.msg_url as msgUrl,
c.pay_num as payNum,
c.price,
c.is_over as isOver,
c.title,
c.is_price as isPrice,
c.title_img as titleImg,
c.update_time as updateTime,
cc.classification_name as classificationName,
c.course_type as courseType,
c.banner_id as bannerId,
b.name as bannerName,
c.view_counts as viewCounts,
c.dy_img_id as dyImgId,
c.dy_course_id as dyCourseId,
c.dy_status as dyStatus,
c.dy_status_content as dyStatusContent,
c.dy_version as dyVersion,
c.license_num as licenseNum,
c.registration_num as registrationNum,
c.ordinary_record_num as ordinaryRecordNum,
c.key_record_num as keyRecordNum,
c.wx_course_id as wxCourseId,
c.wx_show as wxShow,
c.dy_show as dyShow,
c.sort,
c.`duration`,
c.`production_organisation` as productionOrganisation,
c.`director`,
c.`producer`,
c.`actor`,
c.`summary`,
c.`cost_distribution_uri` as costDistributionUri,
c.`assurance_uri` as assuranceUri,
c.`playlet_production_cost` as playletProductionCost,
c.`qualification_type` as qualificationType,
c.`registration_number` as registrationNumber,
c.`qualification_certificate_material_id` as qualificationCertificateMaterialId,
c.`cost_of_production` as costOfProduction,
c.`cost_commitment_letter_material_id` as costCommitmentLetterMaterialId,
c.`wx_course_status` as wxCourseStatus,
(select count(*) from course_details where dy_url_status in (1,3) or dy_url_status=null) as dyUrlStatus,
(select sum(o.pay_money) from orders o where o.course_id=c.course_id and o.status=1) as payMoney,
(select sum(good_num) from course_details d where d.course_id=c.course_id ) as goodNum,
(select count(*) from course_details d where d.course_id=c.course_id ) as courseDetailsCount,
(select count(*) from course_collect d where d.course_id=c.course_id
and date_format(create_time,'%Y-%m-%d')>=date_format(#{startTime},'%Y-%m-%d') and
date_format(create_time,'%Y-%m-%d')&lt;=date_format(#{endTime},'%Y-%m-%d') ) as weekGoodNum,
(select count(*) from course_details cd where c.course_id=cd.course_id and cd.good=1 ) as isRecommend
FROM
course AS c
LEFT JOIN course_classification AS cc ON c.classify_id = cc.classification_id
left join banner as b on b.id=c.banner_id
WHERE
1 = 1
AND c.is_delete = 0
<if test='null != wxShow and wxShow==1'>
and c.wx_show = #{wxShow}
</if>
<if test='null != wxShow and wxShow==2'>
and (c.wx_show = #{wxShow} or c.wx_show is null)
</if>
<if test='null != dyShow and dyShow==1'>
and c.dy_show = #{dyShow}
</if>
<if test='null != dyShow and dyShow==2'>
and (c.dy_show = #{dyShow} or c.dy_show is null)
</if>
<if test='null != title'>
and c.title LIKE CONCAT('%', #{title}, '%')
</if>
<if test='null!= classifyId and classifyId!=0'>
and c.classify_id = #{classifyId}
</if>
<if test='null!= bannerId and bannerId!=0'>
and c.banner_id = #{bannerId}
</if>
<if test="classifyId==0">
and c.is_recommend=1
</if>
<if test="over!=null and over==1">
and c.is_over=1
</if>
<if test="over!=null and over==2">
and (c.is_over is null or c.is_over=2)
</if>
<if test="isRecommend!=null and isRecommend!=-1">
and c.course_id in (select course_id from course_details where good=1)
</if>
<if test="status!=null and status!=0">
and c.status=#{status}
</if>
<if test="isPrice!=null">
and c.is_price=#{isPrice}
</if>
<if test="wxCourse!=null">
and c.wx_course_id is not null
</if>
<if test="dyCourse!=null">
and c.dy_status=4
</if>
<if test="sort==null">
order by c.sort asc,c.create_time desc
</if>
<if test="sort!=null and sort==1">
order by goodNum desc
</if>
<if test="sort!=null and sort==2">
order by weekGoodNum desc
</if>
</select>
<select id="selectCourseTitle" resultType="Map">
SELECT
c.classify_id as classifyId,
c.course_id as courseId,
c.course_label as courseLabel,
c.create_time createTime,
c.details,
c.img,
c.banner_img as bannerImg,
c.is_delete as isDelete,
c.msg_type msgType,
c.msg_url as msgUrl,
c.pay_num as payNum,
c.price,
c.status,
c.title,
c.title_img as titleImg,
c.update_time as updateTime
FROM
course c
WHERE
c.is_delete = 0 and c.status=1
<if test='null != title'>
and c.title LIKE #{title}
</if>
order by create_time desc
</select>
</mapper>

View File

@@ -0,0 +1,63 @@
<?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.sqx.modules.course.dao.CourseDetailsDao">
<!--查找指定短剧的目录 按照顺序数字升序-->
<select id="findByCourseId" resultType="com.sqx.modules.course.entity.CourseDetails">
select c.*,
(select count(*) from course_collect cc where cc.user_id=#{userId} and cc.course_details_id=c.course_details_id and cc.classify=2) as isGood
from course_details c where c.course_id=#{id} order by c.sort asc
</select>
<select id="selectCoursePageByCourseId" resultType="com.sqx.modules.course.entity.CourseDetails">
select * from course_details where course_id=#{id}
<if test="good!=null and good==1">
and good=#{good}
</if>
<if test="good!=null and good==2">
and (good=#{good} or good is null)
</if>
order by sort asc
</select>
<select id="findByCourseIdNotUrl" resultType="com.sqx.modules.course.entity.CourseDetails">
select c.course_details_id as courseDetailsId,c.course_id as courseId,c.wx_course_details_id as wxCourseDetailsId,
c.course_details_name as courseDetailsName,c.create_time as createTime,
c.dy_episode_id as dyEpisodeId,c.advertising,
(select count(*) from course_collect cc where cc.user_id=#{userId} and cc.course_details_id=c.course_details_id and cc.classify=2) as isGood,
c.title_img as titleImg,c.content,c.good_num as goodNum,c.price,if(is_price!=1,c.video_url,'') as videoUrl
from course_details c
where c.course_id=#{id} order by c.sort asc
</select>
<delete id="deleteCourseDetails" parameterType="String">
DELETE FROM course_details WHERE course_details_id IN
<foreach collection="array" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<select id="selectCourseDetailsList" resultType="com.sqx.modules.course.entity.CourseDetails">
select cd.*,
MD5( `course_details_id` ) AS `uid`
from course_details cd
left join course c on c.course_id=cd.course_id
where c.course_id is not null and c.is_delete=0 and cd.good=1
<if test='null != wxShow and wxShow==1'>
and c.wx_show = #{wxShow}
</if>
<if test='null != wxShow and wxShow==2'>
and (c.wx_show = #{wxShow} or c.wx_show is null)
</if>
<if test='null != dyShow and dyShow==1'>
and c.dy_show = #{dyShow}
</if>
<if test='null != dyShow and dyShow==2'>
and (c.dy_show = #{dyShow} or c.dy_show is null)
</if>
order by SUBSTR(uid, #{randomNum}, 6)
</select>
</mapper>

View File

@@ -0,0 +1,47 @@
<?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.sqx.modules.course.dao.CourseUserDao">
<select id="selectLatelyCourse" resultType="com.sqx.modules.course.entity.Course">
select c.*,(select count(*) from course_user cu where cu.course_id=u.course_id) as courseCount,
(select group_concat(avatar) from
(SELECT tu.avatar,course_id FROM course_user o
left join tb_user tu on tu.user_id=o.user_id
GROUP BY course_id,tu.avatar
limit 3
) a where a.course_id=u.course_id ) as avatar from course_user u
left join course c on u.course_id=c.course_id
where u.user_id=#{userId} and c.is_delete=0 order by update_time desc
</select>
<select id="selectCourseByCourseUser" resultType="com.sqx.modules.course.entity.Course">
select c.*,(select count(*) from course_user cu where cu.course_id=u.course_id) as courseCount,
(select group_concat(avatar) from
(SELECT tu.avatar,course_id FROM course_user o
left join tb_user tu on tu.user_id=o.user_id
GROUP BY course_id,tu.avatar
limit 3
) a where a.course_id=u.course_id ) as avatar
from course_user u
left join course c on u.course_id=c.course_id
where u.user_id=#{userId} and c.is_delete=0
order by u.create_time desc
</select>
<select id="selectCourseUser" resultType="com.sqx.modules.course.entity.CourseUser">
select * from course_user u where u.user_id=#{userId} and u.course_id=#{id} and u.classify=1
</select>
<select id="selectCourseUserList" resultType="com.sqx.modules.course.entity.CourseUser">
select * from course_user u where u.user_id=#{userId} and u.course_id=#{id} and u.classify=2
</select>
<update id="updateCourseTime">
update course_user set update_time =#{courseUser.updateTime}
</update>
<delete id="deleteCourseUserByVipUser">
delete from course_user where order_id in (select orders_id from orders where user_id= #{userId} and pay_way=5 and status=1)
</delete>
</mapper>

View 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.sqx.modules.integral.dao.UserIntegralDao">
<update id="updateIntegral">
update user_integral set
<if test="type==1">
integral_num=integral_num+#{num}
</if>
<if test="type==2">
integral_num=integral_num-#{num}
</if>
where user_id=#{userId}
</update>
</mapper>

View File

@@ -0,0 +1,12 @@
<?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.sqx.modules.integral.dao.UserIntegralDetailsDao">
<select id="selectUserIntegralDetailsByUserId" resultType="com.sqx.modules.integral.entity.UserIntegralDetails">
select * from user_integral_details where user_id=#{userId} and
str_to_date(create_time,'%Y-%m-%d')=str_to_date( #{time},'%Y-%m-%d')
and classify=1
</select>
</mapper>

View File

@@ -0,0 +1,108 @@
<?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.sqx.modules.invite.dao.InviteDao">
<select id="selectInviteList" resultType="com.sqx.modules.invite.entity.Invite">
select * from invite
where user_id=#{userId}
<if test="state!=null">
and state=#{state}
</if>
</select>
<select id="selectInviteUser" resultType="Map">
select u.user_id as userId,u.user_name as userName,u.avatar as avatar,i.create_time as createTime,ifnull(i.money,0.00) as money,i.user_type as userType
from invite i
left join tb_user u on u.user_id=i.invitee_user_id
where i.user_id=#{userId}
<if test="state!=null">
and i.state=#{state}
</if>
<if test="userType!=null">
and i.user_type=#{userType}
</if>
and u.user_id is not null
</select>
<select id="sumInviteMoney" resultType="Double">
select sum(money) from invite where state=1
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectInviteCount" resultType="Integer">
select count(*) from invite
where user_id=#{userId}
<if test="state!=null">
and state=#{state}
</if>
</select>
<select id="selectInviteSum" resultType="Double">
select sum(money) from invite
where user_id=#{userId}
<if test="state!=null">
and state=#{state}
</if>
</select>
<select id="selectInviteByUser" resultType="com.sqx.modules.invite.entity.Invite">
select * from invite where user_id=#{userId} and invitee_user_id=#{inviteeUserId}
<if test="userType!=null and userType==1">
and (user_type=1 or user_type is null)
</if>
<if test="userType!=null and userType==2">
and user_type=2
</if>
</select>
<select id="selectInviteByUserIdCount" resultType="Integer">
select count(*) from invite where user_id=#{userId} and date_format(create_time,'%Y-%m-%d') between #{startTime} and #{endTime}
</select>
<select id="selectInviteByUserIdCountNotTime" resultType="Integer">
select count(*) from invite where user_id=#{userId}
</select>
<select id="selectInviteByUserIdSum" resultType="Double">
select sum(money) from invite where user_id=#{userId} and date_format(create_time,'%Y-%m-%d') between #{startTime} and #{endTime}
</select>
<select id="inviteAnalysis" resultType="Map">
select b.*,u.nick_name as nickName from (
SELECT
sum(i.money) as money,
count(*) as `count`,
i.user_id as userId
FROM
invite i where
<if test="flag!=null and flag==1">
date_format(i.create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
date_format(i.create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
date_format(i.create_time,'%Y')=date_format(#{time},'%Y')
</if>
GROUP BY i.user_id
) b
left join tb_user u on u.user_id=b.userId
</select>
</mapper>

View File

@@ -0,0 +1,33 @@
<?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.sqx.modules.invite.dao.InviteMoneyDao">
<select id="selectInviteMoneyByUserId" resultType="com.sqx.modules.invite.entity.InviteMoney">
select * from invite_money where user_id=#{userId}
</select>
<update id="updateInviteMoneySum">
update invite_money set money=money+#{money},money_sum=money_sum+#{money} where user_id=#{userId}
</update>
<update id="updateInviteMoneySumSub">
update invite_money set money=money-#{money},money_sum=money_sum-#{money} where user_id=#{userId}
</update>
<update id="updateInviteMoneyCashOut">
update invite_money set
<if test="type==1">
cash_out=cash_out-#{money},money=money+#{money}
</if>
<if test="type==2">
cash_out=cash_out+#{money},money=money-#{money}
</if>
where user_id=#{userId}
</update>
<update id="updateInviteMoneySub">
update invite_money set money=money-#{money} where user_id=#{userId}
</update>
</mapper>

View 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.sqx.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>

View 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.sqx.modules.job.dao.ScheduleJobLogDao">
</mapper>

View 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.sqx.modules.message.dao.ActivityMessageInfoDao">
<select id="find" resultType="com.sqx.modules.message.entity.ActivityMessageInfo">
select * from activity_message_info where state=#{state} order by id desc
</select>
<select id="findType" resultType="com.sqx.modules.message.entity.ActivityMessageInfo">
select * from activity_message_info where type=#{type} order by id desc
</select>
<select id="findTypeByUserId" resultType="com.sqx.modules.message.entity.ActivityMessageInfo">
select * from activity_message_info where state=#{state} and user_id=#{userId} order by id desc
</select>
<update id="updateState">
update activity_message_info s set s.state=#{state} where s.id=#{id}
</update>
<update id="updateSendState">
update activity_message_info s set s.send_state=#{state} where s.id=#{id}
</update>
</mapper>

View File

@@ -0,0 +1,12 @@
<?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.sqx.modules.message.dao.MessageInfoDao">
<update id="updateSendState">
update message_info s set s.is_see=2 where s.user_id=#{userId} and s.state=#{state} and s.is_see=0
</update>
</mapper>

View File

@@ -0,0 +1,281 @@
<?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.sqx.modules.orders.dao.OrdersDao">
<select id="selectMaxCode" resultType="String">
select max(orders_no) code from orders where orders_no like #{newData}
</select>
<insert id="insertOrders" useGeneratedKeys="true" keyProperty="ordersId" parameterType="com.sqx.modules.orders.entity.Orders">
INSERT INTO orders
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="null != ordersId and '' != ordersId">
orders_id,
</if>
<if test="null != ordersNo and '' != ordersNo">
orders_no,
</if>
<if test="null != tradeNo and '' != tradeNo">
trade_no,
</if>
<if test="null != userId and '' != userId">
user_id,
</if>
<if test="null != courseId and '' != courseId">
course_id,
</if>
<if test="null != payMoney and '' != payMoney">
pay_money,
</if>
<if test="null != payWay and '' != payWay">
pay_way,
</if>
<if test="null != status">
status,
</if>
<if test="null != createTime and '' != createTime">
create_time,
</if>
<if test="null != refundContent and '' != refundContent">
refund_content,
</if>
<if test="null != ordersType and '' != ordersType">
orders_type,
</if>
<if test="null != courseDetailsId ">
course_details_id,
</if>
<if test="null != vipNameType">
vip_name_type
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="null != ordersId and '' != ordersId">
#{ordersId},
</if>
<if test="null != ordersNo and '' != ordersNo">
#{ordersNo},
</if>
<if test="null != tradeNo and '' != tradeNo">
#{tradeNo},
</if>
<if test="null != userId and '' != userId">
#{userId},
</if>
<if test="null != courseId and '' != courseId">
#{courseId},
</if>
<if test="null != payMoney and '' != payMoney">
#{payMoney},
</if>
<if test="null != payWay and '' != payWay">
#{payWay},
</if>
<if test="null != status">
#{status},
</if>
<if test="null != createTime and '' != createTime">
#{createTime},
</if>
<if test="null != refundContent and '' != refundContent">
#{refundContent},
</if>
<if test="null != ordersType and '' != ordersType">
#{ordersType},
</if>
<if test="null != courseDetailsId ">
#{courseDetailsId},
</if>
<if test="null != vipNameType">
#{vipNameType}
</if>
</trim>
</insert>
<select id="selectOrdersByOrdersNo" resultType="com.sqx.modules.orders.entity.Orders">
select o.*,u.user_name as userName,c.title as title,s.username as sysUserName,s.qd_code as qdCode from orders o
left join tb_user u on o.user_id=u.user_id
left join course c on c.course_id=o.course_id
left join sys_user s on s.user_id=o.sys_user_id
where 1=1
<if test="userName!=null and userName!=''">
and u.user_name LIKE CONCAT('%', #{userName}, '%')
</if>
<if test="qdCode!=null and qdCode!=''">
and s.qd_code = #{qdCode}
</if>
<if test="sysUserName!=null and sysUserName!=''">
and s.username LIKE CONCAT('%', #{sysUserName}, '%')
</if>
<if test="ordersNo!=null and ordersNo!=''">
and o.orders_no LIKE CONCAT('%', #{ordersNo}, '%')
</if>
<if test="status!=null and status!=-1">
and o.status=#{status}
</if>
<if test="userId!=null">
and o.user_id=#{userId}
</if>
<if test="ordersType!=null">
and o.orders_type=#{ordersType}
</if>
<if test="courseId!=null">
and o.course_id=#{courseId}
</if>
<if test="sysUserId!=null">
and o.sys_user_id=#{sysUserId}
</if>
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
and date_format(o.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
</if>
<if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
and date_format(o.create_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
<if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
and date_format(o.create_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
order by o.create_time desc
</select>
<delete id="deleteOrders" parameterType="String">
DELETE FROM orders WHERE orders_id IN
<foreach collection="array" item="ids" open="(" separator="," close=")">
#{ids}
</foreach>
</delete>
<select id="statisticsIncomeMoney" resultType="Double">
select sum(pay_money) from orders where status=1
<if test="ordersType!=null">
and orders_type=#{ordersType}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectOrdersByCourseIdAndUserId" resultType="com.sqx.modules.orders.entity.Orders">
select * from orders where user_id=#{userId} and course_id=#{courseId} and status=1 order by create_time desc limit 1
</select>
<select id="selectOrdersMoneyList" resultType="com.sqx.modules.orders.entity.Orders">
select o.*,c.title from orders o
left join tb_user u on u.user_id=o.user_id
left join course c on o.course_id=c.course_id
where o.status=1
<if test="flag!=null and flag==1">
and date_format(o.create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(o.create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(o.create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectOrdersCount" resultType="Integer">
select count(*) from orders where 1=1
<if test="sysUserId!=null">
and sys_user_id=#{sysUserId}
</if>
<if test="status!=null">
and status=#{status}
</if>
<if test="ordersType!=null">
and orders_type=#{ordersType}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectOrdersMoney" resultType="Double">
select ifnull(sum(pay_money),0.00) from orders where 1=1
<if test="sysUserId!=null">
and sys_user_id=#{sysUserId}
</if>
<if test="status!=null">
and status=#{status}
</if>
<if test="courseId!=null">
and course_id=#{courseId}
</if>
<if test="ordersType!=null">
and orders_type=#{ordersType}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectFenXiaoMoney" resultType="Double">
select
<if test="type==1">
ifnull(sum(one_money),0.00)
</if>
<if test="type==2">
ifnull(sum(two_money),0.00)
</if>
<if test="type==3">
ifnull(sum(qd_money),0.00)
</if>
<if test="type==4">
ifnull(sum(one_money),0.00)+ifnull(sum(two_money),0.00)+ifnull(sum(qd_money),0.00)
</if>
from orders
where status=1
<if test="sysUserId!=null">
and sys_user_id=#{sysUserId}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectOrdersCountStatisticsByYear" resultType="Integer">
select count(*) from orders
where 1=1
<if test="status!=null and status!=0">
and status=#{status}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
</mapper>

View 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.sqx.modules.oss.dao.SysOssDao">
</mapper>

View File

@@ -0,0 +1,168 @@
<?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.sqx.modules.pay.dao.CashOutDao">
<select id="selectCashOutLimit3" resultType="com.sqx.modules.pay.entity.CashOut">
select * from cash_out where state=1 order by out_at desc limit 3
</select>
<select id="selectCashOutSum" resultType="Double">
select sum(money) from cash_out where state in (0,1) and user_id=#{userId} and date_format(create_at,'%Y-%m-%d') between #{startTime} and #{endTime}
</select>
<select id="sumMoney" resultType="Double">
select sum(money) from cash_out where state =1
<if test="flag!=null and flag==1">
and date_format(create_at,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_at,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_at,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="countMoney" resultType="Integer">
select count(*) from cash_out where
<if test="flag!=null and flag==1">
date_format(create_at,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
date_format(create_at,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
date_format(create_at,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="stayMoney" resultType="Integer">
select count(*) from cash_out where
<if test="flag!=null and flag==1">
date_format(create_at,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
date_format(create_at,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
date_format(create_at,'%Y')=date_format(#{time},'%Y')
</if>
and state=0
</select>
<select id="selectMayMoney" resultType="Double">
select money from user_money where user_id=#{userId}
</select>
<select id="selectCashOutPage" resultType="com.sqx.modules.pay.entity.CashOut">
SELECT c.*,
ifnull(u.user_name,"用户不存在") as userName,
s.username as sysUserName
FROM cash_out c
left join tb_user u on c.user_id = u.user_id
left join sys_user s on s.user_id= c.sys_user_id
<where>
<if test="cashOut.userName!=null and cashOut.userName!=''">
and u.user_name like concat("%",#{cashOut.userName},"%")
</if>
<if test="cashOut.state!=null">
and c.state = #{cashOut.state}
</if>
<if test="cashOut.userId!=null">
and c.user_id = #{cashOut.userId}
</if>
<if test="cashOut.sysUserId!=null">
and c.sys_user_id = #{cashOut.sysUserId}
</if>
<if test="cashOut.sysUserName!=null and cashOut.sysUserName!=''">
and s.username = #{cashOut.sysUserName}
</if>
<if test="cashOut.userType!=null">
and c.user_type = #{cashOut.userType}
</if>
<if test="cashOut.status!=null and cashOut.status!=-2">
and c.state = #{cashOut.status}
</if>
<if test="cashOut.zhifubao!=null and cashOut.zhifubao!=''">
and c.zhifubao like concat("%",#{cashOut.zhifubao},"%")
</if>
<if test="cashOut.zhifubaoName!=null and cashOut.zhifubaoName!=''">
and c.zhifubao_name like concat("%",#{cashOut.zhifubaoName},"%")
</if>
<if test="cashOut.startTime!=null and cashOut.startTime!='' and (cashOut.endTime!=null and cashOut.endTime!='')">
and date_format(c.create_at,'%Y-%m-%d') BETWEEN #{cashOut.startTime} and #{cashOut.endTime}
</if>
<if test="cashOut.startTime!=null and cashOut.startTime!='' and (cashOut.endTime==null or cashOut.endTime=='')">
and date_format(c.create_at,'%Y-%m-%d') &gt;= #{cashOut.startTime}
</if>
<if test="cashOut.endTime!=null and cashOut.endTime!='' and (cashOut.startTime==null or cashOut.startTime=='')">
and date_format(c.create_at,'%Y-%m-%d') &lt;= #{cashOut.endTime}
</if>
</where>
order by c.create_at desc
</select>
<select id="selectCashOutList" resultType="com.sqx.modules.pay.entity.CashOut">
SELECT c.*,
ifnull(u.user_name,"用户不存在") as userName,
s.username as sysUserName
FROM cash_out c
left join tb_user u on c.user_id = u.user_id
left join sys_user s on s.user_id= c.sys_user_id
<where>
<if test="cashOut.userName!=null and cashOut.userName!=''">
and u.user_name like concat("%",#{cashOut.userName},"%")
</if>
<if test="cashOut.state!=null">
and c.state = #{cashOut.state}
</if>
<if test="cashOut.userId!=null">
and c.user_id = #{cashOut.userId}
</if>
<if test="cashOut.sysUserId!=null">
and c.sys_user_id = #{cashOut.sysUserId}
</if>
<if test="cashOut.userType!=null">
and c.user_type = #{cashOut.userType}
</if>
<if test="cashOut.status!=null and cashOut.status!=-2">
and c.state = #{cashOut.status}
</if>
<if test="cashOut.zhifubao!=null and cashOut.zhifubao!=''">
and c.zhifubao like concat("%",#{cashOut.zhifubao},"%")
</if>
<if test="cashOut.zhifubaoName!=null and cashOut.zhifubaoName!=''">
and c.zhifubao_name like concat("%",#{cashOut.zhifubaoName},"%")
</if>
<if test="cashOut.startTime!=null and cashOut.startTime!='' and (cashOut.endTime!=null and cashOut.endTime!='')">
and date_format(c.create_at,'%Y-%m-%d') BETWEEN #{cashOut.startTime} and #{cashOut.endTime}
</if>
<if test="cashOut.startTime!=null and cashOut.startTime!='' and (cashOut.endTime==null or cashOut.endTime=='')">
and date_format(c.create_at,'%Y-%m-%d') &gt;= #{cashOut.startTime}
</if>
<if test="cashOut.endTime!=null and cashOut.endTime!='' and (cashOut.startTime==null or cashOut.startTime=='')">
and date_format(c.create_at,'%Y-%m-%d') &lt;= #{cashOut.endTime}
</if>
</where>
order by c.create_at desc
</select>
<update id="updateMayMoney">
update user_money set
<if test="type==1">
money=money+#{money}
</if>
<if test="type==2">
money=money-#{money}
</if>
where user_id=#{userId}
</update>
</mapper>

View File

@@ -0,0 +1,177 @@
<?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.sqx.modules.pay.dao.PayDetailsDao">
<select id="selectById" resultType="com.sqx.modules.pay.entity.PayDetails">
select * from pay_details d where d.id=#{id}
</select>
<select id="selectByRemark" resultType="com.sqx.modules.pay.entity.PayDetails">
select * from pay_details d where d.remark=#{remark}
</select>
<select id="selectByOrderId" resultType="com.sqx.modules.pay.entity.PayDetails">
select * from pay_details d where d.order_id=#{orderId}
</select>
<update id="updateState">
update pay_details set `state`=#{state},pay_time=#{time},trade_no=#{tradeNo} where id=#{id}
</update>
<select id=" selectPayDetails" resultType="Map">
select s.id,s.classify,s.order_id as orderId,s.money,s.user_id as userId,
s.state,s.create_time as createTime,s.pay_time as payTime,u.user_name as userName,u.phone
from pay_details s
left join tb_user u on u.user_id=s.user_id
where 1=1
<if test="startTime!=null and startTime!=''and endTime!=null and endTime!='' ">
and str_to_date(s.create_time, '%Y-%m-%d') between str_to_date(#{startTime}, '%Y-%m-%d') AND str_to_date(#{endTime}, '%Y-%m-%d')
</if>
<if test="userId!=null">
and u.user_id=#{userId}
</if>
<if test="state!=null and state!=-1">
and s.state=#{state}
</if>
<if test="state==null or state==-1">
and s.state!=-1
</if>
group by s.id
order by s.create_time desc
</select>
<select id="selectPayDetails" resultType="Map">
select s.id,s.classify,s.order_id as orderId,s.money,s.user_id as userId,s.pay_diamond as payDiamond,s.diamond,
s.state,s.create_time as createTime,s.pay_time as payTime,u.user_name as userName,u.phone
from pay_details s
left join tb_user u on u.user_id=s.user_id
where 1=1
<if test="startTime!=null and startTime!=''and endTime!=null and endTime!='' ">
and str_to_date(s.create_time, '%Y-%m-%d') between str_to_date(#{startTime}, '%Y-%m-%d') AND
str_to_date(#{endTime}, '%Y-%m-%d')
</if>
<if test="userName!=null and userName!=''">
and u.user_name like concat("%",#{userName},"%")
</if>
<if test="orderId!=null and orderId!=''">
and s.order_id like concat("%",#{orderId},"%")
</if>
<if test="userId!=null">
and u.user_id=#{userId}
</if>
<if test="state!=null and state!=-1">
and s.state=#{state}
</if>
<if test="state==null or state==-1">
and s.state!=-1
</if>
group by s.id
order by s.create_time desc
</select>
<select id="selectSumPay" resultType="Double">
select sum(money) from pay_details
where str_to_date(create_time, '%Y-%m-%d') BETWEEN str_to_date(#{createTime}, '%Y-%m-%d') AND str_to_date(#{endTime}, '%Y-%m-%d')
<if test="userId!=null">
and user_id=#{userId}
</if>
and state=1
</select>
<select id="selectSumMember" resultType="Double">
select sum(money) from pay_details where state=1 and `type`=2
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectSumPayByState" resultType="Double">
select sum(money) from pay_details where 1=1
<if test="state!=null">
and state=#{state}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
</select>
<select id="selectSumPayByClassify" resultType="Double">
select sum(money) from pay_details where 1=1
<if test="classify!=null">
and classify=#{classify}
</if>
<if test="flag!=null and flag==1">
and date_format(create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(create_time,'%Y')=date_format(#{time},'%Y')
</if>
<if test="payClassify!=null and payClassify!=0">
and pay_classify=#{payClassify}
</if>
and state=1
</select>
<select id="payMemberAnalysis" resultType="Map">
SELECT
d.classify,d.money,d.pay_time as payTime,d.remark,d.user_id as userId,u.user_name as nickName
FROM
`pay_details` d
left join tb_user u on u.user_id=d.user_id
WHERE
d.type = 2
AND d.state =1
<if test="flag!=null and flag==1">
and date_format(d.create_time,'%Y-%m-%d')=date_format(#{time},'%Y-%m-%d')
</if>
<if test="flag!=null and flag==2">
and date_format(d.create_time,'%Y-%m')=date_format(#{time},'%Y-%m')
</if>
<if test="flag!=null and flag==3">
and date_format(d.create_time,'%Y')=date_format(#{time},'%Y')
</if>
order by d.pay_time desc
</select>
<select id="instantselectSumPay" resultType="Double">
select sum(money) from pay_details where 1=1
and date_format(create_time,'%Y-%m')=date_format(#{date},'%Y-%m')
and state=1 and user_id=#{userId}
</select>
<select id="selectUserMemberList" resultType="Map">
select s.classify,s.money,s.remark,u.nick_name as nickName,u.user_id as userId,u.member from pay_details s
left join tb_user u on s.user_id=u.user_id
where s.state=-1 and s.`type`=2
<if test="phone!=null and phone!=''">
and u.phone=#{phone}
</if>
order by s.create_time desc
</select>
<select id="selectPayCount" resultType="int">
select count(*) from pay_details
where `state`=1 and user_id=#{userId}
</select>
</mapper>

View File

@@ -0,0 +1,80 @@
<?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.sqx.modules.sdk.dao.SdkInfoDao">
<select id="getSdkPage" resultType="com.sqx.modules.sdk.entity.SdkInfo">
SELECT s.*,
u.`user_name` AS nickName,
su.username as sysUserName
FROM sdk_info s
LEFT JOIN tb_user u ON s.user_id = u.user_id
left join sys_user su on su.user_id=s.sys_user_id
where 1=1
<if test="sdkInfo.nickName!=null and sdkInfo.nickName!=''">
and u.user_name like concat("%",#{sdkInfo.nickName},"%")
</if>
<if test="sdkInfo.sdkContent!=null and sdkInfo.sdkContent!=''">
and s.sdk_content like concat("%",#{sdkInfo.sdkContent},"%")
</if>
<if test="sdkInfo.sdkRemarks!=null and sdkInfo.sdkRemarks!=''">
and s.sdk_remarks like concat("%",#{sdkInfo.sdkRemarks},"%")
</if>
<if test="sdkInfo.typeId!=null">
and s.type_id = #{sdkInfo.typeId}
</if>
<if test="sdkInfo.userId!=null">
and s.user_id = #{sdkInfo.userId}
</if>
<if test="sdkInfo.sysUserId!=null">
and s.sys_user_id = #{sdkInfo.sysUserId}
</if>
<if test="sdkInfo.sysUserName!=null and sdkInfo.sysUserName!=''">
and su.username like concat("%",#{sdkInfo.sysUserName},"%")
</if>
<if test="sdkInfo.status!=null">
and s.status = #{sdkInfo.status}
</if>
<if test="sdkInfo.startTime!=null and sdkInfo.startTime!=''">
and date_format(s.create_time,'%Y-%m-%d') >= date_format(#{sdkInfo.startTime},'%Y-%m-%d')
</if>
<if test="sdkInfo.endTime!=null and sdkInfo.endTime!=''">
and date_format(s.create_time,'%Y-%m-%d') &lt;= date_format(#{sdkInfo.endTime},'%Y-%m-%d')
</if>
order by s.create_time desc
</select>
<select id="getSdkList" resultType="com.sqx.modules.sdk.entity.SdkInfo">
SELECT s.*,
u.`user_name` AS nickName
FROM sdk_info s
LEFT JOIN tb_user u ON s.user_id = u.user_id
where 1=1
<if test="sdkInfo.nickName!=null and sdkInfo.nickName!=''">
and u.user_name like concat("%",#{sdkInfo.nickName},"%")
</if>
<if test="sdkInfo.sdkContent!=null and sdkInfo.sdkContent!=''">
and s.sdk_content like concat("%",#{sdkInfo.sdkContent},"%")
</if>
<if test="sdkInfo.sdkRemarks!=null and sdkInfo.sdkRemarks!=''">
and s.sdk_remarks like concat("%",#{sdkInfo.sdkRemarks},"%")
</if>
<if test="sdkInfo.typeId!=null">
and s.type_id = #{sdkInfo.typeId}
</if>
<if test="sdkInfo.userId!=null">
and s.user_id = #{sdkInfo.userId}
</if>
<if test="sdkInfo.status!=null">
and s.status = #{sdkInfo.status}
</if>
<if test="sdkInfo.startTime!=null and sdkInfo.startTime!=''">
and date_format(s.create_time,'%Y-%m-%d') >= date_format(#{sdkInfo.startTime},'%Y-%m-%d')
</if>
<if test="sdkInfo.endTime!=null and sdkInfo.endTime!=''">
and date_format(s.create_time,'%Y-%m-%d') &lt;= date_format(#{sdkInfo.endTime},'%Y-%m-%d')
</if>
order by s.create_time desc
</select>
</mapper>

View 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.sqx.modules.search.dao.AppSearchDao">
<select id="selectAppSearchNum" resultType="String">
select search_name AS searchName from search group by search_name order by count(search_name) desc limit 5
</select>
<delete id="deleteAppSearch">
delete from search where user_id=#{userId}
</delete>
</mapper>

View 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.sqx.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.sqx.modules.sys.entity.SysConfigEntity">
select * from sys_config where param_key = #{paramKey}
</select>
</mapper>

View 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.sqx.modules.sys.dao.SysDictDao">
</mapper>

View 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.sqx.modules.sys.dao.SysLogDao">
</mapper>

View 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.sqx.modules.sys.dao.SysMenuDao">
<select id="queryListParentId" resultType="com.sqx.modules.sys.entity.SysMenuEntity">
select * from sys_menu where parent_id = #{parentId} order by order_num asc
</select>
<select id="queryNotButtonList" resultType="com.sqx.modules.sys.entity.SysMenuEntity">
select * from sys_menu where type != 2 order by order_num asc
</select>
</mapper>

View 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.sqx.modules.sys.dao.SysRoleDao">
<!-- 查询用户创建的角色ID列表 -->
<select id="queryRoleIdList" resultType="long">
select role_id from sys_role where create_user_id = #{createUserId}
</select>
</mapper>

View 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.sqx.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>

View 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.sqx.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.sqx.modules.sys.entity.SysUserEntity">
select * from sys_user where username = #{username}
</select>
</mapper>

View 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.sqx.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>

View 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.sqx.modules.sys.dao.SysUserTokenDao">
<select id="queryByToken" resultType="com.sqx.modules.sys.entity.SysUserTokenEntity">
select * from sys_user_token where token = #{value}
</select>
</mapper>

File diff suppressed because one or more lines are too long

View 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}

File diff suppressed because one or more lines are too long

View 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}

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 445 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 455 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 B

View 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>&nbsp;</div>
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
</body>
</html>

File diff suppressed because it is too large Load Diff

View 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"
});

View 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;
}
};

View 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":"服务器返回"
});

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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)}}();

File diff suppressed because one or more lines are too long

View 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);

View 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);

View 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()})})};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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}}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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>

View 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>

File diff suppressed because one or more lines are too long

View 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":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"swagger-ui-standalone-preset.js","sources":["webpack:///swagger-ui-standalone-preset.js"],"mappings":"AAAA;AA+uFA;;;;;AAyOA;AAo7GA;AAw0FA;;;;;;AAmZA;AAivFA;AAu+CA;AAo+CA;AAirCA;AAuyEA","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"swagger-ui.css","sources":[],"mappings":"","sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"version":3,"file":"swagger-ui.js","sources":["webpack:///swagger-ui.js"],"mappings":"AAAA;AAylFA;;;;;;AAg5CA;AA2pHA;AA6qIA;AAi+FA;AAyvDA;AAmzCA;AA+xCA","sourceRoot":""}

File diff suppressed because one or more lines are too long