|
|
@@ -3,6 +3,7 @@ package shop.alien.store.service.impl;
|
|
|
import com.alibaba.fastjson2.JSONArray;
|
|
|
import com.alibaba.fastjson2.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
@@ -44,13 +45,14 @@ public class StoreCashOutRecordServiceImpl extends ServiceImpl<StoreCashOutRecor
|
|
|
|
|
|
@Override
|
|
|
public StoreCashOutRecordVo getCashOutRecordList(Integer storeId, String cashOutStartTime, String cashOutEndTime, Integer page, Integer size, String paymentStatus) {
|
|
|
- LambdaQueryWrapper<StoreCashOutRecord> wrapper = new LambdaQueryWrapper<>();
|
|
|
- wrapper.eq(StoreCashOutRecord::getStoreId, storeId);
|
|
|
- wrapper.eq(StringUtils.isNotBlank(paymentStatus), StoreCashOutRecord::getPaymentStatus, paymentStatus);
|
|
|
- wrapper.le(StringUtils.isNotBlank(cashOutEndTime) , StoreCashOutRecord::getCreatedTime, cashOutEndTime + " 23:59:59");
|
|
|
- wrapper.ge(StringUtils.isNotBlank(cashOutStartTime), StoreCashOutRecord::getCreatedTime, cashOutStartTime + " 00:00:00" );
|
|
|
- wrapper.orderByDesc(StoreCashOutRecord::getCreatedTime);
|
|
|
- List<StoreCashOutRecord> recordList = storeCashOutRecordMapper.selectList(wrapper);
|
|
|
+ QueryWrapper<StoreCashOutRecord> wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.eq("scor.store_id", storeId);
|
|
|
+ wrapper.eq(StringUtils.isNotBlank(paymentStatus), "scor.payment_status", paymentStatus);
|
|
|
+ wrapper.le(StringUtils.isNotBlank(cashOutEndTime) , "scor.created_time", cashOutEndTime + " 23:59:59");
|
|
|
+ wrapper.ge(StringUtils.isNotBlank(cashOutStartTime), "scor.created_time", cashOutStartTime + " 00:00:00" );
|
|
|
+ wrapper.eq("scor.delete_flag", 0);
|
|
|
+ wrapper.orderByDesc("scor.created_time");
|
|
|
+ List<StoreCashOutRecord> recordList = storeCashOutRecordMapper.selectCashoutRecordList(wrapper);
|
|
|
IPage<StoreCashOutRecord> storeCashOutRecordIPage = ListToPage.setPage(recordList, page, size);
|
|
|
StoreCashOutRecordVo vo = new StoreCashOutRecordVo();
|
|
|
vo.setCashOutRecordList( storeCashOutRecordIPage.getRecords());
|