|
|
@@ -364,7 +364,7 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
QueryWrapper<LawyerConsultationOrderVO> queryWrapper = buildOrderQueryWrapper(
|
|
|
lawyerId, orderStatus, clientUserName, startDate, endDate);
|
|
|
QueryWrapper<LawyerConsultationOrderVO> statisticsWrapper = buildStatisticsQueryWrapper(
|
|
|
- lawyerId, clientUserName);
|
|
|
+ lawyerId, clientUserName,startDate, endDate);
|
|
|
|
|
|
// 查询订单列表
|
|
|
IPage<LawyerConsultationOrderVO> voPage = consultationOrderMapper.getLawyerConsultationOrderInfo(
|
|
|
@@ -526,11 +526,20 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
* @return 统计查询条件包装器
|
|
|
*/
|
|
|
private QueryWrapper<LawyerConsultationOrderVO> buildStatisticsQueryWrapper(String lawyerId,
|
|
|
- String clientUserName) {
|
|
|
+ String clientUserName, String startDate, String endDate) {
|
|
|
QueryWrapper<LawyerConsultationOrderVO> queryWrapper = new QueryWrapper<>();
|
|
|
queryWrapper.eq("lco.lawyer_user_id", lawyerId);
|
|
|
queryWrapper.eq("lco.delete_flag", 0);
|
|
|
|
|
|
+ // 时间范围条件
|
|
|
+ if (StringUtils.hasText(startDate)) {
|
|
|
+ queryWrapper.ge("lco.payment_time", startDate);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.hasText(endDate)) {
|
|
|
+ queryWrapper.le("lco.payment_time", endDate);
|
|
|
+ }
|
|
|
+
|
|
|
if (StringUtils.hasText(clientUserName)) {
|
|
|
queryWrapper.like("lur.user_name", clientUserName);
|
|
|
}
|
|
|
@@ -698,6 +707,13 @@ public class LawyerClientConsultationOrderServiceImpl extends ServiceImpl<Lawyer
|
|
|
order.setOrderStatus(inProgressStatus);
|
|
|
order.setAcceptOrdersTime(acceptTime);
|
|
|
order.setUpdatedTime(acceptTime);
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+ LocalDateTime validityDateTime = now.plusDays(3)
|
|
|
+ .withHour(0)
|
|
|
+ .withMinute(0)
|
|
|
+ .withSecond(0)
|
|
|
+ .withNano(0);
|
|
|
+ order.setValidityPeriod(Date.from(validityDateTime.atZone(ZoneId.systemDefault()).toInstant()));
|
|
|
|
|
|
// 执行更新操作
|
|
|
boolean result = this.updateById(order);
|