Merge remote-tracking branch 'origin/test' into test
# Conflicts: # src/main/resources/mapper/course/CourseDao.xml
This commit is contained in:
@@ -31,7 +31,7 @@ public interface UserDao extends BaseMapper<UserEntity> {
|
|||||||
|
|
||||||
Double queryPayMoney(@Param("type") int type, @Param("date") String date,String qdCode);
|
Double queryPayMoney(@Param("type") int type, @Param("date") String date,String qdCode);
|
||||||
|
|
||||||
IPage<Map<String, Object>> queryCourseOrder(Page iPage,@Param("type") int type, @Param("date") String date,Long sysUserId);
|
IPage<Map<String, Object>> queryCourseOrder(Page iPage,@Param("type") int type, @Param("start") String start, @Param("end") String end,Long sysUserId);
|
||||||
|
|
||||||
int userMessage( String date, int type,String qdCode,Integer vipType);
|
int userMessage( String date, int type,String qdCode,Integer vipType);
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.sqx.modules.app.service.impl;
|
package com.sqx.modules.app.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import cn.hutool.core.thread.ThreadUtil;
|
import cn.hutool.core.thread.ThreadUtil;
|
||||||
import cn.hutool.json.JSONUtil;
|
import cn.hutool.json.JSONUtil;
|
||||||
@@ -55,6 +56,7 @@ import com.sqx.modules.sys.service.SysUserService;
|
|||||||
import com.sqx.modules.utils.HttpClientUtil;
|
import com.sqx.modules.utils.HttpClientUtil;
|
||||||
import com.sqx.modules.utils.InvitationCodeUtil;
|
import com.sqx.modules.utils.InvitationCodeUtil;
|
||||||
import com.sqx.modules.utils.MD5Util;
|
import com.sqx.modules.utils.MD5Util;
|
||||||
|
import com.sqx.modules.utils.TimeCompleteUtils;
|
||||||
import com.tencentcloudapi.common.Credential;
|
import com.tencentcloudapi.common.Credential;
|
||||||
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
|
||||||
import com.tencentcloudapi.common.profile.ClientProfile;
|
import com.tencentcloudapi.common.profile.ClientProfile;
|
||||||
@@ -1335,7 +1337,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||||||
String invitationCode, String startTime, String endTime, String qdCode, String sysUserName, Integer vipType) {
|
String invitationCode, String startTime, String endTime, String qdCode, String sysUserName, Integer vipType) {
|
||||||
Page<UserEntity> pages = new Page<>(page, limit);
|
Page<UserEntity> pages = new Page<>(page, limit);
|
||||||
return new PageUtils(baseMapper.selectUserPage(pages, search, sex, platform, sysPhone, status, member,
|
return new PageUtils(baseMapper.selectUserPage(pages, search, sex, platform, sysPhone, status, member,
|
||||||
inviterCode, userName, invitationCode, startTime, endTime, qdCode, sysUserName, vipType));
|
inviterCode, userName, invitationCode, TimeCompleteUtils.completeStartTime(startTime), TimeCompleteUtils.completeEndTime(endTime), qdCode, sysUserName, vipType));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -1367,7 +1369,18 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<Map<String, Object>> queryCourseOrder(Page<Map<String, Object>> iPage, int type, String date, Long sysUserId) {
|
public IPage<Map<String, Object>> queryCourseOrder(Page<Map<String, Object>> iPage, int type, String date, Long sysUserId) {
|
||||||
return baseMapper.queryCourseOrder(iPage, type, date, sysUserId);
|
DateTime parse = DateUtil.parse(date, "yyyy-MM-dd");
|
||||||
|
|
||||||
|
String startTime = DateUtil.format(parse, "yyyy-MM-dd 00:00:00");
|
||||||
|
String endTime = DateUtil.format(parse, "yyyy-MM-dd 23:59:59");
|
||||||
|
if (type == 2) {
|
||||||
|
startTime = DateUtil.format(DateUtil.beginOfMonth(parse), "yyyy-MM-dd 00:00:00");
|
||||||
|
endTime = DateUtil.format(DateUtil.endOfMonth(parse), "yyyy-MM-dd 23:59:59");
|
||||||
|
} else if (type == 3) {
|
||||||
|
startTime = DateUtil.format(DateUtil.beginOfYear(parse), "yyyy-MM-dd 00:00:00");
|
||||||
|
endTime = DateUtil.format(DateUtil.endOfYear(parse), "yyyy-MM-dd 23:59:59");
|
||||||
|
}
|
||||||
|
return baseMapper.queryCourseOrder(iPage, type, startTime, endTime, sysUserId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -70,6 +70,14 @@ public class AppMessageController {
|
|||||||
return Result.success();
|
return Result.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Login
|
||||||
|
@PostMapping("/sendMessage")
|
||||||
|
@ApiOperation("添加投诉")
|
||||||
|
public Result sendMessage(@RequestBody MessageInfo messageInfo){
|
||||||
|
messageService.saveBody(messageInfo);
|
||||||
|
return Result.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public class OrdersController extends AbstractController {
|
|||||||
Double tuiMemberOrdersMoney = ordersService.selectOrdersMoney(2, 2, flag, time, null, sysUserId);
|
Double tuiMemberOrdersMoney = ordersService.selectOrdersMoney(2, 2, flag, time, null, sysUserId);
|
||||||
//提现
|
//提现
|
||||||
Integer cashCount = cashOutDao.selectCount(new QueryWrapper<CashOut>()
|
Integer cashCount = cashOutDao.selectCount(new QueryWrapper<CashOut>()
|
||||||
.eq("sys_user_id", sysUserId)
|
// .eq("sys_user_id", sysUserId)
|
||||||
.eq("state", 1)
|
.eq("state", 1)
|
||||||
.gt("create_at", DateUtil.format(DateUtil.parse(time, "yyyy-MM-dd"), "yyyy-MM-dd HH:mm:ss")));
|
.gt("create_at", DateUtil.format(DateUtil.parse(time, "yyyy-MM-dd"), "yyyy-MM-dd HH:mm:ss")));
|
||||||
Double cashSum = cashOutDao.selectSysUserCashOutSum(sysUserId, DateUtil.format(DateUtil.parse(time, "yyyy-MM-dd"), "yyyy-MM-dd HH:mm:ss"));
|
Double cashSum = cashOutDao.selectSysUserCashOutSum(sysUserId, DateUtil.format(DateUtil.parse(time, "yyyy-MM-dd"), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.sqx.modules.pay.controller;
|
package com.sqx.modules.pay.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.AlipayApiException;
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
@@ -211,9 +213,21 @@ public class CashController {
|
|||||||
@ApiOperation("财务提现统计")
|
@ApiOperation("财务提现统计")
|
||||||
@GetMapping("/statisticsCashMoney")
|
@GetMapping("/statisticsCashMoney")
|
||||||
public Result statisticsMoney(String time, Integer flag) {
|
public Result statisticsMoney(String time, Integer flag) {
|
||||||
Double sumMoney = cashOutService.sumMoney(time, flag);
|
DateTime parse = DateUtil.parse(time, "yyyy-MM-dd");
|
||||||
Integer countMoney = cashOutService.countMoney(time, flag);
|
|
||||||
Integer stayMoney = cashOutService.stayMoney(time, flag);
|
String startTime = DateUtil.format(parse, "yyyy-MM-dd 00:00:00");
|
||||||
|
String endTime = DateUtil.format(parse, "yyyy-MM-dd 23:59:59");
|
||||||
|
if (flag == 2) {
|
||||||
|
startTime = DateUtil.format(DateUtil.beginOfMonth(parse), "yyyy-MM-dd 00:00:00");
|
||||||
|
endTime = DateUtil.format(DateUtil.endOfMonth(parse), "yyyy-MM-dd 23:59:59");
|
||||||
|
} else if (flag == 3) {
|
||||||
|
startTime = DateUtil.format(DateUtil.beginOfYear(parse), "yyyy-MM-dd 00:00:00");
|
||||||
|
endTime = DateUtil.format(DateUtil.endOfYear(parse), "yyyy-MM-dd 23:59:59");
|
||||||
|
}
|
||||||
|
|
||||||
|
Double sumMoney = cashOutService.sumMoney(startTime, endTime, flag);
|
||||||
|
Integer countMoney = cashOutService.countMoney(startTime, endTime, flag);
|
||||||
|
Integer stayMoney = cashOutService.stayMoney(startTime, endTime, flag);
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("sumMoney", sumMoney == null ? 0.00 : sumMoney);
|
map.put("sumMoney", sumMoney == null ? 0.00 : sumMoney);
|
||||||
map.put("countMoney", countMoney == null ? 0 : countMoney);
|
map.put("countMoney", countMoney == null ? 0 : countMoney);
|
||||||
|
|||||||
@@ -32,11 +32,11 @@ public interface CashOutDao extends BaseMapper<CashOut> {
|
|||||||
|
|
||||||
Double selectSysUserCashOutSum(@Param("sysUserId") Long sysUserId, @Param("time") String time);
|
Double selectSysUserCashOutSum(@Param("sysUserId") Long sysUserId, @Param("time") String time);
|
||||||
|
|
||||||
Double sumMoney(@Param("time") String time, @Param("flag") Integer flag);
|
Double sumMoney(@Param("start") String start, @Param("end") String end, @Param("flag") Integer flag);
|
||||||
|
|
||||||
Integer countMoney(@Param("time") String time, @Param("flag") Integer flag);
|
Integer countMoney(@Param("start") String start, @Param("end") String end, @Param("flag") Integer flag);
|
||||||
|
|
||||||
Integer stayMoney(@Param("time") String time, @Param("flag") Integer flag);
|
Integer stayMoney(@Param("start") String start, @Param("end") String end, @Param("flag") Integer flag);
|
||||||
|
|
||||||
void updateMayMoney(@Param("type") Integer type, @Param("userId") Long userId, @Param("money") Double money);
|
void updateMayMoney(@Param("type") Integer type, @Param("userId") Long userId, @Param("money") Double money);
|
||||||
|
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ public interface CashOutService {
|
|||||||
|
|
||||||
Double selectCashOutSum(Long userId, Date startTime, Date endTime);
|
Double selectCashOutSum(Long userId, Date startTime, Date endTime);
|
||||||
|
|
||||||
Double sumMoney(String time, Integer flag);
|
Double sumMoney(String time, String end, Integer flag);
|
||||||
|
|
||||||
Integer countMoney(String time, Integer flag);
|
Integer countMoney(String time, String end, Integer flag);
|
||||||
|
|
||||||
Integer stayMoney(String time, Integer flag);
|
Integer stayMoney(String time, String end, Integer flag);
|
||||||
|
|
||||||
void updateMayMoney(int i, Long userId, Double money);
|
void updateMayMoney(int i, Long userId, Double money);
|
||||||
|
|
||||||
|
|||||||
@@ -250,18 +250,18 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Double sumMoney(String time, Integer flag) {
|
public Double sumMoney(String start, String end, Integer flag) {
|
||||||
return cashOutDao.sumMoney(time, flag);
|
return cashOutDao.sumMoney(start, end, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer countMoney(String time, Integer flag) {
|
public Integer countMoney(String start, String end, Integer flag) {
|
||||||
return cashOutDao.countMoney(time, flag);
|
return cashOutDao.countMoney(start, end, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer stayMoney(String time, Integer flag) {
|
public Integer stayMoney(String start, String end, Integer flag) {
|
||||||
return cashOutDao.stayMoney(time, flag);
|
return cashOutDao.stayMoney(start, end, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -52,13 +52,13 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
<if test="startTime!=null and startTime!='' and endTime!=null and endTime!=''">
|
||||||
and date_format(u.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
|
and u.create_time BETWEEN #{startTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
|
<if test="startTime!=null and startTime!='' and (endTime==null or endTime=='')">
|
||||||
and date_format(u.create_time,'%Y-%m-%d') >= #{startTime}
|
and u.create_time >= #{startTime}
|
||||||
</if>
|
</if>
|
||||||
<if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
|
<if test="endTime!=null and endTime!='' and (startTime==null or startTime=='')">
|
||||||
and date_format(u.create_time,'%Y-%m-%d') <= #{endTime}
|
and u.create_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
order by create_time desc
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
@@ -136,7 +136,6 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="queryCourseOrder" resultType="com.sqx.modules.app.response.CourseOrderResponse">
|
<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'
|
select c.course_id as courseId,sum(o.pay_money) as 'coursemoney' ,count(*) as 'coursenum',any_value(c.title) as 'coursename'
|
||||||
from orders o
|
from orders o
|
||||||
left join course c on o.course_id=c.course_id
|
left join course c on o.course_id=c.course_id
|
||||||
@@ -144,18 +143,9 @@
|
|||||||
<if test="sysUserId!=null">
|
<if test="sysUserId!=null">
|
||||||
and sys_user_id=#{sysUserId}
|
and sys_user_id=#{sysUserId}
|
||||||
</if>
|
</if>
|
||||||
<if test="type==1">
|
and o.create_time between #{start} and #{end}
|
||||||
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
|
group by c.course_id
|
||||||
) a
|
order by coursenum desc
|
||||||
order by a.coursenum desc
|
|
||||||
</select>
|
</select>
|
||||||
<select id="userMessage" resultType="int">
|
<select id="userMessage" resultType="int">
|
||||||
select count(*) from tb_user t
|
select count(*) from tb_user t
|
||||||
|
|||||||
@@ -6,6 +6,34 @@
|
|||||||
|
|
||||||
<select id="selectCourseByCollect" resultType="com.sqx.modules.course.entity.Course">
|
<select id="selectCourseByCollect" resultType="com.sqx.modules.course.entity.Course">
|
||||||
SELECT
|
SELECT
|
||||||
|
MAX(u.update_time) AS produceEndTime,
|
||||||
|
c.*,
|
||||||
|
d1.course_details_name AS courseDetailsName,
|
||||||
|
d1.course_details_id AS courseDetailsId,
|
||||||
|
COUNT(d2.course_details_id) AS courseDetailsCount
|
||||||
|
FROM
|
||||||
|
course_collect u
|
||||||
|
LEFT JOIN
|
||||||
|
course c ON u.course_id = c.course_id
|
||||||
|
LEFT JOIN
|
||||||
|
course_collect cc1 ON cc1.course_id = u.course_id
|
||||||
|
AND cc1.classify = 3
|
||||||
|
AND cc1.user_id = #{userId}
|
||||||
|
LEFT JOIN
|
||||||
|
course_details d1 ON cc1.course_details_id = d1.course_details_id
|
||||||
|
LEFT JOIN
|
||||||
|
course_details d2 ON d2.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, c.course_id
|
||||||
|
ORDER BY
|
||||||
|
produceEndTime DESC;
|
||||||
|
|
||||||
|
|
||||||
|
<!-- SELECT
|
||||||
MAX( u.update_time ) AS produceEndTime,
|
MAX( u.update_time ) AS produceEndTime,
|
||||||
c.*,
|
c.*,
|
||||||
(
|
(
|
||||||
@@ -46,6 +74,7 @@
|
|||||||
u.course_id
|
u.course_id
|
||||||
ORDER BY
|
ORDER BY
|
||||||
produceEndTime DESC
|
produceEndTime DESC
|
||||||
|
-->
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -30,43 +30,15 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="sumMoney" resultType="Double">
|
<select id="sumMoney" resultType="Double">
|
||||||
select sum(money) from cash_out where state =1
|
select sum(money) from cash_out where state = 1 and create_at between #{start} and #{end}
|
||||||
<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>
|
||||||
|
|
||||||
<select id="countMoney" resultType="Integer">
|
<select id="countMoney" resultType="Integer">
|
||||||
select count(*) from cash_out where
|
select count(*) from cash_out where create_at between #{start} and #{end}
|
||||||
<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>
|
||||||
|
|
||||||
<select id="stayMoney" resultType="Integer">
|
<select id="stayMoney" resultType="Integer">
|
||||||
select count(*) from cash_out where
|
select count(*) from cash_out where create_at between #{start} and #{end} and state=0
|
||||||
<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>
|
||||||
|
|
||||||
<select id="selectMayMoney" resultType="Double">
|
<select id="selectMayMoney" resultType="Double">
|
||||||
|
|||||||
Reference in New Issue
Block a user