Merge remote-tracking branch 'origin/test' into test
This commit is contained in:
@@ -22,7 +22,7 @@ spring:
|
||||
# sharding-jdbc 配置
|
||||
shardingsphere:
|
||||
# 显示sharding-jdbc改写的sql语句
|
||||
show-sql: true
|
||||
show-sql: false
|
||||
|
||||
center-tables-data-node: duanju.%s
|
||||
# 区域表的数据源节点
|
||||
|
||||
@@ -22,7 +22,7 @@ spring:
|
||||
# sharding-jdbc 配置
|
||||
shardingsphere:
|
||||
# 显示sharding-jdbc改写的sql语句
|
||||
show-sql: true
|
||||
show-sql: false
|
||||
|
||||
center-tables-data-node: duanju.%s
|
||||
# 区域表的数据源节点
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<file>logs/duanju.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--生成日志文件名称-->
|
||||
<fileNamePattern>logs/duanju.%d{yyyy-MM-dd}.%i.log.gz</fileNamePattern>
|
||||
<fileNamePattern>logs/%d{yyyy-MM-dd}/duanju.%i.log.gz</fileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
|
||||
|
||||
<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,
|
||||
-- select u.*,v.is_vip as member,v.end_time as endTime,v.vip_type as vipType,
|
||||
select u.*,1 as member,
|
||||
s.username as sysUserName
|
||||
from tb_user u
|
||||
left join user_vip v on v.user_id=u.user_id
|
||||
-- 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="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>
|
||||
@@ -32,15 +33,15 @@
|
||||
<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="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>
|
||||
|
||||
@@ -6,32 +6,21 @@
|
||||
select c.course_id as courseId
|
||||
, c.course_details_id as courseDetailsId
|
||||
, c.course_details_name as courseDetailsName
|
||||
, c.video_url as videoUrl
|
||||
, c.price as countPrice
|
||||
, c.sort as sort
|
||||
, ifnull(#{price}, 0) as price
|
||||
, ifnull(#{wholesalePrice}, 0) as wholesalePrice
|
||||
, IF(#{isPrice} = 1, c.is_price, 2) AS isPrice
|
||||
, c.title_img as titleImg
|
||||
, c.good_num as goodNum
|
||||
, c.sort as sort
|
||||
, IF(#{collect} = 1, 1, 0) AS isCollect
|
||||
from course_details c
|
||||
where c.course_id = #{courseId}
|
||||
order by c.sort asc
|
||||
</select>
|
||||
|
||||
<select id="courseDetails" resultType="com.sqx.modules.course.vo.CourseDetailsVo">
|
||||
select c.course_id as courseId
|
||||
, c.course_details_id as courseDetailsId
|
||||
, c.course_details_name as courseDetailsName
|
||||
, c.title_img as titleImg
|
||||
, c.video_url as videoUrl
|
||||
, c.good_num as goodNum
|
||||
, c.sort as sort
|
||||
, IF(#{collect} = 1, 1, 0) AS isCollect
|
||||
from course_details c
|
||||
where c.course_id = #{courseId}
|
||||
and sort > #{starSort}
|
||||
and sort < #{endSort}
|
||||
order by c.sort asc
|
||||
</select>
|
||||
|
||||
<!--查找指定短剧的目录 按照顺序数字升序-->
|
||||
<select id="findByCourseId" resultType="com.sqx.modules.course.entity.CourseDetails">
|
||||
select
|
||||
|
||||
@@ -205,7 +205,8 @@
|
||||
</select>
|
||||
|
||||
<select id="selectOrdersMoney" resultType="Double">
|
||||
select ifnull(sum(pay_money),0.00) from orders where 1=1
|
||||
select sum(pay_money) from orders
|
||||
where 1=1
|
||||
<if test="sysUserId!=null">
|
||||
and sys_user_id=#{sysUserId}
|
||||
</if>
|
||||
@@ -232,16 +233,13 @@
|
||||
<select id="selectFenXiaoMoney" resultType="Double">
|
||||
select
|
||||
<if test="type==1">
|
||||
ifnull(sum(one_money),0.00)
|
||||
sum(ifnull(one_money,0.00))
|
||||
</if>
|
||||
<if test="type==2">
|
||||
ifnull(sum(two_money),0.00)
|
||||
sum(ifnull(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)
|
||||
sum(ifnull(qd_money,0.00))
|
||||
</if>
|
||||
from orders
|
||||
where status=1
|
||||
|
||||
@@ -61,10 +61,24 @@
|
||||
GROUP BY
|
||||
user_id
|
||||
</select>
|
||||
|
||||
|
||||
<select id="countByUserIdList" resultType="com.sqx.modules.pay.entity.CashOut">
|
||||
SELECT user_id as userId,
|
||||
ROUND(SUM(CASE WHEN state = 1 THEN money ELSE 0 END), 2) AS total,
|
||||
COUNT(CASE WHEN state = 1 THEN 1 END) AS count,
|
||||
ROUND(SUM(CASE WHEN state = 3 THEN money ELSE 0 END), 2) AS verifyTotal,
|
||||
COUNT(CASE WHEN state = 3 THEN 1 END) AS verifyCount
|
||||
FROM cash_out
|
||||
GROUP BY user_id;
|
||||
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCashOutPage" resultType="com.sqx.modules.pay.entity.CashOut">
|
||||
SELECT c.*,
|
||||
ifnull(u.user_name,"用户不存在") as userName,
|
||||
s.username as sysUserName
|
||||
ifnull(u.user_name,"用户不存在") as userName
|
||||
# s.username as sysUserName
|
||||
<if test="isApp == false">
|
||||
,ifnull(t.total,0.00) as total,
|
||||
ifnull(t.count,0) as count,
|
||||
@@ -73,7 +87,7 @@
|
||||
</if>
|
||||
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
|
||||
# left join sys_user s on s.user_id= c.sys_user_id
|
||||
<if test="isApp == false">
|
||||
left join (select user_id,ROUND(sum(money),2) as total,count(*) as count from cash_out where state = 1 GROUP BY user_id) t on c.user_id = t.user_id
|
||||
left join (select user_id,ROUND(sum(money),2) as total,count(*) as count from cash_out where state = 3 GROUP BY user_id) t1 on c.user_id = t1.user_id
|
||||
@@ -91,9 +105,9 @@
|
||||
<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.sysUserName!=null and cashOut.sysUserName!=''">-->
|
||||
<!-- and s.username = #{cashOut.sysUserName}-->
|
||||
<!-- </if>-->
|
||||
<if test="cashOut.userType!=null">
|
||||
and c.user_type = #{cashOut.userType}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user