日期问题
This commit is contained in:
@@ -23,6 +23,7 @@ import com.sqx.modules.pay.service.PayDetailsService;
|
|||||||
import com.sqx.modules.sys.entity.SysUserEntity;
|
import com.sqx.modules.sys.entity.SysUserEntity;
|
||||||
import com.sqx.modules.sys.service.SysUserService;
|
import com.sqx.modules.sys.service.SysUserService;
|
||||||
import com.sqx.modules.utils.EasyPoi.ExcelUtils;
|
import com.sqx.modules.utils.EasyPoi.ExcelUtils;
|
||||||
|
import com.sqx.modules.utils.TimeCompleteUtils;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import io.swagger.annotations.ApiParam;
|
import io.swagger.annotations.ApiParam;
|
||||||
@@ -270,7 +271,7 @@ public class UserController {
|
|||||||
@ApiOperation("短剧分析")
|
@ApiOperation("短剧分析")
|
||||||
public Result courseMessage(Long page, Long limit, String date, int type, Long sysUserId) {
|
public Result courseMessage(Long page, Long limit, String date, int type, Long sysUserId) {
|
||||||
Page<Map<String, Object>> iPage = new Page<>(page, limit);
|
Page<Map<String, Object>> iPage = new Page<>(page, limit);
|
||||||
IPage<Map<String, Object>> mapIPage = userService.queryCourseOrder(iPage, type, date, sysUserId);
|
IPage<Map<String, Object>> mapIPage = userService.queryCourseOrder(iPage, type, TimeCompleteUtils.completeStartTime(date), sysUserId);
|
||||||
return Result.success().put("data", new PageUtils(mapIPage));
|
return Result.success().put("data", new PageUtils(mapIPage));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,6 +281,7 @@ public class UserController {
|
|||||||
@GetMapping("/userMessage")
|
@GetMapping("/userMessage")
|
||||||
@ApiOperation("用户分析")
|
@ApiOperation("用户分析")
|
||||||
public Result userMessage(String date, int type, Long sysUserId) {
|
public Result userMessage(String date, int type, Long sysUserId) {
|
||||||
|
date = TimeCompleteUtils.completeStartTime(date);
|
||||||
String qdCode = null;
|
String qdCode = null;
|
||||||
if (sysUserId != null) {
|
if (sysUserId != null) {
|
||||||
qdCode = sysUserService.getById(sysUserId).getQdCode();
|
qdCode = sysUserService.getById(sysUserId).getQdCode();
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ import com.sqx.modules.pay.controller.app.AliPayController;
|
|||||||
import com.sqx.modules.pay.service.DyService;
|
import com.sqx.modules.pay.service.DyService;
|
||||||
import com.sqx.modules.pay.service.WxService;
|
import com.sqx.modules.pay.service.WxService;
|
||||||
import com.sqx.modules.utils.AliPayOrderUtil;
|
import com.sqx.modules.utils.AliPayOrderUtil;
|
||||||
|
import com.sqx.modules.utils.TimeCompleteUtils;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -657,8 +658,9 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||||||
Integer flag, String time, String userName, Integer ordersType, String startTime, String endTime,
|
Integer flag, String time, String userName, Integer ordersType, String startTime, String endTime,
|
||||||
Long sysUserId, String qdCode, String sysUserName) {
|
Long sysUserId, String qdCode, String sysUserName) {
|
||||||
Page<Orders> pages = new Page<>(page, limit);
|
Page<Orders> pages = new Page<>(page, limit);
|
||||||
|
|
||||||
return Result.success().put("data", new PageUtils(baseMapper.selectOrdersByOrdersNo(pages, ordersNo, status, userId, courseId,
|
return Result.success().put("data", new PageUtils(baseMapper.selectOrdersByOrdersNo(pages, ordersNo, status, userId, courseId,
|
||||||
flag, time, userName, ordersType, startTime, endTime, sysUserId, qdCode, sysUserName)));
|
flag, time, userName, ordersType, TimeCompleteUtils.completeStartTime(startTime), TimeCompleteUtils.completeEndTime(endTime), sysUserId, qdCode, sysUserName)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -127,13 +127,13 @@
|
|||||||
and o.sys_user_id=#{sysUserId}
|
and o.sys_user_id=#{sysUserId}
|
||||||
</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(o.create_time,'%Y-%m-%d') BETWEEN #{startTime} and #{endTime}
|
and o.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(o.create_time,'%Y-%m-%d') >= #{startTime}
|
and o.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(o.create_time,'%Y-%m-%d') <= #{endTime}
|
and o.create_time <= #{endTime}
|
||||||
</if>
|
</if>
|
||||||
order by o.create_time desc
|
order by o.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Reference in New Issue
Block a user